/* 管理员面板专用样式 */
.admin-main {
    padding: 20px;
    min-height: calc(100vh - 200px);
}

.admin-container {
    max-width: 1400px;
    margin: 0 auto;
}

.admin-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.admin-header h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    background: linear-gradient(45deg, #ffd700, #ff6b6b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    background: rgba(255, 255, 255, 0.15);
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: #4ecdc4;
    margin-bottom: 5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.stat-label {
    font-size: 0.9rem;
    color: #ccc;
}

.admin-nav {
    margin-bottom: 30px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 10px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.admin-tabs {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    gap: 5px;
    margin: 0;
    padding: 0;
}

.admin-tab {
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-family: 'Noto Sans SC', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.admin-tab:hover, .admin-tab.active {
    background: linear-gradient(45deg, #4ecdc4, #44a08d);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(78, 205, 196, 0.4);
}

.admin-section {
    display: none;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    animation: fadeIn 0.5s ease;
}

.admin-section.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.section-header h2 {
    margin: 0;
    color: #ffd700;
    font-size: 1.8rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.search-filters {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.search-input, .filter-select {
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    font-size: 1rem;
    min-width: 200px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.search-input:focus, .filter-select:focus {
    outline: none;
    border-color: #4ecdc4;
    box-shadow: 0 0 0 2px rgba(78, 205, 196, 0.3);
    background: rgba(0, 0, 0, 0.4);
}

.search-input::placeholder {
    color: #aaa;
}

.filter-select {
    min-width: 150px;
}

.content-table {
    overflow-x: auto;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    overflow: hidden;
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

th {
    background: rgba(0, 0, 0, 0.4);
    color: #ffd700;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

.action-buttons {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.btn-view, .btn-edit, .btn-delete {
    padding: 6px 12px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    font-family: 'Noto Sans SC', sans-serif;
    font-weight: 500;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.btn-view {
    background: linear-gradient(45deg, #74b9ff, #0984e3);
    color: white;
}

.btn-edit {
    background: linear-gradient(45deg, #fdcb6e, #e17055);
    color: white;
}

.btn-delete {
    background: linear-gradient(45deg, #e17055, #d63031);
    color: white;
}

.btn-view:hover, .btn-edit:hover, .btn-delete:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.user-avatar-small {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(45deg, #4ecdc4, #44a08d);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: white;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.role-admin {
    background: linear-gradient(45deg, #ff6b6b, #d32f2f);
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    color: white;
    display: inline-block;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.role-moderator {
    background: linear-gradient(45deg, #ffa726, #fb8c00);
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    color: white;
    display: inline-block;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.role-user {
    background: linear-gradient(45deg, #4ecdc4, #00897b);
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    color: white;
    display: inline-block;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.status-active {
    background: linear-gradient(45deg, #00b894, #00796b);
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    color: white;
    display: inline-block;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.status-inactive {
    background: linear-gradient(45deg, #fdcb6e, #ff9800);
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    color: white;
    display: inline-block;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.level-basic {
    background: linear-gradient(45deg, #6c5ce7, #5e35b1);
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    color: white;
    display: inline-block;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.level-intermediate {
    background: linear-gradient(45deg, #a29bfe, #7b1fa2);
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    color: white;
    display: inline-block;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.level-advanced {
    background: linear-gradient(45deg, #fd79a8, #d81b60);
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    color: white;
    display: inline-block;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.level-expert {
    background: linear-gradient(45deg, #fdcb6e, #ff8f00);
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    color: white;
    display: inline-block;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: rgba(30, 30, 40, 0.95);
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    animation: modalAppear 0.3s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.modal-header h3 {
    margin: 0;
    color: #ffd700;
    font-size: 1.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #fff;
    cursor: pointer;
    padding: 5px;
    border-radius: 5px;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(90deg);
}

.modal-body {
    padding: 20px;
}

.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.form-group {
    flex: 1;
    min-width: 200px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #ccc;
    font-weight: 500;
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    font-size: 1rem;
    font-family: 'Noto Sans SC', sans-serif;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: #4ecdc4;
    box-shadow: 0 0 0 2px rgba(78, 205, 196, 0.3);
    background: rgba(0, 0, 0, 0.4);
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.btn-primary {
    background: linear-gradient(45deg, #4ecdc4, #44a08d);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: 'Noto Sans SC', sans-serif;
    font-weight: 500;
    box-shadow: 0 4px 10px rgba(78, 205, 196, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(78, 205, 196, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 12px 25px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: 'Noto Sans SC', sans-serif;
    font-weight: 500;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.btn-danger {
    background: linear-gradient(45deg, #ff6b6b, #d32f2f);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: 'Noto Sans SC', sans-serif;
    font-weight: 500;
    box-shadow: 0 4px 10px rgba(255, 107, 107, 0.3);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(255, 107, 107, 0.4);
}

/* 访问拒绝页面 */
.access-denied {
    text-align: center;
    padding: 50px 20px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 15px;
    margin: 50px auto;
    max-width: 600px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    animation: fadeIn 0.5s ease;
}

.access-denied h2 {
    font-size: 2rem;
    color: #ff6b6b;
    margin-bottom: 20px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.access-denied p {
    color: #ccc;
    margin-bottom: 15px;
    line-height: 1.6;
}

/* 设置页面样式 */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.settings-card {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.settings-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    background: rgba(0, 0, 0, 0.35);
}

.settings-card h3 {
    margin-top: 0;
    color: #ffd700;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.settings-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.settings-actions .btn-primary, 
.settings-actions .btn-secondary, 
.settings-actions .btn-danger {
    width: 100%;
    text-align: center;
}

/* 分析页面样式 */
.analytics-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.analytics-card {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.analytics-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    background: rgba(0, 0, 0, 0.35);
}

.analytics-card .card-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.analytics-card .card-header h3 {
    margin: 0;
    color: #ffd700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.stat-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-item:last-child {
    border-bottom: none;
}

.stat-item label {
    color: #ccc;
}

.stat-item span {
    color: #4ecdc4;
    font-weight: 500;
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes modalAppear {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .admin-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .search-filters {
        flex-direction: column;
    }
    
    .search-input, .filter-select {
        width: 100%;
        min-width: auto;
    }
    
    .section-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .admin-tabs {
        flex-direction: column;
    }
    
    .admin-tab {
        width: 100%;
        text-align: center;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .settings-grid {
        grid-template-columns: 1fr;
    }
    
    .analytics-cards {
        grid-template-columns: 1fr;
    }
    
    .admin-header h1 {
        font-size: 2rem;
    }
    
    .section-header h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .admin-stats {
        grid-template-columns: 1fr;
    }
    
    .stat-card {
        padding: 10px;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .admin-header h1 {
        font-size: 1.8rem;
    }
    
    .section-header h2 {
        font-size: 1.3rem;
    }
    
    .modal-content {
        width: 95%;
        padding: 10px;
    }
}