/* css/app.css */
:root {
    /* 浅色模式变量 */
    --bg-main: #f5f7fa;
    --bg-card: #ffffff;
    --text-main: #333333;
    --text-sub: #888888;
    --border-color: #eeeeee;
    --lvl-trivial: #007aff;
    --lvl-easy: #34c759;
    --lvl-normal: #ff9500;
    --lvl-hard: #ff3b30;
    --lvl-challenge: #af52de;
}

@media (prefers-color-scheme: dark) {
    :root {
        /* 深色模式变量 */
        --bg-main: #000000;
        --bg-card: #1c1c1e;
        --text-main: #ffffff;
        --text-sub: #98989d;
        --border-color: #38383a;
    }
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent; /* 去除手机端点击高亮 */
}

body {
    background-color: #e0e0e0; /* 电脑端背景 */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* 🌟 PC 端主布局：Sidebar + Main */
.app-container {
    display: flex;
    min-height: 100vh;
    background-color: var(--bg-main);
}

/* 左侧栏 (毛玻璃特效) */
.sidebar {
    width: 260px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 30px 20px;
    box-shadow: 2px 0 15px rgba(0,0,0,0.02);
    flex-shrink: 0;
}

@media (prefers-color-scheme: dark) {
    .sidebar {
        background: rgba(28, 28, 30, 0.7);
    }
}

.sidebar-title {
    font-size: 24px;
    font-weight: 900;
    margin-bottom: 40px;
    color: var(--text-main);
    text-align: center;
    background: linear-gradient(135deg, #ff007f, #af52de);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.menu-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-main);
    font-size: 15px;
    font-weight: 500;
}

.menu-item:hover, .menu-item.active {
    background: var(--bg-card);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transform: translateY(-2px);
}

.menu-text {
    flex: 1;
    margin-left: 15px;
}

.logout-text { color: var(--lvl-hard); }

/* 主内容区 */
.main-content {
    flex: 1;
    padding: 40px 60px;
    overflow-y: auto;
    height: 100vh;
}

.page-header {
    margin-bottom: 30px;
}

.page-title {
    font-size: 28px;
    font-weight: bold;
    color: var(--text-main);
}

/* 隐藏元素的通用类 */
.hidden {
    display: none !important;
}

/* 卡片基类 */
.glass-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.04);
    border: 1px solid var(--border-color);
    transition: transform 0.3s;
}
.glass-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.08);
}