/* ================= CHRISTMAS THEME =================
   Deep Christmas red with gold and white (no red text on red, no green), with snow falling down the page, a string of
   twinkling lights under the top bar and snowflakes falling from the mouse pointer (christmas.js).
   season.py adds this file in December only. */
:root {
  color-scheme: dark;
  --pip-royal: #7a0f14;
  --pip-blue: #d62f2f;
  --pip-bright: #f5c542;
  --pip-cyan: #ffe08a;
  --gradient: linear-gradient(135deg, #9b1018, #d62f2f 55%, #f05454);
  --bg: #210407;  /* inputs and inner boxes; the page itself is a gradient (body) a little darker than the cards */
  --surface: #3d0a0f;
  --surface-2: #4f1016;
  --border: #6e1c23;
  --text: #fff6f3;
  --muted: #f0b9b4;
  --accent: #e23b3b;
  --accent-hover: #f05454;
  --accent-text: #ffffff;
  --link: #ffd36b;
  --focus: #f5c542;
  --gold: #f5c542;
  --gold-soft: #4a3010;
}
body {
  background:
    radial-gradient(circle at 88% 4%, rgba(245, 197, 66, .14), rgba(214, 47, 47, .06) 16%, transparent 34%),
    radial-gradient(circle at 6% 100%, rgba(245, 197, 66, .05), transparent 42%),
    linear-gradient(180deg, #300609 0%, #22040a 45%, #170305 100%) fixed;
  background-attachment: fixed;
}
/* snow falling down the whole page, behind the cards (the SVG animates itself) */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: url("/static/christmas-snow.svg") center / cover no-repeat;
}
/* snowflakes falling from the mouse pointer (christmas.js makes them) */
.tg-leaf {
  position: fixed; z-index: 9999; pointer-events: none; user-select: none; line-height: 1;
  font-size: var(--size, 18px); transform: translate(-50%, -50%);
  animation: snow-fall var(--time, 1.8s) ease-in forwards;
}
@keyframes snow-fall {
  0% { opacity: 0; transform: translate(-50%, -50%) rotate(0deg) scale(.6); }
  12% { opacity: 1; transform: translate(-50%, -50%) rotate(20deg) scale(1); }
  100% { opacity: 0; transform: translate(calc(-50% + var(--dx, 0px)), 110px) rotate(var(--spin, 180deg)) scale(.8); }
}
main, .topbar, footer { position: relative; z-index: 1; }
.topbar { background: rgba(61, 10, 15, .94); border-bottom-color: #7a1f26; box-shadow: 0 1px 18px rgba(214, 47, 47, .25); z-index: 3; }
/* a string of twinkling lights hanging under the top bar */
.topbar::after {
  content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 34px; pointer-events: none;
  background: url("/static/christmas-lights.svg") 0 0 / 240px 40px repeat-x;
  filter: drop-shadow(0 0 4px rgba(255, 220, 120, .45));
}
.card { border-color: var(--border); box-shadow: 0 0 0 1px rgba(245, 197, 66, .05), 0 8px 24px rgba(0, 0, 0, .35); }
.guild:hover, .card.review:hover { border-color: var(--gold); box-shadow: 0 0 18px rgba(245, 197, 66, .2); }
.hero .logo.lg { width: 300px; filter: drop-shadow(0 10px 40px rgba(245, 197, 66, .4)); }
.hero .accent { background: linear-gradient(90deg, #f5c542, #fff1c4); -webkit-background-clip: text; background-clip: text; color: transparent; }
/* numbers and highlights in gold and white, never red on red */
.stat-value { background: linear-gradient(135deg, #f5c542, #fff6dc); -webkit-background-clip: text; background-clip: text; color: transparent; }
a.stat-tile:hover { border-color: var(--gold); box-shadow: 0 10px 24px rgba(0, 0, 0, .3); }
a { color: var(--link); }
/* the home banner: a little greeting */
.overview-hero, .home-hero { position: relative; overflow: hidden; box-shadow: 0 10px 40px rgba(0, 0, 0, .35), inset 0 0 0 1px rgba(245, 197, 66, .35); }
.badge, .chip { border-color: rgba(245, 197, 66, .35); }
.overview-hero::before, .home-hero::before {
  content: "🎄 Merry Christmas! 🎅"; position: absolute; inset: 12px 16px auto auto; font-size: 14px; font-weight: 700;
  padding: 4px 12px; border-radius: 999px; background: rgba(255, 255, 255, .18); color: #fff; pointer-events: none;
  animation: xmas-bob 3.2s ease-in-out infinite;
}
@keyframes xmas-bob { 50% { transform: translateY(-3px) rotate(-2deg); } }
@media (max-width: 700px) { .overview-hero::before, .home-hero::before { display: none; } }
.card > h2::after { content: " ❄️"; font-size: .75em; opacity: .85; }
/* snow piled on top of the cards, stat tiles and the welcome banner */
.card, .stat-tile { position: relative; }
.card::before, .stat-tile::before {
  content: ""; position: absolute; left: -2px; right: -2px; top: -11px; height: 27px; pointer-events: none; z-index: 1;
  background: url("/static/christmas-snowcap.svg") 0 0 / 150px 27px repeat-x;
  border-radius: 10px 10px 0 0; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .25));
}
.stat-tile::before { background-position: -37px 0; }  /* so neighbouring tiles don't look identical */
.overview-hero::after, .home-hero::after {
  content: ""; position: absolute; inset: 0 0 auto 0; width: auto; height: 20px; transform: none; animation: none;
  pointer-events: none; background: url("/static/christmas-snowcap.svg") -60px -4px / 150px 27px repeat-x;
}
button:not(.secondary):not(.danger):hover, .button:hover { box-shadow: 0 4px 16px rgba(214, 47, 47, .35); }
.badge.premium { color: #2b0a0a; }
.side-nav { background: var(--surface); }
.side-nav a.active { box-shadow: inset 3px 0 0 var(--gold); }
::selection { background: #d62f2f; color: #fff; }
/* places the normal look tints with Pip blue: gold and red instead */
.help-invite {
  border-color: rgba(245, 197, 66, .4);
  background: linear-gradient(120deg, rgba(245, 197, 66, .12), transparent 70%), var(--surface);
}
.spinner { border-color: rgba(245, 197, 66, .25); border-top-color: var(--gold); }
.layout-pick.on { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); background: rgba(245, 197, 66, .1); }
.card:hover { border-color: rgba(245, 197, 66, .45); box-shadow: 0 8px 28px rgba(0, 0, 0, .35); }
.guild:hover { box-shadow: 0 10px 26px rgba(0, 0, 0, .35); }
button:not(:disabled):hover, .button:hover { box-shadow: 0 4px 14px rgba(214, 47, 47, .35); }
@media (prefers-reduced-motion: reduce) {
  .overview-hero::before, .home-hero::before { animation: none; }
  body::before { display: none; }
}
