:root {
    color-scheme: light dark;
    --bg-primary: #FFF8F7;
    --bg-card: #FFFFFF;
    --brand-surface: #FFDAD5;
    --accent: #904A42;
    --accent-secondary: #B3392F;
    --accent-glow: rgba(144, 74, 66, 0.08);
    --accent-border: rgba(144, 74, 66, 0.18);
    --text-primary: #231918;
    --text-secondary: #534341;
    --text-muted: #857371;
    --border: #F1DEDB;
    --header-bg: rgba(255, 248, 247, 0.85);
    --phone-frame: linear-gradient(180deg, #2b2120 0%, #140d0c 100%);
    --radius: 16px;
    --shadow-sm: 0 1px 3px rgba(35, 25, 24, 0.05), 0 1px 2px rgba(35, 25, 24, 0.06);
    --shadow-md: 0 4px 16px rgba(35, 25, 24, 0.06), 0 2px 4px rgba(35, 25, 24, 0.04);
    --shadow-lg: 0 20px 50px rgba(35, 25, 24, 0.09), 0 8px 20px rgba(35, 25, 24, 0.04);
    --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, "Liberation Mono", monospace;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: #1A1110;
        --bg-card: #231918;
        --brand-surface: #3B2D2B;
        --accent: #FFB4A9;
        --accent-secondary: #FF8A7A;
        --accent-glow: rgba(255, 180, 169, 0.08);
        --accent-border: rgba(255, 180, 169, 0.2);
        --text-primary: #F1DEDC;
        --text-secondary: #D8C2BF;
        --text-muted: #A08C89;
        --border: #3B2D2B;
        --header-bg: rgba(26, 17, 16, 0.85);
        --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
        --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.35);
        --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.45);
    }
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
    font-family: var(--font);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

img { max-width: 100%; }

.bg-gradient {
    position: fixed; inset: 0;
    background:
        radial-gradient(ellipse 80% 50% at 20% -10%, rgba(179, 57, 47, 0.07) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 80% 100%, rgba(144, 74, 66, 0.05) 0%, transparent 50%);
    pointer-events: none; z-index: 0;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; position: relative; z-index: 2; }

/* ── Header ── */
header {
    padding: 16px 0; position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); background: var(--header-bg);
    border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.header-right { display: flex; align-items: center; gap: 12px; }

.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text-primary); min-width: 0; }
.logo-icon { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; flex-shrink: 0; }
.logo-text { font-weight: 650; font-size: 18px; letter-spacing: -0.02em; white-space: nowrap; }

.nav-links { display: flex; gap: 28px; list-style: none; }
.nav-links a { color: var(--text-secondary); text-decoration: none; font-size: 14px; font-weight: 500; transition: color 0.2s; }
.nav-links a:hover { color: var(--accent); }

.btn-download-header { display: inline-flex; align-items: center; text-decoration: none; transition: transform 0.2s, opacity 0.2s; }
.btn-download-header:hover { transform: translateY(-2px); opacity: 0.9; }
.playstore-badge-sm { height: 44px; width: auto; display: block; }

/* ── Language switcher (works without JS via <details>) ── */
.lang-switcher { position: relative; }
.lang-switcher > summary { list-style: none; }
.lang-switcher > summary::-webkit-details-marker { display: none; }
.lang-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 12px; background: var(--bg-card); color: var(--text-secondary);
    border: 1px solid var(--border); border-radius: 8px;
    font-family: var(--font); font-size: 13px; font-weight: 600;
    cursor: pointer; transition: border-color 0.2s, box-shadow 0.2s; user-select: none;
}
.lang-btn:hover { border-color: var(--text-muted); box-shadow: var(--shadow-sm); }
.lang-dropdown {
    position: absolute; top: calc(100% + 6px); right: 0;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 10px; padding: 6px; min-width: 170px;
    box-shadow: var(--shadow-lg); z-index: 200;
}
.lang-option {
    display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; padding: 8px 12px;
    font-size: 14px; color: var(--text-secondary); text-decoration: none;
    border-radius: 6px; transition: background 0.15s, color 0.15s;
}
.lang-option small { font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); text-transform: uppercase; }
.lang-option:hover { background: var(--accent-glow); color: var(--text-primary); }
.lang-option.active { color: var(--accent); font-weight: 650; }

/* ── Buttons ── */
.btn-playstore { display: inline-flex; align-items: center; text-decoration: none; transition: transform 0.2s, opacity 0.2s; }
.btn-playstore:hover { transform: translateY(-2px); opacity: 0.9; }
.playstore-badge { height: 56px; width: auto; display: block; }

.btn-secondary {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 14px 24px; background: var(--bg-card); color: var(--text-primary);
    text-decoration: none; border-radius: 12px; font-weight: 600; font-size: 15px;
    border: 1px solid var(--border); transition: border-color 0.2s, box-shadow 0.2s;
}
.btn-secondary:hover { border-color: var(--text-muted); box-shadow: var(--shadow-sm); }

/* ── Footer ── */
footer { padding: 40px 0; border-top: 1px solid var(--border); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 12px 28px; list-style: none; }
.footer-links a { color: var(--text-muted); text-decoration: none; font-size: 14px; transition: color 0.2s; }
.footer-links a:hover { color: var(--accent); }
.footer-copy { color: var(--text-muted); font-size: 14px; }

@media (max-width: 900px) {
    .nav-links { display: none; }
}

@media (max-width: 768px) {
    header { padding: 12px 0; }
    .container { padding: 0 16px; }
    .header-inner { gap: 8px; }
    .logo { gap: 8px; }
    .logo-icon { width: 32px; height: 32px; border-radius: 8px; }
    .logo-text { font-size: 15px; }
    .btn-download-header { display: none; }
    .lang-btn { padding: 6px 10px; font-size: 12px; }
    .footer-inner { flex-direction: column; text-align: center; }
    .footer-links { justify-content: center; }
}
