/* ============================================
   火场逃生迷宫 — 共享样式表
   配色方案: UI 设计师 小染
   安全绿洲 #2ECC71 / 烈火警示 #E74C3C
   蜜糖黄 #F1C40F / 奶油白 #FDFEFE
   ============================================ */

/* --- CSS 自定义属性（主题色） --- */
:root {
    --color-primary: #2ECC71;
    --color-danger: #E74C3C;
    --color-accent: #F1C40F;
    --color-bg: #FDFEFE;
    --color-bg-dark: #1a1a2e;
    --color-wall: #8d6e63;
    --color-wall-light: #a1887f;
    --color-floor: #d7ccc8;
    --color-text: #2c3e50;
    --color-text-light: #7f8c8d;
    --color-card: #ffffff;
    --color-card-shadow: rgba(0,0,0,0.08);
    --radius-sm: 12px;
    --radius-md: 20px;
    --radius-lg: 32px;
    --shadow-btn: 0 6px 0 rgba(0,0,0,0.2);
    --transition: 0.2s ease;
}

/* --- 全局重置 --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
    background: var(--color-bg-dark);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    overflow-x: hidden;
    color: var(--color-text);
    font-size: 18px;
}

/* --- 游戏容器（手机卡片） --- */
.game-container {
    width: 100%;
    max-width: 480px;
    min-height: 100vh;
    max-height: 860px;
    background: var(--color-bg);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    position: relative;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

/* --- 页面切换 --- */
.page {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px;
    min-height: 100%;
    flex: 1;
}

.page.hidden {
    display: none !important;
}

/* --- 标题渐变文字 --- */
.gradient-title {
    font-size: 38px;
    font-weight: 900;
    background: linear-gradient(135deg, #E74C3C, #F1C40F);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

/* --- 按钮系统 --- */
.btn {
    border: none;
    background: var(--color-primary);
    color: #fff;
    font-weight: 800;
    padding: 16px 36px;
    border-radius: 60px;
    font-size: 19px;
    cursor: pointer;
    box-shadow: var(--shadow-btn);
    transition: transform var(--transition), box-shadow var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 1px;
}

.btn:active {
    transform: translateY(4px);
    box-shadow: 0 2px 0 rgba(0,0,0,0.2);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 0 rgba(0,0,0,0.2);
}

.btn-danger {
    background: var(--color-danger);
}

.btn-accent {
    background: var(--color-accent);
    color: #2c3e50;
}

.btn-secondary {
    background: #95a5a6;
    box-shadow: 0 6px 0 #7f8c8d;
}

.btn-small {
    padding: 10px 20px;
    font-size: 14px;
}

/* --- 卡片 --- */
.card {
    background: var(--color-card);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: 0 4px 16px var(--color-card-shadow);
    width: 100%;
    max-width: 380px;
    margin: 8px 0;
}

/* --- 导航栏 --- */
.nav-bar {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
}

.nav-bar .nav-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--color-text);
}

.nav-bar a {
    text-decoration: none;
    color: var(--color-primary);
    font-weight: 700;
    font-size: 14px;
    padding: 6px 14px;
    border-radius: 40px;
    background: rgba(46,204,113,0.1);
    transition: background var(--transition);
}

.nav-bar a:hover {
    background: rgba(46,204,113,0.2);
}

/* --- 输入框 --- */
.input-field {
    background: rgba(0,0,0,0.04);
    border: 2px solid #e0e0e0;
    border-radius: 40px;
    padding: 12px 20px;
    color: var(--color-text);
    font-size: 15px;
    width: 100%;
    max-width: 300px;
    outline: none;
    transition: border-color var(--transition);
}

.input-field:focus {
    border-color: var(--color-primary);
}

.input-field::placeholder {
    color: #bdbdbd;
}

/* --- 响应式 --- */
@media (max-width: 420px) {
    .game-container {
        border-radius: 0;
        max-height: none;
    }
    .gradient-title {
        font-size: 26px;
    }
    .btn {
        padding: 12px 24px;
        font-size: 15px;
    }
}

/* --- 工具类 --- */
.flex-col { display: flex; flex-direction: column; align-items: center; }
.flex-row { display: flex; align-items: center; }
.gap-4 { gap: 4px; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.text-center { text-align: center; }
.text-sm { font-size: 14px; }
.text-xs { font-size: 12px; }
.op-6 { opacity: 0.6; }
.op-8 { opacity: 0.8; }
.w-full { width: 100%; }
