:root {
  --page-bg: #F2F4F7;
  --fixture-surface: #FFFFFF;
  --divider-line: #D8DDE3;
  --dark-text: #111827;
  --muted-text: #5F6B7A;
  --group-label: #1C4E80;
  --btn-dark: #15191F;
  --btn-text: #FFFFFF;
  --accent-blue: #2563EB;
  --accent-green: #0E7A3D;
  --accent-red: #D62839;
  --header-black: #050505;
  --header-active: #FFFFFF;
  --light-row-header: #FAFAFA;
  --max-width: 1180px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--page-bg);
  color: var(--dark-text);
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

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

ul {
  list-style: none;
}

/* Typography */
h1, h2, h3, h4 {
  font-weight: 600;
  line-height: 1.2;
}

p {
  line-height: 1.5;
  color: var(--muted-text);
}

/* Header */
.site-header {
  background-color: var(--header-black);
  color: var(--btn-text);
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-container {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 60px;
}

.brand {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.desktop-nav {
  display: flex;
  height: 100%;
}

.desktop-nav a {
  display: flex;
  align-items: center;
  padding: 0 16px;
  font-size: 0.875rem;
  font-weight: 500;
  color: #A0AAB5;
  border-bottom: 3px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.desktop-nav a:hover {
  color: var(--header-active);
}

.desktop-nav a.active {
  color: var(--header-active);
  border-bottom-color: var(--header-active);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: #FFF;
  font-size: 1.5rem;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  background-color: var(--header-black);
  padding: 10px 20px 20px;
}

.mobile-nav.open {
  display: block;
}

.mobile-nav a {
  display: block;
  padding: 12px 0;
  color: #A0AAB5;
  font-size: 1rem;
  border-bottom: 1px solid #1f2937;
}

.mobile-nav a.active {
  color: var(--header-active);
  font-weight: 600;
}

/* Main Content Area */
main {
  flex: 1;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 40px 20px;
}

/* Hero / Intro */
.hero-block {
  margin-bottom: 40px;
  background-color: #1a202c;
  padding: 60px 40px;
  border-radius: 8px;
  position: relative;
}

.hero-block::before {
  content: "";
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  background-color: rgba(17, 24, 39, 0.5);
  border-radius: 8px;
  z-index: 1;
}

.hero-block > * {
  position: relative;
  z-index: 2;
}

.hero-title {
  font-size: 2.5rem;
  color: #FFFFFF;
  margin-bottom: 8px;
}

.hero-subtitle {
  font-size: 1.125rem;
  color: #F3F4F6;
  margin-bottom: 16px;
  max-width: 800px;
}

.snapshot-badge {
  display: inline-block;
  background-color: rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.content-image {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 24px;
  display: block;
}

.preview-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 20px;
}

/* Schedule Section */
.schedule-section {
  background-color: var(--fixture-surface);
  border: 1px solid var(--divider-line);
  margin-bottom: 60px;
}

.date-header {
  background-color: var(--light-row-header);
  border-bottom: 1px solid var(--divider-line);
  font-size: 18px;
  font-weight: 600;
  padding: 16px 28px;
  color: var(--dark-text);
}

.fixture-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.fixture-card {
  display: flex;
  height: 145px;
  border-bottom: 1px solid var(--divider-line);
}

.fixture-card:nth-child(odd) {
  border-right: 1px solid var(--divider-line);
}

/* When the last row has only one item or to clean up borders */
.fixture-grid .fixture-card:nth-last-child(-n+2) {
  border-bottom: none;
}

@media (max-width: 768px) {
  .fixture-grid .fixture-card:nth-last-child(2) {
    border-bottom: 1px solid var(--divider-line);
  }
}

.fixture-teams {
  flex: 1;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.group-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--group-label);
  text-transform: uppercase;
  margin-bottom: 12px;
  letter-spacing: 0.05em;
}

.competition-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted-text);
  text-transform: uppercase;
  margin-bottom: 4px;
  letter-spacing: 0.05em;
}

.team-row {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}

.team-row:last-child {
  margin-bottom: 0;
}

.team-flag {
  width: 28px;
  height: 20px;
  object-fit: cover;
  margin-right: 12px;
  border-radius: 2px;
  border: 1px solid var(--divider-line);
}

.inline-flag {
  width: 20px;
  height: 14px;
  object-fit: cover;
  border-radius: 2px;
  display: inline-block;
  vertical-align: middle;
  margin: -2px 4px 0 4px;
  border: 1px solid var(--divider-line);
}

.preview-title .inline-flag {
  width: 24px;
  height: 16px;
}

.preview-title .inline-flag:first-child {
  margin-left: 0;
}

.team-name {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--dark-text);
}

.fixture-info {
  width: 160px;
  border-left: 1px solid var(--divider-line);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.match-date {
  font-size: 0.75rem;
  color: var(--muted-text);
  margin-bottom: 4px;
}

.match-time {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--dark-text);
  margin-bottom: 12px;
}

.btn-preview {
  display: inline-block;
  background-color: var(--btn-dark);
  color: var(--btn-text);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 4px;
  transition: background-color 0.2s;
  white-space: nowrap;
}

.btn-preview:hover {
  background-color: #2c3440;
}

/* Sections (Previews, Decisions, Context) */
.content-section {
  margin-bottom: 60px;
}

.section-title {
  font-size: 1.5rem;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--divider-line);
}

/* Decision Board */
.decision-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
}

.decision-card {
  background-color: var(--fixture-surface);
  border: 1px solid var(--divider-line);
  padding: 24px;
}

.decision-match {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.decision-stats {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 0.875rem;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--page-bg);
  padding-bottom: 4px;
}

.decision-note {
  font-size: 0.875rem;
  color: var(--muted-text);
  line-height: 1.5;
}

/* Previews */
.preview-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.preview-card {
  background-color: var(--fixture-surface);
  border: 1px solid var(--divider-line);
  padding: 32px;
  scroll-margin-top: 80px;
}

.preview-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}

.preview-title {
  font-size: 1.25rem;
  font-weight: 700;
}

.preview-meta {
  text-align: right;
  font-size: 0.875rem;
  color: var(--muted-text);
}

.preview-body p {
  color: var(--dark-text);
  margin-bottom: 12px;
}

/* Group Context Strips */
.context-strip {
  background-color: var(--fixture-surface);
  border: 1px solid var(--divider-line);
  margin-bottom: 24px;
}

.context-header {
  background-color: var(--light-row-header);
  padding: 12px 24px;
  font-weight: 700;
  color: var(--group-label);
  border-bottom: 1px solid var(--divider-line);
}

.context-body {
  padding: 24px;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
}

.context-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.context-table th, .context-table td {
  text-align: left;
  padding: 8px;
  border-bottom: 1px solid var(--page-bg);
}

.context-table th {
  color: var(--muted-text);
  font-weight: 600;
}

.remaining-fixture {
  background-color: var(--page-bg);
  padding: 16px;
  border-radius: 4px;
  font-size: 0.875rem;
}

.remaining-title {
  font-weight: 700;
  margin-bottom: 8px;
}

/* Standard Pages (About, Privacy, Terms) */
.page-content {
  background-color: var(--fixture-surface);
  border: 1px solid var(--divider-line);
  padding: 40px;
  max-width: 800px;
}

.page-content h2 {
  margin-top: 32px;
  margin-bottom: 16px;
  font-size: 1.25rem;
}

.page-content p {
  margin-bottom: 16px;
}

.page-content ul {
  margin-bottom: 16px;
  padding-left: 20px;
  list-style: disc;
}

.page-content li {
  margin-bottom: 8px;
  color: var(--muted-text);
  line-height: 1.5;
}

/* Forms */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 0.875rem;
  font-weight: 600;
}

.form-group input, .form-group select, .form-group textarea {
  padding: 12px;
  border: 1px solid var(--divider-line);
  border-radius: 4px;
  font-family: inherit;
  font-size: 1rem;
}

.btn-submit {
  background-color: var(--btn-dark);
  color: var(--btn-text);
  padding: 14px 24px;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  align-self: flex-start;
}

.btn-submit:hover {
  background-color: #2c3440;
}

.form-message {
  display: none;
  padding: 16px;
  background-color: #d1fae5;
  color: #065f46;
  border: 1px solid #34d399;
  border-radius: 4px;
  margin-top: 20px;
}

/* Footer */
.site-footer {
  background-color: var(--header-black);
  color: var(--btn-text);
  padding: 60px 20px 40px;
  margin-top: auto;
}

.footer-container {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  margin-bottom: 40px;
}

.footer-col h4 {
  font-size: 1rem;
  margin-bottom: 20px;
  color: #A0AAB5;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-col a {
  font-size: 0.875rem;
  color: #FFF;
  transition: color 0.2s;
}

.footer-col a:hover {
  color: #A0AAB5;
}

.footer-bottom {
  max-width: var(--max-width);
  margin: 0 auto;
  border-top: 1px solid #1f2937;
  padding-top: 24px;
  font-size: 0.75rem;
  color: #A0AAB5;
  text-align: center;
  line-height: 1.6;
}

/* Cookie Banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: var(--fixture-surface);
  border-top: 1px solid var(--divider-line);
  padding: 20px;
  box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.05);
  z-index: 1000;
  display: none;
}

.cookie-content {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

@media (min-width: 768px) {
  .cookie-content {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.cookie-text {
  font-size: 0.875rem;
  color: var(--muted-text);
  flex: 1;
}

.cookie-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn-cookie {
  padding: 8px 16px;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
  border: 1px solid var(--btn-dark);
}

.btn-cookie.primary {
  background-color: var(--btn-dark);
  color: var(--btn-text);
}

.btn-cookie.secondary {
  background-color: transparent;
  color: var(--btn-dark);
}

.cookie-preferences {
  display: none;
  background-color: var(--page-bg);
  padding: 16px;
  margin-top: 16px;
  border-radius: 4px;
}

.cookie-preferences.open {
  display: block;
}

.pref-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 0.875rem;
}

/* Responsive Breakpoints */
@media (max-width: 1200px) {
  .context-body {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .desktop-nav {
    display: none;
  }
  
  .mobile-menu-btn {
    display: block;
  }
  
  .fixture-grid {
    grid-template-columns: 1fr;
  }
  
  .fixture-card {
    border-right: none;
  }
  
  .fixture-card:nth-child(odd) {
    border-right: none;
  }
  
  .fixture-info {
    width: 120px;
    padding: 16px 12px;
  }
  
  .team-name {
    font-size: 1rem;
  }
  
  .footer-container {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .footer-container {
    grid-template-columns: 1fr;
  }
  
  .fixture-info {
    width: 100px;
  }
  
  .btn-preview {
    font-size: 0.7rem;
    padding: 6px 8px;
  }
  
  .page-content {
    padding: 24px;
  }
}