/* 后台管理页面样式 */
.admin-body {
    margin: 0;
    padding: 0;
    background: #f8f9fa;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* 分页样式 */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.pagination-btn {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    background: white;
    color: #333;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
    min-width: 40px;
}

.pagination-btn:hover:not(:disabled) {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.pagination-btn.active {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-ellipsis {
    padding: 0.5rem;
    color: #666;
    font-weight: bold;
}

/* 广告类型标签样式 */
.ad-type-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    text-align: center;
    min-width: 60px;
}

.ad-type-homepage_carousel {
    background-color: #e3f2fd;
    color: #1976d2;
    border: 1px solid #bbdefb;
}

.ad-type-playback_sidebar {
    background-color: #f3e5f5;
    color: #7b1fa2;
    border: 1px solid #ce93d8;
}

.ad-type-video_ad {
    background-color: #e8f5e8;
    color: #388e3c;
    border: 1px solid #a5d6a7;
}

/* 兼容旧广告类型 */
.ad-type-banner {
    background-color: #fff3e0;
    color: #f57c00;
    border: 1px solid #ffcc02;
}

.ad-type-sidebar {
    background-color: #fce4ec;
    color: #c2185b;
    border: 1px solid #f8bbd9;
}

.ad-type-overlay,
.ad-type-midroll {
    background-color: #e0f2f1;
    color: #00695c;
    border: 1px solid #80cbc4;
}

/* 侧边栏 */
.admin-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 250px;
    height: 100vh;
    background: #2c3e50;
    color: white;
    z-index: 1000;
    transition: transform 0.3s;
    overflow-y: auto;
}

.admin-sidebar.collapsed {
    transform: translateX(-250px);
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid #34495e;
    background: #34495e;
}

.sidebar-header h2 {
    margin: 0;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-nav {
    padding: 1rem 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    color: #bdc3c7;
    text-decoration: none;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background: #34495e;
    color: white;
}

.nav-item.active {
    background: #3498db;
    color: white;
    border-left-color: #2980b9;
}

.nav-item i {
    width: 20px;
    text-align: center;
}

/* 主内容区域 */
.admin-main {
    margin-left: 250px;
    min-height: 100vh;
    transition: margin-left 0.3s;
}

.admin-main.expanded {
    margin-left: 0;
}

/* 顶部导航 */
.admin-header {
    background: white;
    padding: 1rem 2rem;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 999;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sidebar-toggle {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #666;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.sidebar-toggle:hover {
    background: #f8f9fa;
}

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

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logout-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logout-btn:hover {
    background: #c82333;
}

/* 内容区域 */
.admin-content {
    padding: 2rem;
}

.content-section {
    display: none;
}

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

/* 仪表盘样式 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

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

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

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

.stat-card:nth-child(1) .stat-icon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.stat-card:nth-child(2) .stat-icon {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.stat-card:nth-child(3) .stat-icon {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.stat-card:nth-child(4) .stat-icon {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.stat-info h3 {
    font-size: 2rem;
    margin: 0;
    color: #333;
}

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

.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.chart-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.chart-card h3 {
    margin-bottom: 1.5rem;
    color: #333;
    font-size: 1.2rem;
}

.chart-card canvas {
    max-height: 300px;
}

.recent-activity {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

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

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #667eea;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.activity-content {
    flex: 1;
}

.activity-text {
    color: #333;
    margin-bottom: 0.25rem;
}

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

/* 表格样式 */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-header h2 {
    margin: 0;
    color: #333;
}

.header-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.header-actions input,
.header-actions select {
    padding: 0.5rem;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    font-size: 0.9rem;
}

.table-container {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

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

.data-table th {
    background: #f8f9fa;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 1px solid #dee2e6;
}

.data-table td {
    padding: 1rem;
    border-bottom: 1px solid #f1f3f4;
    color: #666;
}

.data-table tr:hover {
    background: #f8f9fa;
}

.data-table tr:last-child td {
    border-bottom: none;
}

/* 状态标签 */
.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-approved {
    background: #d4edda;
    color: #155724;
}

.status-approved i {
    margin-right: 0.25rem;
}

.status-rejected {
    background: #f8d7da;
    color: #721c24;
}

/* 类型标签样式 */
.type-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.type-movie {
    background: #e3f2fd;
    color: #1976d2;
}

.type-tv {
    background: #f3e5f5;
    color: #7b1fa2;
}

.type-variety {
    background: #fff3e0;
    color: #f57c00;
}

.type-anime {
    background: #e8f5e8;
    color: #388e3c;
}

.type-documentary {
    background: #fce4ec;
    color: #c2185b;
}

.type-short {
    background: #f1f8e9;
    color: #689f38;
}

/* 操作按钮 */
.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    padding: 0.25rem 0.75rem;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.3s;
}

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

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

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

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

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

.action-btn:hover {
    opacity: 0.8;
    transform: translateY(-1px);
}

/* 分类管理样式 */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.category-section {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.category-section h3 {
    margin-bottom: 1rem;
    color: #333;
    font-size: 1.1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #667eea;
}

.category-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.category-tag {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #666;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s;
}

.category-tag:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.category-tag .delete-btn {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    padding: 0;
    font-size: 0.75rem;
    margin-left: 0.5rem;
}

.category-tag .delete-btn:hover {
    color: #c82333;
}

/* 设置页面样式 */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
}

.settings-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.settings-card h3 {
    margin-bottom: 1.5rem;
    color: #333;
    font-size: 1.2rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #667eea;
}

/* 视频审核模态框 */
.video-preview {
    margin-bottom: 1.5rem;
}

.video-preview video {
    width: 100%;
    max-height: 400px;
    border-radius: 8px;
}

.video-info h3 {
    margin-bottom: 0.5rem;
    color: #333;
}

.video-info p {
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.video-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.video-meta span {
    background: #f8f9fa;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.875rem;
    color: #666;
}

.review-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .admin-sidebar {
        transform: translateX(-250px);
    }
    
    .admin-sidebar.show {
        transform: translateX(0);
    }
    
    .admin-main {
        margin-left: 0;
    }
    
    .admin-content {
        padding: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .charts-grid {
        grid-template-columns: 1fr;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
    }
    
    .settings-grid {
        grid-template-columns: 1fr;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .header-actions {
        width: 100%;
        justify-content: flex-start;
    }
    
    .data-table {
        font-size: 0.875rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 0.75rem 0.5rem;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 0.25rem;
    }
}

@media (max-width: 480px) {
    .admin-header {
        padding: 1rem;
    }
    
    .admin-content {
        padding: 0.5rem;
    }
    
    .stat-card {
        padding: 1.5rem;
    }
    
    .settings-card {
        padding: 1.5rem;
    }
    
    .data-table {
        font-size: 0.75rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 0.5rem 0.25rem;
    }
}
