/* Sol Conflict site styling. Dark, cool-toned, matching the game's palette. */

:root {
  --bg: #0a0c10;
  --bg-panel: #141821;
  --bg-panel-2: #1b202b;
  --border: #262d3b;
  --text: #e6e9f0;
  --text-dim: #8b93a6;
  --cyan: #29d3ff;
  --cyan-dim: #1a8fb0;
  --yellow: #ffd91a;
  --danger: #ff5a45;
  --ok: #3ddc84;
  --radius: 10px;
  --max-width: 1100px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 "Segoe UI", system-ui, -apple-system, sans-serif;
  min-height: 100vh;
}

a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Nav ------------------------------------------------------------ */

.nav {
  border-bottom: 1px solid var(--border);
  background: rgba(10, 12, 16, 0.9);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 3px;
  color: var(--text);
}
.brand span { color: var(--cyan); }

.nav-links {
  display: flex;
  gap: 22px;
  margin-right: auto;
}

.nav-links a {
  color: var(--text-dim);
  font-weight: 500;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}
.nav-links a:hover { color: var(--text); text-decoration: none; }
.nav-links a.active { color: var(--text); border-bottom-color: var(--cyan); }

.nav-auth { display: flex; gap: 10px; align-items: center; }

/* --- Buttons -------------------------------------------------------- */

.btn {
  display: inline-block;
  padding: 9px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-panel-2);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: 0.15s;
}
.btn:hover { border-color: var(--cyan-dim); text-decoration: none; }
.btn-primary {
  background: var(--cyan);
  border-color: var(--cyan);
  color: #04222b;
}
.btn-primary:hover { background: #4ee0ff; }
.btn-danger { border-color: #5a2723; color: var(--danger); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-sm { padding: 5px 12px; font-size: 13px; }

/* --- Layout --------------------------------------------------------- */

.panel {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.page { padding: 40px 0 80px; }
h1 { font-size: 30px; margin: 0 0 6px; }
h2 { font-size: 20px; margin: 0 0 14px; }
.subtitle { color: var(--text-dim); margin: 0 0 28px; }

/* --- Hero ----------------------------------------------------------- */

.hero {
  padding: 90px 0 70px;
  text-align: center;
  background:
    radial-gradient(900px 400px at 50% -10%, rgba(41, 211, 255, 0.14), transparent 70%);
  border-bottom: 1px solid var(--border);
}
.hero h1 { font-size: 58px; letter-spacing: 8px; margin: 0 0 14px; }
.hero p { color: var(--text-dim); font-size: 18px; max-width: 620px; margin: 0 auto 30px; }
.hero-actions { display: flex; gap: 14px; justify-content: center; }

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  padding: 50px 0;
}
.feature h3 { margin: 0 0 8px; font-size: 16px; color: var(--cyan); }
.feature p { margin: 0; color: var(--text-dim); font-size: 14px; }

/* --- Forms ---------------------------------------------------------- */

.field { margin-bottom: 16px; }
.field label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
}
.field input[type="text"],
.field input[type="email"],
.field input[type="password"],
.field input[type="number"],
.field select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #0d1017;
  color: var(--text);
  font: inherit;
}
.field input:focus, .field select:focus {
  outline: none;
  border-color: var(--cyan-dim);
}

.form-narrow { max-width: 420px; margin: 0 auto; }

.error {
  background: rgba(255, 90, 69, 0.1);
  border: 1px solid #5a2723;
  color: var(--danger);
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 14px;
}
.success {
  background: rgba(61, 220, 132, 0.1);
  border: 1px solid #205238;
  color: var(--ok);
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 14px;
}
.hidden { display: none !important; }

/* --- Tables --------------------------------------------------------- */

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--border); }
th { color: var(--text-dim); font-size: 12px; text-transform: uppercase; letter-spacing: 0.6px; }
tbody tr:hover { background: var(--bg-panel-2); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.rank { color: var(--text-dim); width: 60px; }
.rank-1 { color: var(--yellow); font-weight: 700; }
.rank-2, .rank-3 { color: var(--text); font-weight: 600; }

/* --- Colour pickers ------------------------------------------------- */

.color-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.color-row:last-child { border-bottom: none; }
.color-row input[type="color"] {
  width: 56px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: none;
  cursor: pointer;
}
.color-meta { flex: 1; }
.color-meta strong { display: block; }
.color-meta small { color: var(--text-dim); }
.color-hex {
  font-family: ui-monospace, "Cascadia Code", monospace;
  color: var(--text-dim);
  width: 84px;
  text-align: right;
}

.soldier-preview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 18px;
}
.swatch {
  height: 70px;
  border-radius: 8px;
  border: 1px solid var(--border);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 6px;
  font-size: 11px;
  font-weight: 600;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

/* --- Lobby ---------------------------------------------------------- */

.room-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}
.room-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}
.room-card h3 { margin: 0 0 4px; font-size: 17px; }
.room-meta { color: var(--text-dim); font-size: 13px; margin-bottom: 14px; }
.room-foot { display: flex; align-items: center; justify-content: space-between; }
.pill {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: var(--bg-panel-2);
  border: 1px solid var(--border);
  color: var(--text-dim);
}
.pill.team { border-color: var(--cyan-dim); color: var(--cyan); }
.pill.br { border-color: #6b5a1e; color: var(--yellow); }

.team-yellow { color: var(--yellow); }
.team-cyan { color: var(--cyan); }

.row-split { display: flex; gap: 24px; align-items: flex-start; }
.row-split > * { flex: 1; }

.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.empty {
  text-align: center;
  color: var(--text-dim);
  padding: 50px 20px;
}

/* --- Game frame ----------------------------------------------------- */

.game-shell { width: 100%; height: calc(100vh - 60px); background: #000; }
.game-shell iframe { width: 100%; height: 100%; border: 0; display: block; }

@media (max-width: 720px) {
  .hero h1 { font-size: 38px; letter-spacing: 4px; }
  .nav-links { gap: 14px; font-size: 14px; }
  .row-split { flex-direction: column; }
}
