/* Hogwarts of EVE — shared look: tokens, space backdrop, top bar, buttons. */

:root {
  --void: #05060f;
  --deep: #0a0f24;
  --gold: #d9b45a;
  --gold-hi: #f3d98c;
  --cyan: #5fd4ff;
  --violet: #8a5cff;
  --text: #d7dcef;
  --muted: #8a93b5;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; } /* never let a display: rule un-hide something */
html, body { height: 100%; }
body {
  background: var(--void);
  color: var(--text);
  font-family: "Rajdhani", system-ui, sans-serif;
  font-size: 18px;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Space backdrop: nebula gradients behind a canvas starfield */
.nebula {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 60% 45% at 78% 22%, rgba(138, 92, 255, .22), transparent 70%),
    radial-gradient(ellipse 55% 40% at 15% 80%, rgba(95, 212, 255, .14), transparent 70%),
    radial-gradient(ellipse 40% 30% at 50% 55%, rgba(217, 180, 90, .07), transparent 70%),
    linear-gradient(180deg, var(--void) 0%, var(--deep) 60%, var(--void) 100%);
}
canvas#stars { position: fixed; inset: 0; z-index: 1; width: 100%; height: 100%; }

/* Top bar: EVE SSO login / logged-in pilot */
.topbar {
  position: absolute; z-index: 4; top: 0; right: 0;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 0 16px;
  display: flex; align-items: center; gap: 12px;
}
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 44px; padding: 0 18px;
  font: 600 .95rem/1 "Rajdhani", system-ui, sans-serif; letter-spacing: .14em; text-transform: uppercase;
  color: var(--text); text-decoration: none; cursor: pointer;
  background: rgba(10, 15, 36, .7);
  border: 1px solid rgba(217, 180, 90, .55);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: border-color .2s, box-shadow .2s, color .2s;
}
.btn:hover, .btn:focus-visible {
  color: #fff; border-color: var(--gold-hi); outline: none;
  box-shadow: 0 0 0 1px var(--gold-hi), 0 0 24px rgba(217, 180, 90, .3);
}
.btn svg { width: 18px; height: 18px; flex: none; }
.pilot { display: flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: .06em; }
.pilot img { width: 40px; height: 40px; border: 1px solid var(--gold); }
.pilot small { display: block; font-size: .7rem; letter-spacing: .3em; text-transform: uppercase; color: var(--cyan); }
.topbar form { margin: 0; }
.flash {
  margin-top: 22px; padding: 10px 16px; max-width: 34em;
  color: var(--gold-hi); border: 1px solid rgba(217, 180, 90, .4); background: rgba(10, 15, 36, .6);
}
@media (max-width: 520px) {
  .pilot span { display: none; }
  .btn { padding: 0 14px; letter-spacing: .1em; }
}

/* House Cup: the four houses side by side, each with a Great Hall style hourglass.
   House colours are a validated categorical set (dark surface); each bar is also
   labelled with its house name, so colour is never the only cue. */
.cup-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.cup-head h2 { margin: 0; }
.cup-head small { color: var(--muted); font-size: .85rem; }
.houses { list-style: none; display: grid; gap: 12px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 760px) { .houses { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.house {
  --house: var(--gold);
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px;
  padding: 14px 12px 12px; border: 1px solid rgba(138, 147, 181, .16); background: rgba(5, 6, 15, .35);
}
.house.gryffindor { --house: #c23a4f; } .house.hufflepuff { --house: #c98500; }
.house.ravenclaw  { --house: #4a7fe0; } .house.slytherin  { --house: #2fa864; }
.house.lead { border-color: rgba(217, 180, 90, .7); box-shadow: inset 0 3px 0 var(--gold); }
.house.mine .hn { color: var(--cyan); }
.house .rk { font: 600 .7rem "Rajdhani", sans-serif; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
.house.lead .rk { color: var(--gold-hi); }
.house img { width: 52px; height: 52px; }
.house .hn { font-family: "Cinzel", Georgia, serif; font-weight: 700; color: var(--gold-hi); line-height: 1.2; }
.glass { position: relative; width: 46px; height: 140px; margin: 4px 0; border: 1px solid rgba(138, 147, 181, .35); border-radius: 4px; background: rgba(5, 6, 15, .6); overflow: hidden; }
.glass i { position: absolute; left: 2px; right: 2px; bottom: 2px; background: var(--house); border-radius: 4px 4px 2px 2px; transition: height .6s ease; }
.house .pts { font-family: "Cinzel", Georgia, serif; font-size: 1.9rem; line-height: 1; color: #fff; }
.house .pts small { display: block; margin-top: 3px; font: 600 .66rem "Rajdhani", sans-serif; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.house .sub { color: var(--muted); font-size: .82rem; line-height: 1.35; }
.house .star { color: var(--text); font-size: .82rem; }
@media (prefers-reduced-motion: reduce) { .glass i { transition: none; } }
.house .members { margin-top: -2px; color: var(--muted); font-size: .85rem; letter-spacing: .06em; }
.house.mine .members { color: var(--cyan); }
