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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #2d3748;
    line-height: 1.6;
}

/* ===========================================
   登录页面样式
   =========================================== */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 2rem;
}

.login-box {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 100%;
    max-width: 400px;
}

.login-box h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: #1a202c;
    font-size: 1.875rem;
    font-weight: 700;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #374151;
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid rgba(226, 232, 240, 0.8);
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    background: white;
}

.login-btn {
    width: 100%;
    padding: 0.875rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.default-account {
    text-align: center;
    padding: 1rem;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 10px;
    color: #4c51bf;
    font-size: 0.875rem;
}

.error-message {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.success-message {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

/* ===========================================
   管理员容器样式 (仪表板和上传页面)
   =========================================== */
.admin-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.admin-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.admin-header h1 {
    color: #1a202c;
    font-size: 1.5rem;
    font-weight: 700;
}

.admin-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.admin-nav span {
    color: #4a5568;
    font-weight: 600;
    margin-right: 1rem;
}

.admin-main {
    flex: 1;
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.admin-main h2 {
    color: #1a202c;
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ===========================================
   按钮样式
   =========================================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border: none;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    position: relative;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.btn-secondary {
    background: rgba(107, 114, 128, 0.9);
    color: white;
}

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

.btn-info {
    background: linear-gradient(135deg, #06b6d4, #0891b2);
    color: white;
}

.btn-info:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(6, 182, 212, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.btn-danger:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
}

.btn-small {
    padding: 0.5rem 0.875rem;
    font-size: 0.8rem;
}

.btn.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.badge {
    background: #ef4444;
    color: white;
    font-size: 0.75rem;
    padding: 0.125rem 0.5rem;
    border-radius: 10px;
    margin-left: 0.25rem;
    font-weight: 600;
}

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

.stat-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.stat-info {
    flex: 1;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a202c;
    line-height: 1;
}

.stat-label {
    color: #64748b;
    font-size: 1rem;
    font-weight: 500;
    margin-top: 0.25rem;
}

/* ===========================================
   文件表格样式
   =========================================== */
.files-table {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.files-table table {
    width: 100%;
    border-collapse: collapse;
}

.files-table th {
    background: rgba(102, 126, 234, 0.1);
    color: #374151;
    font-weight: 600;
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(226, 232, 240, 0.5);
}

.files-table td {
    padding: 1rem;
    border-bottom: 1px solid rgba(226, 232, 240, 0.3);
    color: #4a5568;
}

.files-table tr:hover {
    background: rgba(102, 126, 234, 0.05);
}

.no-files {
    text-align: center;
    color: #64748b;
    font-style: italic;
    padding: 2rem;
}

/* ===========================================
   上传表单样式
   =========================================== */
.upload-form {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    max-width: 600px;
}

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

.upload-form label {
    display: block;
    margin-bottom: 0.5rem;
    color: #374151;
    font-weight: 600;
}

.upload-form input[type="text"],
.upload-form input[type="file"],
.upload-form textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid rgba(226, 232, 240, 0.8);
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
}

.upload-form input:focus,
.upload-form textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    background: white;
}

.upload-form small {
    color: #64748b;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
}

/* ===========================================
   评论管理页面样式 (新版)
   =========================================== */

/* 顶部导航栏 */
.top-nav {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.nav-left .logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: #667eea;
}

.nav-left .logo i {
    font-size: 1.75rem;
}

.main-nav {
    display: flex;
    gap: 2rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    color: #64748b;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-item:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    transform: translateY(-1px);
}

.nav-item.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.nav-badge {
    background: #ef4444;
    color: white;
    font-size: 0.75rem;
    padding: 0.125rem 0.5rem;
    border-radius: 10px;
    margin-left: 0.25rem;
    font-weight: 600;
}

.nav-right .user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.username {
    font-weight: 600;
    color: #374151;
}

.logout-link {
    color: #ef4444;
    font-size: 1.25rem;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.logout-link:hover {
    background: rgba(239, 68, 68, 0.1);
    transform: scale(1.1);
}

/* 主要内容区域 */
.main-content {
    padding: 2rem 0;
}

.content-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* 页面标题区域 */
.page-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.page-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 2rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 0.5rem;
}

.page-title i {
    color: #667eea;
}

.page-description {
    color: #64748b;
    font-size: 1.1rem;
}

.refresh-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.refresh-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

/* 消息提示 */
.message-alert {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.message-alert.success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #166534;
}

.message-alert.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #991b1b;
}

.alert-icon {
    font-size: 1.25rem;
}

.alert-text {
    flex: 1;
    font-weight: 500;
}

.alert-close {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 6px;
    opacity: 0.7;
    transition: all 0.2s ease;
}

.alert-close:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.1);
}

/* 统计概览区域 */
.stats-overview {
    margin-bottom: 2rem;
}

.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.stat-item {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.stat-icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.stat-item.pending .stat-icon-wrapper {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.stat-item.approved .stat-icon-wrapper {
    background: linear-gradient(135deg, #10b981, #059669);
}

.stat-item.rejected .stat-icon-wrapper {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.stat-item.total .stat-icon-wrapper {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.stat-details {
    flex: 1;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a202c;
    line-height: 1;
}

.stat-label {
    color: #64748b;
    font-size: 1rem;
    font-weight: 500;
    margin-top: 0.25rem;
}

.stat-btn {
    padding: 0.5rem 1rem;
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.stat-btn:hover {
    background: #667eea;
    color: white;
}

/* 评论列表区域 */
.comments-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
}

.section-header {
    padding: 2rem;
    border-bottom: 1px solid rgba(226, 232, 240, 0.5);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a202c;
}

.status-filter {
    padding: 0.75rem 1rem;
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 10px;
    background: white;
    color: #374151;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.status-filter:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 评论容器 */
.comments-container {
    padding: 2rem;
}

.comment-item {
    background: rgba(248, 250, 252, 0.8);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(226, 232, 240, 0.5);
    transition: all 0.3s ease;
}

.comment-item:hover {
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.comment-item:last-child {
    margin-bottom: 0;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.user-section {
    display: flex;
    gap: 1rem;
}

.user-avatar {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
}

.user-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 0.5rem;
}

.comment-metadata {
    display: flex;
    gap: 1.5rem;
    font-size: 0.9rem;
    color: #64748b;
}

.comment-metadata span {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.status-tag {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.status-tag.pending {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.status-tag.approved {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-tag.rejected {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.comment-body {
    margin-bottom: 1.5rem;
}

.comment-text {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid rgba(226, 232, 240, 0.5);
    line-height: 1.7;
    color: #374151;
    margin-bottom: 1rem;
}

.contact-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #64748b;
    font-size: 0.9rem;
}

.comment-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.action-form {
    display: inline;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.875rem;
}

.action-btn.approve {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.action-btn.approve:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.action-btn.reject {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

.action-btn.reject:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
}

.action-btn.delete {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.action-btn.delete:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #64748b;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    opacity: 0.5;
}

.empty-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #374151;
}

.empty-text {
    font-size: 1rem;
    line-height: 1.6;
}

/* ===========================================
   响应式设计
   =========================================== */
@media (max-width: 1024px) {
    .nav-container {
        padding: 0 1rem;
    }
    
    .content-wrapper {
        padding: 0 1rem;
    }
    
    .admin-main {
        padding: 1rem;
    }
    
    .stats-container,
    .dashboard-stats {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        height: auto;
        padding: 1rem;
        gap: 1rem;
    }
    
    .admin-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .admin-nav {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .main-nav {
        gap: 1rem;
    }
    
    .page-header {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
    
    .section-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .comment-header {
        flex-direction: column;
        gap: 1rem;
    }
    
    .comment-metadata {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .stats-container,
    .dashboard-stats {
        grid-template-columns: 1fr;
    }
    
    .stat-item,
    .stat-card {
        padding: 1.5rem;
    }
    
    .login-box {
        padding: 2rem;
    }
}

@media (max-width: 480px) {
    .main-nav {
        flex-direction: column;
        width: 100%;
    }
    
    .nav-item {
        justify-content: center;
    }
    
    .admin-nav {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .comment-item {
        padding: 1.5rem;
    }
    
    .action-btn,
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
    
    .stat-value {
        font-size: 2rem;
    }
    
    .login-box {
        padding: 1.5rem;
    }
    
    .upload-form {
        padding: 1.5rem;
    }
}