/* ============================================
   Golgufus Game Hub — Theme Overrides (Light & Dark)
   ============================================ */

/* --- Light Mode — softer, warmer palette --- */
:root[data-theme="light"] {
    color-scheme: light;

    --bg-body: #eef0f4;
    --bg-card: #ffffff;
    --bg-navbar: #e0e4ec;
    --bg-footer: #eaecf0;
    --bg-input: #f2f3f6;
    --bg-hover: #e6e8ed;

    --accent: #2e5d9a;
    --accent-hover: #264f82;
    --accent-light: rgba(46, 93, 154, 0.1);
    --accent-glow: rgba(46, 93, 154, 0.25);

    --text-primary: #1c2128;
    --text-secondary: #4d5664;
    --text-muted: #7a8494;
    --text-on-dark: #1c2128;
    --text-on-accent: #ffffff;

    /* Softened 2026-05-31: decorative borders fade toward the background so
       panels/cards/dividers read as faint hairlines; --border (inputs/buttons)
       stays a touch softer but still visible. */
    --border: #dcdfe6;
    --border-light: #eceef2;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 4px 14px rgba(0, 0, 0, 0.08);
    --shadow-card-hover: 0 4px 16px rgba(0, 0, 0, 0.1);

    --bg-message-area-start: #f3f4f7;
    --bg-message-area-end: #eef0f3;

    --surface-panel-bg: #ffffff;
    --surface-panel-alt: #f2f3f6;
    --surface-panel-border: #dcdfe6;
    --surface-panel-border-soft: #eceef2;
    --surface-panel-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    --surface-media-bg: #0f1724;

    --log-bg: #f3f4f7;
    --log-header-bg: #e4e7ed;
    --log-border: #d0d4dc;
    --log-text: #2c3340;

    /* Status colors (parity with dark mode) */
    --success: #1f8a55;
    --success-bg: rgba(31, 138, 85, 0.12);
    --danger: #c4382b;
    --danger-bg: rgba(196, 56, 43, 0.10);
    --warning: #a87000;
    --warning-bg: rgba(168, 112, 0, 0.14);
    --info: #2e5d9a;

    /* Message bubbles (parity with dark mode) */
    --bubble-own-start: #3a72c4;
    --bubble-own-end: #4d83cc;
    --bubble-own-shadow: rgba(58, 114, 196, 0.18);
    --bubble-other-bg: #ffffff;
    --bubble-other-border: #e6e8ec;

    /* Secondary accent (parity with dark mode) */
    --accent-secondary: #0ea5e9;
    --accent-secondary-light: rgba(14, 165, 233, 0.14);
    --accent-alt: #4d83cc;
}

:root[data-theme="dark"] {
    color-scheme: dark;

    --bg-body: #0e131c;
    --bg-card: #151b26;
    --bg-navbar: #0c1017;
    --bg-footer: #0c1017;
    --bg-input: #1a2230;
    --bg-hover: #232c3b;

    --accent: #7ea0e8;
    --accent-hover: #6c8ed6;
    --accent-light: rgba(126, 160, 232, 0.18);
    --accent-glow: rgba(126, 160, 232, 0.35);
    --accent-alt: #a4b9f0;

    --text-primary: #f2f4f8;
    --text-secondary: #c7cfdd;
    --text-muted: #aab3c4;
    --text-on-dark: #f5f7fb;
    --text-on-accent: #ffffff;

    /* Softened 2026-05-31 (see light-mode note). */
    --border: #242e3e;
    --border-light: #1a2231;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 2px 6px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-card-hover: 0 4px 16px rgba(0, 0, 0, 0.35);

    --success: #3cd99e;
    --success-bg: rgba(60, 217, 158, 0.16);
    --danger: #f57b7b;
    --danger-bg: rgba(245, 123, 123, 0.18);
    --warning: #f7c252;
    --warning-bg: rgba(247, 194, 82, 0.18);
    --info: #6aa9ff;

    --log-bg: #0d1117;
    --log-header-bg: #161b22;
    --log-border: #30363d;
    --log-text: #c9d1d9;

    --bg-message-area-start: #131b27;
    --bg-message-area-end: #0f1723;
    --bubble-own-start: #5c78d6;
    --bubble-own-end: #6f8ae4;
    --bubble-own-shadow: rgba(92, 120, 214, 0.35);
    --bubble-other-bg: #1a2233;
    --bubble-other-border: #232d3d;

    --accent-secondary: #38bdf8;
    --accent-secondary-light: rgba(56, 189, 248, 0.18);

    --surface-panel-bg: #151b26;
    --surface-panel-alt: #1a2230;
    --surface-panel-border: #242e3e;
    --surface-panel-border-soft: #1a2231;
    --surface-panel-shadow: 0 8px 22px rgba(0, 0, 0, 0.32);
    --surface-media-bg: #0a111d;
}

:root[data-theme="dark"] .room-card-golden {
    border-color: rgba(226, 191, 102, 0.55);
    background: linear-gradient(155deg, rgba(191, 140, 40, 0.2), rgba(21, 27, 38, 0));
}

:root[data-theme="dark"] .badge-tag-golden {
    background: linear-gradient(135deg, #d2ac52, #9f7a2b) !important;
    color: #fff8e6 !important;
    border-color: rgba(242, 214, 153, 0.35);
}

:root[data-theme="dark"] .btn-room-official {
    background: linear-gradient(135deg, #b58b35, #8a6824);
    border-color: #d2ac52;
    color: #fff8e6;
}

:root[data-theme="dark"] .btn-room-official:hover,
:root[data-theme="dark"] .btn-room-official:focus {
    background: linear-gradient(135deg, #c69a41, #947029);
    border-color: #e2bf66;
    color: #ffffff;
}
