/* === 公共基础样式 === */
:root {
    --bg-color: #f0f4f8;
    --primary: #7aa5d2;
    --accent: #ff9a9e;
    --text: #5d6d7e;
    --card-bg: #ffffff;
    --paper-texture: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0IiBoZWlnaHQ9IjQiPgo8cmVjdCB3aWR0aD0iNCIgaGVpZ2h0PSI0IiBmaWxsPSIjZmZmIi8+CjxyZWN0IHdpZHRoPSIxIiBoZWlnaHQ9IjEiIGZpbGw9IiNlZWVlZWUiLz4KPC9zdmc+');
    --success: #88cc88;
    --warning: #ffd54f;
    --danger: #ff7043;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background-color: var(--bg-color);
    color: var(--text);
    font-family: 'ZCOOL KuaiLe', cursive, sans-serif;
    overflow: hidden;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 背景画布 */
#bg-canvas {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: -1;
    background: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%);
}

/* 页面切换容器 */
.page {
    position: absolute;
    width: 100%; height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}
.page.active { opacity: 1; pointer-events: all; }
.page.hidden { display: none; opacity: 0; pointer-events: none; }

/* 通用手绘风格卡片 */
.paper-card {
    background: var(--card-bg);
    background-image: var(--paper-texture);
    padding: 50px;
    width: 450px;
    min-height: 400px;
    border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
    box-shadow: 10px 10px 0px rgba(122, 165, 210, 0.2);
    border: 3px solid var(--text);
    position: relative;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* 通用按钮 */
.sketch-btn {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 15px 40px;
    font-size: 1.2rem;
    font-family: inherit;
    border-radius: 30px 40px 30px 40px;
    cursor: pointer;
    box-shadow: 4px 4px 0px var(--text);
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: 200px;
    white-space: nowrap;
}
.sketch-btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0px var(--text);
}
.sketch-btn:active {
    transform: translate(2px, 2px);
    box-shadow: 0px 0px 0px var(--text);
}
.sketch-btn:disabled {
    cursor: not-allowed;
    opacity: 0.8;
}

.sketch-btn.success {
    background: var(--success);
}

.sketch-btn.danger {
    background: var(--danger);
}

/* 布局容器 */
.content-container {
    width: 90%;
    max-width: 1000px;
    height: 90vh;
    display: flex;
    flex-direction: column;
}

.header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 10px 20px;
    background: rgba(255,255,255,0.6);
    backdrop-filter: blur(5px);
    border-radius: 20px 20px 5px 5px;
    border-bottom: 3px solid var(--text);
}

.page-title {
    font-size: 2rem;
    color: var(--primary);
    text-shadow: 2px 2px 0px rgba(0,0,0,0.1);
}

.spacer { width: 150px; }

.back-btn {
    background: transparent;
    border: 2px solid var(--text);
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-family: inherit;
    font-size: 1rem;
    transition: 0.3s;
}
.back-btn:hover {
    background: var(--text);
    color: #fff;
    transform: scale(1.05);
}

/* 状态印章 */
.stamp {
    font-size: 0.8rem;
    padding: 5px 10px;
    border-radius: 20px;
    border: 2px solid;
    transform: rotate(-10deg);
    font-weight: bold;
    text-transform: uppercase;
    opacity: 0.8;
}
.stamp.ac { border-color: #88cc88; color: #88cc88; }
.stamp.partial { border-color: #ffd54f; color: #b8860b; }
.stamp.todo { border-color: #aaa; color: #aaa; border-style: dashed; }
.stamp.wrong { border-color: #ff7043; color: #ff7043; }

/* 通用隐藏类 */
.hidden {
    display: none !important;
}

/* Toast 提示 */
.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 24px;
    border-radius: 20px;
    z-index: 1000;
    font-size: 1rem;
    animation: fadeInDown 0.3s ease;
}

.toast.error {
    background: var(--danger);
    color: white;
}

.toast.success {
    background: var(--success);
    color: white;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* 滚动条美化 - 垂直滚动条 */
::-webkit-scrollbar { width: 8px; height: 0; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { 
    background: var(--primary); 
    border-radius: 4px; 
}
::-webkit-scrollbar-thumb:hover { 
    background: #5a8bc2; 
}

/* 隐藏横向滚动条 */
::-webkit-scrollbar:horizontal {
    height: 0;
    display: none;
}
