/**
 * 夜间模式样式
 */

body.dark-theme {
    background: #1a1a2e;
    color: #e0e0e0;
}

/* 头部导航 */
body.dark-theme .main-header {
    background: #16213e;
    border-bottom: 1px solid #2a2a3e;
}

body.dark-theme .logo span {
    color: #e0e0e0;
}

body.dark-theme .nav-menu a {
    color: #b0b0b0;
}

body.dark-theme .nav-menu a:hover {
    color: #42a5f5;
}

body.dark-theme .user-info .username,
body.dark-theme .user-info .user-level {
    color: #e0e0e0;
}

/* 容器和卡片 */
body.dark-theme .container {
    background: transparent;
}

body.dark-theme .welcome-banner,
body.dark-theme .level-card,
body.dark-theme .stat-card-modern,
body.dark-theme .contributor-banner,
body.dark-theme .answers-section,
body.dark-theme .user-info-card,
body.dark-theme .question-box,
body.dark-theme .result-box,
body.dark-theme .note-box,
body.dark-theme .editor-panel,
body.dark-theme .question-content-wrapper {
    background: #16213e;
    border-color: #2a2a3e;
    color: #e0e0e0;
}

/* 文本颜色 */
body.dark-theme h1,
body.dark-theme h2,
body.dark-theme h3,
body.dark-theme h4,
body.dark-theme .welcome-title,
body.dark-theme .question-title {
    color: #e0e0e0;
}

body.dark-theme p,
body.dark-theme .stat-label,
body.dark-theme .level-name {
    color: #b0b0b0;
}

/* 表单元素 */
body.dark-theme input[type="text"],
body.dark-theme input[type="password"],
body.dark-theme input[type="email"],
body.dark-theme textarea,
body.dark-theme select {
    background: #0f1729;
    border-color: #2a2a3e;
    color: #e0e0e0;
}

body.dark-theme input:focus,
body.dark-theme textarea:focus {
    border-color: #42a5f5;
}

body.dark-theme .note-body textarea {
    background: #0f1729;
    color: #e0e0e0;
}

/* 按钮 */
body.dark-theme .btn-outline,
body.dark-theme .btn-outline-modern,
body.dark-theme .btn-modern,
body.dark-theme .btn-icon-action {
    background: #0f1729;
    border-color: #2a2a3e;
    color: #b0b0b0;
}

body.dark-theme .btn-outline:hover,
body.dark-theme .btn-icon-action:hover {
    border-color: #42a5f5;
    color: #42a5f5;
}

body.dark-theme .btn-primary {
    background: #42a5f5;
    color: white;
}

/* 题目卡片 */
body.dark-theme .question-card {
    background: #16213e;
    border-color: #2a2a3e;
}

body.dark-theme .question-card:hover {
    border-color: #42a5f5;
}

body.dark-theme .question-card.completed {
    background: rgba(76, 175, 80, 0.1);
    border-color: #4caf50;
}

/* 选项 */
body.dark-theme .option-item {
    background: #0f1729;
    border-color: #2a2a3e;
}

body.dark-theme .option-item:hover {
    border-color: #42a5f5;
    background: rgba(66, 165, 245, 0.1);
}

/* 进度条 */
body.dark-theme .progress-bar {
    background: #0f1729;
}

body.dark-theme .level-progress-fill,
body.dark-theme .progress-fill {
    background: linear-gradient(90deg, #42a5f5 0%, #66bb6a 100%);
}

/* 徽章和标签 */
body.dark-theme .question-type-badge,
body.dark-theme .level-badge {
    background: linear-gradient(135deg, #42a5f5 0%, #66bb6a 100%);
}

body.dark-theme .meta-item {
    color: #b0b0b0;
}

/* 警告框 */
body.dark-theme .alert-info {
    background: rgba(66, 165, 245, 0.1);
    border-color: #42a5f5;
    color: #42a5f5;
}

body.dark-theme .alert-success {
    background: rgba(76, 175, 80, 0.1);
    border-color: #4caf50;
    color: #4caf50;
}

body.dark-theme .alert-warning {
    background: rgba(255, 152, 0, 0.1);
    border-color: #ff9800;
    color: #ff9800;
}

body.dark-theme .alert-danger {
    background: rgba(244, 67, 54, 0.1);
    border-color: #f44336;
    color: #f44336;
}

/* 面包屑 */
body.dark-theme .breadcrumb {
    color: #b0b0b0;
}

body.dark-theme .breadcrumb a {
    color: #42a5f5;
}

/* 主题切换按钮 */
.theme-toggle {
    background: #42a5f5;
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
}

.theme-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(66, 165, 245, 0.4);
}

body.dark-theme .theme-toggle {
    background: #ffa726;
}

/* 表格 */
body.dark-theme table {
    background: #16213e;
    color: #e0e0e0;
}

body.dark-theme table th {
    background: #0f1729;
    color: #b0b0b0;
    border-color: #2a2a3e;
}

body.dark-theme table td {
    border-color: #2a2a3e;
}

body.dark-theme table tr:hover {
    background: rgba(66, 165, 245, 0.05);
}

/* 页脚 */
body.dark-theme footer {
    background: #16213e;
    border-top: 1px solid #2a2a3e;
    color: #b0b0b0;
}

/* 滚动条 */
body.dark-theme ::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

body.dark-theme ::-webkit-scrollbar-track {
    background: #0f1729;
}

body.dark-theme ::-webkit-scrollbar-thumb {
    background: #2a2a3e;
    border-radius: 5px;
}

body.dark-theme ::-webkit-scrollbar-thumb:hover {
    background: #42a5f5;
}

/* 代码块 */
body.dark-theme code,
body.dark-theme pre {
    background: #0f1729;
    color: #e0e0e0;
    border-color: #2a2a3e;
}

/* 移动端优化 */
@media (max-width: 768px) {
    .theme-toggle {
        width: 36px;
        height: 36px;
        margin-right: 10px;
    }
}

