/* ===== ATmosphere Themes ===== */
/* Inspired by atmosphereconf.org's multi-theme system */

/* Default: Atmosphere (blue/white — defined in style.css :root) */

/* Bluesky — classic butterfly blue, lighter feel */
[data-theme="bluesky"] {
    --blue: #0085ff;
    --blue-dark: #0066cc;
    --blue-light: #e6f2ff;
    --bg: #f0f7ff;
    --white: #ffffff;
    --text: #1c2b3a;
    --text-muted: #5b7083;
    --border: #c8ddf0;
    --cat-hover-bg: rgba(0,133,255,0.14);
}

/* Blacksky — deep dark indigo */
[data-theme="blacksky"] {
    --blue: #7b8ef5;
    --blue-dark: #6070e0;
    --blue-light: rgba(123,142,245,0.12);
    --bg: #0d1220;
    --white: #161d30;
    --text: #dce0f0;
    --text-muted: #8890b0;
    --border: rgba(255,255,255,0.1);
    --shadow: 0 1px 3px rgba(0,0,0,0.3);
    --shadow-hover: 0 4px 12px rgba(0,0,0,0.4);
    --cat-hover-bg: rgba(123,142,245,0.2);
}

/* Red Dwarf — warm dark */
[data-theme="reddwarf"] {
    --blue: #e06050;
    --blue-dark: #c84040;
    --blue-light: rgba(224,96,80,0.1);
    --bg: #151010;
    --white: #221a1a;
    --text: #e8d8d8;
    --text-muted: #a89090;
    --border: rgba(255,255,255,0.1);
    --shadow: 0 1px 3px rgba(0,0,0,0.3);
    --shadow-hover: 0 4px 12px rgba(0,0,0,0.4);
    --cat-hover-bg: rgba(224,96,80,0.2);
}

/* Northsky — dark violet base with cyan accent (aligned to atmosphereconf northsky) */
[data-theme="northsky"] {
    --blue: #40dac4;
    --blue-dark: #2fb8a6;
    --blue-light: rgba(64,218,196,0.12);
    --bg: #170823;
    --white: #1f0b35;
    --text: #f1f1f1;
    --text-muted: #9a45ec;
    --border: rgba(255,255,255,0.15);
    --shadow: 0 1px 3px rgba(0,0,0,0.3);
    --shadow-hover: 0 4px 12px rgba(0,0,0,0.4);
    --cat-hover-bg: rgba(64,218,196,0.2);
}

/* Teal.fm — deep teal dark */
[data-theme="teal.fm"] {
    --blue: #14b8a6;
    --blue-dark: #0f8f82;
    --blue-light: rgba(20,184,166,0.14);
    --bg: #042f2e;
    --white: #111827;
    --text: #ecfdf5;
    --text-muted: rgba(204,251,241,0.7);
    --border: rgba(45,212,191,0.22);
    --shadow: 0 1px 3px rgba(0,0,0,0.35);
    --shadow-hover: 0 4px 12px rgba(0,0,0,0.45);
    --cat-hover-bg: rgba(20,184,166,0.24);
}

/* Plyr.fm — true-black, neutral dark with sky-blue accent */
[data-theme="plyr.fm"] {
    --blue: #58a7ff;
    --blue-dark: #3f86d8;
    --blue-light: rgba(88,167,255,0.18);
    --bg: #0a0a0a;
    --white: #141414;
    --text: #ecebe8;
    --text-muted: #9d9a95;
    --border: rgba(255,255,255,0.12);
    --shadow: 0 1px 3px rgba(0,0,0,0.4);
    --shadow-hover: 0 4px 12px rgba(0,0,0,0.5);
    --cat-hover-bg: rgba(88,167,255,0.2);
}

/* Spark — high-contrast black with magenta neon */
[data-theme="spark"] {
    --blue: #ff0090;
    --blue-dark: #d40078;
    --blue-light: rgba(255,0,144,0.16);
    --bg: #000000;
    --white: #0a0a0a;
    --text: #ffffff;
    --text-muted: rgba(255,0,144,0.72);
    --border: rgba(255,0,144,0.36);
    --shadow: 0 1px 3px rgba(0,0,0,0.5);
    --shadow-hover: 0 4px 12px rgba(0,0,0,0.6);
    --cat-hover-bg: rgba(255,0,144,0.2);
}

/* Fujocoded — candy violet with neon pink accent */
[data-theme="fujocoded"] {
    --blue: #ff38eb;
    --blue-dark: #ce00ff;
    --blue-light: rgba(255,56,235,0.16);
    --bg: #b89ffc;
    --white: #ffffff;
    --text: #4d2e91;
    --text-muted: #7a5fbd;
    --border: rgba(77,46,145,0.35);
    --shadow: 0 1px 3px rgba(77,46,145,0.2);
    --shadow-hover: 0 8px 24px rgba(77,46,145,0.28);
    --cat-hover-bg: rgba(206,0,255,0.14);
}

/* Laelaps — deep purple with electric violet accent */
[data-theme="laelaps"] {
    --blue: #7837f1;
    --blue-dark: #6022d4;
    --blue-light: rgba(120,55,241,0.16);
    --bg: #1c0648;
    --white: #1c0648;
    --text: #ffffff;
    --text-muted: rgba(255,255,255,0.82);
    --border: rgba(92,4,207,0.58);
    --shadow: 0 1px 3px rgba(0,0,0,0.45);
    --shadow-hover: 0 4px 12px rgba(0,0,0,0.55);
    --cat-hover-bg: rgba(120,55,241,0.24);
    --spotlight-grad-start: #12022f;
    --spotlight-grad-mid: #2a0d63;
    --spotlight-grad-end: #7837f1;
    --spotlight-glow: rgba(188,136,255,0.18);
    --gc-bg: linear-gradient(160deg, #140339 0%, #1a0545 58%, #2b0b66 100%);
    --gc-border: rgba(146,88,255,0.5);
    --gc-panel-bg: rgba(11,3,34,0.74);
    --gc-panel-hover: rgba(20,6,56,0.88);
    --gc-avatar-bg: #17043f;
    --promise-card-bg: rgba(15,4,44,0.65);
    --submit-cta-start: #1f0552;
    --submit-cta-end: #6e2ee8;
    --submit-cta-button-text: #3a0f8f;
}

[data-theme="laelaps"] .profile-page {
    --pc-card-border: rgba(153,94,255,0.55);
    --pc-surface-1: rgba(11,3,34,0.66);
    --pc-surface-2: rgba(13,4,40,0.78);
    --pc-surface-3: rgba(17,5,50,0.9);
    --pc-sprite-bg: #1a0547;
    --pc-section-bg: rgba(14,4,42,0.74);
    --pc-card-item-bg: rgba(10,3,32,0.84);
    --pc-card-item-hover: rgba(19,7,54,0.93);
    --pc-banner-bg: linear-gradient(135deg, #130333 0%, #230857 56%, #5e22ca 100%);
}

/* rpg.actor — parchment, ink, and brass (from rpg.actor core vars) */
[data-theme="rpg.actor"] {
    --blue: #b38a1f;
    --blue-dark: #7a5714;
    --blue-light: rgba(179,138,31,0.18);
    --bg: #e8e4d8;
    --white: #f4f1e8;
    --text: #2c2416;
    --text-muted: #5c4a2e;
    --border: rgba(92,74,46,0.25);
    --shadow: 0 1px 3px rgba(44,36,22,0.14);
    --shadow-hover: 0 6px 18px rgba(44,36,22,0.2);
    --cat-hover-bg: rgba(179,138,31,0.2);
    --spotlight-grad-start: #4c2510;
    --spotlight-grad-mid: #7a5714;
    --spotlight-grad-end: #b38a1f;
    --spotlight-glow: rgba(240,208,96,0.22);
    --gc-bg: linear-gradient(160deg, #f6f2e8 0%, #eee7d7 64%, #dccba8 100%);
    --gc-border: rgba(139,69,19,0.36);
    --gc-panel-bg: rgba(201,162,39,0.12);
    --gc-panel-hover: rgba(201,162,39,0.2);
    --gc-avatar-bg: #d7caaf;
    --promise-card-bg: rgba(201,162,39,0.11);
    --submit-cta-start: #5c2d0e;
    --submit-cta-end: #7a5714;
    --submit-cta-button-text: #5c2d0e;
}

[data-theme="rpg.actor"] .profile-page {
    --pc-card-border: rgba(92,74,46,0.3);
    --pc-surface-1: rgba(220,208,186,0.44);
    --pc-surface-2: rgba(214,198,167,0.52);
    --pc-surface-3: rgba(205,186,145,0.62);
    --pc-sprite-bg: #d8c9a8;
    --pc-section-bg: rgba(239,232,218,0.78);
    --pc-card-item-bg: rgba(225,212,186,0.72);
    --pc-card-item-hover: rgba(213,196,161,0.84);
    --pc-banner-bg: linear-gradient(135deg, #5c2d0e 0%, #8b4513 54%, #c9a227 100%);
}

/* Reverie — white surfaces with core violet accents (from reverie.house) */
[data-theme="reverie"] {
    --blue: #734ba1;
    --blue-dark: #5b3a80;
    --blue-light: rgba(115,75,161,0.18);
    --bg: #f2ebf7;
    --white: #ffffff;
    --text: #2f2640;
    --text-muted: #6f5f88;
    --border: rgba(115,75,161,0.26);
    --shadow: 0 1px 3px rgba(54,32,80,0.16);
    --shadow-hover: 0 8px 22px rgba(54,32,80,0.2);
    --cat-hover-bg: rgba(115,75,161,0.14);
    --spotlight-grad-start: #5b3a80;
    --spotlight-grad-mid: #734ba1;
    --spotlight-grad-end: #9a7abe;
    --spotlight-glow: rgba(176,143,217,0.24);
    --gc-bg: linear-gradient(160deg, #ffffff 0%, #f7f2fc 62%, #eee3f8 100%);
    --gc-border: rgba(115,75,161,0.34);
    --gc-panel-bg: rgba(115,75,161,0.09);
    --gc-panel-hover: rgba(115,75,161,0.16);
    --gc-avatar-bg: #e3d7f1;
    --promise-card-bg: rgba(115,75,161,0.08);
    --submit-cta-start: #5f3f87;
    --submit-cta-end: #7d57ad;
    --submit-cta-button-text: #5b3a80;
}

[data-theme="reverie"] .profile-page {
    --pc-card-border: rgba(115,75,161,0.3);
    --pc-surface-1: rgba(115,75,161,0.1);
    --pc-surface-2: rgba(115,75,161,0.14);
    --pc-surface-3: rgba(115,75,161,0.2);
    --pc-sprite-bg: #e2d4f1;
    --pc-section-bg: rgba(255,255,255,0.82);
    --pc-card-item-bg: rgba(115,75,161,0.12);
    --pc-card-item-hover: rgba(115,75,161,0.2);
    --pc-banner-bg: linear-gradient(135deg, #5f3f87 0%, #734ba1 56%, #9a7abe 100%);
}

/* ===== Dark theme structural overrides ===== */
[data-theme="blacksky"],
[data-theme="reddwarf"],
[data-theme="northsky"],
[data-theme="teal.fm"],
[data-theme="plyr.fm"],
[data-theme="spark"],
[data-theme="laelaps"] {
    color-scheme: dark;
}

/* Header */
[data-theme="blacksky"] .site-header { background: #0a0f1a; border-bottom-color: rgba(255,255,255,0.08); }
[data-theme="reddwarf"] .site-header { background: #120c0c; border-bottom-color: rgba(255,255,255,0.08); }
[data-theme="northsky"] .site-header { background: #1f0b35; border-bottom-color: rgba(255,255,255,0.1); }
[data-theme="teal.fm"] .site-header { background: #042f2e; border-bottom-color: rgba(45,212,191,0.28); }
[data-theme="plyr.fm"] .site-header { background: #070707; border-bottom-color: rgba(255,255,255,0.12); }
[data-theme="spark"] .site-header { background: #000000; border-bottom-color: rgba(255,0,144,0.45); }
[data-theme="fujocoded"] .site-header { background: #b89ffc; border-bottom-color: rgba(77,46,145,0.35); }
[data-theme="laelaps"] .site-header { background: #1c0648; border-bottom-color: rgba(92,4,207,0.58); }
[data-theme="rpg.actor"] .site-header { background: #2c2416; border-bottom-color: #c9a227; }
[data-theme="reverie"] .site-header { background: #ffffff; border-bottom-color: rgba(115,75,161,0.3); }

[data-theme="blacksky"] .header-logo,
[data-theme="reddwarf"] .header-logo,
[data-theme="northsky"] .header-logo,
[data-theme="teal.fm"] .header-logo,
[data-theme="plyr.fm"] .header-logo,
[data-theme="spark"] .header-logo,
[data-theme="fujocoded"] .header-logo,
[data-theme="laelaps"] .header-logo,
[data-theme="reverie"] .header-logo { color: var(--text); }

[data-theme="rpg.actor"] .header-logo { color: #c9a227; }
[data-theme="rpg.actor"] .nav-link { color: #e8e4d8; }
[data-theme="rpg.actor"] .user-handle { color: #f4f1e8; }
[data-theme="rpg.actor"] .logout-btn { color: #e8e4d8; }
[data-theme="rpg.actor"] .logout-btn:hover { color: #c9a227; }

[data-theme="blacksky"] .nav-link,
[data-theme="reddwarf"] .nav-link,
[data-theme="northsky"] .nav-link,
[data-theme="teal.fm"] .nav-link,
[data-theme="plyr.fm"] .nav-link,
[data-theme="spark"] .nav-link,
[data-theme="fujocoded"] .nav-link,
[data-theme="laelaps"] .nav-link,
[data-theme="rpg.actor"] .nav-link,
[data-theme="reverie"] .nav-link { color: var(--text-muted); }

/* Hero */
[data-theme="bluesky"] .hero { background: linear-gradient(135deg, #0085ff 0%, #56a3f5 100%); }
[data-theme="blacksky"] .hero { background: linear-gradient(135deg, #0a0f1a 0%, #1a2540 100%); }
[data-theme="reddwarf"] .hero { background: linear-gradient(135deg, #1a0808 0%, #3a1515 100%); }
[data-theme="northsky"] .hero { background: linear-gradient(135deg, #251a40 0%, #3a2a60 100%); }
[data-theme="teal.fm"] .hero { background: linear-gradient(135deg, #111827 0%, #042f2e 55%, #14b8a6 100%); }
[data-theme="plyr.fm"] .hero { background: linear-gradient(135deg, #0a0a0a 0%, #111111 60%, #1a2e48 100%); }
[data-theme="spark"] .hero { background: linear-gradient(135deg, #12000b 0%, #2a0018 100%); }
[data-theme="fujocoded"] .hero { background: linear-gradient(135deg, #b89ffc 0%, #d4c2ff 60%, #ffffff 100%); }
[data-theme="laelaps"] .hero { background: linear-gradient(135deg, #1c0648 0%, #2a0b52 60%, #6022d4 100%); }

/* Category ribbon */
[data-theme="blacksky"] .category-ribbon,
[data-theme="reddwarf"] .category-ribbon,
[data-theme="northsky"] .category-ribbon,
[data-theme="teal.fm"] .category-ribbon,
[data-theme="plyr.fm"] .category-ribbon,
[data-theme="spark"] .category-ribbon,
[data-theme="laelaps"] .category-ribbon,
[data-theme="rpg.actor"] .category-ribbon,
[data-theme="reverie"] .category-ribbon {
    background: var(--white);
    border-bottom-color: var(--border);
}

[data-theme="blacksky"] .cat-btn,
[data-theme="reddwarf"] .cat-btn,
[data-theme="northsky"] .cat-btn,
[data-theme="teal.fm"] .cat-btn,
[data-theme="plyr.fm"] .cat-btn,
[data-theme="spark"] .cat-btn,
[data-theme="laelaps"] .cat-btn,
[data-theme="rpg.actor"] .cat-btn,
[data-theme="reverie"] .cat-btn {
    background: transparent;
    border-color: var(--border);
    color: var(--text-muted);
}

/* Cards */
[data-theme="blacksky"] .game-card,
[data-theme="reddwarf"] .game-card,
[data-theme="northsky"] .game-card,
[data-theme="teal.fm"] .game-card,
[data-theme="plyr.fm"] .game-card,
[data-theme="spark"] .game-card,
[data-theme="fujocoded"] .game-card,
[data-theme="laelaps"] .game-card,
[data-theme="rpg.actor"] .game-card,
[data-theme="reverie"] .game-card {
    background: var(--white);
    border-color: var(--border);
}

[data-theme="blacksky"] .card-body h3,
[data-theme="reddwarf"] .card-body h3,
[data-theme="northsky"] .card-body h3,
[data-theme="teal.fm"] .card-body h3,
[data-theme="plyr.fm"] .card-body h3,
[data-theme="spark"] .card-body h3,
[data-theme="fujocoded"] .card-body h3,
[data-theme="laelaps"] .card-body h3,
[data-theme="rpg.actor"] .card-body h3,
[data-theme="reverie"] .card-body h3 { color: var(--text); }

[data-theme="blacksky"] .card-foot,
[data-theme="reddwarf"] .card-foot,
[data-theme="northsky"] .card-foot,
[data-theme="teal.fm"] .card-foot,
[data-theme="plyr.fm"] .card-foot,
[data-theme="spark"] .card-foot,
[data-theme="fujocoded"] .card-foot,
[data-theme="laelaps"] .card-foot,
[data-theme="rpg.actor"] .card-foot,
[data-theme="reverie"] .card-foot { border-top-color: var(--border); }

[data-theme="blacksky"] .card-badge--live,
[data-theme="reddwarf"] .card-badge--live,
[data-theme="northsky"] .card-badge--live,
[data-theme="teal.fm"] .card-badge--live,
[data-theme="plyr.fm"] .card-badge--live,
[data-theme="spark"] .card-badge--live,
[data-theme="fujocoded"] .card-badge--live,
[data-theme="laelaps"] .card-badge--live,
[data-theme="rpg.actor"] .card-badge--live,
[data-theme="reverie"] .card-badge--live { background: rgba(22,163,74,0.2); color: #4ade80; }

[data-theme="blacksky"] .card-badge--coming-soon,
[data-theme="reddwarf"] .card-badge--coming-soon,
[data-theme="northsky"] .card-badge--coming-soon,
[data-theme="teal.fm"] .card-badge--coming-soon,
[data-theme="plyr.fm"] .card-badge--coming-soon,
[data-theme="spark"] .card-badge--coming-soon,
[data-theme="fujocoded"] .card-badge--coming-soon,
[data-theme="laelaps"] .card-badge--coming-soon,
[data-theme="rpg.actor"] .card-badge--coming-soon,
[data-theme="reverie"] .card-badge--coming-soon { background: rgba(217,119,6,0.2); color: #fbbf24; }

[data-theme="blacksky"] .card-tags span,
[data-theme="reddwarf"] .card-tags span,
[data-theme="northsky"] .card-tags span,
[data-theme="teal.fm"] .card-tags span,
[data-theme="plyr.fm"] .card-tags span,
[data-theme="spark"] .card-tags span,
[data-theme="fujocoded"] .card-tags span,
[data-theme="laelaps"] .card-tags span,
[data-theme="rpg.actor"] .card-tags span,
[data-theme="reverie"] .card-tags span {
    background: transparent;
    border-color: var(--border);
    color: var(--text-muted);
}

/* Info strip */
[data-theme="blacksky"] .info-strip,
[data-theme="reddwarf"] .info-strip,
[data-theme="northsky"] .info-strip,
[data-theme="teal.fm"] .info-strip,
[data-theme="plyr.fm"] .info-strip,
[data-theme="spark"] .info-strip,
[data-theme="fujocoded"] .info-strip,
[data-theme="laelaps"] .info-strip,
[data-theme="rpg.actor"] .info-strip,
[data-theme="reverie"] .info-strip {
    background: var(--white);
    border-color: var(--border);
}

[data-theme="blacksky"] .info-card h3,
[data-theme="reddwarf"] .info-card h3,
[data-theme="northsky"] .info-card h3,
[data-theme="teal.fm"] .info-card h3,
[data-theme="plyr.fm"] .info-card h3,
[data-theme="spark"] .info-card h3,
[data-theme="fujocoded"] .info-card h3,
[data-theme="laelaps"] .info-card h3,
[data-theme="rpg.actor"] .info-card h3,
[data-theme="reverie"] .info-card h3 { color: var(--text); }

/* Footer */
[data-theme="blacksky"] .site-footer,
[data-theme="reddwarf"] .site-footer,
[data-theme="northsky"] .site-footer,
[data-theme="teal.fm"] .site-footer,
[data-theme="plyr.fm"] .site-footer,
[data-theme="spark"] .site-footer,
[data-theme="fujocoded"] .site-footer,
[data-theme="laelaps"] .site-footer,
[data-theme="rpg.actor"] .site-footer,
[data-theme="reverie"] .site-footer {
    border-top-color: var(--border);
    color: var(--text-muted);
}

/* Theme toggle button in dark themes */
[data-theme="blacksky"] .theme-toggle,
[data-theme="reddwarf"] .theme-toggle,
[data-theme="northsky"] .theme-toggle,
[data-theme="teal.fm"] .theme-toggle,
[data-theme="plyr.fm"] .theme-toggle,
[data-theme="spark"] .theme-toggle,
[data-theme="fujocoded"] .theme-toggle,
[data-theme="laelaps"] .theme-toggle,
[data-theme="reverie"] .theme-toggle {
    border-color: var(--border);
    color: var(--text-muted);
}

[data-theme="rpg.actor"] .theme-toggle {
    border-color: rgba(201,162,39,0.55);
    color: #e8e4d8;
}

/* Login card in dark themes */
[data-theme="blacksky"] .login-card,
[data-theme="reddwarf"] .login-card,
[data-theme="northsky"] .login-card,
[data-theme="teal.fm"] .login-card,
[data-theme="plyr.fm"] .login-card,
[data-theme="spark"] .login-card,
[data-theme="fujocoded"] .login-card,
[data-theme="laelaps"] .login-card,
[data-theme="reverie"] .login-card {
    background: var(--white);
    border-color: var(--border);
    color: var(--text);
}

[data-theme="blacksky"] .login-card h1,
[data-theme="reddwarf"] .login-card h1,
[data-theme="northsky"] .login-card h1,
[data-theme="teal.fm"] .login-card h1,
[data-theme="plyr.fm"] .login-card h1,
[data-theme="spark"] .login-card h1,
[data-theme="fujocoded"] .login-card h1,
[data-theme="laelaps"] .login-card h1,
[data-theme="reverie"] .login-card h1 { color: var(--text); }

[data-theme="blacksky"] .handle-wrapper input,
[data-theme="reddwarf"] .handle-wrapper input,
[data-theme="northsky"] .handle-wrapper input,
[data-theme="teal.fm"] .handle-wrapper input,
[data-theme="plyr.fm"] .handle-wrapper input,
[data-theme="spark"] .handle-wrapper input,
[data-theme="fujocoded"] .handle-wrapper input,
[data-theme="laelaps"] .handle-wrapper input,
[data-theme="reverie"] .handle-wrapper input { color: var(--text); }
