/* 管理后台样式 */
.admin-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.admin-navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    height: 70px;
}

.admin-logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 700;
}

.admin-nav-links {
    display: flex;
    gap: 1rem;
}

.nav-btn {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.nav-btn.active {
    background: rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.admin-user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.admin-user-info .logout-btn {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.admin-user-info .logout-btn:hover {
    background: #c0392b;
    transform: translateY(-2px);
}

.admin-main {
    margin-top: 70px;
    padding: 2rem;
    min-height: calc(100vh - 70px);
    background: #f8f9fa;
}

.admin-section {
    display: none;
    animation: fadeIn 0.3s ease;
}

.admin-section.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.admin-section h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: #2d3748;
    border-bottom: 3px solid #667eea;
    padding-bottom: 0.5rem;
}

/* 仪表盘样式 */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e2e8f0;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.stat-icon {
    font-size: 3rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-content h3 {
    font-size: 1rem;
    color: #718096;
    margin: 0 0 0.5rem 0;
    font-weight: 500;
}

.stat-content p {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2d3748;
    margin: 0;
}

.dashboard-charts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.chart-container {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
}

.chart-container h3 {
    margin-bottom: 1.5rem;
    color: #2d3748;
    font-size: 1.3rem;
}

.popular-files-list {
    max-height: 300px;
    overflow-y: auto;
}

.popular-file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid #e2e8f0;
    transition: background-color 0.3s ease;
}

.popular-file-item:hover {
    background-color: #f7fafc;
}

.popular-file-item:last-child {
    border-bottom: none;
}

/* 表格样式 */
.section-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    gap: 1rem;
}

.search-box {
    display: flex;
    gap: 0.5rem;
}

.search-box input {
    padding: 0.8rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    min-width: 300px;
}

.search-box button,
.export-btn,
.add-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.search-box button:hover,
.export-btn:hover,
.add-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.table-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th {
    background: #f7fafc;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: #2d3748;
    border-bottom: 2px solid #e2e8f0;
}

.admin-table td {
    padding: 1rem;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: middle;
}

.admin-table tr:hover {
    background-color: #f7fafc;
}

.admin-table tr:last-child td {
    border-bottom: none;
}

.user-avatar-small {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.view-btn {
    background: #3498db;
    color: white;
}

.edit-btn {
    background: #f39c12;
    color: white;
}

.delete-btn {
    background: #e74c3c;
    color: white;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* 文件上传样式 */
.upload-container {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
}

.upload-area {
    border: 2px dashed #cbd5e0;
    border-radius: 12px;
    padding: 3rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-area:hover {
    border-color: #667eea;
    background-color: #f7fafc;
}

.upload-area.dragover {
    border-color: #667eea;
    background-color: #edf2f7;
}

.upload-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: #cbd5e0;
}

.upload-area h3 {
    margin-bottom: 1rem;
    color: #2d3748;
}

.upload-area p {
    color: #718096;
    margin-bottom: 2rem;
}

.select-file-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.select-file-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.upload-progress {
    margin-top: 2rem;
    padding: 2rem;
    background: #f7fafc;
    border-radius: 8px;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    margin: 1rem 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
    width: 0%;
}

.upload-list {
    margin-top: 2rem;
}

.upload-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: #f7fafc;
    border-radius: 8px;
    margin-bottom: 1rem;
    border: 1px solid #e2e8f0;
}

.upload-item-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.upload-item-icon {
    font-size: 2rem;
}

.upload-item-details h4 {
    margin: 0 0 0.5rem 0;
    color: #2d3748;
}

.upload-item-details p {
    margin: 0;
    color: #718096;
    font-size: 0.9rem;
}

/* 统计样式 */
.stats-filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    align-items: center;
}

.stats-filters select {
    padding: 0.8rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    min-width: 150px;
}

.stats-overview {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.ranking-list {
    max-height: 400px;
    overflow-y: auto;
}

.ranking-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid #e2e8f0;
    transition: background-color 0.3s ease;
}

.ranking-item:hover {
    background-color: #f7fafc;
}

.ranking-item:last-child {
    border-bottom: none;
}

.ranking-number {
    font-weight: 700;
    color: #667eea;
    font-size: 1.2rem;
    min-width: 30px;
}

.ranking-info {
    flex: 1;
    margin-left: 1rem;
}

.ranking-info h4 {
    margin: 0 0 0.2rem 0;
    color: #2d3748;
}

.ranking-info p {
    margin: 0;
    color: #718096;
    font-size: 0.9rem;
}

.ranking-count {
    font-weight: 600;
    color: #667eea;
}

/* 状态标签 */
.status-badge {
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status-active {
    background: #c6f6d5;
    color: #22543d;
}

.status-inactive {
    background: #fed7d7;
    color: #742a2a;
}

.status-pending {
    background: #fef5e7;
    color: #744210;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .dashboard-charts,
    .stats-overview {
        grid-template-columns: 1fr;
    }
    
    .admin-nav-links {
        display: none;
    }
}

@media (max-width: 768px) {
    .admin-navbar {
        padding: 0 1rem;
    }
    
    .admin-main {
        padding: 1rem;
    }
    
    .dashboard-stats {
        grid-template-columns: 1fr;
    }
    
    .section-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-box {
        flex-direction: column;
    }
    
    .search-box input {
        min-width: auto;
    }
    
    .admin-table {
        font-size: 0.9rem;
    }
    
    .admin-table th,
    .admin-table td {
        padding: 0.8rem 0.5rem;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 0.3rem;
    }
    
    .upload-area {
        padding: 2rem 1rem;
    }
    
    .upload-area h3 {
        font-size: 1.2rem;
    }
    
    .upload-icon {
        font-size: 3rem;
    }
} 