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

:root {
  --secondary: #16ff5e;
  --secondary50: #16ff5e50;
  --secondary-light: #bfffba;
  --tertiary: #0ee46e;
  --quaternary: #16ff5e;
  --icon: #ff6600;
  --bg: #e9eaed;
  --black: #000;
  --dark: #1d1d1d;
  --grey333: #333;
  --grey515: #515151;
  --white: #fff;
  --red: #cc0000;
  --red-pill: #e60000;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  padding-top: 8rem;
  font-family: 'Saira', Arial, sans-serif;
  font-size: 1rem;
  background: var(--bg);
  overflow-x: hidden;
  display: grid;
  grid-template-columns: 18rem minmax(20rem, 80rem) 24rem;
  justify-content: center;
  min-height: 100vh;
}

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

/* ===== HEADER ===== */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 4rem;
  background: var(--black);
  color: var(--white);
  outline: 2px solid var(--tertiary);
  z-index: 200;
}

nav {
  display: grid;
  grid-template-columns: 7rem auto auto;
  justify-content: normal;
  max-width: 90rem;
  margin: auto;
  height: 100%;
  align-items: center;
}

.header-logo img { height: 32px; margin-left: 15px; display: block; }

.header-nav {
  display: flex;
  gap: 1rem;
  padding: 0 2rem;
}

.header-nav a {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  width: 6rem;
  min-height: 35px;
  padding: 0.2rem 1rem;
  text-align: center;
  font-weight: bold;
  font-size: 1.2rem;
  line-height: 1.2rem;
  border-radius: 2rem;
  color: var(--white);
  background: var(--dark);
  text-transform: uppercase;
}

.header-nav a.selected { background: var(--secondary); color: var(--black); }

.header-login {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  margin-right: 1rem;
  margin-top: -8px;
}

.button-login {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 5rem;
  min-height: 35px;
  padding: 0.2rem 1rem;
  font-weight: bold;
  font-size: 1.2rem;
  border-radius: 2rem;
  color: var(--white);
  background: var(--dark);
  cursor: pointer;
}

.button-join {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 5rem;
  min-height: 35px;
  padding: 0.2rem 1rem;
  font-weight: bold;
  font-size: 1.2rem;
  border-radius: 2rem;
  background: var(--secondary);
  color: var(--black);
}

/* ===== RACE TICKER ===== */
#nav-ntj {
  display: flex;
  gap: 0.5rem;
  width: 100vw;
  position: fixed;
  top: 4rem;
  left: 0;
  padding: 0.65rem 0;
  overflow: auto;
  background: var(--bg);
  z-index: 5;
  scrollbar-width: none;
}

#nav-ntj::-webkit-scrollbar { display: none; }

.ntj-sticky {
  position: sticky;
  left: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  background: var(--bg);
}

.tab-togglers {
  display: flex;
  padding-bottom: 0;
}

.tab-toggler {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  font-weight: bold;
  background: var(--grey333);
  color: var(--white);
  cursor: pointer;
  min-width: 2.5rem;
}

.tab-toggler-selected {
  background: var(--secondary);
  color: var(--black);
}

.tab-toggler.icon-btn {
  font-size: 0;
  width: 2.5rem;
  padding: 0.5rem;
}

.tab-toggler.icon-btn svg { width: 18px; height: 18px; fill: var(--white); }
.tab-toggler-selected.icon-btn svg { fill: var(--black); }

.ntj-fixed {
  margin-left: 0.5rem;
  margin-right: -0.5rem;
  padding: 0.5rem 1rem;
  background: var(--grey333);
  color: var(--white);
  font-weight: bold;
  border-radius: 2rem 0 0 2rem;
  cursor: pointer;
  white-space: nowrap;
}

.ntj-aus {
  margin-left: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--grey333);
  color: var(--white);
  font-weight: bold;
  border-radius: 0 2rem 2rem 0;
  cursor: pointer;
  white-space: nowrap;
}

.ntj-fixed.tab-toggler-selected,
.ntj-aus.tab-toggler-selected {
  background: var(--secondary);
  color: var(--black);
}

.nextup-race {
  position: relative;
  display: grid;
  grid-template-areas: "icon track track" "icon race race";
  grid-template-columns: 1rem auto 3rem;
  border-radius: 2rem;
  align-content: center;
  min-width: 11rem;
  height: 2.5rem;
  padding: 0 1rem;
  background: var(--white);
  text-decoration: none;
  color: var(--black);
  flex-shrink: 0;
}

.nextup-race-icon { grid-area: icon; margin-left: -6px; margin-top: 8px; color: var(--icon); }
.nextup-race-icon svg { width: 14px; height: 14px; fill: var(--icon); }
.nextup-race-title { grid-area: track; padding-top: 3px; font-size: 0.9rem; line-height: 1.2rem; font-weight: 600; }
.nextup-race-number { grid-area: race; margin-top: -3px; font-size: 12px; font-weight: 500; color: #666; }
.nextup-race-footer { position: absolute; right: 0; height: 100%; display: flex; align-items: center; }
.nextup-race-ttg {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 5px 6px 5px 5px;
  padding: 0 0.5rem;
  min-width: 2rem;
  height: 1.4rem;
  border-radius: 1rem;
  background: var(--red-pill);
  color: var(--white);
  font-weight: bold;
  font-size: 0.75rem;
}

/* ===== LEFT SIDEBAR ===== */
#leftColumn { padding: 0 1rem; }

.left-float {
  position: fixed;
  top: 8rem;
  padding-left: 1rem;
  width: 15rem;
  max-height: calc(100vh - 9rem);
  overflow-y: auto;
}

#leftColumn .tab-togglers {
  gap: 0.5rem;
  border-bottom: 4px solid var(--tertiary);
}

#leftColumn .tab-toggler {
  flex: 1;
  max-width: none;
  font-size: 18px;
  border-radius: 1rem 1rem 0 0;
  padding: 0.5rem 0;
}

.sky-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0.5rem;
  margin: 0.5rem 0;
  background: var(--white);
  border-radius: 0.5rem;
  font-size: 0.75rem;
  font-weight: 900;
  line-height: 1.1;
}

.sky-banner img { width: 36px; height: auto; }

.menu { display: flex; flex-direction: column; border: 1px solid #e0e0e0; border-top: none; }

.menu-header {
  padding: 0.6rem 0.5rem;
  background: linear-gradient(135deg, #000 70%, #333 70%);
  color: var(--white);
  border-bottom: 1px solid var(--white);
  font-weight: bold;
  font-size: 1rem;
}

.menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0.5rem;
  min-height: 1.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  background: var(--white);
  color: var(--black);
  border-bottom: 1px solid #e0e0e0;
}

.menu a:last-child { border-radius: 0 0 0.5rem 0.5rem; border: none; }
.menu a:hover { background: #f6f6f6; }
.menu a svg { width: 20px; height: 20px; fill: var(--icon); flex-shrink: 0; }

/* ===== MAIN CONTENT ===== */
#mainContent {
  padding: 0 1rem 0 0;
  height: calc(100vh - 9rem);
  overflow: scroll;
  overflow-x: hidden;
}

#mainContent::-webkit-scrollbar { width: 10px; border: 1px solid var(--bg); }
#mainContent::-webkit-scrollbar-track { background: var(--bg); border-radius: 1rem; }
#mainContent::-webkit-scrollbar-thumb { background: #888; border-radius: 1rem; }

.carousel {
  display: flex;
  gap: 0.5rem;
  width: calc(100% + 1rem);
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scrollbar-width: none;
}

.carousel::-webkit-scrollbar { display: none; }

.carousel-tab {
  flex: 0 0 calc(33.333% - 0.35rem);
  min-width: calc(33.333% - 0.35rem);
  height: 150px;
  border-radius: 0.75rem;
  background-size: cover;
  background-position: center;
  cursor: pointer;
}

.homepage-switch {
  display: flex;
  margin: 0.75rem 0;
  background: var(--white);
  border-radius: 2rem;
  overflow: hidden;
  border: 2px solid var(--tertiary);
}

.homepage-switch .button {
  flex: 1;
  padding: 0.6rem 1rem;
  text-align: center;
  font-weight: bold;
  font-size: 1.1rem;
  cursor: pointer;
  background: var(--white);
  color: #666;
}

.homepage-switch .button.selected {
  background: var(--secondary);
  color: var(--black);
}

.tab-switches {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.tab-switches::-webkit-scrollbar { display: none; }

.tab-switch {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 5.5rem;
  padding: 0.5rem 0.75rem;
  background: var(--white);
  border-radius: 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  position: relative;
}

.tab-switch svg { width: 28px; height: 28px; fill: var(--icon); margin-bottom: 4px; }
.tab-switch.highlighted { background: #ffe8d6; }

.tab-switch .badge {
  position: absolute;
  top: 4px;
  right: 4px;
  background: var(--black);
  color: var(--white);
  font-size: 9px;
  font-weight: bold;
  padding: 1px 4px;
  border-radius: 4px;
}

h5 {
  margin: 1rem 0 0.5rem;
  font-size: 1rem;
  font-weight: 700;
  color: #666;
  text-transform: uppercase;
}

h5 span { background: var(--bg); padding-right: 0.5rem; }

.section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 1rem 0 0.5rem;
}

.section-header h5 { margin: 0; }

.section-header svg { width: 20px; height: 20px; fill: var(--icon); }

/* ===== RACE CARDS (NEXT TO JUMP) ===== */
.content-scroller {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scrollbar-width: none;
}

.content-scroller::-webkit-scrollbar { display: none; }

.panel {
  flex: 0 0 280px;
  background: var(--white);
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.odds-table { width: 100%; border-collapse: collapse; }

#rightColumn .tab-toggler.disabled {
  background: #888;
  color: var(--white);
  cursor: default;
  opacity: 0.7;
}

.tab-toggler:first-child { border-radius: 0; }
#nav-ntj .tab-togglers .tab-toggler:first-child { border-radius: 0; }
#nav-ntj .tab-togglers .tab-toggler:last-child { border-radius: 0 2rem 2rem 0; }

.odds-table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  background: linear-gradient(135deg, var(--secondary) 55%, #0a6b30 55%);
  color: var(--black);
  font-weight: 900;
  font-size: 0.95rem;
  text-transform: uppercase;
  min-height: 2.5rem;
}

.odds-table-header .race-details { display: flex; align-items: center; gap: 6px; }
.odds-table-header .race-details svg { width: 16px; height: 16px; fill: var(--black); }

.odds-table-ttg {
  padding: 2px 8px;
  border-radius: 1rem;
  background: var(--red-pill);
  color: var(--white);
  font-size: 10px;
  font-weight: bold;
}

.win-plc-toggle {
  display: flex;
  gap: 2px;
}

.win-plc-toggle span {
  padding: 2px 8px;
  border-radius: 1rem;
  background: var(--black);
  color: var(--white);
  font-size: 10px;
  font-weight: bold;
  cursor: pointer;
}

.win-plc-toggle span.active { background: var(--secondary); color: var(--black); }

.odds-table td {
  padding: 0.2rem 0.5rem;
  height: 3.5rem;
  vertical-align: middle;
  border-bottom: 1px solid #e0e0e0;
}

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

.silk-racing {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 4px;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
}

.silk-grey {
  width: 1.2rem;
  height: 1.2rem;
  border-radius: 50%;
  margin-left: 10px;
}

.runner-name { font-weight: 700; font-size: 0.9rem; line-height: 1.1; }
.runner-jockey { font-size: 0.8rem; color: #666; line-height: 0.9rem; }

.odds-table td.odds { width: 3rem; text-align: right; padding-right: 0.5rem; }

.button.betlink {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 3rem;
  height: 2rem;
  padding: 0 0.5rem;
  background: #dbdbdb;
  color: var(--black);
  font-weight: bold;
  font-size: 0.9rem;
  border-radius: 0.5rem;
  cursor: pointer;
}

/* ===== QUICK MULTI / TIPS CARDS ===== */
.cards-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.quick-multi-card {
  background: var(--white);
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.quick-multi-bet-type {
  position: relative;
  padding: 0.7rem 0.5rem 0.5rem 2.8rem;
  line-height: 1rem;
  color: var(--white);
  border-bottom: 4px solid var(--tertiary);
  font-size: 1rem;
  font-weight: bold;
  border-radius: 1rem 1rem 0 0;
  background: linear-gradient(135deg, #000 calc(100% - 7rem), #333 calc(100% - 7rem));
  text-transform: uppercase;
}

.quick-multi-bet-type .card-icon {
  position: absolute;
  left: 10px;
  top: 14px;
  width: 24px;
  height: 24px;
}

.quick-multi-bet-type .card-icon.green { fill: var(--secondary); }
.quick-multi-bet-type .card-icon.orange { fill: var(--icon); }

.quick-multi-bet-type .win-plc-toggle {
  position: absolute;
  right: 8px;
  top: 10px;
}

.card-subtitle {
  padding: 0.4rem 0.75rem;
  font-weight: 700;
  font-size: 0.85rem;
  background: var(--white);
  border-bottom: 1px solid #e0e0e0;
}

.quick-multi-race-runner {
  display: grid;
  grid-template-columns: 2rem auto 4rem;
  column-gap: 0.5rem;
  min-height: 36px;
  padding: 0.2rem 0.5rem;
  align-items: center;
  border-bottom: 1px solid #e0e0e0;
}

.quick-multi-race-runner:last-child { border: 0; }

.quick-multi-race-runner-name {
  display: flex;
  flex-direction: column;
  line-height: 1rem;
  font-size: 0.85rem;
}

.quick-multi-race-runner-race {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  font-weight: bold;
  color: #333;
}

.quick-multi-race-runner-race .ttg-now { color: var(--red); font-weight: 600; font-size: 0.7rem; }

.quick-multi-race-runner-rating {
  padding: 2px 5px;
  background: #ff6300;
  color: var(--white);
  font-size: 11px;
  font-weight: bold;
  border-radius: 10px;
  min-width: 16px;
  text-align: center;
  margin-left: 4px;
}

.quick-multi-footer {
  padding: 0.5rem;
  background: #efefef;
  border-radius: 0 0 0.75rem 0.75rem;
}

.quick-multi-footer .button.betlink {
  width: 100%;
  height: auto;
  padding: 0.5rem;
  background: #dbdbdb;
  font-size: 0.85rem;
  font-weight: 600;
}

/* ===== SRMS CARDS ===== */
.srm-card .quick-multi-race-info {
  display: grid;
  grid-template-columns: 2.5rem auto;
  align-items: center;
  background: var(--grey333);
  color: var(--white);
  border-radius: 1rem;
  margin: 0.5rem;
}

.srm-card .quick-multi-race-number {
  width: 2rem;
  height: 2rem;
  line-height: 2rem;
  text-align: center;
  font-weight: bold;
  background: var(--tertiary);
  color: #333;
  border-radius: 50%;
  transform: scale(0.8);
  margin: 0 auto;
}

.srm-card .quick-multi-race-name {
  font-size: 1rem;
  font-weight: 900;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
}

.srm-card .quick-multi-race-ttg {
  border-radius: 1rem;
  padding: 2px 8px;
  font-size: 0.8rem;
  font-weight: bold;
  background: var(--black);
  color: var(--white);
}

.srm-card .top4-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.85rem;
  font-weight: bold;
  color: #333;
  cursor: pointer;
}

.srm-card .top4-btn svg { width: 12px; height: 12px; fill: #666; }

/* ===== NEXT GALLOPS / GREYS / HARNESS ===== */
.homepage-racing-nextup {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.nextup-column {
  background: var(--white);
  border-radius: 0.75rem;
  overflow: hidden;
}

.nextup-column-header {
  padding: 0.6rem 0.75rem;
  font-weight: 900;
  font-size: 0.85rem;
  text-transform: uppercase;
  background: var(--bg);
  color: var(--black);
}

.nextup-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid #e0e0e0;
  min-height: 2.5rem;
}

.nextup-list-item:nth-child(even) { background: #f9f9f9; }

.nextup-list-item:last-child { border-bottom: none; }

.nextup-list-track { font-weight: 700; font-size: 0.9rem; line-height: 1.1; }
.nextup-list-race { font-size: 0.8rem; color: #666; }

.nextup-list-times {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nextup-list-ttg {
  padding: 2px 8px;
  border-radius: 1rem;
  background: var(--black);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: bold;
  white-space: nowrap;
}

.nextup-list-ttg.urgent { background: var(--red-pill); }

.nextup-list-start {
  padding: 2px 8px;
  border-radius: 1rem;
  background: var(--grey333);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: bold;
  min-width: 2.8rem;
  text-align: center;
}

/* ===== FOOTER ===== */
.homepage-links-footer {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1rem;
}

.homepage-links-footer h4 {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
  color: #666;
}

.homepage-links-footer a {
  display: block;
  padding: 0.2rem 0;
  font-size: 0.85rem;
  color: #666;
}

.homepage-regulatory {
  font-size: 0.75rem;
  color: #999;
  line-height: 1.4;
  margin: 1rem 0;
}

.homepage-rg-footer {
  display: grid;
  grid-template-columns: 0.8fr 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
}

.main-respgambling {
  padding: 1rem;
  background: var(--white);
  border-radius: 0.75rem;
  border: 2px solid var(--black);
}

.respgambling-head {
  font-weight: 900;
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.respgambling-msg { font-size: 0.85rem; color: #666; }
.respgambling-msg a { color: #0066cc; }

.betstop {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem;
  background: var(--white);
  border-radius: 0.75rem;
  font-size: 0.85rem;
  color: #666;
}

.betstop img { max-width: 200px; height: auto; }

/* ===== RIGHT SIDEBAR / BETSLIP ===== */
#rightColumn { padding: 0 2rem 0 1rem; }

#rightColumn .tab-togglers {
  display: flex;
  gap: 0.5rem;
  border-bottom: 4px solid var(--tertiary);
  margin-right: 10px;
}

#rightColumn .tab-toggler {
  flex: 1;
  max-width: none;
  font-size: 18px;
  border-radius: 1rem 1rem 0 0;
  padding: 0.5rem 0;
  gap: 10px;
}

.betslip-refresh {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid var(--black);
  border-radius: 50%;
  position: relative;
}

.betslip-refresh::after {
  content: '';
  position: absolute;
  top: -3px;
  right: 2px;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-bottom: 6px solid var(--black);
}

.betslip-container {
  background: var(--grey333);
  border-radius: 0 0 0.5rem 0.5rem;
  min-height: 400px;
  display: flex;
  flex-direction: column;
}

.betslip-empty {
  flex: 1;
  padding: 2rem 1rem;
  color: var(--white);
  text-align: center;
  font-size: 1.1rem;
  font-weight: bold;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.betslip-empty svg { width: 80px; height: 80px; fill: none; stroke: var(--white); stroke-width: 3; }

.betslip-empty-sub {
  font-size: 0.85rem;
  font-weight: 500;
  color: #aaa;
}

.betslip-rg {
  margin: 0;
  padding: 1rem;
  background: var(--white);
  border: 2px solid var(--black);
  border-radius: 0.75rem;
  text-align: center;
}

.betslip-rg-head {
  font-weight: 900;
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
  color: var(--black);
}

.betslip-rg-msg { font-size: 0.8rem; color: #666; line-height: 1.4; }
.betslip-rg-msg a { color: #0066cc; }

/* ===== FLOATING ELEMENTS ===== */
#sky-racing {
  position: fixed;
  bottom: 80px;
  right: 24rem;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--white);
  border-radius: 12px;
  padding: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  cursor: pointer;
}

#sky-racing img { width: 45px; height: auto; }
#sky-racing span { font-size: 10px; font-weight: 900; color: var(--black); }

.chat-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--grey333);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.chat-btn svg { width: 24px; height: 24px; fill: var(--white); }

/* ===== SILK PATTERNS ===== */
.silk-1 { background: linear-gradient(135deg, #e74c3c 50%, #fff 50%); }
.silk-2 { background: linear-gradient(135deg, #3498db 50%, #f1c40f 50%); }
.silk-3 { background: linear-gradient(135deg, #2ecc71 50%, #fff 50%); }
.silk-4 { background: linear-gradient(135deg, #9b59b6 50%, #fff 50%); }
.silk-5 { background: linear-gradient(135deg, #e67e22 50%, #000 50%); }
.silk-6 { background: linear-gradient(135deg, #1abc9c 50%, #fff 50%); }
.silk-7 { background: linear-gradient(135deg, #34495e 50%, #e74c3c 50%); }
.silk-8 { background: linear-gradient(135deg, #f39c12 50%, #000 50%); }
.silk-9 { background: linear-gradient(135deg, #fff 50%, #13b971 50%); }
.silk-10 { background: linear-gradient(135deg, #000 50%, #fff 50%); }
.silk-11 { background: linear-gradient(135deg, #c0392b 50%, #fff 50%); }
.silk-12 { background: linear-gradient(135deg, #8e44ad 50%, #f1c40f 50%); }
.silk-13 { background: linear-gradient(135deg, #16a085 50%, #fff 50%); }

.grey-yellow { background: #f1c40f; }
.grey-red { background: #e74c3c; }
.grey-white { background: #fff; border: 1px solid #ccc; }
.grey-black { background: #000; }
.grey-pink { background: #e91e8c; }

/* ===== ABOUT PAGE ===== */
.about-page {
  background: #fff;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  margin-bottom: 2rem;
}

.about-page-header {
  padding: 0.85rem 1.25rem;
  background: #000;
  color: #fff;
  font-size: 1.25rem;
  font-weight: 700;
  border-top: 4px solid var(--tertiary);
}

.about-page-banner {
  width: 100%;
  height: 220px;
  background: #000 url('/assets/img/about-banner.png') center center / cover no-repeat;
}

.about-page-content {
  padding: 1.5rem 1.75rem 2rem;
  color: #333;
  line-height: 1.65;
  font-size: 0.95rem;
}

.about-page-content p {
  margin: 0 0 1rem;
}

.about-page-content p:last-child {
  margin-bottom: 0;
}

.about-page-content strong {
  font-weight: 800;
}

.about-page-lead {
  font-weight: 700;
  font-size: 1rem;
}

.homepage-links-footer a.is-current {
  color: #000;
  font-weight: 700;
  pointer-events: none;
}

.contact-page-content a {
  color: #0066cc;
  font-weight: 600;
}

.contact-page-content a:hover {
  text-decoration: underline;
}

.contact-hours {
  margin-top: 1.5rem;
}

.contact-hours h4 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  font-weight: 800;
  color: #000;
}

.contact-hours dl {
  margin: 0;
}

.contact-hours-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem 2rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid #efefef;
}

.contact-hours-row:last-child {
  border-bottom: none;
}

.contact-hours-row dt {
  font-weight: 600;
  color: #333;
}

.contact-hours-row dd {
  margin: 0;
  color: #666;
}

.contact-live-chat {
  display: inline-block;
  margin-top: 0.25rem;
}

.terms-version-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1.5rem;
  font-size: 0.9rem;
}

.terms-version-table th,
.terms-version-table td {
  border: 1px solid #e0e0e0;
  padding: 0.6rem 0.75rem;
  text-align: left;
  vertical-align: top;
}

.terms-version-table th {
  background: #f5f5f5;
  font-weight: 700;
}

.terms-contents {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
}

.terms-contents li {
  padding: 0.45rem 0;
  border-bottom: 1px solid #efefef;
  font-size: 0.9rem;
}

.terms-section {
  margin-top: 1.75rem;
}

.terms-section h3 {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 1rem;
  padding: 0.55rem 0.75rem;
  background: #efefef;
  font-size: 1rem;
  font-weight: 800;
  border-radius: 0.25rem;
  color: #000;
}

.terms-section-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #000;
  color: #fff;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.terms-section p {
  margin: 0 0 0.75rem;
}

.terms-section ul,
.terms-section ol {
  margin: 0 0 0.75rem;
  padding-left: 1.5rem;
}

.terms-section li {
  margin-bottom: 0.35rem;
}

.terms-section h4 {
  margin: 1rem 0 0.5rem;
  font-size: 0.95rem;
  font-weight: 800;
}

.terms-id-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  margin: 1rem 0;
}

.terms-id-table th,
.terms-id-table td {
  border: 1px solid #e0e0e0;
  padding: 0.45rem 0.5rem;
  vertical-align: top;
}

.terms-id-table th {
  background: #f9f9f9;
  font-weight: 700;
}

.terms-page-content a {
  color: #0066cc;
  word-break: break-word;
}

/* ===== MODALS ===== */
body.modal-open { overflow: hidden; }

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-overlay.active { display: flex; }

#login-modal {
  background: #000;
}

#register-modal {
  background: rgba(0, 0, 0, 0.55);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}

#register-modal .modal-close { color: #666; }

.modal-login {
  position: relative;
  width: 100%;
  max-width: 420px;
  padding: 2rem 2.5rem 2.5rem;
  text-align: center;
}

.modal-login-logo {
  margin-bottom: 3rem;
}

.modal-login-logo img {
  height: 72px;
  width: auto;
}

.modal-login-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal-login-form input {
  width: 100%;
  padding: 14px 24px;
  border: none;
  border-radius: 999px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 500;
  color: #333;
  background: #fff;
  outline: none;
}

.modal-login-form input::placeholder { color: #999; }

.modal-login-submit {
  width: 100%;
  margin-top: 8px;
  padding: 14px 24px;
  border: none;
  border-radius: 999px;
  background: var(--secondary);
  color: #000;
  font-family: inherit;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  cursor: pointer;
}

.modal-login-join {
  width: 100%;
  padding: 14px 24px;
  border: none;
  border-radius: 999px;
  background: #c8facc;
  color: #000;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
}

.modal-login-help {
  display: inline-block;
  margin-top: 2rem;
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

.modal-register {
  position: relative;
  width: 100%;
  max-width: 680px;
  background: #fff;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.modal-register-header {
  padding: 0.85rem 1.25rem;
  background: #000;
  color: #fff;
  font-size: 1.25rem;
  font-weight: 700;
  border-top: 4px solid var(--tertiary);
}

.modal-register-steps {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0;
  padding: 1rem 1.25rem 0.5rem;
  background: #fff;
}

.modal-register-step {
  padding: 0.65rem 0.5rem;
  text-align: center;
  font-weight: 700;
  font-size: 0.95rem;
  background: #e8e8e8;
  color: #666;
  border-radius: 999px;
  margin: 0 4px;
}

.modal-register-step.active {
  background: var(--secondary);
  color: #000;
}

.modal-register-form {
  padding: 0.75rem 1.25rem 1.5rem;
}

.register-field {
  display: grid;
  grid-template-columns: 140px 1fr;
  align-items: center;
  gap: 1rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid #efefef;
}

.register-field label {
  font-weight: 600;
  font-size: 0.95rem;
  color: #333;
}

.register-field input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #ccc;
  border-radius: 0.5rem;
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
}

.register-field input:focus { border-color: var(--tertiary); }

.register-dob {
  display: grid;
  grid-template-columns: 1fr 1fr 1.5fr;
  gap: 8px;
}

.register-dob input {
  text-align: center;
}

.modal-register-submit {
  display: block;
  width: calc(100% - 2.5rem);
  margin: 1.25rem auto 0;
  padding: 14px 24px;
  border: none;
  border-radius: 999px;
  background: var(--secondary);
  color: #333;
  font-family: inherit;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.modal-register-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.register-step-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  padding: 0 1.25rem 1.5rem;
}

.register-step-buttons .modal-register-submit,
.register-step-buttons .modal-register-back {
  width: 100%;
  margin: 1.25rem 0 0;
}

.modal-register-back {
  padding: 14px 24px;
  border: 2px solid #ccc;
  border-radius: 999px;
  background: #fff;
  color: #333;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
}

.register-step[data-step="1"] .modal-register-submit {
  width: calc(100% - 2.5rem);
}

.register-success {
  padding: 2rem 1.5rem 2.5rem;
  text-align: center;
}

.register-success-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: var(--secondary);
  color: #000;
  font-size: 2rem;
  font-weight: 900;
  line-height: 64px;
}

.register-success h3 {
  margin: 0 0 0.5rem;
  font-size: 1.4rem;
}

.register-success p {
  margin: 0 0 0.5rem;
  color: #666;
}

.register-success-user {
  font-weight: 700;
  color: #000 !important;
  margin-bottom: 1.5rem !important;
}

.form-message {
  margin: 0 1.25rem 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
}

.form-message.error {
  background: #ffe0e0;
  color: #c00;
  border: 1px solid #f5a0a0;
}

.form-message.success {
  background: #ddffe1;
  color: #0a5a20;
  border: 1px solid var(--tertiary);
}

.register-field input.invalid {
  border-color: #e60000;
}

.header-user-logged {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-right: 1rem;
  margin-top: -8px;
}

.header-user-name {
  color: var(--secondary);
  font-weight: 700;
  font-size: 0.95rem;
}

.button-logout {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 5rem;
  min-height: 35px;
  padding: 0.2rem 1rem;
  font-weight: bold;
  font-size: 1rem;
  border-radius: 2rem;
  color: var(--white);
  background: var(--dark);
  border: none;
  cursor: pointer;
  font-family: inherit;
}

/* ===== MOBILE / TABLET ===== */
@media (max-width: 1024px) {
  html {
    font-size: 0.9rem;
    overflow-x: hidden;
  }

  body {
    display: block;
    padding-top: 8rem;
    padding-bottom: 1rem;
    min-height: 100vh;
  }

  nav {
    grid-template-columns: 5rem 1fr;
    justify-content: space-between;
    max-width: none;
    width: 100%;
    padding: 0;
  }

  .header-nav {
    display: none;
  }

  .header-details {
    justify-self: end;
  }

  .header-login,
  .header-user-logged {
    margin-right: 0.75rem;
    margin-top: 0;
    gap: 0.5rem;
  }

  .header-user-name {
    display: none;
  }

  .button-login,
  .button-join,
  .button-logout {
    min-width: 4.25rem;
    min-height: 32px;
    padding: 0.2rem 0.65rem;
    font-size: 0.95rem;
  }

  #nav-ntj {
    top: 4rem;
    padding: 0.5rem 0;
  }

  #leftColumn,
  #rightColumn {
    display: none;
  }

  #mainContent {
    width: 100%;
    max-width: 100vw;
    padding: 0 1rem 5rem;
    height: auto;
    min-height: calc(100vh - 8rem);
    overflow: visible;
    overflow-x: hidden;
  }

  #mainContent::-webkit-scrollbar {
    display: none;
  }

  .carousel {
    width: calc(100% + 2rem);
    margin-left: -1rem;
    margin-right: -1rem;
    padding-left: 1rem;
    padding-right: 1rem;
    box-sizing: border-box;
  }

  .carousel-tab {
    flex: 0 0 min(300px, 82vw);
    min-width: min(300px, 82vw);
    height: 130px;
  }

  .homepage-switch .button {
    font-size: 0.95rem;
    padding: 0.55rem 0.5rem;
  }

  .panel {
    flex: 0 0 min(280px, 78vw);
  }

  .homepage-links-footer {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .homepage-rg-footer {
    grid-template-columns: 1fr;
  }

  .betstop img {
    max-width: 160px;
  }

  .about-page-banner {
    height: 160px;
  }

  .about-page-content {
    padding: 1rem 1.15rem 1.5rem;
    font-size: 0.9rem;
  }

  .about-page-header {
    font-size: 1.1rem;
    padding: 0.75rem 1rem;
  }

  .terms-section h3 {
    font-size: 0.92rem;
    gap: 0.5rem;
  }

  .terms-version-table,
  .terms-id-table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .contact-hours-row {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }

  #sky-racing {
    right: 4.75rem;
    bottom: 1.15rem;
  }

  #sky-racing img {
    width: 40px;
  }

  .chat-btn {
    right: 1rem;
    bottom: 1.15rem;
    width: 46px;
    height: 46px;
  }

  .modal-overlay {
    padding: 0.75rem;
    align-items: flex-start;
    overflow-y: auto;
  }

  .modal-login {
    max-width: none;
    padding: 1.5rem 1.25rem 2rem;
    margin-top: 2rem;
  }

  .modal-register {
    max-width: none;
    max-height: none;
    margin-top: 0.5rem;
  }

  .modal-register-steps {
    grid-template-columns: 1fr;
    gap: 0.35rem;
    padding: 0.75rem 1rem 0.5rem;
  }

  .modal-register-step {
    margin: 0;
    font-size: 0.82rem;
    padding: 0.5rem 0.75rem;
  }

  .register-field {
    grid-template-columns: 1fr;
    gap: 0.35rem;
    align-items: stretch;
  }

  .register-step-buttons {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .modal-register-submit,
  .register-step-buttons .modal-register-submit,
  .register-step-buttons .modal-register-back {
    width: calc(100% - 2rem);
  }
}

@media (max-width: 480px) {
  body {
    padding-top: 7.5rem;
  }

  #nav-ntj .ntj-fixed,
  #nav-ntj .ntj-aus {
    font-size: 0.85rem;
    padding: 0.45rem 0.75rem;
  }

  .nextup-race {
    min-width: 9.5rem;
    padding: 0 0.75rem;
  }

  .carousel-tab {
    flex: 0 0 88vw;
    min-width: 88vw;
    height: 115px;
  }

  .tab-switch {
    min-width: 4.75rem;
    padding: 0.45rem 0.5rem;
    font-size: 0.7rem;
  }

  .tab-switch svg {
    width: 24px;
    height: 24px;
  }

  .odds-table td {
    height: 3rem;
    padding: 0.15rem 0.35rem;
    font-size: 0.85rem;
  }

  .betlink {
    min-width: 2.6rem;
    font-size: 0.8rem;
  }

  .button-login,
  .button-join {
    min-width: 3.75rem;
    font-size: 0.85rem;
  }

  .respgambling-head,
  .betslip-rg-head {
    font-size: 0.85rem;
  }
}
