/* style.css - klimat telewizyjnej grafiki sportowej (broadcast graphics) */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; width: 100%; height: 100%; overflow: hidden; background: #060810;
  font-family: 'Bahnschriften', 'Arial Narrow', Arial, sans-serif; color: #eef2f6; }
#game-canvas { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
.hidden { display: none !important; }
button { cursor: pointer; font-family: inherit; border: none; border-radius: 6px; padding: 10px 14px;
  background: #1b2a3a; color: #eef2f6; font-weight: 700; letter-spacing: .3px; transition: transform .12s, background .12s; }
button:hover { background: #2a4058; transform: translateY(-1px); }
button:disabled { opacity: .35; cursor: not-allowed; transform: none; }
.btn-ok { background: #1f8f4d; } .btn-ok:hover { background: #26a85c; }
.btn-warning { background: #b98a12; } .btn-warning:hover { background: #d6a11a; }
.btn-danger { background: #a4271f; } .btn-danger:hover { background: #c22f26; }
select, input { font-family: inherit; }

/* ---------- MENU STARTOWE ---------- */
#start-menu { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at center, #0d1b2a 0%, #060810 75%); }
.menu-box { width: min(560px, 92vw); background: rgba(10,16,26,.9); border: 1px solid #1f3040; border-radius: 14px;
  padding: 28px 30px; box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.menu-box h1 { margin: 0 0 2px; font-size: 30px; letter-spacing: 1px; color: #f5b400; text-align: center; }
.subtitle { text-align: center; opacity: .75; margin: 0 0 20px; font-size: 13px; }
.menu-row { display: flex; gap: 16px; margin-bottom: 14px; }
.menu-col { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.menu-col.toggles { justify-content: center; gap: 10px; font-size: 13px; }
label { font-size: 12px; text-transform: uppercase; letter-spacing: .6px; opacity: .8; }
select { padding: 9px; border-radius: 6px; background: #101b28; color: #fff; border: 1px solid #253647; }
.kit-choices { display: flex; gap: 10px; margin: 6px 0 16px; }
.kit-swatch { display: flex; align-items: center; gap: 6px; font-size: 12px; background: #101b28; padding: 8px 10px;
  border-radius: 8px; border: 1px solid #253647; cursor: pointer; text-transform: none; }
.kit-swatch span { width: 18px; height: 18px; border-radius: 4px; display: inline-block; border: 1px solid #0006; }
#btn-start-match { width: 100%; padding: 15px; font-size: 16px; background: #1f8f4d; margin-top: 6px; }
#btn-start-match:hover { background: #26a85c; }
.menu-help { margin-top: 16px; font-size: 11.5px; line-height: 1.5; opacity: .65; border-top: 1px solid #1f3040; padding-top: 12px; }

/* ---------- SCOREBOARD ---------- */
#scoreboard { position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 20;
  background: linear-gradient(180deg, rgba(10,16,26,.92), rgba(10,16,26,.8)); border: 1px solid #1f3040;
  border-top: 3px solid #1f8f4d; border-radius: 10px; padding: 9px 18px; display: flex; gap: 16px; align-items: center;
  font-size: 14px; font-weight: 700; box-shadow: 0 8px 24px rgba(0,0,0,.4); }
#sc-score { font-size: 19px; color: #f5b400; }
#sc-half { opacity: .75; font-weight: 600; font-size: 12px; }
#sc-cards-a, #sc-cards-b { font-size: 12px; }

/* ---------- TOASTS ---------- */
#toasts { position: fixed; top: 68px; left: 50%; transform: translateX(-50%); z-index: 25;
  display: flex; flex-direction: column; gap: 6px; align-items: center; pointer-events: none; }
.toast { background: rgba(10,16,26,.92); border: 1px solid #2a4058; border-left: 4px solid #f5b400;
  padding: 9px 16px; border-radius: 8px; font-size: 13px; opacity: 0; transform: translateY(-8px);
  transition: opacity .3s, transform .3s; }
.toast.show { opacity: 1; transform: translateY(0); }

/* ---------- BANERY / OVERLAYE OGÓLNE ---------- */
#restart-banner { position: fixed; top: 100px; left: 50%; transform: translateX(-50%); z-index: 20;
  background: rgba(10,16,26,.9); border: 1px solid #2a4058; padding: 8px 20px; border-radius: 20px; font-size: 13px; }
.overlay-box { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 40;
  background: rgba(8,13,22,.96); border: 1px solid #2a4058; border-radius: 14px; padding: 22px 26px;
  max-width: 480px; text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,.6); font-size: 14px; line-height: 1.5; }
.btn-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 14px; }

/* ---------- DECISION PROMPT ---------- */
#decision-prompt { position: fixed; top: 100px; left: 50%; transform: translateX(-50%); z-index: 30;
  background: rgba(10,16,26,.95); border: 1px solid #b98a12; border-radius: 12px; padding: 14px 20px;
  display: flex; flex-direction: column; align-items: center; gap: 10px; max-width: 420px; text-align: center;
  box-shadow: 0 10px 40px rgba(0,0,0,.5); }
#decision-icon { font-size: 22px; }
.decision-buttons { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }

/* ---------- CROSSHAIR / KAMERA / LOCK HINT ---------- */
#crosshair { position: fixed; top: 50%; left: 50%; width: 8px; height: 8px; margin: -4px 0 0 -4px;
  border: 2px solid rgba(255,255,255,.75); border-radius: 50%; z-index: 15; pointer-events: none; }
#lock-hint { position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%); z-index: 20;
  background: rgba(10,16,26,.85); padding: 8px 16px; border-radius: 20px; font-size: 12px; }
#cam-indicator { position: fixed; top: 14px; right: 16px; z-index: 20; background: rgba(10,16,26,.8);
  padding: 6px 12px; border-radius: 8px; font-size: 11px; opacity: .8; }
#hydration-banner { position: fixed; top: 100px; left: 50%; transform: translateX(-50%); z-index: 20;
  background: rgba(20,60,90,.9); border: 1px solid #3fa0d6; padding: 8px 18px; border-radius: 20px; font-size: 13px; }

/* ---------- PANEL SĘDZIEGO (zwijany) ---------- */
#ref-panel { position: fixed; bottom: 14px; right: 16px; z-index: 22; width: 230px; }
#ref-panel-toggle { width: 100%; background: #14202c; border: 1px solid #2a4058; }
#ref-panel-body { max-height: 0; overflow: hidden; transition: max-height .22s ease; display: flex; flex-direction: column; gap: 6px;
  background: rgba(10,16,26,.92); border: 1px solid #2a4058; border-radius: 8px; margin-top: 6px; padding: 0 8px; }
#ref-panel.open #ref-panel-body { max-height: 480px; padding: 8px; overflow-y: auto; }
#ref-panel-body button { font-size: 12.5px; padding: 8px 10px; text-align: left; }

/* ---------- PANEL ZAWODNIKA ---------- */
#player-panel { z-index: 41; }
#player-panel-title { font-size: 15px; font-weight: 700; margin-bottom: 6px; color: #f5b400; }

/* ---------- BOTTOM CONTROLS ---------- */
#bottom-controls { position: fixed; bottom: 14px; left: 16px; z-index: 22; display: flex; gap: 8px; }

/* ---------- VAR ---------- */
#var-overlay { position: fixed; inset: 0; z-index: 60; background: rgba(4,7,12,.92);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 20px; }
.var-header { font-size: 20px; font-weight: 800; letter-spacing: 1px; color: #f5b400; border-bottom: 2px solid #f5b400; padding-bottom: 8px; }
.var-nav { display: flex; gap: 10px; }
.var-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; max-width: 640px; }
.var-grid button { font-size: 12px; background: #14202c; border: 1px solid #2a4058; }

/* ---------- SHOOTOUT ---------- */
#shootout-rows { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; font-size: 13px; }
.pk { display: inline-block; width: 14px; height: 14px; border-radius: 50%; margin-right: 4px; border: 1px solid #0006; }
.pk-yes { background: #1f8f4d; } .pk-no { background: #a4271f; }

@media (max-width: 720px) {
  #ref-panel { width: 180px; }
  .var-grid { grid-template-columns: repeat(2, 1fr); }
  .menu-row { flex-direction: column; }
}
