/* 后台管理样式 */

/* 重置和基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: #f5f7fa;
    color: #333;
    overflow-x: hidden;
}

/* 主容器 */
.admin-container {
    display: flex;
    min-height: 100vh;
}

/* 侧边栏 */
.sidebar {
    width: 280px;
    background: linear-gradient(135deg, #4b4241 0%, #6b5b73 100%);
    color: white;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
}

.sidebar-header {
    padding: 2rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    font-weight: 400;
}

.sidebar-header p {
    font-size: 0.9rem;
    opacity: 0.8;
}

.sidebar-nav ul {
    list-style: none;
    padding: 1rem 0;
}

.sidebar-nav li {
    margin: 0.25rem 0;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.nav-link:hover,
.nav-link.active {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    border-left-color: #dcc5c0;
}

.nav-link i {
    margin-right: 0.75rem;
    width: 20px;
}

.sidebar-footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    padding: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* 主内容区 */
.main-content {
    flex: 1;
    margin-left: 280px;
    min-height: 100vh;
}

.content-header {
    background: white;
    padding: 2rem;
    border-bottom: 1px solid #e0e6ed;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.header-left h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    color: #4b4241;
    margin-bottom: 0.25rem;
}

.header-left p {
    color: #666;
    font-size: 0.95rem;
}

.header-right {
    display: flex;
    gap: 1rem;
}

/* 内容部分 */
.content-section {
    display: none;
    padding: 2rem;
}

.content-section.active {
    display: block;
}

/* 统计卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: linear-gradient(135deg, #4b4241, #866962);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1.5rem;
}

.stat-icon i {
    font-size: 1.5rem;
    color: white;
}

.stat-info h3 {
    font-size: 2rem;
    font-weight: 600;
    color: #4b4241;
    margin-bottom: 0.25rem;
}

.stat-info p {
    color: #666;
    font-size: 0.9rem;
}

/* 最近活动 */
.recent-activity {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.recent-activity h3 {
    color: #4b4241;
    margin-bottom: 1.5rem;
}

.activity-list {
    max-height: 300px;
    overflow-y: auto;
}

.activity-item {
    padding: 1rem;
    border-left: 3px solid #dcc5c0;
    background: #f8f9fa;
    margin-bottom: 1rem;
    border-radius: 6px;
}

.activity-item .time {
    font-size: 0.8rem;
    color: #666;
}

/* 部分头部 */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.section-header h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    color: #4b4241;
}

.search-bar {
    position: relative;
}

.search-bar input {
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 2px solid #e0e6ed;
    border-radius: 8px;
    font-size: 0.9rem;
    width: 300px;
    transition: border-color 0.3s ease;
}

.search-bar input:focus {
    outline: none;
    border-color: #4b4241;
}

.search-bar i {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
}

/* 模特网格 */
.models-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.model-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: transform 0.3s ease;
}

.model-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.model-card-image {
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.model-card-content {
    padding: 1.5rem;
}

.model-card h4 {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    color: #4b4241;
    margin-bottom: 0.5rem;
}

.model-card p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.model-card-actions {
    display: flex;
    gap: 0.5rem;
}

/* 表单样式 */
.form-container {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    max-width: 800px;
}

.model-form {
    max-width: 100%;
}

.form-section {
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e0e6ed;
}

.form-section:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
}

.form-section h4 {
    color: #4b4241;
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #4b4241;
    font-weight: 500;
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e0e6ed;
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #4b4241;
    box-shadow: 0 0 0 3px rgba(75, 66, 65, 0.1);
}

.form-group textarea {
    resize: vertical;
    line-height: 1.5;
}

/* 图片上传区域 */
.image-upload-area {
    border: 2px dashed #dcc5c0;
    border-radius: 12px;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.image-upload-area:hover {
    border-color: #4b4241;
    background-color: #f8f9fa;
}

.image-upload-area.dragover {
    border-color: #4b4241;
    background-color: #f0f8ff;
}

.image-upload-area i {
    font-size: 2rem;
    color: #dcc5c0;
    margin-bottom: 1rem;
}

.image-upload-area p {
    color: #666;
    margin: 0;
}

.image-preview {
    margin-top: 1rem;
}

.image-preview img {
    max-width: 200px;
    max-height: 200px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 按钮 */
.btn {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.btn i {
    margin-right: 0.5rem;
}

.btn-primary {
    background: #4b4241;
    color: white;
}

.btn-primary:hover {
    background: #3a3230;
    transform: translateY(-1px);
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
    transform: translateY(-1px);
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

.btn-warning {
    background: #ffc107;
    color: #212529;
}

.btn-warning:hover {
    background: #e0a800;
    transform: translateY(-1px);
}

.btn-info {
    background: #17a2b8;
    color: white;
}

.btn-info:hover {
    background: #138496;
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.8);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
}

/* 设置页面 */
.settings-container {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    max-width: 800px;
}

.settings-group {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e0e6ed;
}

.settings-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.settings-group h3 {
    color: #4b4241;
    margin-bottom: 1.5rem;
}

.settings-actions {
    text-align: right;
}

/* 预览容器 */
.preview-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.preview-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #e0e6ed;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.preview-header h3 {
    color: #4b4241;
}

.preview-frame {
    height: 80vh;
}

.preview-frame iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* 表单操作 */
.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    padding-top: 2rem;
    border-top: 1px solid #e0e6ed;
}

/* 云端同步设置样式 */
.cloud-sync-section {
    border: 2px solid #007bff;
    border-radius: 12px;
    background: linear-gradient(135deg, #f8f9ff 0%, #e6f3ff 100%);
}

.cloud-sync-info .info-box {
    background: linear-gradient(135deg, #4285f4 0%, #34a853 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.cloud-sync-info .info-box h4 {
    margin-bottom: 0.75rem;
    font-size: 1.2rem;
}

.cloud-sync-info .info-box ul {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0 0 0;
}

.cloud-sync-info .info-box li {
    padding: 0.25rem 0;
    font-size: 0.9rem;
}

.cloud-sync-status {
    background: white;
    border: 1px solid #e0e6ed;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.status-label {
    font-weight: 500;
    color: #4b4241;
}

.status-value {
    font-weight: 600;
}

.cloud-sync-setup h4 {
    color: #4b4241;
    margin-bottom: 1rem;
}

.setup-steps {
    background: white;
    border: 1px solid #e0e6ed;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1rem 0;
}

.setup-steps li {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.setup-steps a {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
}

.setup-steps a:hover {
    text-decoration: underline;
}

.cloud-sync-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.cloud-sync-help {
    margin-top: 1.5rem;
}

.cloud-sync-help details {
    background: white;
    border: 1px solid #e0e6ed;
    border-radius: 8px;
    padding: 1rem;
}

.cloud-sync-help summary {
    cursor: pointer;
    font-weight: 500;
    color: #007bff;
    margin-bottom: 1rem;
}

.cloud-sync-help summary:hover {
    color: #0056b3;
}

.help-content {
    margin-top: 1rem;
}

.help-content h5 {
    color: #4b4241;
    margin: 1rem 0 0.5rem 0;
    font-size: 1rem;
}

.help-content ol {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

.help-content li {
    margin-bottom: 0.25rem;
    line-height: 1.4;
}

.help-content p {
    margin: 1rem 0;
    padding: 0.75rem;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    font-size: 0.9rem;
}

/* 云同步输入框样式 */
.cloud-sync-setup .form-group label small {
    display: block;
    font-size: 0.8rem;
    color: #666;
    font-weight: normal;
    margin-top: 0.25rem;
}

.cloud-sync-setup .form-group label i {
    margin-right: 0.5rem;
    color: #007bff;
}

/* 云同步启用状态信息 */
.cloud-sync-enabled-info {
    margin: 1rem 0;
}

/* 动画 */
@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 媒体统计 */
.media-stats {
    margin-bottom: 0.5rem;
}

.media-stats small {
    color: #666;
    font-size: 0.75rem;
}

.media-stats i {
    margin-right: 0.25rem;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .content-header {
        padding: 1.5rem;
    }

    .content-section {
        padding: 1.5rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .models-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .header-right {
        flex-direction: column;
        gap: 0.5rem;
    }

    .search-bar input {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .cloud-sync-status {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .cloud-sync-actions {
        flex-direction: column;
    }

    .cloud-sync-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .setup-steps {
        font-size: 0.9rem;
    }

    .form-actions {
        flex-direction: column;
    }

    .settings-container {
        max-width: 100%;
    }
}
