/* ===== 后台管理系统样式 ===== */
:root {
    --primary: #00f5ff;
    --secondary: #ff00ff;
    --dark: #0a0a0f;
    --darker: #050508;
    --light: #ffffff;
    --gray: #888888;
    --success: #00ff88;
    --error: #ff4444;
    --gradient: linear-gradient(135deg, var(--primary), var(--secondary));
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans SC', sans-serif;
    background: var(--darker);
    color: var(--light);
    min-height: 100vh;
}

/* ===== 登录页面 ===== */
.login-container {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(0, 245, 255, 0.05), rgba(255, 0, 255, 0.05));
}

.login-box {
    background: rgba(10, 10, 15, 0.9);
    border: 1px solid rgba(0, 245, 255, 0.3);
    border-radius: 20px;
    padding: 3rem;
    width: 100%;
    max-width: 400px;
    backdrop-filter: blur(10px);
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.login-header p {
    color: var(--gray);
    font-size: 0.9rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--gray);
    font-size: 0.9rem;
}

.form-group input[type="text"],
.form-group input[type="password"] {
    width: 100%;
    padding: 0.8rem 1rem;
    background: rgba(0, 245, 255, 0.05);
    border: 1px solid rgba(0, 245, 255, 0.3);
    border-radius: 10px;
    color: var(--light);
    font-size: 1rem;
    transition: all 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(0, 245, 255, 0.2);
}

.captcha-input {
    display: flex;
    gap: 0.5rem;
}

.captcha-input input {
    flex: 1;
}

#captchaCanvas {
    background: rgba(0, 245, 255, 0.1);
    border-radius: 8px;
    cursor: pointer;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.checkbox-label input {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

.login-btn {
    width: 100%;
    padding: 1rem;
    background: var(--gradient);
    border: none;
    border-radius: 10px;
    color: var(--dark);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 245, 255, 0.3);
}

.login-error {
    margin-top: 1rem;
    color: var(--error);
    text-align: center;
    font-size: 0.9rem;
    min-height: 1.2rem;
}

.login-footer {
    margin-top: 2rem;
    text-align: center;
    font-size: 0.85rem;
    color: var(--gray);
}

.login-footer a {
    color: var(--primary);
    text-decoration: none;
}

.login-footer span {
    margin: 0 0.5rem;
}

/* ===== 后台主页面 ===== */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    background: var(--dark);
    border-right: 1px solid rgba(0, 245, 255, 0.2);
    padding: 1.5rem;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-header {
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(0, 245, 255, 0.2);
    margin-bottom: 1.5rem;
}

.sidebar-header h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem;
    color: var(--primary);
}

.sidebar-header p {
    font-size: 0.8rem;
    color: var(--gray);
    margin-top: 0.3rem;
}

.nav-menu {
    list-style: none;
}

.nav-menu li {
    margin-bottom: 0.5rem;
}

.nav-menu a {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 1rem;
    color: var(--gray);
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.3s;
}

.nav-menu a:hover,
.nav-menu a.active {
    background: rgba(0, 245, 255, 0.1);
    color: var(--primary);
}

.nav-menu a.active {
    border-left: 3px solid var(--primary);
}

.nav-icon {
    font-size: 1.2rem;
}

.main-content {
    flex: 1;
    margin-left: 250px;
    padding: 2rem;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(0, 245, 255, 0.2);
}

.page-header h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem;
    color: var(--primary);
}

.header-actions {
    display: flex;
    gap: 1rem;
}

/* ===== 按钮 ===== */
.btn {
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--gradient);
    color: var(--dark);
    font-weight: 600;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 245, 255, 0.3);
}

.btn-secondary {
    background: rgba(0, 245, 255, 0.1);
    border: 1px solid var(--primary);
    color: var(--primary);
}

.btn-secondary:hover {
    background: rgba(0, 245, 255, 0.2);
}

.btn-danger {
    background: rgba(255, 68, 68, 0.1);
    border: 1px solid var(--error);
    color: var(--error);
}

.btn-danger:hover {
    background: rgba(255, 68, 68, 0.2);
}

/* ===== 表单 ===== */
.form-card {
    background: rgba(10, 10, 15, 0.8);
    border: 1px solid rgba(0, 245, 255, 0.2);
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.form-card h3 {
    font-size: 1.1rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(0, 245, 255, 0.2);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--gray);
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.8rem;
    background: rgba(0, 245, 255, 0.05);
    border: 1px solid rgba(0, 245, 255, 0.2);
    border-radius: 8px;
    color: var(--light);
    font-size: 0.95rem;
    font-family: inherit;
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(0, 245, 255, 0.2);
}

/* ===== 数据表格 ===== */
.data-table {
    width: 100%;
    background: rgba(10, 10, 15, 0.8);
    border: 1px solid rgba(0, 245, 255, 0.2);
    border-radius: 15px;
    overflow: hidden;
}

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

.data-table th,
.data-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(0, 245, 255, 0.1);
}

.data-table th {
    background: rgba(0, 245, 255, 0.1);
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
}

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

.data-table .actions {
    display: flex;
    gap: 0.5rem;
}

.data-table .actions .btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
}

/* ===== 模态框 ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: var(--dark);
    border: 1px solid rgba(0, 245, 255, 0.3);
    border-radius: 15px;
    padding: 2rem;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(0, 245, 255, 0.2);
}

.modal-header h3 {
    color: var(--primary);
}

.modal-close {
    background: none;
    border: none;
    color: var(--gray);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s;
}

.modal-close:hover {
    color: var(--error);
}

.modal-footer {
    margin-top: 1.5rem;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* ===== 消息提示 ===== */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    background: var(--dark);
    border: 1px solid var(--primary);
    border-radius: 10px;
    color: var(--light);
    z-index: 2000;
    transform: translateX(120%);
    transition: transform 0.3s;
}

.toast.show {
    transform: translateX(0);
}

.toast.success {
    border-color: var(--success);
}

.toast.error {
    border-color: var(--error);
}

/* ===== 设置面板 ===== */
.settings-section {
    margin-bottom: 2rem;
}

.settings-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: rgba(0, 245, 255, 0.03);
    border: 1px solid rgba(0, 245, 255, 0.1);
    border-radius: 10px;
    margin-bottom: 1rem;
}

.settings-info h4 {
    margin-bottom: 0.3rem;
}

.settings-info p {
    font-size: 0.85rem;
    color: var(--gray);
}

/* ===== 统计卡片 ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: rgba(10, 10, 15, 0.8);
    border: 1px solid rgba(0, 245, 255, 0.2);
    border-radius: 15px;
    padding: 1.5rem;
    text-align: center;
}

.stat-card .stat-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.stat-card .stat-value {
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    color: var(--primary);
}

.stat-card .stat-label {
    color: var(--gray);
    font-size: 0.9rem;
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        position: relative;
        height: auto;
    }

    .main-content {
        margin-left: 0;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .data-table {
        overflow-x: auto;
    }
}
