/* ===== THEMES =====
 * Each theme is a set of colour variables on <html data-theme="name">. The choice is saved by
 * site-settings.js and applied by the inline script in index.html <head> before first paint.
 * The site has two themes: "ying-yang" (Black, the site default) and "light" (White).
 * "ying-yang" is the default and is also applied when no (or an unknown) theme is set.
 * --accent-text is the readable text colour for anything drawn on top of --accent. */
:root,
html[data-theme="ying-yang"],
.yy-theme-swatch > i[data-theme="ying-yang"] {
    --bg: #000000;
    --bg-2: #0a0a0a;
    --bg-3: #121212;
    --bg-4: #1a1a1a;
    --border: rgba(255,255,255,.2);
    --border-2: rgba(255,255,255,.08);
    --text: #e0e0e0;
    --text-2: #a0a0a0;
    --bright-text: #ffffff;
    --accent: #ffffff;
    --accent-2: #d0d0d0;
    --accent-glow: rgba(255,255,255,.08);
    --accent-text: #000000;
    color-scheme: dark;
}
html[data-theme="light"],
.yy-theme-swatch > i[data-theme="light"] {
    --bg: #ffffff;
    --bg-2: #f7f7f7;
    --bg-3: #efefef;
    --bg-4: #e6e6e6;
    --border: rgba(0,0,0,.14);
    --border-2: rgba(0,0,0,.08);
    --text: #1a1a1a;
    --text-2: #5c5c5c;
    --bright-text: #000000;
    --accent: #000000;
    --accent-2: #2a2a2a;
    --accent-glow: rgba(0,0,0,.08);
    --accent-text: #ffffff;
    color-scheme: light;
}

/* Light theme: deepen the fixed gold / red / green text colours (made for dark backgrounds) so they
   stay readable on white, and outline the white half of the yin-yang logo. */
html[data-theme="light"] .home-yin-yang-symbol svg { filter: drop-shadow(0 0 1px rgba(0, 0, 0, 0.6)); }
html[data-theme="light"] .yy-gold-hero h5 { background-image: linear-gradient(90deg, #8a6508, #b8860b, #8a6508); }
html[data-theme="light"] .yy-perk b,
html[data-theme="light"] .cc-role-pill-owner,
html[data-theme="light"] .yy-tab.yy-tab-gold.active,
html[data-theme="light"] .yy-tab.yy-tab-gold:hover,
html[data-theme="light"] .yy-key.listening { color: #8a6508; }
html[data-theme="light"] .cc-role-pill-mod { color: #a35400; }
html[data-theme="light"] .cc-error,
html[data-theme="light"] .cc-composer-error,
html[data-theme="light"] .cc-btn-danger,
html[data-theme="light"] .cc-report-reason,
html[data-theme="light"] .cc-role-pill-banned { color: #c62828; }
html[data-theme="light"] .cc-room-notice.cc-room-muted,
html[data-theme="light"] .cc-hidden-note { color: #8a6000; }
html[data-theme="light"] .cc-mini-ok { color: #1b7f3b; }
html[data-theme="light"] .cc-bubble a,
html[data-theme="light"] .cc-link-btn,
html[data-theme="light"] .cc-error a,
html[data-theme="light"] .cc-composer-error a { color: #c2185b; }

/* ===== AURORA TEXT =====
 * Animated multi-colour text used for headings across the site: <span class="aurora-text">…</span>.
 * A slow-moving gradient is clipped to the glyphs while the word gently tilts and breathes. */
.aurora-text {
    position: relative;
    display: inline-block;
    background-image: linear-gradient(135deg, var(--bright-text), var(--text-2), var(--bright-text), var(--text-2), var(--bright-text));
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    animation: yy-aurora 10s ease-in-out infinite alternate;
    padding: 0 0.04em;
}
@keyframes yy-aurora {
    0%   { background-position: 0% 50%;   transform: rotate(-5deg) scale(0.9); }
    25%  { background-position: 50% 100%; transform: rotate(5deg) scale(1.1); }
    50%  { background-position: 100% 50%; transform: rotate(-3deg) scale(0.95); }
    75%  { background-position: 50% 0%;   transform: rotate(3deg) scale(1.05); }
    100% { background-position: 0% 50%;   transform: rotate(-5deg) scale(0.9); }
}
html.yy-reduce-motion .aurora-text { animation: none; }
@media (prefers-reduced-motion: reduce) { .aurora-text { animation: none; } }
