/* ============================================================
   OPENITG / IN THE GROOVE 2 AUTHENTIC ARCADE CABINET THEME
   ============================================================ */
:root {
  --bg-top: #5e080c;
  --bg-mid: #230407;
  --bg-bot: #0a0204;

  --chrome-1: #ffffff;
  --chrome-2: #d8dee8;
  --chrome-3: #8c96a8;
  --chrome-4: #4c5566;
  --chrome-dark: #1d222c;

  --itg-red: #e61c24;
  --itg-crimson: #9e0b12;
  --itg-orange: #ff6a00;
  --itg-gold: #ffd000;
  --itg-blue: #00aeff;
  --itg-blue-dark: #0057b8;
  --itg-green: #00d95f;

  --panel-bg: rgba(14, 5, 8, 0.9);
  --panel-inner: rgba(8, 3, 5, 0.92);
  --text: #f7f9fc;
  --muted: #c2b6bc;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg-mid) 45%, var(--bg-bot) 100%);
  color: var(--text);
  font-family: 'Segoe UI', 'Trebuchet MS', system-ui, sans-serif;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

.hidden { display: none !important; }
.muted { color: var(--muted); font-size: 0.88rem; }
.err-msg { color: #ff5a67; font-weight: 700; min-height: 20px; font-size: 0.9rem; }
.status-line { color: var(--itg-gold); font-weight: 700; min-height: 20px; font-size: 0.88rem; }

/* AUTHENTIC ITG2 BACKGROUND STREAKS & SCANLINES */
.itg-bg-layer {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
}
.itg-streak {
  position: absolute; left: -20%; width: 140%; height: 180px;
  background-repeat: repeat-x; background-size: auto 100%;
  opacity: 0.28; mix-blend-mode: screen;
}
.streak-red {
  top: 14%;
  background-image: url("/itg-assets/default/BGAnimations/_red%20streak%20(res%201024x128).png");
  animation: streakSlide 22s linear infinite;
}
.streak-blue {
  bottom: 12%;
  background-image: url("/itg-assets/default/BGAnimations/_blue%20streak%20(res%201024x128).png");
  opacity: 0.18;
  animation: streakSlideRev 28s linear infinite;
}
@keyframes streakSlide {
  from { background-position: 0 0; }
  to { background-position: 1024px 0; }
}
@keyframes streakSlideRev {
  from { background-position: 1024px 0; }
  to { background-position: 0 0; }
}
.itg-scanlines {
  position: absolute; inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0px,
    rgba(0, 0, 0, 0) 2px,
    rgba(0, 0, 0, 0.16) 3px,
    rgba(0, 0, 0, 0.16) 4px
  );
}

/* CHROME METALLIC ARCADE HEADER */
.itg-header {
  position: sticky; top: 0; z-index: 60;
  background: linear-gradient(180deg,
    #f6f8fb 0%,
    #cfd6e0 44%,
    #9ca6b6 50%,
    #bac2ce 88%,
    #636c7a 100%);
  border-bottom: 3px solid #000;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.75);
}

.header-inner {
  max-width: 1360px; margin: 0 auto;
  padding: 8px 20px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap;
}

.itg-brand {
  display: flex; align-items: center; gap: 8px; cursor: pointer;
}
.itg-arrow-icon {
  height: 36px; width: auto;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,0.65));
}
.itg-logo-img {
  height: 30px; width: auto;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.85));
}
.arena-chip {
  background: linear-gradient(180deg, #ff333b 0%, #a50810 100%);
  color: #fff; font-weight: 900; font-size: 0.72rem; letter-spacing: 1.5px;
  padding: 4px 10px; border-radius: 4px;
  border: 2px solid #111;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.45), 0 2px 5px rgba(0,0,0,0.45);
  text-transform: uppercase;
}

.itg-nav { display: flex; gap: 6px; flex-wrap: wrap; }
.chrome-tab {
  background: linear-gradient(180deg, #2d3340 0%, #151820 50%, #0d0f14 100%);
  color: #e6ecf5;
  border: 2px solid #222;
  outline: 1px solid rgba(255,255,255,0.4);
  padding: 7px 14px; border-radius: 6px;
  font-weight: 900; font-size: 0.8rem; letter-spacing: 0.8px;
  cursor: pointer; text-transform: uppercase;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.22), 0 2px 5px rgba(0,0,0,0.4);
  transition: 0.12s;
}
.chrome-tab:hover {
  background: linear-gradient(180deg, #3c465a 0%, #1d2330 100%);
  color: #fff;
}
.chrome-tab.active {
  background: linear-gradient(180deg, #ff4238 0%, #c40e16 52%, #8c060c 100%);
  color: #fff;
  border-color: #300;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.5), 0 0 12px rgba(230, 28, 36, 0.55);
}
.chrome-tab.solo-tab {
  background: linear-gradient(180deg, #1ea6ff 0%, #0066cc 52%, #004499 100%);
  color: #fff;
}
.chrome-tab.solo-tab:hover { filter: brightness(1.12); }
.chrome-tab.admin-tab.active {
  background: linear-gradient(180deg, #ffbb00 0%, #d47a00 100%);
  color: #160a00;
}

.header-right { display: flex; align-items: center; gap: 8px; }
.sfx-toggle {
  background: #171a22; color: #ffd000; border: 2px solid #2a303d;
  border-radius: 6px; padding: 6px 10px; font-weight: 800; font-size: 0.76rem;
  cursor: pointer;
}
.sfx-toggle.muted { color: #7a8291; }

.player-plate {
  display: flex; align-items: center; gap: 7px;
  background: linear-gradient(180deg, #1d222e 0%, #0d1017 100%);
  border: 2px solid #222; border-radius: 6px; padding: 4px 10px;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.8);
}
.plate-tag {
  background: linear-gradient(180deg, #00c3ff, #0066cc);
  color: #fff; font-weight: 900; font-size: 0.72rem;
  padding: 2px 6px; border-radius: 3px;
}
.player-plate input {
  background: transparent; border: none; color: #fff;
  font-weight: 800; width: 112px; outline: none; font-size: 0.86rem;
}
.ws-led {
  width: 10px; height: 10px; border-radius: 50%;
  background: #ff2424; box-shadow: 0 0 8px #ff2424; border: 1px solid #000;
}
.ws-led.online { background: #00e676; box-shadow: 0 0 8px #00e676; }

/* TICKER BAR */
.itg-ticker {
  background: linear-gradient(180deg, #210306 0%, #100103 100%);
  border-top: 2px solid #000;
  padding: 4px 16px;
  text-align: center;
  font-size: 0.76rem; font-weight: 800; letter-spacing: 1.4px;
  color: #ffd86b; text-transform: uppercase;
  text-shadow: 0 1px 2px #000;
}

/* ENGINE LOADING BANNER */
.engine-banner {
  position: relative; z-index: 50;
  background: linear-gradient(90deg, #120407, #350911, #120407);
  border-bottom: 2px solid var(--itg-gold);
  padding: 8px 24px; display: flex; align-items: center; justify-content: center; gap: 16px;
  font-size: 0.85rem; font-weight: 800; color: var(--itg-gold);
}
.progress-track {
  flex: 1; max-width: 360px; height: 10px;
  background: #0a0406; border: 1px solid var(--chrome-3); border-radius: 4px; overflow: hidden;
}
.progress-track.full-w { max-width: none; width: 100%; }
.progress-fill {
  height: 100%; width: 10%;
  background: linear-gradient(90deg, #ff2a2a, #ffae00, #00c8ff);
  transition: width 0.2s;
}

/* MAIN VIEW CONTAINER */
.view {
  display: none; position: relative; z-index: 10;
  width: 100%; max-width: 1360px; margin: 20px auto; padding: 0 18px 36px;
  flex: 1;
}
.view.active { display: block; }

/* AUTHENTIC ITG2 CHROME-FRAMED METALLIC PANELS */
.itg-frame {
  background: var(--panel-bg);
  border: 2px solid var(--chrome-2);
  outline: 2px solid #000;
  border-radius: 10px;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.16),
    0 10px 28px rgba(0, 0, 0, 0.7);
  overflow: hidden;
  margin-bottom: 18px;
}

.frame-header {
  background: linear-gradient(180deg,
    #3d1116 0%,
    #25070a 49%,
    #180406 51%,
    #28090d 100%);
  border-bottom: 2px solid var(--chrome-3);
  padding: 10px 16px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
}
.frame-title {
  font-weight: 900; font-size: 0.92rem; letter-spacing: 1.5px;
  color: #fff; text-transform: uppercase;
  text-shadow: 0 2px 3px #000;
}
.frame-body { padding: 16px; }

/* AUTHENTIC ITG2 GLOSSY BUTTONS */
.itg-btn {
  border: 2px solid #111;
  outline: 1px solid rgba(255,255,255,0.45);
  border-radius: 7px;
  padding: 9px 18px;
  font-weight: 900; font-size: 0.85rem; letter-spacing: 1px;
  text-transform: uppercase; cursor: pointer;
  text-shadow: 0 1px 2px rgba(0,0,0,0.75);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.5), 0 4px 10px rgba(0,0,0,0.5);
  transition: transform 0.08s, filter 0.12s;
}
.itg-btn:hover { filter: brightness(1.12); }
.itg-btn:active { transform: scale(0.98); }
.itg-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-lg { padding: 12px 24px; font-size: 0.98rem; }
.btn-sm { padding: 6px 12px; font-size: 0.78rem; }
.btn-xs { padding: 4px 10px; font-size: 0.74rem; }

.itg-btn-start {
  background: linear-gradient(180deg, #ff7b1a 0%, #e62614 50%, #a80a08 52%, #d41c14 100%);
  color: #fff;
}
.itg-btn-blue {
  background: linear-gradient(180deg, #3ac8ff 0%, #007ee6 50%, #0051a8 52%, #0072d6 100%);
  color: #fff;
}
.itg-btn-chrome {
  background: linear-gradient(180deg, #eef2f7 0%, #b8c2d1 50%, #8b95a6 52%, #adb7c7 100%);
  color: #10141d; text-shadow: 0 1px 0 rgba(255,255,255,0.75);
}
.itg-btn-red {
  background: linear-gradient(180deg, #b81a24 0%, #6e0810 52%, #8a0d16 100%);
  color: #fff;
}
.itg-btn-ready {
  background: linear-gradient(180deg, #33f078 0%, #00b84c 50%, #008234 52%, #00ad46 100%);
  color: #031f0c; text-shadow: 0 1px 0 rgba(255,255,255,0.5);
}

/* HERO CABINET SECTION */
.itg-hero {
  display: grid; grid-template-columns: 1.35fr 1fr; gap: 24px;
  padding: 24px;
  background:
    radial-gradient(circle at 20% 20%, rgba(230, 28, 36, 0.35), transparent 55%),
    radial-gradient(circle at 85% 80%, rgba(0, 174, 255, 0.22), transparent 55%),
    linear-gradient(180deg, rgba(28, 6, 10, 0.94), rgba(10, 3, 5, 0.96));
}
.itg-kicker {
  font-size: 0.74rem; font-weight: 900; letter-spacing: 2px;
  color: var(--itg-gold); margin-bottom: 10px;
}
.hero-logo-lockup { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 18px; }
.hero-arrow { width: 64px; height: auto; filter: drop-shadow(0 4px 10px rgba(230,28,36,0.55)); }
.itg-hero h1 {
  margin: 0 0 8px; font-size: 1.95rem; font-weight: 900; letter-spacing: 0.8px;
  text-shadow: 0 3px 6px #000;
}
.itg-glow {
  color: #fff;
  text-shadow: 0 0 12px var(--itg-red), 0 0 24px var(--itg-orange);
}
.hero-sub { margin: 0; color: #ddd0d4; line-height: 1.48; font-size: 0.93rem; }

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.itg-join-box {
  display: flex; gap: 6px; padding: 4px;
  background: #0a0305; border: 2px solid var(--chrome-3); border-radius: 8px;
}
.itg-join-box input {
  background: transparent; border: none; color: #fff; outline: none;
  padding: 6px 10px; width: 165px; font-weight: 900;
  text-transform: uppercase; letter-spacing: 1px;
}

.machine-readout {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px; height: 100%;
}
.readout-cell {
  background: linear-gradient(180deg, #1b060a, #0b0204);
  border: 2px solid #596375; border-radius: 8px; padding: 14px;
  display: flex; flex-direction: column; justify-content: center;
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.75);
}
.readout-cell.full { grid-column: 1 / -1; }
.readout-val {
  font-size: 2.1rem; font-weight: 900; color: var(--itg-gold);
  text-shadow: 0 0 12px rgba(255, 208, 0, 0.35);
}
.readout-val.blue { color: var(--itg-blue); text-shadow: 0 0 12px rgba(0, 174, 255, 0.4); }
.readout-lbl { font-size: 0.72rem; font-weight: 900; letter-spacing: 1.4px; color: var(--muted); }
.keys-row { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 5px; align-items: center; font-size: 0.82rem; font-weight: 800; }
.keys-row kbd {
  background: linear-gradient(180deg, #f0f4f8, #9aa4b4);
  color: #111; padding: 2px 7px; border-radius: 4px; border: 1px solid #000;
  font-family: inherit; font-weight: 900;
}
.keys-row .sep { color: var(--itg-gold); }

/* LOBBY CARDS */
.lobby-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(295px, 1fr)); gap: 14px; }
.lobby-card {
  background: linear-gradient(180deg, #1e080d, #0d0306);
  border: 2px solid #6b7689; border-radius: 8px; padding: 14px;
  display: flex; flex-direction: column; gap: 8px;
}
.lobby-card-top { display: flex; justify-content: space-between; align-items: center; }
.room-plate {
  background: linear-gradient(180deg, #102a4a, #071528);
  color: var(--itg-blue); border: 2px solid var(--itg-blue);
  font-family: monospace; font-weight: 900; font-size: 0.95rem;
  padding: 4px 10px; border-radius: 5px; letter-spacing: 1px;
}
.empty-state { color: var(--muted); text-align: center; padding: 22px; font-weight: 700; grid-column: 1 / -1; }

/* LOBBY ROOM */
.lobby-header-flex { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.lobby-id-block { display: flex; align-items: center; gap: 14px; }
.lobby-id-block h2 { margin: 0; font-size: 1.25rem; text-transform: uppercase; letter-spacing: 1px; }
.lobby-header-actions { display: flex; gap: 8px; }

.lobby-layout { display: grid; grid-template-columns: 1fr 1.15fr; gap: 18px; align-items: start; }
.lobby-col-left { display: flex; flex-direction: column; }

.versus-stage {
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center;
  margin-bottom: 18px;
}
.vs-emblem {
  font-size: 1.7rem; font-weight: 900; font-style: italic;
  color: var(--itg-gold);
  text-shadow: 0 2px 0 #000, 0 0 18px rgba(255, 106, 0, 0.8);
}
.slot-plate {
  background: linear-gradient(180deg, #1b0a10, #0c0306);
  border: 2px solid var(--chrome-3); border-radius: 9px; padding: 14px; min-height: 118px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.2);
}
.slot-plate.p1 { border-color: var(--itg-blue); }
.slot-plate.p2 { border-color: var(--itg-red); }
.slot-plate.is-ready { border-color: var(--itg-green); box-shadow: 0 0 16px rgba(0, 217, 95, 0.35); }
.slot-label { font-size: 0.7rem; font-weight: 900; letter-spacing: 1.5px; color: var(--muted); }
.slot-name { font-size: 1.15rem; font-weight: 900; margin: 4px 0; }
.slot-meta { font-size: 0.8rem; color: #dcd0d4; }
.ready-pill {
  display: inline-block; margin-top: 8px; font-size: 0.72rem; font-weight: 900;
  padding: 3px 9px; border-radius: 4px; background: #26161b; color: var(--muted);
  border: 1px solid #554048;
}
.ready-pill.ok { background: var(--itg-green); color: #02200d; border-color: #02200d; }

.options-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.itg-field { display: flex; flex-direction: column; gap: 5px; }
.itg-field label { font-size: 0.72rem; font-weight: 900; letter-spacing: 1px; color: var(--itg-gold); }
.itg-field input, .itg-field select, .wheel-filters input, .wheel-filters select {
  background: #0a0305; border: 2px solid #5c6678; color: #fff;
  padding: 8px 10px; border-radius: 6px; outline: none; font-size: 0.88rem; font-weight: 700;
}
.itg-field input:focus, .itg-field select:focus, .wheel-filters input:focus { border-color: var(--itg-blue); }
.ready-bar { display: flex; gap: 10px; flex-wrap: wrap; }
.ready-bar .itg-btn { flex: 1; }

/* CHAT */
.chat-messages {
  height: 155px; overflow-y: auto; background: #080204;
  border: 2px solid #424a59; border-radius: 6px; padding: 10px; margin-bottom: 10px;
  font-size: 0.85rem;
}
.chat-line { margin-bottom: 5px; line-height: 1.35; }
.chat-line.sys { color: var(--itg-gold); font-style: italic; }
.chat-form { display: flex; gap: 8px; }
.chat-form input {
  flex: 1; background: #0a0305; border: 2px solid #5c6678; color: #fff;
  padding: 8px 10px; border-radius: 6px; outline: none;
}

/* ITG2 MUSIC WHEEL */
.wheel-filters { display: flex; gap: 8px; flex-wrap: wrap; }
.itg-banner-stage {
  background: linear-gradient(180deg, #1f060a, #0b0204);
  border: 2px solid var(--chrome-2); border-radius: 8px;
  padding: 12px; margin-bottom: 12px;
  display: flex; gap: 14px; align-items: center;
}
.preview-banner {
  width: 192px; height: 60px; object-fit: cover; border-radius: 5px;
  border: 2px solid #000; background: #140508; flex-shrink: 0;
}
.music-wheel { max-height: 495px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }
.wheel-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: linear-gradient(90deg, #270b11 0%, #150508 65%, #0e0305 100%);
  border: 2px solid #576173; border-left: 6px solid var(--itg-red);
  border-radius: 6px; padding: 9px 12px; cursor: pointer; transition: 0.1s;
}
.wheel-item:hover {
  border-color: var(--chrome-1);
  background: linear-gradient(90deg, #42101a 0%, #24080e 70%, #140408 100%);
}
.wheel-item.selected {
  border-color: var(--itg-gold); border-left-color: var(--itg-blue);
  background: linear-gradient(90deg, #0b325c 0%, #240d1c 70%, #120408 100%);
  box-shadow: 0 0 14px rgba(0, 174, 255, 0.35);
}
.song-row-info { min-width: 0; flex: 1; }
.song-title { font-weight: 900; font-size: 0.95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.song-sub { font-size: 0.78rem; color: var(--muted); }

/* AUTHENTIC ITG2 DIFFICULTY METERS */
.diff-pills { display: flex; gap: 4px; flex-wrap: wrap; }
.diff-pill {
  font-size: 0.74rem; font-weight: 900; padding: 2px 7px; border-radius: 4px;
  border: 1px solid #000; color: #fff; text-shadow: 0 1px 1px #000;
}
.diff-Beginner { background: linear-gradient(180deg, #cf7dff, #8a2be2); }
.diff-Easy { background: linear-gradient(180deg, #2ef078, #009e42); }
.diff-Medium { background: linear-gradient(180deg, #ffe23b, #d99b00); color: #160c00; text-shadow: none; }
.diff-Hard { background: linear-gradient(180deg, #ff4747, #b80c14); }
.diff-Challenge { background: linear-gradient(180deg, #33ccff, #0077cc); }
.diff-Edit { background: linear-gradient(180deg, #cbd4e0, #778396); color: #111; text-shadow: none; }

/* PUBLIC CATALOG GRID */
.catalog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 12px; }
.catalog-card {
  background: linear-gradient(180deg, #1b070c, #0c0305);
  border: 2px solid #5b6577; border-radius: 8px; overflow: hidden;
  display: flex; flex-direction: column;
}
.catalog-banner { width: 100%; height: 84px; object-fit: cover; border-bottom: 2px solid #000; }
.catalog-card-body { padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }

/* ADMIN PANEL */
.admin-login-card { max-width: 480px; margin: 40px auto; }
.admin-login-form, .stack-form { display: flex; flex-direction: column; gap: 12px; }
.two-col-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.two-col-grid.tight { gap: 10px; }

.admin-topbar-flex { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; }
.admin-stats-strip { display: flex; gap: 14px; flex-wrap: wrap; }
.mini-stat {
  background: #0b0305; border: 1px solid #596375; border-radius: 6px;
  padding: 6px 12px; display: flex; flex-direction: column; align-items: center; min-width: 78px;
}
.mini-stat strong { font-size: 1.15rem; color: var(--itg-gold); }
.mini-stat span { font-size: 0.65rem; font-weight: 800; letter-spacing: 1px; color: var(--muted); }
.admin-subtabs { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }

.itg-dropzone {
  border: 2px dashed var(--itg-gold); border-radius: 8px; padding: 22px 14px;
  text-align: center; cursor: pointer; font-weight: 800; font-size: 0.85rem;
  color: var(--itg-gold); background: rgba(255, 208, 0, 0.05);
}
.itg-dropzone:hover { background: rgba(255, 208, 0, 0.12); color: #fff; }
.itg-dropzone input { display: none; }

.pack-chips-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.pack-chip {
  display: flex; align-items: center; gap: 8px;
  background: #1a070c; border: 1px solid var(--chrome-3); border-radius: 6px;
  padding: 6px 10px; font-size: 0.82rem; font-weight: 800;
}
.admin-song-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 8px; }
.admin-song-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: #0d0406; border: 1px solid #4e5869; border-radius: 6px; padding: 8px 10px;
}

.itg-check { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 0.88rem; cursor: pointer; }
.check-row { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 12px; }
.save-bar { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }

/* CHROME FOOTER */
.itg-footer {
  position: relative; z-index: 20;
  background: linear-gradient(180deg, #d8dee8 0%, #8f99ab 55%, #5e6778 100%);
  border-top: 3px solid #000;
  color: #10141c; font-weight: 900; font-size: 0.74rem; letter-spacing: 1.2px;
  padding: 7px 24px;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px;
}

/* FULLSCREEN OPENITG GAME OVERLAY */
.game-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: #000; display: flex; flex-direction: column;
}
.versus-hud {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 6px 16px;
  background: linear-gradient(180deg, #2d070c 0%, #120204 100%);
  border-bottom: 3px solid var(--chrome-2);
  gap: 14px;
}
.hud-player { display: flex; align-items: baseline; gap: 14px; }
.hud-player.p2 { justify-content: flex-end; flex-direction: row-reverse; }
.hud-name { font-weight: 900; font-size: 0.95rem; text-transform: uppercase; }
.hud-player.p1 .hud-name { color: var(--itg-blue); }
.hud-player.p2 .hud-name { color: var(--itg-red); }
.hud-dp { font-size: 1.55rem; font-weight: 900; font-variant-numeric: tabular-nums; color: #fff; text-shadow: 0 2px 4px #000; }
.hud-combo { font-size: 0.82rem; font-weight: 900; color: var(--itg-gold); }
.hud-center { text-align: center; }
.hud-song { font-weight: 900; font-size: 0.9rem; color: #fff; }
.hud-delta { font-size: 0.78rem; font-weight: 900; color: var(--itg-gold); margin: 2px 0; }
.hud-controls { display: flex; gap: 6px; justify-content: center; margin-top: 4px; }

.canvas-stage {
  flex: 1; position: relative; display: flex;
  align-items: center; justify-content: center;
  background: #000; overflow: hidden;
}
#canvas {
  aspect-ratio: 4 / 3;
  height: 100%; width: auto; max-width: 100%; max-height: 100%;
  outline: none; display: block; background: #000;
  box-shadow: 0 0 60px rgba(230, 28, 36, 0.25);
}

.stage-overlay {
  position: absolute; inset: 0; z-index: 10;
  background: rgba(10, 2, 4, 0.88);
  display: flex; align-items: center; justify-content: center;
}
.stage-overlay-card { text-align: center; padding: 30px 48px; }
.overlay-big { font-size: 3.1rem; font-weight: 900; color: var(--itg-gold); letter-spacing: 2px; text-shadow: 0 0 20px var(--itg-red); }
.overlay-sub { margin-top: 8px; color: #e8dce0; font-size: 1rem; font-weight: 700; }

.results-modal {
  position: absolute; inset: 0; z-index: 20;
  background: rgba(6, 1, 3, 0.92);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.results-card { width: 100%; max-width: 740px; }
.results-banner { text-align: center; font-size: 2rem; font-weight: 900; color: var(--itg-gold); text-shadow: 0 2px 6px #000; }
.results-song { text-align: center; color: var(--muted); margin: 4px 0 16px; font-weight: 700; }
.results-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 18px; }
.result-col {
  background: #0b0204; border: 2px solid #596375; border-radius: 8px; padding: 14px;
}
.result-col.winner { border-color: var(--itg-gold); box-shadow: 0 0 22px rgba(255, 208, 0, 0.28); }
.result-dp { font-size: 2rem; font-weight: 900; color: var(--itg-blue); margin: 4px 0 10px; }
.judge-line { display: flex; justify-content: space-between; font-size: 0.85rem; padding: 2px 0; }
.results-actions { text-align: center; }

.cabinet-footer {
  display: flex; justify-content: space-between; align-items: center;
  padding: 5px 16px; background: #140306; border-top: 2px solid var(--chrome-3);
  font-size: 0.76rem; color: var(--muted);
}
.screen-badge { font-family: monospace; color: var(--itg-gold); font-weight: 700; }

.toast {
  position: fixed; bottom: 42px; right: 20px; z-index: 500;
  background: linear-gradient(180deg, #2d0910, #140306);
  border: 2px solid var(--itg-gold); color: #fff;
  padding: 11px 18px; border-radius: 8px; font-weight: 800;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.65);
}

@media (max-width: 920px) {
  .itg-hero, .lobby-layout, .two-col-grid { grid-template-columns: 1fr; }
}
