/* Glass look: frosted translucent panels over a soft brand-coloured backdrop.
   Loaded after app.css so it overrides colours and surfaces only. */
:root {
  --glass: rgba(255, 255, 255, .55);
  --glass-strong: rgba(255, 255, 255, .78);
  --glass-border: rgba(255, 255, 255, .7);
  --glass-shadow: 0 8px 32px rgba(0, 41, 107, .14), inset 0 1px 0 rgba(255, 255, 255, .8);
  --blur: blur(18px) saturate(170%);
  --line: rgba(20, 32, 46, .09);
}
html { background: var(--brand-page); }
body {
  min-height: 100vh;
  background:
    radial-gradient(60rem 40rem at 8% -10%, color-mix(in srgb, var(--brand-primary) 38%, transparent), transparent 60%),
    radial-gradient(50rem 36rem at 100% 0%, color-mix(in srgb, var(--brand-accent) 30%, transparent), transparent 60%),
    radial-gradient(60rem 40rem at 50% 115%, color-mix(in srgb, var(--brand-primary) 26%, transparent), transparent 60%),
    var(--brand-page);
  background-attachment: fixed;
}
h1, h2, h3 { letter-spacing: -.01em; }

/* header */
header.site {
  position: sticky; top: 0; z-index: 50;
  background: linear-gradient(135deg, color-mix(in srgb, var(--brand-primary-deep) 88%, transparent), color-mix(in srgb, var(--brand-primary) 80%, transparent));
  backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  border-bottom: 1px solid rgba(255, 255, 255, .22);
  box-shadow: 0 4px 24px rgba(0, 41, 107, .25);
}
.logo { width: 2.7rem; height: 2.7rem; flex: none; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .3)); }
header.site .brand { display: flex; align-items: center; gap: .65rem; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text b { font-size: 1rem; letter-spacing: -.005em; }
.brand-text small { font-size: .74rem; font-weight: 500; opacity: .85; }
.tabs a { border-radius: 999px; padding: 6px 14px; transition: background .15s; }
.tabs a.active { background: rgba(255, 255, 255, .22); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35), 0 0 0 1px rgba(255, 255, 255, .05); }
.tabs a:hover { background: rgba(255, 255, 255, .16); }

/* frosted surfaces */
.card, .stat, .b-game, .block, .banner, .match .card {
  background: var(--glass);
  backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: var(--radius);
}
.block { border-radius: 12px; }
.banner { border-left: 4px solid var(--brand-accent); }
a.fixture { transition: transform .15s, box-shadow .15s; }
a.fixture:hover, a.b-game:hover, .team-card:hover { transform: translateY(-2px); box-shadow: 0 14px 36px rgba(0, 41, 107, .2), inset 0 1px 0 rgba(255, 255, 255, .9); }
.score { color: var(--brand-primary-deep); }

/* pills and chips */
.pill { background: rgba(0, 74, 156, .12); color: var(--brand-primary-deep); backdrop-filter: blur(6px); }
.pill.live { background: #e5372b; box-shadow: 0 0 0 0 rgba(229, 55, 43, .6); animation: pulse 1.8s infinite; }
.pill.ok { background: rgba(26, 127, 55, .14); }
.pill.warn { background: rgba(242, 169, 0, .2); color: #6b4d00; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(229, 55, 43, 0); } 100% { box-shadow: 0 0 0 0 rgba(229, 55, 43, 0); } }
@media (prefers-reduced-motion: reduce) { .pill.live { animation: none; } a.fixture { transition: none; } }
.division-tag { background: rgba(0, 74, 156, .12); }
.chips button { background: var(--glass); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border: 1px solid var(--glass-border); color: var(--brand-primary-deep); box-shadow: 0 2px 10px rgba(0, 41, 107, .08); }
.chips button[aria-pressed="true"] { background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-deep)); color: #fff; border-color: transparent; box-shadow: 0 6px 18px rgba(0, 41, 107, .35); }

/* tables */
th, td { border-bottom-color: var(--line); }
table.data tbody tr:hover { background: rgba(255, 255, 255, .5); }
.subtabs { border-bottom-color: var(--line); }
.subtabs a.active { border-bottom-color: var(--brand-accent); color: var(--brand-primary-deep); }
.checklist li { border-bottom-color: var(--line); }
.stat strong { background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-deep)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* controls */
input, select, textarea { background: rgba(255, 255, 255, .6); border: 1px solid rgba(255, 255, 255, .85); box-shadow: inset 0 1px 3px rgba(0, 41, 107, .1); border-radius: 12px; transition: box-shadow .15s, background .15s; }
input:focus, select:focus, textarea:focus { outline: none; background: rgba(255, 255, 255, .9); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-primary) 35%, transparent); }
button, .btn, a.btn { background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-deep)); border-radius: 12px; box-shadow: 0 4px 14px rgba(0, 41, 107, .3), inset 0 1px 0 rgba(255, 255, 255, .25); transition: transform .12s, box-shadow .12s, filter .12s; }
button:hover:not(:disabled), a.btn:hover { transform: translateY(-1px); filter: brightness(1.08); }
button:active:not(:disabled) { transform: none; }
button:focus-visible, a:focus-visible, .tabs a:focus-visible { outline: 3px solid var(--brand-accent); outline-offset: 2px; }
button.secondary { background: var(--glass); color: var(--brand-primary-deep); border: 1px solid var(--glass-border); box-shadow: 0 2px 10px rgba(0, 41, 107, .1); }
header.site button.secondary { background: rgba(255, 255, 255, .18); color: #fff; border-color: rgba(255, 255, 255, .4); }
button.danger { background: var(--glass); color: var(--brand-danger); border: 1px solid rgba(180, 35, 24, .5); box-shadow: none; }
button.danger-solid { background: linear-gradient(135deg, #d92d20, #a4180f); }
button.goal { background: linear-gradient(135deg, #1f9d4a, #14692f); }
.chips button:not([aria-pressed="true"]):hover, button.secondary:hover { filter: none; background: var(--glass-strong); }

/* dialog and floating messages */
dialog#dlg { background: var(--glass-strong); backdrop-filter: blur(28px) saturate(180%); -webkit-backdrop-filter: blur(28px) saturate(180%); border: 1px solid var(--glass-border); border-radius: 20px; box-shadow: 0 24px 80px rgba(10, 25, 50, .45); }
dialog#dlg::backdrop { background: rgba(15, 30, 55, .35); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
#notice, .console-page #status { background: var(--glass-strong); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border: 1px solid var(--glass-border); border-left-width: 5px; border-radius: 14px; }
ul.impact.warn { background: rgba(242, 169, 0, .18); }
tr.flash td { animation-name: flash-glass; }
@keyframes flash-glass { from { background: rgba(242, 169, 0, .35); } to { background: transparent; } }

/* bracket */
.b-game.is-live { border-color: rgba(229, 55, 43, .75); box-shadow: 0 0 0 2px rgba(229, 55, 43, .2), var(--glass-shadow); }
.b-row + .b-row { border-top-color: var(--line); }

/* referee console */
.console-page .big-score { color: var(--brand-primary-deep); }

.site-foot { color: var(--brand-muted); }
.site-foot .motto { display: block; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: .75rem; margin-bottom: 4px; color: var(--brand-primary); }

/* browsers without backdrop-filter get a more solid panel so text stays readable */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .card, .stat, .b-game, .block, .banner, dialog#dlg, #notice, .chips button { background: rgba(255, 255, 255, .92); }
}
@media (prefers-contrast: more) {
  .card, .stat, .b-game, .block { background: #fff; border-color: #8a94a6; }
}

/* On phones the header wraps to several lines, so let it scroll away instead of covering the page. */
@media (max-width: 640px) { header.site { position: static; } }
