:root { 
    --accent-teal: #14b8a6; 
    --bg-color: #151515; 
    --card-bg: linear-gradient(145deg, #1c1c1c, #161616);
    --card-border: rgba(255, 255, 255, 0.08);
    --text-main: #ffffff;
    --text-dim: #94a3b8;
    --nav-bg: rgba(22, 22, 22, 0.9);
    --sheet-bg: #1a1a1a;
    --input-bg: rgba(255, 255, 255, 0.05);
}

body.light-theme {
    --bg-color: #f1f5f9;
    --card-bg: #ffffff;
    --card-border: rgba(0, 0, 0, 0.05);
    --text-main: #0f172a;
    --text-dim: #64748b;
    --nav-bg: rgba(255, 255, 255, 0.9);
    --sheet-bg: #ffffff;
    --input-bg: #f1f5f9;
}
body.light-theme .card-main { box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03); }
body.light-theme #snow-container { display: none; }
body.light-theme .text-zinc-500 { color: #64748b; }
body.light-theme .text-zinc-400 { color: #475569; }
body.light-theme .text-zinc-300 { color: #334155; }
body.light-theme .bg-zinc-800 { background-color: #e2e8f0; }
body.light-theme .bg-zinc-700 { background-color: #cbd5e1; }

body { 
    user-select: none; 
    -webkit-tap-highlight-color: transparent; 
    background-color: var(--bg-color); 
    color: var(--text-main);
    padding-top: calc(env(safe-area-inset-top) + 40px);
    padding-bottom: calc(env(safe-area-inset-bottom) + 140px);
    min-height: 100vh;
    overflow-x: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    transition: background 0.4s ease, color 0.4s ease;
}

#splash-screen { 
    position: fixed; inset: 0; background: #000; z-index: 9999; 
    display: flex; flex-direction: column; align-items: center; justify-content: center; 
    transition: opacity 0.8s ease; 
}
.splash-hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.logo-text { font-size: 80px; font-weight: 900; font-style: italic; letter-spacing: -4px; }

#snow-container { position: fixed; inset: 0; pointer-events: none; z-index: 99999; }
.snowflake { 
    position: absolute; top: -10px; color: #fff; opacity: 0.4; 
    filter: drop-shadow(0 0 5px var(--accent-teal));
    animation: fall linear infinite; 
}
@keyframes fall { to { transform: translateY(105vh) translateX(30px); } }

.tab-content { display: none; position: relative; z-index: 10; }
.tab-content.active { display: block; animation: fadeIn 0.4s ease-out; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.nav-blur { 
    background: var(--nav-bg); 
    backdrop-filter: blur(25px); 
    border: 1px solid var(--card-border); 
    margin: 0 20px; 
    bottom: calc(env(safe-area-inset-bottom) + 30px); 
    width: calc(100% - 40px); 
    position: fixed; height: 80px; 
    border-radius: 2.5rem; display: flex; 
    justify-content: space-around; align-items: center; z-index: 100; 
}
.nav-active { color: var(--accent-teal); transform: scale(1.1); }

.card-main { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 2rem; transition: all 0.3s ease; }

.bottom-sheet {
    position: fixed; bottom: -100%; left: 0; right: 0; 
    background: var(--sheet-bg); border-top: 1px solid var(--card-border);
    z-index: 1000; transition: bottom 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 3rem 3rem 0 0; padding: 2rem; 
    padding-bottom: calc(env(safe-area-inset-bottom) + 2rem);
    max-height: 85vh;
}
.bottom-sheet.open { bottom: 0; }

.overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.7); z-index: 900; display: none; backdrop-filter: blur(8px); }
.overlay.open { display: block; }

.os-badge { font-size: 9px; padding: 2px 8px; border-radius: 6px; background: rgba(20, 184, 166, 0.2); color: var(--accent-teal); font-weight: 800; text-transform: uppercase; margin-top: 4px; display: inline-block; }

.guide-content { max-height: 0; overflow: hidden; transition: max-height 0.4s ease, opacity 0.4s ease; opacity: 0; }
.guide-content.open { max-height: 1000px; opacity: 1; }
.guide-chevron { transition: transform 0.3s ease; }
.guide-chevron.open { transform: rotate(90deg); }

.app-tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 16px; scrollbar-width: none; }
.app-tabs::-webkit-scrollbar { display: none; }
.app-tab-btn { 
    padding: 8px 16px; border-radius: 12px; background: var(--input-bg); 
    font-size: 11px; font-weight: 800; white-space: nowrap; border: 1px solid transparent; transition: all 0.3s; color: var(--text-main);
}
.app-tab-btn.active { background: rgba(20, 184, 166, 0.1); border-color: var(--accent-teal); color: var(--accent-teal); }

.app-instruction { display: none; }
.app-instruction.active { display: block; animation: fadeIn 0.3s ease; }

.sheet-scroll { overflow-y: auto; max-height: 55vh; padding-right: 10px; }
.sheet-scroll::-webkit-scrollbar { width: 4px; }
.sheet-scroll::-webkit-scrollbar-thumb { background: rgba(148, 163, 184, 0.3); border-radius: 4px; }

.toggle-switch { position: relative; display: inline-block; width: 44px; height: 24px; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: var(--input-bg); transition: .4s; border-radius: 24px; border: 1px solid var(--card-border); }
.slider:before { position: absolute; content: ""; height: 18px; width: 18px; left: 3px; bottom: 2px; background-color: var(--text-dim); transition: .4s; border-radius: 50%; }
input:checked + .slider { background-color: rgba(20, 184, 166, 0.2); border-color: var(--accent-teal); }
input:checked + .slider:before { transform: translateX(18px); background-color: var(--accent-teal); }

input.rose-toggle:checked + .slider { background-color: rgba(244, 63, 94, 0.2); border-color: #f43f5e; }
input.rose-toggle:checked + .slider:before { background-color: #f43f5e; }
