/* Aurora (2026-10-19): the soft colour glow behind the cards, and the sign-in page's glow + curve.
   Colours follow the theme (r,g,b triplets so any alpha can be mixed in). The app turns it on with html.aurora-on (see Themes > Blend,
   saved in localStorage 'aurora'; default: on, subtle, frosted, gentle). Turned off, none of the rules below apply and the old theme shows.
   The sign-in page always uses it (it has its own rules in Login.cshtml). */

html { --au-g1: 56,144,255; --au-g2: 255,59,48; --au-g3: 124,185,40; --au-deep: 11,24,48; --au-ai: 1; --au-base: 1; }
html.dark { --au-base: .85; }
html.theme-discord   { --au-g1: 88,101,242;  --au-g2: 168,85,247;  --au-g3: 59,130,246; --au-deep: 24,26,52; }
html.theme-sakura    { --au-g1: 244,114,182; --au-g2: 251,113,133; --au-g3: 167,139,250; --au-deep: 74,18,48; }
html.theme-github    { --au-g1: 130,80,223;  --au-g2: 47,129,247;  --au-g3: 63,185,80;  --au-deep: 20,16,40; }
html.theme-party    { --au-g1: 255,92,147;  --au-g2: 124,92,255;  --au-g3: 63,208,224;  --au-deep: 20,14,40; }
html.theme-cyberpunk { --au-g1: 217,70,239;  --au-g2: 34,211,238;  --au-g3: 250,204,21; --au-deep: 18,10,34; }

html.aurora-subtle { --au-ai: .55; }
html.aurora-medium { --au-ai: 1; }
html.aurora-bold   { --au-ai: 1.5; }

/* the glow itself: one fixed layer behind the page, no blur filter (gradients are already soft) */
.aurora-bg, .auth-aurora { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.aurora-bg { display: none; }
html.aurora-on .aurora-bg { display: block; }
.aurora-bg::before, .auth-aurora::before {
    content: ""; position: absolute; inset: -15%;
    background:
        radial-gradient(circle at 16% 22%, rgba(var(--au-g1), calc(.5  * var(--au-ai) * var(--au-base))), transparent 42%),
        radial-gradient(circle at 78% 8%,  rgba(var(--au-g2), calc(.34 * var(--au-ai) * var(--au-base))), transparent 40%),
        radial-gradient(circle at 36% 92%, rgba(var(--au-g3), calc(.42 * var(--au-ai) * var(--au-base))), transparent 44%),
        radial-gradient(circle at 96% 78%, rgba(var(--au-g1), calc(.24 * var(--au-ai) * var(--au-base))), transparent 40%);
}
html.aurora-on.aurora-motion .aurora-bg::before, .auth-aurora::before { animation: aurora-drift 22s ease-in-out infinite alternate; }
@keyframes aurora-drift { from { transform: translate3d(-2%, -1%, 0) scale(1); } to { transform: translate3d(2%, 2%, 0) scale(1.08); } }
@media (max-width: 767px), (prefers-reduced-motion: reduce) { .aurora-bg::before, .auth-aurora::before { animation: none !important; } }

/* the page sits above the glow and lets it show through */
html.aurora-on .aurora-shell { position: relative; z-index: 1; }
html.aurora-on #main-content { background: transparent !important; }

/* frosted cards (never a pop-up panel: modals sit inside a fixed overlay and date/time/dropdown panels are absolute, both stay solid): the card colour of the current theme, a little see-through (no blur: it would turn every card into a containing
   block for fixed pop-ups placed inside it, and the glow is too soft for blur to show anyway) */
html.aurora-on.aurora-frosted:not([class*="theme-"]):not(.dark) #main-content :is(.rounded-xl, .rounded-2xl).bg-white:not(.fixed *):not(.absolute) { background-color: rgba(255, 255, 255, .8) !important; }
html.aurora-on.aurora-frosted.dark:not([class*="theme-"]) #main-content :is(.rounded-xl, .rounded-2xl).bg-white:not(.fixed *):not(.absolute) { background-color: color-mix(in srgb, var(--dark-surface) 80%, transparent) !important; }
html.aurora-on.aurora-frosted.theme-discord   #main-content :is(.rounded-xl, .rounded-2xl).bg-white:not(.fixed *):not(.absolute) { background-color: color-mix(in srgb, var(--dc-surface) 80%, transparent) !important; }
html.aurora-on.aurora-frosted.theme-sakura    #main-content :is(.rounded-xl, .rounded-2xl).bg-white:not(.fixed *):not(.absolute) { background-color: color-mix(in srgb, var(--sk-surface) 80%, transparent) !important; }
html.aurora-on.aurora-frosted.theme-github    #main-content :is(.rounded-xl, .rounded-2xl).bg-white:not(.fixed *):not(.absolute) { background-color: color-mix(in srgb, var(--gh-surface) 80%, transparent) !important; }
html.aurora-on.aurora-frosted.theme-cyberpunk #main-content :is(.rounded-xl, .rounded-2xl).bg-white:not(.fixed *):not(.absolute) { background-color: color-mix(in srgb, var(--cp-surface) 80%, transparent) !important; }
html.aurora-on.aurora-frosted.theme-party     #main-content :is(.rounded-xl, .rounded-2xl).bg-white:not(.fixed *):not(.absolute) { background-color: color-mix(in srgb, var(--pt-surface) 80%, transparent) !important; }
