/* ===== SII: fresh dark, mobile-first ===== */

/* Reset-ish */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  padding: 0;
}
img,
canvas,
svg,
video {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Theme vars */
:root {
  --page-bg: #0b1220;
  --surface: #0f172a;
  --surface-2: #0b1f33;
  --ink: #e2e8f0;
  --ink-dim: #cbd5e1;
  --line: rgba(255, 255, 255, 0.08);
  --accent: #0b59de;
  --accent-2: #aad4ff;
  --ok: #22c55e;
  --warn: #facc15;
  --bad: #ef4444;
}

html,
body {
  background: var(--page-bg);
  color: var(--ink);
  overflow-x: hidden;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

/* Layout helpers */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px;
}
.card {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
}
.header-bar {
  background: #093759;
  color: #fff;
  border-bottom: 1px solid var(--line);
}

/* Links & buttons */
a {
  color: var(--accent-2);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
button,
.button {
  background: var(--accent);
  color: #fff;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 10px 14px;
  font-weight: 600;
  cursor: pointer;
  transition: filter 0.2s ease;
}
button:hover,
.button:hover {
  filter: brightness(1.1);
}

/* Tables */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
}
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 560px;
}
th,
td {
  padding: 10px;
  border-bottom: 1px solid var(--line);
}
th {
  background: #0a1222;
  color: var(--ink);
  text-align: left;
}
tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.04);
}

/* Dots/status */
.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.dot.live {
  background: var(--warn);
}
.dot.ok {
  background: var(--ok);
}
.dot.bad {
  background: var(--bad);
}

/* ===== Auth pages ===== */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  position: relative;
  padding-left: 5%;
  background: url("/static/images/stick_it_in_bg.jpg") center/cover no-repeat;
}
.auth-page::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}
.auth-container {
  position: relative;
  z-index: 1;
  width: 340px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 24px;
  text-align: center;
}
.auth-container input {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
  border-radius: 6px;
  font-size: 14px;
}

/* ===== Global League ===== */
.global-league-page {
  min-height: 100vh;
  position: relative;
  padding: 20px;
  background: url("/static/images/Stadium.jpeg") center/cover fixed no-repeat;
}
.global-league-page::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}
.global-league-page > * {
  position: relative;
  z-index: 1;
}

.global-league-title {
  color: #fff;
  font-size: 32px;
  font-weight: 700;
  text-align: center;
  text-shadow: 2px 2px 4px #093759;
  margin: 10px 0 20px;
}

.leaderboard-card {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 15px;
  width: 100%;
  max-width: 520px;
  margin: 0 auto 14px;
}
.global-league-table .table-wrap {
  background: var(--surface);
  border-radius: 10px;
}

/* ===== Game Entry ===== */
.game-entry-page {
  min-height: 100vh;
  position: relative;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: url("/static/images/gameDay.jpg") center/cover fixed no-repeat;
}
.game-entry-page::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}
.game-entry-page > * {
  position: relative;
  z-index: 1;
}

.game-entry-title {
  color: #fff;
  font-size: 34px;
  font-weight: 800;
  text-shadow: 2px 2px 4px #093759;
  margin-bottom: 12px;
  text-align: center;
}

.fixture-container {
  width: 92%;
  max-width: 820px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.fixture-card {
  composes: card;
} /* if your build doesn’t support composes, keep both .card + .fixture-card */
.fixture-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 15px;
  width: 100%;
  text-align: center;
}
.fixture-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  width: 100%;
}
.team-logo {
  width: 80px;
  height: auto;
  object-fit: contain;
}

.fixture-info {
  flex: 1;
  text-align: center;
}
.fixture-card h3 {
  color: var(--accent-2);
  margin: 4px 0 6px;
}
.fixture-card p {
  color: var(--ink-dim);
}

.prediction-buttons {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
}
.home-btn,
.draw-btn,
.away-btn {
  background: var(--accent);
}

.prediction-outcome {
  margin-top: 10px;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}
.prediction-bar {
  display: flex;
  width: 100%;
  height: 20px;
  border-radius: 6px;
  overflow: hidden;
  background: #1f2937;
  margin-top: 6px;
  font-size: 12px;
}
.home-bar {
  background: #2563eb;
}
.draw-bar {
  background: #f59e0b;
  color: #111;
}
.away-bar {
  background: #ef4444;
}

/* status borders */
.fixture.correct {
  border-left: 4px solid var(--ok);
}
.fixture.wrong {
  border-left: 4px solid var(--bad);
}
.fixture.live {
  border-left: 4px solid var(--warn);
}

/* Submit bar */
.submit-wrapper {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 20px;
  text-align: center;
  pointer-events: none;
}
.submit-wrapper .submit-all-btn {
  pointer-events: auto;
  background: #ff5722;
  color: #fff;
  font-weight: 800;
  font-size: 16px;
  padding: 12px 24px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  box-shadow: 0 0 6px rgba(255, 87, 34, 0.5);
  width: calc(100% - 40px);
  max-width: 480px;
}

/* ===== Manager’s Office & common cards ===== */
.managers-office-page {
  min-height: 100vh;
  position: relative;
  padding: 20px;
  background: url("/static/images/Managers.jpg") center/cover fixed no-repeat;
}
.managers-office-page::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}
.managers-office-page > * {
  position: relative;
  z-index: 1;
}

.managers-office-content,
.action-menu,
.manager-stats,
.achievement-card {
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
}

/* Utilities */
.mt-2 {
  margin-top: 8px;
}
.mb-2 {
  margin-bottom: 8px;
}
.mt-3 {
  margin-top: 12px;
}
.mb-3 {
  margin-bottom: 12px;
}
.center {
  text-align: center;
}
