/* 管理后台样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 去除所有a标签的下划线 */
a {
    text-decoration: none;
}

body {
    font-family: '楷体', 'KaiTi', 'Microsoft YaHei', sans-serif;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

/* 登录页面样式 */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-box {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    padding: 30px;
    width: 400px;
    max-width: 90%;
}

.login-box h2 {
    text-align: center;
    margin-bottom: 25px;
    color: #333;
}

/* 管理后台容器 */
.admin-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.admin-header {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 美化导航按钮 */
.admin-nav {
    display: flex;
    gap: 15px;
}

.nav-link {
    padding: 10px 20px;
    border-radius: 50px;
    transition: all 0.3s ease;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 6px rgba(0,0,0,0.1);
}

.nav-link i {
    margin-right: 8px;
}

.btn-admin {
    background: linear-gradient(135deg, #2196F3, #0b7dda);
    color: white;
}

.btn-admin:hover {
    background: linear-gradient(135deg, #0b7dda, #0a6ebd);
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0,0,0,0.15);
}

.btn-logout {
    background: linear-gradient(135deg, #ff5722, #e64a19);
    color: white;
}

.btn-logout:hover {
    background: linear-gradient(135deg, #e64a19, #d84315);
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0,0,0,0.15);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.admin-content {
    display: flex;
    flex: 1;
}

/* 侧边栏导航 */
.sidebar {
    width: 250px;
    background-color: #fff;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.05);
    padding: 20px 0;
}

.nav {
    list-style: none;
}

.nav li {
    margin-bottom: 5px;
}

.nav a {
    display: block;
    padding: 12px 20px;
    color: #555;
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.nav a:hover {
    background-color: #f5f7fa;
    color: #4CAF50;
}

.nav a.active {
    background-color: #f5f7fa;
    color: #4CAF50;
    border-left-color: #4CAF50;
}

/* 主内容区域 */
.main-content {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
}

.content-section {
    display: none;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 25px;
    margin-bottom: 30px;
}

.content-section.active {
    display: block;
}

.content-section h2 {
    margin-bottom: 20px;
    color: #333;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
}

input[type="text"],
input[type="password"],
input[type="file"],
textarea,
select {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

input[type="text"]:focus,
input[type="password"]:focus,
textarea:focus,
select:focus {
    border-color: #4CAF50;
    outline: none;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
    text-decoration: none;
}

.btn:hover {
    background-color: #45a049;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 14px;
}

.btn-secondary {
    background-color: #6c757d;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

.btn-danger {
    background-color: #dc3545;
}

.btn-danger:hover {
    background-color: #c82333;
}

.btn-success {
    background-color: #28a745;
}

.btn-success:hover {
    background-color: #218838;
}

/* 提示框 */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* 统计卡片 */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 20px;
    text-align: center;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.stat-card h3 {
    font-size: 18px;
    color: #555;
    margin-bottom: 10px;
}

.stat-number {
    font-size: 28px;
    font-weight: bold;
    color: #4CAF50;
}

/* 媒体网格 */
.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.media-item {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    position: relative;
}

.media-checkbox {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 10;
}

.media-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
}

.video-thumbnail {
    position: relative;
}

.video-indicator {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 12px;
}

.media-info {
    padding: 10px;
    font-size: 14px;
}

.media-info p {
    margin-bottom: 5px;
}

/* 上传预览 */
.preview-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.preview-item {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.preview-item img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
}

.video-preview {
    width: 100%;
    height: 120px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.file-info {
    padding: 8px;
    font-size: 12px;
}

.file-info p {
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 待审批操作 */
.pending-grid {
    margin-top: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

/* 待审批项样式 */
.pending-item {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    position: relative;
    padding-bottom: 10px;
}

.pending-preview {
    position: relative;
    width: 100%;
    height: 150px;
}

.pending-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pending-info {
    padding: 10px;
    font-size: 14px;
}

.pending-info p {
    margin-bottom: 5px;
}

.pending-actions {
    padding: 0 10px 10px;
    display: flex;
    justify-content: space-between;
}

/* 状态标签 */
.status-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 12px;
    margin-left: 5px;
}

.status-pending {
    background-color: #ffc107;
    color: #212529;
}

.status-approved {
    background-color: #28a745;
    color: white;
}

.status-rejected {
    background-color: #dc3545;
    color: white;
}

.pending-info {
    flex: 1;
}

.pending-info p {
    margin-bottom: 5px;
}

.pending-preview {
    width: 100%;
    height: 150px;
    object-fit: cover;
    margin: 10px 0;
    border-radius: 4px;
}

.pending-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    justify-content: flex-end;
}

/* 副管理员管理 */
.subadmin-list {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.subadmin-item {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mt-4 {
    margin-top: 25px;
}

/* 帮助文本 */
.help-text {
    font-size: 14px;
    color: #6c757d;
    margin-top: 5px;
}

/* 无内容提示 */
.no-items {
    text-align: center;
    padding: 30px;
    color: #6c757d;
    font-style: italic;
}

/* 媒体模态框 */
.media-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgb(0 0 0 / 21%);
    z-index: 9999;
}

.media-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    width: auto;
    height: auto;
    max-width: 90%;
    max-height: 90vh;
}

.close {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 24px;
    color: #fff;
    cursor: pointer;
    z-index: 10000;
}

.media-container {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.media-container img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 15px;
}

.media-container video {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 15px;
}

/* 操作栏 */
.action-bar {
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
}

/* 响应式调整 */
@media (max-width: 992px) {
    .admin-content {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    }
    
    .nav {
        display: flex;
        flex-wrap: wrap;
    }
    
    .nav li {
        margin-right: 5px;
    }
    
    .nav a {
        border-left: none;
        border-bottom: 3px solid transparent;
    }
    
    .nav a.active {
        border-left-color: transparent;
        border-bottom-color: #4CAF50;
    }
}

@media (max-width: 768px) {
    .stats-cards {
        grid-template-columns: 1fr;
    }
    
    .media-grid, .pending-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .admin-header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
}

@media (max-width: 1020px) and (min-width: 769px) {
    .media-grid, .pending-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1400px) {
    .media-grid, .pending-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

/* 会话警告样式 */
.session-warning {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #fff3cd;
    border: 1px solid #ffeeba;
    border-radius: 5px;
    padding: 15px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    z-index: 1000;
    max-width: 300px;
}

.session-warning p {
    margin-bottom: 10px;
    color: #856404;
}

.session-warning button {
    margin-right: 10px;
    padding: 5px 10px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

#renew-session {
    background-color: #28a745;
    color: white;
}

#ignore-warning {
    background-color: #6c757d;
    color: white;
}
