:root {
  --bg: #0b0f17; --panel: rgba(255, 255, 255, .05); --border: rgba(255, 255, 255, .09);
  --text: #e8edf6; --muted: #8b97ad; --green: #5dd67d; --red: #ff6b6b; --accent: #7c6cff; --accent2: #38d6c4;
  --radius: 18px;
}
* { box-sizing: border-box; }
body {
  margin: 0; min-height: 100vh; color: var(--text); background: var(--bg);
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif; line-height: 1.45;
}
.aurora {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60vw 50vh at 10% -10%, rgba(124, 108, 255, .35), transparent 60%),
    radial-gradient(50vw 45vh at 95% 0%, rgba(56, 214, 196, .25), transparent 60%),
    radial-gradient(60vw 50vh at 50% 110%, rgba(93, 214, 125, .15), transparent 60%);
  animation: drift 18s ease-in-out infinite alternate;
}
@keyframes drift { to { transform: translate3d(0, -2%, 0) scale(1.06); } }

.topbar {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 18px clamp(16px, 4vw, 40px); position: sticky; top: 0; z-index: 5;
  backdrop-filter: blur(14px); background: rgba(11, 15, 23, .6); border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand h1 { margin: 0; font-size: 1.25rem; letter-spacing: .2px; }
.top-right { display: flex; align-items: center; gap: 12px; }

.logo-cube {
  display: block; width: 56px; height: 56px; border-radius: 14px; margin: 0 auto 14px;
  background: linear-gradient(135deg, var(--green), var(--accent2) 55%, var(--accent));
  box-shadow: 0 10px 40px rgba(124, 108, 255, .45), inset 0 0 0 2px rgba(255, 255, 255, .25);
}
.logo-cube.small { width: 32px; height: 32px; border-radius: 9px; margin: 0; }

main { max-width: 1200px; margin: 0 auto; padding: 24px clamp(16px, 4vw, 40px) 60px; }
.players-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; flex-wrap: wrap; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; }

.card {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
  backdrop-filter: blur(10px); transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
  animation: rise .5s ease both;
}
.card:hover { transform: translateY(-6px); border-color: rgba(124, 108, 255, .55); box-shadow: 0 18px 50px rgba(0, 0, 0, .45); }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.logo { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; image-rendering: pixelated; background: #0d1117; }
.card-body { padding: 16px 18px 18px; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.card h2 { margin: 0; font-size: 1.08rem; }
.meta { margin: 4px 0 12px; font-size: .85rem; word-break: break-all; }
.label { margin: 0 0 6px; font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }

.badge, .pill, .chip {
  display: inline-block; border-radius: 999px; font-size: .78rem; padding: 4px 11px; white-space: nowrap;
  border: 1px solid var(--border); background: rgba(255, 255, 255, .06);
}
.badge.open { color: var(--green); border-color: rgba(93, 214, 125, .4); background: rgba(93, 214, 125, .1); }
.badge.closed { color: var(--red); border-color: rgba(255, 107, 107, .4); background: rgba(255, 107, 107, .1); }
.pill.ok { color: var(--green); } .pill.off { color: var(--red); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip.live { color: var(--green); border-color: rgba(93, 214, 125, .35); }
.chip.dim { color: var(--muted); }
.muted { color: var(--muted); }
.foot { text-align: center; margin-top: 30px; font-size: .8rem; }

button {
  font: inherit; cursor: pointer; border: 0; border-radius: 12px; padding: 11px 18px; color: #fff; font-weight: 600;
  background: linear-gradient(135deg, var(--accent), var(--accent2)); transition: transform .15s ease, filter .15s ease;
}
button:hover { transform: translateY(-1px); filter: brightness(1.1); }
button:focus-visible, input:focus-visible { outline: 2px solid var(--accent2); outline-offset: 2px; }
button.ghost { background: var(--panel); border: 1px solid var(--border); padding: 8px 14px; }

.login-body { display: grid; place-items: center; padding: 20px; }
.login-card {
  width: min(400px, 100%); padding: 34px 30px; text-align: center; border-radius: 24px;
  background: var(--panel); border: 1px solid var(--border); backdrop-filter: blur(18px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .5); animation: rise .6s ease both;
}
.login-card h1 { margin: 0 0 4px; font-size: 1.5rem; }
.login-card form { text-align: left; margin-top: 18px; display: grid; gap: 8px; }
.login-card label { font-size: .8rem; color: var(--muted); }
.login-card input {
  width: 100%; padding: 12px 14px; border-radius: 12px; font: inherit; color: var(--text);
  background: rgba(0, 0, 0, .3); border: 1px solid var(--border);
}
.login-card button { margin-top: 12px; width: 100%; }
.err { margin: 14px 0 0; padding: 10px 12px; border-radius: 12px; color: var(--red); background: rgba(255, 107, 107, .1); border: 1px solid rgba(255, 107, 107, .35); font-size: .88rem; }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
