/* =========================================
   GAME CSS — all styles for game.html
   ========================================= */

* { margin: 0; padding: 0; box-sizing: border-box; }
body { background: #000; overflow: hidden; font-family: 'Inter', sans-serif; }
#game-container { width: 100vw; height: 100vh; }

/* === SETTINGS OVERLAY === */
#settings-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.85);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
}
#settings-overlay.hidden { display: none; }
.settings-box {
  background: #13152a;
  border: 1px solid rgba(0,229,255,0.2);
  border-radius: 16px;
  padding: 32px 40px;
  width: 420px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}
.settings-box h2 {
  font-family: 'Orbitron', sans-serif;
  color: #00e5ff; font-size: 18px;
  letter-spacing: 2px; margin-bottom: 24px; text-align: center;
}
.setting-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.setting-row label { color: #8a93ac; font-size: 14px; font-weight: 500; }
.setting-row input, .setting-row select {
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(255,255,255,0.1);
  color: #e0e6f0; padding: 8px 14px;
  border-radius: 8px; font-family: inherit; font-size: 14px; width: 140px; outline: none;
}
.setting-row input:focus { border-color: #00e5ff; }
.settings-actions { display: flex; gap: 10px; margin-top: 24px; }
.settings-actions button {
  flex: 1; padding: 12px; border: none;
  border-radius: 8px; font-family: 'Orbitron', sans-serif;
  font-weight: 700; font-size: 13px; cursor: pointer; letter-spacing: 1px;
}
.btn-start { background: linear-gradient(135deg, #00e5ff, #3a7bd5); color: #fff; }
.btn-load { background: rgba(255,255,255,0.06); color: #8a93ac; border: 1px solid rgba(255,255,255,0.1) !important; }
.btn-load:hover { background: rgba(255,255,255,0.1); color: #fff; }

/* === QR CODE OVERLAY === */
#qr-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(10,12,20,0.92);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  z-index: 500; backdrop-filter: blur(12px); transition: all 0.5s ease;
}
#qr-overlay.qr-small {
  top: auto; left: auto; right: 16px; bottom: 16px;
  width: auto; height: auto;
  background: rgba(13,15,30,0.9);
  border: 1px solid rgba(0,229,255,0.15);
  border-radius: 14px; padding: 14px;
}
#qr-overlay .qr-label {
  font-family: 'Orbitron', sans-serif; font-size: 28px;
  color: #00e5ff; letter-spacing: 3px; margin-bottom: 24px;
  text-shadow: 0 0 30px rgba(0,229,255,0.3);
}
#qr-overlay.qr-small .qr-label { font-size: 10px; letter-spacing: 1.5px; margin-bottom: 8px; text-shadow: none; }
#qr-overlay img { width: 400px; height: 400px; border-radius: 16px; display: block; margin: 0 auto; box-shadow: 0 0 60px rgba(0,229,255,0.15); }
#qr-overlay.qr-small img { width: 120px; height: 120px; border-radius: 8px; box-shadow: none; }
#qr-overlay .qr-url { font-size: 18px; color: #6a7394; margin-top: 16px; word-break: break-all; }
#qr-overlay.qr-small .qr-url { font-size: 10px; margin-top: 6px; }

/* === WAIT ROOM === */
#waitroom {
  position: fixed; bottom: 16px; right: 170px;
  background: rgba(13,15,30,0.9);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px; padding: 14px 18px; z-index: 500; min-width: 160px;
}
#waitroom .wr-title { font-family: 'Orbitron', sans-serif; font-size: 10px; color: #ffd600; letter-spacing: 1.5px; margin-bottom: 8px; }
.wr-player { font-size: 13px; color: #8a93ac; padding: 3px 0; }
.wr-player .wr-num { color: #ffd600; font-weight: 700; margin-right: 6px; }
.wr-empty { font-size: 12px; color: #3a3f5c; font-style: italic; }
input[type="file"] { display: none; }

/* === GEAR BUTTON === */
#gear-btn {
  position: fixed; top: 12px; right: 12px;
  background: rgba(13,15,30,0.8);
  border: 1px solid rgba(255,255,255,0.08);
  color: #6a7394; width: 36px; height: 36px;
  border-radius: 50%; font-size: 18px; cursor: pointer; z-index: 500;
  display: flex; align-items: center; justify-content: center;
}
#gear-btn:hover { color: #00e5ff; border-color: rgba(0,229,255,0.3); }

/* === FX TOGGLE BUTTON === */
#fx-btn {
  position: fixed; top: 12px; right: 54px;
  background: rgba(13,15,30,0.8);
  border: 1px solid rgba(255,255,255,0.08);
  color: #6a7394; padding: 0 12px; height: 36px;
  border-radius: 8px; font-size: 12px;
  font-family: 'Orbitron', sans-serif; letter-spacing: 1px;
  cursor: pointer; z-index: 500; display: none;
}
#fx-btn:hover { color: #ffd600; border-color: rgba(255,214,0,0.3); }

/* === GAMES PICKER BUTTON === */
#games-btn {
  position: fixed; top: 12px; right: 130px;
  background: rgba(13,15,30,0.8);
  border: 1px solid rgba(255,214,0,0.2);
  color: #ffd600; padding: 0 12px; height: 36px;
  border-radius: 8px; font-size: 12px;
  font-family: 'Orbitron', sans-serif; letter-spacing: 1px;
  cursor: pointer; z-index: 500; display: none;
}
#games-btn:hover { background: rgba(255,214,0,0.08); border-color: rgba(255,214,0,0.5); }

/* === RELAY SETTINGS === */
.relay-section { margin-top: 16px; border-top: 1px solid rgba(255,255,255,0.06); padding-top: 14px; }
.relay-section h3 { font-size: 13px; color: #ff6e40; letter-spacing: 1px; margin-bottom: 10px; font-family: 'Orbitron', sans-serif; }
.relay-grid { max-height: 220px; overflow-y: auto; }
.relay-row { display: flex; gap: 6px; align-items: center; margin-bottom: 4px; font-size: 12px; }
.relay-row .r-num { width: 24px; color: #6a7394; text-align: right; font-weight: 700; }
.relay-row input { background: rgba(0,0,0,0.4); border: 1px solid rgba(255,255,255,0.08); color: #e0e6f0; border-radius: 5px; padding: 4px 8px; font-family: inherit; font-size: 12px; outline: none; }
.relay-row input:focus { border-color: #ff6e40; }
.relay-row .r-label { width: 100px; }
.relay-row .r-test { background: none; border: 1px solid rgba(255,255,255,0.1); color: #6a7394; padding: 3px 8px; border-radius: 4px; cursor: pointer; font-size: 11px; }
.relay-row .r-test:hover { color: #ff6e40; border-color: #ff6e40; }
.relay-row .r-test.on { color: #00e676; border-color: #00e676; }
.relay-grid::-webkit-scrollbar { width: 3px; }
.relay-grid::-webkit-scrollbar-thumb { background: #6a7394; border-radius: 3px; }

/* === RELAY PANEL (during game) === */
#relay-toggle {
  position: fixed; top: 12px; left: 12px;
  background: rgba(13,15,30,0.9);
  border: 1px solid rgba(255,110,64,0.15);
  border-radius: 8px; padding: 6px 14px;
  z-index: 501; cursor: pointer;
  font-family: 'Orbitron', sans-serif; font-size: 10px;
  color: #ff6e40; letter-spacing: 1.5px; transition: all 0.2s;
}
#relay-toggle:hover { border-color: #ff6e40; }
#relay-panel {
  position: fixed; top: 42px; left: 12px;
  background: rgba(13,15,30,0.9);
  border: 1px solid rgba(255,110,64,0.15);
  border-radius: 12px; padding: 10px 14px;
  z-index: 500; max-height: 50vh; overflow-y: auto; display: none;
}
.rp-btn {
  display: block; width: 100%;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  color: #6a7394; padding: 5px 12px; margin-bottom: 3px;
  border-radius: 6px; font-family: inherit; font-size: 11px;
  cursor: pointer; text-align: left; transition: all 0.1s;
}
.rp-btn:hover { border-color: #ff6e40; color: #ff6e40; }
.rp-btn.relay-on { background: rgba(0,230,118,0.1); border-color: rgba(0,230,118,0.3); color: #00e676; }
