/* ===== The Isle Proximity Voice - Styles ===== */
* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0d1410;
  --bg2: #141f18;
  --panel: #1a2a1f;
  --line: #2e4a36;
  --text: #e8f5ec;
  --muted: #8aa896;
  --accent: #7dffb0;
  --accent2: #38d47f;
  --danger: #ff6b6b;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: radial-gradient(circle at 50% 0%, #16241b, #0a100c 70%);
  color: var(--text);
  min-height: 100vh;
}

.hidden { display: none !important; }

/* ---- Join screen ---- */
.screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
}
.card {
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 36px;
  width: 100%;
  max-width: 400px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.card h1 { font-size: 30px; margin-bottom: 6px; }
.card .sub { color: var(--muted); margin-bottom: 20px; font-size: 14px; }

/* Nút đăng nhập Steam */
.steam-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 13px;
  border-radius: 10px;
  background: linear-gradient(135deg, #1b2838, #2a475e);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid #3b5268;
  transition: transform .1s ease, background .2s;
  margin-bottom: 6px;
}
.steam-btn:hover { transform: translateY(-1px); background: linear-gradient(135deg, #2a475e, #417597); }
.steam-btn img { width: 22px; height: 22px; }
#steam-status { color: var(--muted); font-size: 12px; margin-top: 4px; }
.steam-btn.using { border-color: var(--accent2); color: var(--accent); }
.divider {
  display: flex; align-items: center; gap: 10px;
  margin: 14px 0; color: var(--muted); font-size: 12px;
}
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.card input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  margin-bottom: 14px;
  outline: none;
}
.card input:focus { border-color: var(--accent2); }
.card button {
  width: 100%;
  padding: 13px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent2), var(--accent));
  color: #07210f;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .1s ease;
}
.card button:hover { transform: translateY(-1px); }
.card .hint { color: var(--muted); font-size: 12px; margin-top: 14px; }

/* ---- Main screen ---- */
#screen-main { display: flex; flex-direction: column; min-height: 100vh; }

.header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  background: var(--bg2);
  border-bottom: 1px solid var(--line);
}
.header .logo { font-size: 22px; }
.header #my-name { font-weight: 700; }
.pill {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 14px;
  font-size: 13px;
  color: var(--muted);
}
.pill.voice-on { color: var(--accent); border-color: var(--accent2); }
button.small {
  margin-left: auto;
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--danger);
  cursor: pointer;
  font-size: 13px;
}
button.small:hover { background: rgba(255,107,107,.1); }

.main {
  display: flex;
  flex: 1;
  gap: 16px;
  padding: 16px 20px;
  min-height: 0;
}

/* ---- Map ---- */
.map-wrap {
  position: relative;
  flex: 1;
  min-height: 400px;
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
#map {
  width: 100%;
  height: 100%;
  display: block;
  cursor: crosshair;
}
.map-overlay {
  position: absolute;
  bottom: 10px;
  left: 14px;
  background: rgba(0,0,0,.55);
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-family: monospace;
  color: var(--accent);
  pointer-events: none;
}

/* ---- Side panel ---- */
.side {
  width: 320px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
}
.panel {
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
}
.panel-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  margin-bottom: 10px;
  font-weight: 700;
}
#status-list { list-style: none; }
#status-list li {
  font-size: 13px;
  padding: 4px 0;
  border-bottom: 1px dashed rgba(255,255,255,.05);
}
#status-list li:last-child { border-bottom: none; }
#status-list .ok { color: var(--accent); }
#status-list .bad { color: var(--danger); }

.control .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 0;
  font-size: 14px;
}
.control input[type="checkbox"] {
  width: 18px; height: 18px;
  accent-color: var(--accent2);
  cursor: pointer;
}
.ptt-hint {
  margin-top: 8px;
  padding: 8px;
  border-radius: 8px;
  background: rgba(125,255,176,.1);
  border: 1px solid var(--line);
  font-size: 13px;
  text-align: center;
  color: var(--accent);
}

.help p { font-size: 13px; color: var(--muted); margin-bottom: 7px; }
.help .warn { color: #ffd479; }

/* ---- Responsive ---- */
@media (max-width: 800px) {
  .main { flex-direction: column; }
  .side { width: 100%; }
  .map-wrap { min-height: 300px; }
}
