@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;700&display=swap');

:root {
  --teal: #006D6F;
  --teal-dk: #004F51;
  --teal-bg: #EAF5F5;
  --gold: #C8960A;
  --gold-bg: #FEF7E0;
  --red: #C0392B;
  --red-bg: #FDECEA;
  --ink: #12141A;
  --mid: #454860;
  --soft: #5C617A;
  --border: #DEE1EF;
  --bg: #F4F6FB;
  --white: #FFFFFF;
  --footer-bg: #1A2E2E;

  --font-main: 'Manrope', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 24px rgba(0,0,0,0.12);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 14px;
}

body {
  font-family: var(--font-main);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body.age-gate-active {
  overflow: hidden;
}

a {
  color: var(--teal);
  text-decoration: none;
  transition: all 0.2s ease;
}

a:hover {
  color: var(--teal-dk);
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 800;
  line-height: 1.2;
  color: var(--ink);
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  text-align: center;
}

.btn-primary {
  background: var(--teal);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--teal-dk);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: transparent;
  color: var(--teal);
  border: 2px solid var(--teal);
}

.btn-secondary:hover {
  background: var(--teal-bg);
}

.btn-danger {
  background: var(--red);
  color: var(--white);
}

.btn-danger:hover {
  background: #a02c21;
}

.site-header {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  background: var(--white);
  height: 64px;
  box-shadow: var(--shadow-sm);
  z-index: 100;
  display: flex;
  align-items: center;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-area svg {
  height: 32px;
}

.logo-text {
  font-size: 10px;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--teal-dk);
  line-height: 1;
  display: flex;
  flex-direction: column;
}

.main-nav {
  display: flex;
  gap: 24px;
}

.main-nav a {
  color: var(--mid);
  font-weight: 600;
  font-size: 14px;
}

.main-nav a:hover, .main-nav a.active {
  color: var(--teal);
}

.header-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.age-gate-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.age-gate-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.age-gate-modal {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 40px;
  max-width: 480px;
  width: 90%;
  text-align: center;
  box-shadow: var(--shadow-lg);
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.age-gate-overlay.active .age-gate-modal {
  transform: translateY(0);
}

.ag-logo {
  height: 48px;
  margin-bottom: 24px;
  fill: var(--teal);
}

.age-gate-modal h2 {
  font-size: 24px;
  color: var(--ink);
  margin-bottom: 12px;
}

.age-gate-modal p {
  color: var(--mid);
  margin-bottom: 32px;
}

.ag-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.ag-btn-yes {
  width: 100%;
  padding: 16px;
  font-size: 16px;
}

.ag-btn-no {
  background: #f1f3f5;
  color: var(--mid);
  width: 100%;
  padding: 16px;
  font-size: 16px;
}

.ag-btn-no:hover {
  background: #e9ecef;
}

.ag-legal {
  font-size: 12px;
  color: var(--soft);
}

.ag-legal u {
  cursor: pointer;
  color: var(--teal);
}

.site-footer {
  background: var(--footer-bg);
  padding: 60px 0 30px;
  color: #90B8B8;
  margin-top: 60px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  margin-bottom: 40px;
}

.footer-col h2 {
  color: var(--gold);
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.footer-col p {
  font-size: 13px;
  line-height: 1.8;
  margin-bottom: 8px;
  color: #B0D0D0;
}

.footer-col a {
  display: block;
  font-size: 13px;
  line-height: 2.2;
  color: #B0D0D0;
}

.footer-col a:hover {
  color: var(--white);
}

.footer-divider {
  border: none;
  border-top: 1px solid rgba(255,255,255,0.08);
  margin: 30px 0;
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.footer-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.badge-18 {
  background: var(--red);
  color: var(--white);
  font-weight: 900;
  font-size: 16px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  display: inline-block;
}

.badge-outline {
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.05);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  color: rgba(255,255,255,0.8);
}

.footer-legal-text {
  font-size: 12px;
  color: #90B8B8;
  line-height: 1.8;
}

.footer-legal-text strong {
  color: #8ABCBC;
}

.hero {
  height: 90vh;
  min-height: 600px;
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  align-items: flex-end;
  padding-bottom: 80px;
}

.hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.3) 50%, rgba(0,0,0,0.1) 100%);
}

.hero .container {
  position: relative;
  z-index: 10;
}

.hero-content {
  max-width: 600px;
  color: var(--white);
  animation: fadeUp 0.8s ease forwards;
}

.hero h1 {
  font-size: 48px;
  color: var(--white);
  margin-bottom: 16px;
}

.hero p {
  font-size: 18px;
  color: rgba(255,255,255,0.9);
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 16px;
}

.hero-disclaimer {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: rgba(255,255,255,0.6);
}

.hero-disclaimer .small-18 {
  background: var(--red);
  color: white;
  font-weight: 900;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
}

.card {
  background: var(--white);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  padding: 24px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 32px;
  margin-top: 64px;
}

.section-header h2 {
  font-size: 28px;
  color: var(--ink);
}

.section-header a {
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
}

.rg-banner {
  background: var(--teal-bg);
  border-left: 4px solid var(--teal);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 32px;
  margin: 64px 0;
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.rg-banner-content h3 {
  font-size: 20px;
  color: var(--teal-dk);
  margin-bottom: 8px;
}

.rg-banner-content p {
  margin-bottom: 16px;
  color: var(--mid);
}

.rg-links {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.rg-links a {
  font-weight: 600;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.race-card {
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.rc-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
}

.rc-title {
  font-weight: 800;
  font-size: 16px;
}

.rc-status {
  font-size: 12px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 4px;
}

.status-soon { background: #FFF3CD; color: #856404; }
.status-open { background: #D4EDDA; color: #155724; }
.status-closed { background: #F8D7DA; color: #721C24; }

.rc-details {
  font-size: 13px;
  color: var(--mid);
  margin-bottom: 16px;
}

.steps-row {
  display: flex;
  gap: 24px;
  margin: 40px 0;
}

.step-card {
  flex: 1;
  text-align: center;
  padding: 32px 24px;
}

.step-icon {
  font-size: 32px;
  margin-bottom: 16px;
}

.step-card h4 {
  margin-bottom: 8px;
}

.step-card p {
  font-size: 13px;
  color: var(--mid);
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  min-width: 500px; 
}

.data-table th, .data-table td {
  padding: 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.data-table th {
  background: #F8F9FA;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--mid);
}

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

.page-layout {
  display: grid;
  grid-template-columns: 240px 1fr 320px;
  gap: 24px;
  margin-top: 32px;
  margin-bottom: 64px;
}

.page-layout.two-col {
  grid-template-columns: 240px 1fr;
}

.sidebar {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  align-self: start;
  position: sticky;
  top: 88px;
}

.sidebar-menu {
  list-style: none;
}

.sidebar-menu li {
  margin-bottom: 8px;
}

.sidebar-menu a {
  display: block;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--mid);
  font-weight: 600;
}

.sidebar-menu a:hover, .sidebar-menu a.active {
  background: var(--teal-bg);
  color: var(--teal);
}

.betslip {
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  align-self: start;
  position: sticky;
  top: 88px;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}

.betslip-header {
  background: var(--teal-dk);
  color: var(--white);
  padding: 16px 20px;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.betslip-header h3 {
  color: var(--white);
  font-size: 16px;
  margin-bottom: 4px;
}

.betslip-header p {
  font-size: 12px;
  color: rgba(255,255,255,0.7);
}

.betslip-body {
  padding: 20px;
  min-height: 200px;
}

.betslip-empty {
  text-align: center;
  color: var(--soft);
  font-size: 13px;
  padding: 40px 0;
}

.betslip-footer {
  padding: 20px;
  border-top: 1px solid var(--border);
  background: #F8F9FA;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--mid);
}

.form-control {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-main);
  font-size: 14px;
  transition: border-color 0.2s;
}

.form-control:focus {
  outline: none;
  border-color: var(--teal);
}

.disclaimer-text {
  font-size: 11px;
  color: var(--soft);
  text-align: center;
  margin-top: 12px;
}

.operator-disclaimer {
  background: var(--teal-bg);
  border-left: 3px solid var(--teal);
  padding: 12px 16px;
  font-size: 13px;
  color: var(--teal-dk);
  margin-bottom: 24px;
  border-radius: 4px;
  font-weight: 600;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.custom-modal-overlay {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.custom-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}
.custom-modal {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 32px;
  max-width: 400px;
  width: 90%;
  text-align: center;
  box-shadow: var(--shadow-lg);
  transform: translateY(20px);
  transition: transform 0.2s ease;
}
.custom-modal-overlay.active .custom-modal {
  transform: translateY(0);
}
.custom-modal p {
  font-size: 16px;
  color: var(--ink);
  margin-bottom: 24px;
  font-weight: 600;
}
.custom-modal-btn {
  width: 100%;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--teal-dk);
}

@media (max-width: 992px) {
  .page-layout {
    grid-template-columns: 1fr;
  }
  .page-layout.two-col {
    grid-template-columns: 1fr;
  }
  .sidebar, .betslip {
    position: relative;
    top: auto;
  }
  .sidebar-menu {
    display: flex;
    overflow-x: auto;
    gap: 8px;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
    margin: 0 -20px;
    padding: 0 20px 8px;
  }
  .sidebar-menu li {
    margin-bottom: 0;
  }
  .sidebar-menu a {
    white-space: nowrap;
    background: var(--bg);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
  }
  .sidebar-menu a.active {
    background: var(--teal);
    color: var(--white);
  }
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 991px) {
  .site-header {
    position: relative; 
    height: auto;
    min-height: 64px;
  }
  .header-container {
    flex-wrap: wrap;
    padding: 10px 20px;
  }
  .logo-area {
    margin-bottom: 0;
  }
  .mobile-menu-btn {
    display: block;
    margin-left: auto;
  }
  .main-nav {
    display: none;
    width: 100%;
    background: transparent;
    flex-direction: column;
    padding: 20px 0 10px;
    box-shadow: none;
    border-top: 1px solid var(--border);
    margin-top: 10px;
  }
  .main-nav.active {
    display: flex;
  }
  .header-actions {
    display: none;
  }
  .main-nav.active + .header-actions {
    display: flex;
    width: 100%;
    background: transparent;
    padding: 0 0 10px;
    flex-direction: column;
    box-shadow: none;
    gap: 10px;
  }
  .header-actions .btn {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .grid-3 {
    grid-template-columns: 1fr !important;
  }
  .grid-4 {
    grid-template-columns: 1fr !important;
  }
  .steps-row {
    flex-direction: column;
  }
  .rg-banner {
    flex-direction: column;
    padding: 24px 16px;
    word-break: break-word;
  }
  .hero h1 {
    font-size: 32px;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }
  .hero {
    min-height: 500px;
  }
  .hero h1 {
    font-size: 24px;
    word-break: break-word;
  }
  .hero-actions {
    flex-direction: column;
    width: 100%;
  }
  .hero-actions .btn {
    width: 100%;
  }
  .age-gate-modal {
    padding: 24px 16px;
  }
  .age-gate-modal h2 {
    font-size: 20px;
  }
  .ag-logo {
    height: 36px;
    margin-bottom: 16px;
  }
  .rc-header {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 8px;
  }
  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .section-header h2 {
    font-size: 20px;
    word-break: break-word;
  }
  .card {
    padding: 16px;
    word-break: break-word;
  }
  .page-layout > * {
    min-width: 0;
  }
  .main-content {
    min-width: 0;
  }
}

/* Cookie Banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: var(--white);
  box-shadow: 0 -4px 12px rgba(0,0,0,0.2);
  z-index: 10000;
  padding: 16px 0;
  display: flex;
  justify-content: center;
}
.cookie-banner-content {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1200px;
  padding: 0 20px;
  gap: 20px;
}
.cookie-banner-content p {
  margin: 0;
  font-size: 14px;
  color: var(--dark);
}
.cookie-actions {
  display: flex;
  gap: 12px;
}
@media (max-width: 768px) {
  .cookie-banner-content {
    flex-direction: column;
    text-align: center;
  }
  .cookie-actions {
    width: 100%;
    justify-content: center;
  }
}

/* Badge Logo Styling */
.badge-logo {
  padding: 4px 12px !important;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s;
  background-color: transparent;
}
.badge-logo:hover {
  opacity: 0.8;
  background-color: rgba(255, 255, 255, 0.05);
}
