/* win1x2.app -- shared styles across all pages.
   Palette mirrors the Flutter app's AppColors (lib/core/theme/app_colors.dart)
   exactly, so the website reads as the same product, not a separate brand. */

:root {
  --bg-top: #1b1e2c;
  --bg-mid: #101219;
  --bg-bottom: #000000;
  --screen-bg: #0f1117;
  --card-bg: #1a1d28;
  --nav-bg: #151822;
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-overlay: rgba(255, 255, 255, 0.05);
  --accent: #d7f547;
  --accent-muted: #a9c23a;
  --live-amber: #ffb300;
  --ai-accent: #9b6bff;
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.6);
  --text-tertiary: rgba(255, 255, 255, 0.4);
  --card-radius: 20px;
  --pill-radius: 999px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  background: var(--screen-bg);
  background-image: linear-gradient(to bottom, var(--bg-top) 0%, var(--bg-mid) 50%, var(--bg-bottom) 100%);
  background-attachment: fixed;
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
}
  
/* ---------------------------------------------------------------- Nav --- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--nav-bg);
  border-bottom: 1px solid var(--glass-border);
}

.nav-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.02em;
}

.brand .dot {
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.nav-links a {
  padding: 8px 14px;
  border-radius: var(--pill-radius);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: background 0.15s, color 0.15s;
}

.nav-links a:hover {
  background: var(--glass-overlay);
  color: var(--text-primary);
}

.nav-links a.active {
  background: var(--accent);
  color: #0f1117;
}

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

.page {
  max-width: 1080px;
  margin: 0 auto;
  padding: 28px 20px 80px;
}

.page-title {
  font-size: 26px;
  font-weight: 800;
  margin: 0 0 4px;
  letter-spacing: -0.01em;
}

.page-subtitle {
  color: var(--text-secondary);
  font-size: 14px;
  margin: 0 0 24px;
}

.section {
  margin-bottom: 32px;
}

.section-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* --------------------------------------------------------- Glass card --- */

.card {
  background: var(--card-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--card-radius);
  padding: 16px;
}

.card + .card {
  margin-top: 10px;
}

/* ------------------------------------------------------- Fixture card --- */

.fixture-card {
  display: flex;
  align-items: center;
  gap: 14px;
}

.fixture-teams {
  flex: 1;
  min-width: 0;
}

.fixture-team-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 2px 0;
}

.fixture-team-name {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fixture-score {
  font-size: 15px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  min-width: 20px;
  text-align: right;
}

.fixture-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  min-width: 64px;
}

.fixture-time {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: var(--pill-radius);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.badge-live {
  color: var(--live-amber);
  background: rgba(255, 179, 0, 0.14);
}

.badge-live .live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--live-amber);
  animation: pulse 1.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.badge-finished {
  color: var(--text-tertiary);
  background: rgba(255, 255, 255, 0.06);
}

.league-group-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  margin: 22px 0 8px;
}

.league-group-title:first-child {
  margin-top: 0;
}

.league-country {
  color: var(--text-tertiary);
  font-weight: 500;
}

/* -------------------------------------------------------------- Tips ---- */

.tip-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tip-teams {
  font-size: 15px;
  font-weight: 700;
}

.tip-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-tertiary);
}

.tip-bars {
  display: flex;
  height: 8px;
  border-radius: var(--pill-radius);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
}

.tip-bar-home { background: var(--accent); }
.tip-bar-draw { background: rgba(255, 255, 255, 0.35); }
.tip-bar-away { background: var(--ai-accent); }

.tip-legend {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
}

.tip-legend .home { color: var(--accent); }
.tip-legend .draw { color: var(--text-secondary); }
.tip-legend .away { color: var(--ai-accent); }

.tip-pick {
  align-self: flex-start;
  padding: 4px 10px;
  border-radius: var(--pill-radius);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  background: rgba(155, 107, 255, 0.16);
  color: var(--ai-accent);
}

/* -------------------------------------------------------------- News ---- */

.news-card {
  display: flex;
  gap: 14px;
}

.news-thumb {
  width: 96px;
  height: 96px;
  border-radius: 14px;
  object-fit: cover;
  background: var(--glass-overlay);
  flex-shrink: 0;
}

.news-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.news-headline {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
}

.news-summary {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-meta {
  font-size: 12px;
  color: var(--text-tertiary);
  font-weight: 600;
}

/* --------------------------------------------------------- Standings ---- */

.league-picker {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 20px;
}

.league-chip {
  flex-shrink: 0;
  padding: 8px 16px;
  border-radius: var(--pill-radius);
  background: var(--card-bg);
  border: 1px solid var(--glass-border);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
}

.league-chip.active {
  background: var(--accent);
  color: #0f1117;
  border-color: var(--accent);
}

.standings-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.standings-table th {
  text-align: left;
  color: var(--text-tertiary);
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 10px 8px;
  border-bottom: 1px solid var(--glass-border);
}

.standings-table td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--glass-border);
  font-variant-numeric: tabular-nums;
}

.standings-table tr:last-child td {
  border-bottom: none;
}

.standings-table .col-team {
  font-weight: 600;
  white-space: nowrap;
}

.standings-table .col-pos {
  color: var(--text-tertiary);
  width: 28px;
}

.standings-table .col-pts {
  font-weight: 800;
  color: var(--accent);
}

.standings-table td.num,
.standings-table th.num {
  text-align: center;
}

/* --------------------------------------------------------- Utilities ---- */

.empty-state,
.loading-state,
.error-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-tertiary);
  font-size: 14px;
}

.error-state {
  color: var(--live-amber);
}

.site-footer {
  text-align: center;
  padding: 32px 20px 40px;
  color: var(--text-tertiary);
  font-size: 12px;
}

@media (max-width: 600px) {
  .nav-links a {
    padding: 7px 11px;
    font-size: 13px;
  }
  .news-thumb {
    width: 72px;
    height: 72px;
  }
}
