/* ============================================
   宝可梦伴行 — 3D 立体风格
   糖果色 + 厚实立体感
   ============================================ */

/* ---------- 自定义属性 ---------- */
:root {
    --color-primary: #FFD93D;
    --color-bg: #A8E6CF;
    --color-accent: #FF8B94;
    --color-card: #FFF8E7;
    --color-text: #3d5a4a;
    --color-text-light: #7a9a88;
    --color-shadow: rgba(60, 80, 70, 0.25);
    --radius-lg: 48px;
    --radius-md: 24px;
    --radius-sm: 16px;
    --radius-xs: 10px;
    --transition-bounce: cubic-bezier(.34, 1.56, .64, 1);
    --depth-1: 0 8px 0 #c8d8c0, 0 12px 24px rgba(0,0,0,0.12);
    --depth-2: 0 6px 0 #c8d8c0, 0 10px 20px rgba(0,0,0,0.10);
    --depth-btn: 0 6px 0 #c4a86a, 0 8px 16px rgba(0,0,0,0.12);
    --depth-btn-press: 0 2px 0 #c4a86a, 0 4px 8px rgba(0,0,0,0.10);
}

* { 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: linear-gradient(160deg, #7ec8a8 0%, #a8e6cf 40%, #b8e6d0 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px;
    color: var(--color-text);
    line-height: 1.5;
    perspective: 1200px;
}

/* ---------- 导航栏 (底部) — 3D 厚板 ---------- */
.nav-bar {
    width: 100%;
    max-width: 420px;
    background: linear-gradient(180deg, #fffcf0 0%, #f5edd8 50%, #e8dcc8 100%);
    border-radius: 60px;
    padding: 10px 16px;
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 10px 0 #c8d0c0, 0 16px 32px rgba(0,0,0,0.12), inset 0 2px 0 rgba(255,255,255,0.5);
    border: none;
    transform: translateZ(24px) rotateX(2deg);
    transition: transform 0.15s;
    position: relative;
}

.nav-bar::before {
    content: '';
    position: absolute;
    top: 4px; left: 20px; right: 20px;
    height: 6px;
    background: linear-gradient(180deg, rgba(255,255,255,0.25), transparent);
    border-radius: 60px;
    pointer-events: none;
}

.nav-bar .logo {
    font-size: 20px;
    font-weight: 700;
    color: var(--color-text);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.06);
}

.nav-links { display: flex; gap: 4px; }

.nav-links a {
    text-decoration: none;
    color: var(--color-text-light);
    font-size: 13px;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 40px;
    transition: all 0.15s var(--transition-bounce);
    transform: translateZ(0);
    position: relative;
}

.nav-links a:hover {
    background: linear-gradient(180deg, #e8f4e8, #c8e0d0);
    color: var(--color-text);
    transform: translateZ(6px) scale(1.05);
    box-shadow: 0 4px 0 #a8c0b0, 0 6px 12px rgba(0,0,0,0.08);
}

.nav-links a.active {
    background: linear-gradient(180deg, #fff0a0 0%, #f5c93d 50%, #dbaa20 100%);
    color: #3d3a1a;
    box-shadow: 0 4px 0 #b8942a, 0 6px 12px rgba(0,0,0,0.10);
    transform: translateZ(8px) scale(1.05);
    text-shadow: 0 1px 0 rgba(255,255,255,0.3);
}

/* ---------- 卡片容器 — 3D 厚卡片 ---------- */
.app-card {
    width: 100%;
    max-width: 420px;
    background: linear-gradient(180deg, #fffcf0 0%, #f5edd8 50%, #e8dcc8 100%);
    border-radius: var(--radius-lg);
    box-shadow: 0 12px 0 #c8d0c0, 0 20px 40px rgba(0,0,0,0.12), inset 0 2px 0 rgba(255,255,255,0.5);
    padding: 24px 20px 28px;
    position: relative;
    display: flex;
    flex-direction: column;
    transform: rotateX(3deg) translateZ(36px);
    border: none;
    transition: transform 0.2s;
}

.app-card::before {
    content: '';
    position: absolute;
    top: 6px; left: 24px; right: 24px;
    height: 8px;
    background: linear-gradient(180deg, rgba(255,255,255,0.2), transparent);
    border-radius: var(--radius-lg);
    pointer-events: none;
}

/* ---------- 标题 — 3D 凸起文字 ---------- */
.gradient-title {
    font-size: 28px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
    margin-bottom: 12px;
    text-shadow: 0 2px 4px rgba(255,217,61,0.3);
    transform: translateZ(10px);
}

/* ---------- 鹅卵石按钮 — 3D 立体凸起 ---------- */
.btn-pebble {
    background: linear-gradient(180deg, #fff8ec 0%, #f5dbb0 50%, #e8c890 100%);
    border: none;
    border-radius: 60px;
    padding: 14px 28px;
    font-weight: 700;
    font-size: 16px;
    color: var(--color-text);
    box-shadow: 0 8px 0 #c4a86a, 0 12px 24px rgba(0,0,0,0.15), inset 0 2px 0 rgba(255,255,255,0.6);
    cursor: pointer;
    transition: all 0.08s var(--transition-bounce);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    user-select: none;
    transform: translateZ(12px) rotateX(2deg);
    text-shadow: 0 1px 0 rgba(255,255,255,0.5);
    position: relative;
    letter-spacing: 0.5px;
}

.btn-pebble::before {
    content: '';
    position: absolute;
    top: 3px; left: 12px; right: 12px;
    height: 8px;
    background: linear-gradient(180deg, rgba(255,255,255,0.5), transparent);
    border-radius: 60px;
    pointer-events: none;
}

.btn-pebble:active {
    transform: translateY(6px) translateZ(4px) rotateX(0deg);
    box-shadow: 0 2px 0 #c4a86a, 0 6px 12px rgba(0,0,0,0.10);
}

.btn-pebble.primary {
    background: linear-gradient(180deg, #fff0a0 0%, #f5c93d 50%, #dbaa20 100%);
    box-shadow: 0 8px 0 #b8942a, 0 12px 24px rgba(0,0,0,0.15), inset 0 2px 0 rgba(255,255,255,0.5);
    color: #3d3a1a;
}

.btn-pebble.primary:active {
    box-shadow: 0 2px 0 #b8942a, 0 6px 12px rgba(0,0,0,0.10);
}

/* ---------- 藤蔓状态条 — 3D 立体凹槽 ---------- */
.vines {
    display: flex;
    justify-content: space-around;
    margin: 8px 0 14px;
    gap: 8px;
    perspective: 400px;
}

.vine-item {
    flex: 1;
    background: linear-gradient(180deg, #dce8d8, #c8d8c0 60%, #b8c8b0);
    border-radius: 40px;
    padding: 8px 4px 6px;
    box-shadow: inset 0 4px 8px rgba(0,0,0,0.12), inset 0 -2px 4px rgba(255,255,255,0.3), 0 3px 0 #a8b8a0;
    text-align: center;
    transform: translateZ(6px) rotateX(2deg);
    border: none;
}

.vine-label {
    font-size: 12px;
    color: #4a6a5a;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 0 rgba(255,255,255,0.3);
}

.vine-bar {
    height: 12px;
    background: #b8c8b0;
    border-radius: 20px;
    margin: 6px 8px 4px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 3px 6px rgba(0,0,0,0.15), inset 0 -1px 2px rgba(255,255,255,0.2);
}

.vine-fill {
    height: 100%;
    width: 70%;
    border-radius: 20px;
    background: linear-gradient(180deg, #fff0a0 0%, #f5c93d 60%, #dbaa20 100%);
    transition: width 0.3s var(--transition-bounce);
    box-shadow: 0 0 12px rgba(255,217,61,0.3);
    position: relative;
}

.vine-fill::after {
    content: '';
    position: absolute;
    top: 2px; left: 4px; right: 50%;
    height: 4px;
    background: rgba(255,255,255,0.35);
    border-radius: 10px;
}

.vine-fill.hunger { background: linear-gradient(180deg, #ffb8c0 0%, #ff8b94 60%, #e07078 100%); }
.vine-fill.clean { background: linear-gradient(180deg, #a0e8f8 0%, #5eb8d8 60%, #3a98b8 100%); }
.vine-fill.low { background: linear-gradient(180deg, #d0d8d0, #a8b8a8 60%, #90a090) !important; }

.vine-flower {
    font-size: 18px;
    display: inline-block;
    transition: transform 0.2s;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.12));
    transform: translateZ(4px);
}

/* ---------- 地毯 (宝可梦展示区) — 3D 立体球台 ---------- */
.carpet {
    background: radial-gradient(circle at 35% 25%, #d8f0e0, #7ec8a0 55%, #5aaa80 85%, #3a8a60 100%);
    border-radius: 50%;
    aspect-ratio: 1/1;
    width: 75%;
    margin: 0 auto 12px;
    position: relative;
    box-shadow: 0 14px 0 #3a7a5a, 0 24px 48px rgba(40, 80, 60, 0.3), inset 0 -12px 30px rgba(0,0,0,0.2), inset 0 8px 20px rgba(255,255,255,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateZ(30px) rotateX(6deg);
    transition: transform 0.3s ease;
}

.carpet::before {
    content: '';
    position: absolute;
    top: 6%; left: 12%;
    width: 50%; height: 30%;
    background: radial-gradient(ellipse, rgba(255,255,240,0.3), transparent);
    border-radius: 50%;
    pointer-events: none;
}

.carpet::after {
    content: "";
    position: absolute;
    inset: -6%;
    border-radius: 50%;
    background: transparent;
    box-shadow: 0 0 0 3px rgba(255,248,231,0.3), 0 0 0 8px rgba(168,230,207,0.12), 0 0 0 14px rgba(168,230,207,0.05);
    pointer-events: none;
}

/* ---------- 宝可梦容器 — 3D 立体头像 ---------- */
.pokemon {
    position: relative;
    width: 75%;
    aspect-ratio: 1/1;
    cursor: pointer;
    transition: transform 0.15s var(--transition-bounce);
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateZ(40px) rotateY(0deg);
    transform-style: preserve-3d;
}

.pokemon:hover {
    transform: translateZ(50px) rotateY(8deg) scale(1.05);
}

.pokemon:active { transform: translateZ(20px) rotateY(0deg) scale(0.92); }

.pokemon-emoji {
    font-size: clamp(80px, 22vw, 130px);
    line-height: 1;
    filter: drop-shadow(0 12px 20px rgba(0,0,0,0.2)) drop-shadow(0 4px 8px rgba(0,0,0,0.1));
    transition: transform 0.2s var(--transition-bounce);
    pointer-events: none;
    transform: translateZ(10px);
    text-shadow: 0 2px 0 rgba(0,0,0,0.08), 0 4px 8px rgba(0,0,0,0.1);
}

/* 宝可梦头像底部光晕 */
.pokemon::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%) translateZ(-5px);
    width: 70%;
    height: 12px;
    background: radial-gradient(ellipse, rgba(0,0,0,0.15), transparent);
    border-radius: 50%;
    pointer-events: none;
}

/* ---------- 动画 (3D 加强) ---------- */
@keyframes bounce {
    0% { transform: translateZ(30px) scale(1) rotate(0deg); }
    30% { transform: translateZ(50px) scale(1.2) rotate(-6deg); }
    60% { transform: translateZ(20px) scale(0.9) rotate(4deg); }
    100% { transform: translateZ(30px) scale(1) rotate(0deg); }
}

@keyframes happyShake {
    0% { transform: translateZ(30px) scale(1) rotate(0); }
    25% { transform: translateZ(50px) scale(1.15) rotate(-8deg); }
    50% { transform: translateZ(55px) scale(1.25) rotate(8deg); }
    75% { transform: translateZ(40px) scale(1.1) rotate(-4deg); }
    100% { transform: translateZ(30px) scale(1) rotate(0); }
}

@keyframes feedMunch {
    0% { transform: translateZ(30px) scale(1) translateY(0); }
    20% { transform: translateZ(45px) scale(1.1) translateY(-8px); }
    40% { transform: translateZ(20px) scale(0.95) translateY(4px) rotate(-3deg); }
    70% { transform: translateZ(40px) scale(1.08) translateY(-4px); }
    100% { transform: translateZ(30px) scale(1) translateY(0); }
}

@keyframes sadWobble {
    0% { transform: translateZ(20px) scale(0.95) rotate(-2deg); }
    100% { transform: translateZ(25px) scale(1) rotate(2deg); }
}

@keyframes confettiFall {
    0% { transform: translateY(0) rotate(0deg) translateZ(0); opacity: 1; }
    100% { transform: translateY(110vh) rotate(720deg) translateZ(50px); opacity: 0; }
}

@keyframes float {
    0%, 100% { transform: translateZ(30px) translateY(0); }
    50% { transform: translateZ(40px) translateY(-10px); }
}

@keyframes blink {
    0%, 90%, 100% { transform: translateZ(30px) scaleY(1); }
    95% { transform: translateZ(30px) scaleY(0.1); }
}

.pokemon.bounce .pokemon-emoji { animation: bounce 0.4s ease; }
.pokemon.happy .pokemon-emoji { animation: happyShake 0.5s ease; }
.pokemon.feed .pokemon-emoji { animation: feedMunch 0.6s ease; }
.pokemon.sad .pokemon-emoji { animation: sadWobble 0.8s ease infinite alternate; }
.pokemon.float .pokemon-emoji { animation: float 2s ease-in-out infinite; }
.pokemon.blink .pokemon-emoji { animation: blink 3s ease infinite; }

/* ---------- 气泡 — 3D 浮动 ---------- */
.speech-bubble {
    position: absolute;
    top: -28px;
    left: 50%;
    transform: translateX(-50%) translateZ(20px);
    background: linear-gradient(170deg, #fffcf0, #f5edd8);
    padding: 6px 16px;
    border-radius: 40px;
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text);
    box-shadow: 0 4px 0 #d8d0c0, 0 8px 16px rgba(0,0,0,0.08);
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.2s, transform 0.2s;
    pointer-events: none;
    border: 1px solid rgba(255,255,240,0.5);
}

.speech-bubble.show {
    opacity: 1;
    transform: translateX(-50%) translateY(-6px) translateZ(25px);
}

/* ---------- 勋章 ---------- */
.medals {
    position: absolute;
    top: -6px;
    right: -12px;
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: flex-end;
    max-width: 80px;
    pointer-events: none;
}

.medal {
    background: linear-gradient(170deg, #ffe87a, var(--color-primary));
    border-radius: 30px;
    padding: 2px 8px 3px;
    font-size: 14px;
    box-shadow: 0 3px 0 #c4a83a, 0 4px 8px rgba(255,180,50,0.2);
    border: 1px solid rgba(255,255,240,0.5);
    line-height: 1.2;
    color: #5a4a2a;
    font-weight: 600;
    transform: translateZ(10px);
}

/* ---------- 食物托盘 — 3D 立体圆盘 ---------- */
.food-tray {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 10px 0 6px;
    padding: 6px 0;
    perspective: 600px;
}

.food-item {
    background: linear-gradient(180deg, #fff8ec 0%, #f5dbb0 50%, #e0c898 100%);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    box-shadow: 0 7px 0 #c4a86a, 0 10px 20px rgba(0,0,0,0.15), inset 0 2px 0 rgba(255,255,255,0.5);
    cursor: pointer;
    transition: all 0.1s var(--transition-bounce);
    border: none;
    transform: translateZ(16px) rotateX(4deg);
    position: relative;
}

.food-item::before {
    content: '';
    position: absolute;
    top: 4px; left: 10px; right: 10px;
    height: 6px;
    background: linear-gradient(180deg, rgba(255,255,255,0.4), transparent);
    border-radius: 50%;
    pointer-events: none;
}

.food-item:active {
    transform: translateY(5px) translateZ(6px) rotateX(0deg);
    box-shadow: 0 2px 0 #c4a86a, 0 6px 12px rgba(0,0,0,0.10);
}

/* ---------- 纸屑容器 ---------- */
.confetti-container {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 999;
    overflow: hidden;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 2px;
    top: -20px;
    animation: confettiFall linear forwards;
}

/* ---------- 对战区 — 3D 厚板 ---------- */
.battle-arena {
    background: linear-gradient(170deg, #f5f9f0, #e8f0e0);
    border-radius: 32px;
    padding: 16px;
    margin: 8px 0;
    text-align: center;
    box-shadow: var(--depth-2);
    transform: translateZ(15px);
    border: 1px solid rgba(255,255,240,0.4);
}

.battle-hp { display: flex; justify-content: space-around; gap: 12px; margin-bottom: 12px; }

.hp-card {
    flex: 1;
    background: linear-gradient(170deg, #f5f9f0, #e0e8dc);
    border-radius: 20px;
    padding: 10px 8px;
    text-align: center;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.06), 0 4px 0 #c8d0c0;
    transform: translateZ(8px);
}

.hp-card .name { font-weight: 700; font-size: 15px; color: #3d5a4a; }
.hp-card .emoji { font-size: 40px; display: block; margin: 4px 0; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.08)); }

.hp-bar {
    height: 10px;
    background: #d0ddd0;
    border-radius: 20px;
    margin: 4px 8px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.08);
}

.hp-fill {
    height: 100%;
    border-radius: 20px;
    background: linear-gradient(180deg, #6cd87a, #4caf50);
    transition: width 0.4s ease;
}

.hp-fill.low { background: linear-gradient(180deg, #ffa0a8, #FF8B94); }
.hp-fill.mid { background: linear-gradient(180deg, #ffe87a, #FFD93D); }
.hp-text { font-size: 13px; font-weight: 700; color: #3d5a4a; }

.vs-badge {
    font-size: 24px;
    font-weight: 800;
    color: #FF8B94;
    display: flex;
    align-items: center;
    justify-content: center;
    text-shadow: 0 2px 4px rgba(255,139,148,0.2);
}

.battle-log {
    background: #f5f9f0;
    border-radius: 20px;
    padding: 12px 16px;
    margin: 8px 0;
    max-height: 180px;
    overflow-y: auto;
    text-align: left;
    font-size: 14px;
    line-height: 1.8;
    color: #3d5a4a;
    box-shadow: inset 0 2px 6px rgba(0,0,0,0.06);
}

.battle-log .log-entry { padding: 2px 0; border-bottom: 1px solid rgba(0,0,0,0.04); }
.battle-log .log-entry:last-child { border-bottom: none; }
.battle-log .log-hit { color: #FF8B94; font-weight: 600; }
.battle-log .log-heal { color: #4caf50; font-weight: 600; }
.battle-log .log-win { color: #FFD93D; font-weight: 800; font-size: 16px; }
.battle-log .log-lose { color: #b0b9ae; font-weight: 600; }

.opponent-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
    margin: 8px 0;
}

.opponent-card {
    background: linear-gradient(170deg, #f5f9f0, #e0e8dc);
    border-radius: 20px;
    padding: 10px 4px;
    text-align: center;
    cursor: pointer;
    transition: all 0.15s ease;
    border: 2px solid transparent;
    box-shadow: 0 4px 0 #c8d0c0;
    transform: translateZ(6px);
}

.opponent-card:hover { border-color: #A8E6CF; transform: translateY(-2px) translateZ(10px); }
.opponent-card:active { transform: scale(0.95) translateZ(2px); }
.opponent-card.selected { border-color: #FFD93D; background: linear-gradient(170deg, #fff8e0, #f5edc8); }

.opponent-card .o-emoji { font-size: 36px; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.08)); }
.opponent-card .o-name { font-size: 13px; font-weight: 600; color: #3d5a4a; }

.battle-actions { display: flex; gap: 8px; justify-content: center; margin: 8px 0; }
.battle-actions .btn-pebble { font-size: 14px; padding: 10px 20px; }

.result-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 100;
    align-items: center;
    justify-content: center;
}

.result-overlay.show { display: flex; }

.result-card {
    background: linear-gradient(170deg, #fffcf0, #f5edd8);
    border-radius: 40px;
    padding: 32px 40px;
    text-align: center;
    box-shadow: 0 12px 0 #c8d0c0, 0 20px 60px rgba(0,0,0,0.2);
    max-width: 300px;
    transform: translateZ(40px);
    border: 1px solid rgba(255,255,240,0.5);
}

.result-card .big-emoji { font-size: 80px; filter: drop-shadow(0 4px 8px rgba(0,0,0,0.1)); }
.result-card .result-title { font-size: 24px; font-weight: 800; margin: 8px 0; }
.result-card .result-detail { font-size: 14px; color: #7a9a88; margin-bottom: 12px; }

/* ---------- 入口卡片网格 — 3D 立体卡片 ---------- */
.entry-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-top: 16px;
    perspective: 800px;
}

.entry-card {
    background: linear-gradient(180deg, #fffcf0 0%, #f5edd8 50%, #e8dcc8 100%);
    border-radius: var(--radius-md);
    padding: 22px 12px;
    text-align: center;
    text-decoration: none;
    color: var(--color-text);
    box-shadow: 0 8px 0 #c8d0c0, 0 12px 24px rgba(0,0,0,0.12), inset 0 2px 0 rgba(255,255,255,0.5);
    transition: all 0.15s var(--transition-bounce);
    border: none;
    transform: translateZ(12px) rotateX(2deg);
    position: relative;
}

.entry-card::before {
    content: '';
    position: absolute;
    top: 3px; left: 16px; right: 16px;
    height: 6px;
    background: linear-gradient(180deg, rgba(255,255,255,0.3), transparent);
    border-radius: 20px;
    pointer-events: none;
}

.entry-card:hover {
    transform: translateY(-6px) translateZ(24px) rotateX(0deg) scale(1.03);
    box-shadow: 0 12px 0 #c8d0c0, 0 18px 36px rgba(0,0,0,0.15), inset 0 2px 0 rgba(255,255,255,0.5);
}

.entry-card:active {
    transform: translateY(2px) translateZ(6px) rotateX(0deg) scale(0.97);
    box-shadow: 0 4px 0 #c8d0c0, 0 8px 16px rgba(0,0,0,0.10);
}

.entry-card .icon {
    font-size: 44px;
    display: block;
    margin-bottom: 6px;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.12));
    transform: translateZ(6px);
}

.entry-card .title { font-weight: 700; font-size: 16px; text-shadow: 0 1px 0 rgba(255,255,255,0.3); }
.entry-card .desc { font-size: 12px; color: var(--color-text-light); margin-top: 2px; }

/* ---------- 底部 ---------- */
.footer-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    font-size: 12px;
    color: var(--color-text-light);
    order: 1000;
}

.day-badge {
    background: linear-gradient(170deg, #d4eddb, #c0dcc8);
    border-radius: 40px;
    padding: 4px 14px;
    font-weight: 600;
    font-size: 13px;
    color: #2a5a3a;
    box-shadow: inset 0 1px 2px rgba(255,255,255,0.4), 0 2px 0 #a8c0b0;
}

/* ---------- 登录页 — 3D 卡片 ---------- */
.auth-card {
    max-width: 360px;
    margin: 40px auto;
    background: linear-gradient(170deg, #fffcf0, #f5edd8);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    box-shadow: var(--depth-1);
    text-align: center;
    transform: rotateX(2deg) translateZ(30px);
    border: 1px solid rgba(255,255,240,0.5);
}

.auth-card .logo-big {
    font-size: 64px;
    display: block;
    margin-bottom: 8px;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.1));
}

.auth-card h2 {
    font-size: 24px;
    font-weight: 800;
    color: var(--color-text);
    margin-bottom: 4px;
}

.auth-card .sub {
    font-size: 14px;
    color: var(--color-text-light);
    margin-bottom: 20px;
}

.auth-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #d0ddd0;
    border-radius: 60px;
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text);
    background: #f5f9f0;
    outline: none;
    transition: border-color 0.2s;
    margin-bottom: 12px;
    box-sizing: border-box;
    box-shadow: inset 0 3px 6px rgba(0,0,0,0.06);
}

.auth-input:focus {
    border-color: var(--color-primary);
    background: #fff;
    box-shadow: inset 0 3px 6px rgba(0,0,0,0.04), 0 0 0 3px rgba(255,217,61,0.15);
}

.auth-input::placeholder { color: #b0c4b8; font-weight: 400; }

.auth-btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 60px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.1s var(--transition-bounce);
    margin-bottom: 10px;
}

.auth-btn.primary {
    background: linear-gradient(170deg, #ffe68a, #f5c93d);
    color: var(--color-text);
    box-shadow: 0 6px 0 #c4a83a, 0 8px 16px rgba(0,0,0,0.08);
}

.auth-btn.primary:active {
    transform: translateY(5px);
    box-shadow: 0 2px 0 #c4a83a, 0 6px 12px rgba(0,0,0,0.08);
}

.auth-btn.secondary {
    background: transparent;
    color: var(--color-text-light);
    font-size: 14px;
    padding: 8px;
}

.auth-btn.secondary:hover { color: var(--color-text); }

.auth-error {
    color: var(--color-accent);
    font-size: 14px;
    font-weight: 600;
    min-height: 20px;
    margin-bottom: 8px;
}

.auth-success {
    color: #4caf50;
    font-size: 14px;
    font-weight: 600;
    min-height: 20px;
    margin-bottom: 8px;
}

.auth-divider {
    height: 1px;
    background: #d0ddd0;
    margin: 16px 0;
}

.auth-footer {
    font-size: 13px;
    color: var(--color-text-light);
    margin-top: 16px;
}

.auth-footer a {
    color: var(--color-accent);
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.auth-footer a:hover { text-decoration: underline; }

/* ---------- 新手教程遮罩 — 3D 立体弹层 (从顶部弹出) ---------- */
.tutorial-overlay {
    position: fixed;
    inset: 0;
    background: rgba(30, 50, 40, 0.75);
    z-index: 999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 20px;
    perspective: 1200px;
    animation: fadeIn 0.3s ease;
    overflow-y: auto;
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
.tutorial-card {
    background: linear-gradient(170deg, #fffcf0, #f5edd8);
    border-radius: 48px;
    padding: 32px 28px 28px;
    max-width: 360px;
    width: 90%;
    text-align: center;
    box-shadow: 0 14px 0 #c8d0c0, 0 24px 60px rgba(0,0,0,0.3), inset 0 2px 0 rgba(255,255,255,0.5);
    transform: translateZ(60px) rotateX(2deg);
    border: 1px solid rgba(255,255,240,0.4);
    animation: cardPop 0.4s cubic-bezier(.34,1.56,.64,1);
    position: relative;
    margin-top: 10px;
}
@keyframes cardPop {
    from { transform: translateZ(0) rotateX(10deg) scale(0.7); opacity: 0; }
    to { transform: translateZ(60px) rotateX(2deg) scale(1); opacity: 1; }
}
.tutorial-card .t-icon {
    font-size: 64px;
    display: block;
    margin-bottom: 6px;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.1));
}
.tutorial-card h2 {
    font-size: 22px;
    font-weight: 800;
    color: #3d5a4a;
    margin-bottom: 4px;
}
.tutorial-card .t-sub {
    font-size: 14px;
    color: #7a9a88;
    margin-bottom: 16px;
    line-height: 1.6;
}
.tutorial-steps {
    text-align: left;
    margin: 0 0 16px;
    padding: 0;
    list-style: none;
}
.tutorial-steps li {
    padding: 10px 12px 10px 40px;
    margin-bottom: 6px;
    background: #f5f9f0;
    border-radius: 16px;
    font-size: 14px;
    color: #3d5a4a;
    font-weight: 600;
    position: relative;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.04), 0 2px 0 #d0ddd0;
    line-height: 1.5;
}
.tutorial-steps li::before {
    content: attr(data-step);
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    background: linear-gradient(170deg, #ffe87a, #FFD93D);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    color: #3d3a1a;
    box-shadow: 0 2px 0 #c4a83a;
}
.tutorial-card .btn-pebble {
    width: 100%;
    justify-content: center;
    font-size: 17px;
}
.tutorial-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #d0ddd0;
    margin: 0 4px;
    cursor: pointer;
    transition: all 0.2s;
}
.tutorial-dot.active {
    background: #FFD93D;
    transform: scale(1.3);
    box-shadow: 0 0 8px rgba(255,217,61,0.4);
}
.tutorial-pages {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-top: 12px;
}

/* ---------- 教程跳过按钮 ---------- */
.tutorial-skip {
    position: absolute;
    top: 12px;
    right: 12px;
    background: transparent;
    border: none;
    font-size: 14px;
    color: #b0c4b8;
    font-weight: 600;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 40px;
    transition: all 0.15s;
    z-index: 10;
}
.tutorial-skip:hover {
    color: #FF8B94;
    background: rgba(255,139,148,0.08);
}

/* ---------- 响应式 ---------- */
@media (max-width: 380px) {
    .app-card { padding: 16px 12px 20px; }
    .food-item { width: 48px; height: 48px; font-size: 24px; }
    .entry-grid { grid-template-columns: 1fr; }
    .nav-links a { font-size: 12px; padding: 4px 8px; }
}
