/* css/admin.css */
:root {
    --primary-color: #4361ee;
    --text-color: #333;
    --bg-color: #f8f9fa;
    --card-bg: #ffffff;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s ease;
    --accent-color: #f72585;
    --border-color: #e9ecef;
}

.dark-theme {
    --primary-color: #4895ef;
    --text-color: #f8f9fa;
    --bg-color: #121212;
    --card-bg: #1e1e1e;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    --accent-color: #b5179e;
    --border-color: #343a40;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Microsoft YaHei', 'PingFang SC', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    min-height: 100vh;
    color: var(--text-color);
    background-image: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-size: cover; 
    background-position: center; 
    background-repeat: no-repeat; 
    overflow-x: hidden; 
    padding: 20px; 
    transition: background 0.5s ease, color 0.5s ease; 
    position: relative; 
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.2);
    z-index: -1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 80px;
}

/* 导航栏 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 100;
}
.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    gap: 25px;
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
    padding: 5px 0;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--primary-color);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-color);
    cursor: pointer;
}

.nav-links a.active, 
.nav-links a:hover {
    color: var(--accent-color);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2极客时间x;
    background: var(--accent-color);
    transition: width 0.3s;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

/* 毛玻璃效果容器 */
.glass-container {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: var(--shadow);
    padding: 30px;
    margin: 20px 0;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

/* 管理后台样式 */
.admin-header {
    text-align: center;
    padding: 20px 0 40px;
}

.admin-title {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: white;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.admin-subtitle {
    color: #e0e0ff;
    font-size: 1.2rem;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.2);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--accent-color);
    margin: 10px 0;
}

.stat-label {
    font-size: 1.1rem;
    color: #e0e0ff;
}

.admin-section {
    margin-bottom: 40px;
}

.section-title {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--accent-color);
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 10px;
}

.comments-list {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 10px;
}

.comment-item {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    transition: var(--transition);
}

.comment-item:hover {
    background: rgba(255, 255, 255, 0.15);
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.comment-author {
    font-weight: bold;
    color: var(--primary-color);
}

.comment-date {
    color: #888;
    font-size: 0.9rem;
}

.comment-content {
    line-height: 1.5;
}

.comment-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
    gap: 10px;
}

.action-btn {
    padding: 5px 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: var(--transition);
}

.delete-btn {
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
}

.delete-btn:hover {
    background: rgba(231, 76, 60, 0.3);
}

.users-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.users-table th,
.users-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.users-table th {
    background: rgba(255, 255, 255, 0.1);
    color: var(--accent-color);
}

.users-table tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

.user-actions {
    display: flex;
    gap: 10px;
}

.edit-btn {
    background: rgba(52, 152, 219, 0.2);
    color: #3498db;
}

.edit-btn:hover {
    background: rgba(52, 152, 219, 0.3);
}

/* 页脚 */
footer {
    text-align: center;
    padding: 30px;
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.7);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .admin-stats {
        grid-template-columns: 1fr;
    }
    
    .nav-links {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: rgba(26, 42, 108, 0.95);
        flex-direction: column;
        align-items: center;
        padding: 20px 0;
        gap: 15px;
        transform: translateY(-150%);
        transition: transform 0.4s ease;
    }

    .nav-links.active {
        transform: translateY(0);
    }

    .nav-toggle {
        display: block;
    }
    
    .users-table {
        display: block;
        overflow-x: auto;
    }
}

@media (max-width: 480px) {
    .admin-title {
        font-size: 2rem;
    }
    
    .admin-subtitle {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
}