:root {
  /* 1xBet-inspired palette */
  --green: #1f72b8;
  --green-dark: #0d4f8a;
  --green-deep: #002b72;
  --lime: #0bbbef;
  --lime-dark: #0999c4;
  --yellow: #7fd9f5;
  --bg: #eef3f9;
  --panel: #ffffff;
  --ink: #0b1c33;
  --muted: #5a6f86;
  --line: #d5e2ef;
  --live: #e11d48;
  --odds: #e8f6fc;
  --odds-hover: #d2effa;
  --odds-active: #002b72;
  --shadow: 0 8px 24px rgba(0, 43, 114, 0.1);
  --radius: 10px;
  --header-h: 64px;
  --font: "Inter", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.app {
  min-height: 100vh;
  padding-bottom: 72px;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: linear-gradient(180deg, #00358a 0%, var(--green-deep) 100%);
  color: #fff;
  box-shadow: 0 2px 12px rgba(0, 20, 60, 0.28);
}

.header-inner {
  max-width: 1440px;
  margin: 0 auto;
  height: var(--header-h);
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.logo {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  padding: 4px 2px;
  transition: opacity 0.15s ease;
}

.logo:hover {
  opacity: 0.92;
}

.logo-word {
  display: inline-flex;
  align-items: baseline;
  font-family: "Montserrat", var(--font);
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.06em;
  line-height: 1;
  text-transform: none;
}

.logo-my {
  color: var(--lime);
}

.logo-bet {
  color: #ffffff;
}

.product-nav {
  display: flex;
  gap: 4px;
  flex: 1;
  overflow-x: auto;
}

.product-nav a {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0.9;
}

.product-nav a:hover,
.product-nav a.is-active {
  background: rgba(255, 255, 255, 0.14);
  opacity: 1;
}

.product-nav a.nav-news {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px 7px 10px;
  border-radius: 999px;
  opacity: 1;
  color: #001a3d;
  font-weight: 800;
  letter-spacing: 0.01em;
  background: linear-gradient(120deg, #ffe566 0%, #0bbbef 55%, #7fd9f5 100%);
  background-size: 200% 100%;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.35) inset,
    0 4px 14px rgba(11, 187, 239, 0.45);
  animation: newsShine 3.2s ease-in-out infinite;
  overflow: hidden;
}

.product-nav a.nav-news::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 40%,
    rgba(255, 255, 255, 0.55) 50%,
    transparent 60%
  );
  transform: translateX(-120%);
  animation: newsSweep 2.8s ease-in-out infinite;
  pointer-events: none;
}

.product-nav a.nav-news:hover {
  background: linear-gradient(120deg, #fff1a0 0%, #3dcef5 55%, #a8e9fb 100%);
  transform: translateY(-1px);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.45) inset,
    0 6px 18px rgba(11, 187, 239, 0.55);
}

.nav-news-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.nav-news-text {
  position: relative;
  z-index: 1;
  font-size: 0.92rem;
}

@keyframes newsShine {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

@keyframes newsSweep {
  0%,
  55% {
    transform: translateX(-120%);
  }
  80%,
  100% {
    transform: translateX(120%);
  }
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.balance-chip {
  display: none;
  flex-direction: column;
  line-height: 1.1;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.18);
  font-size: 0.7rem;
}

.balance-chip strong {
  font-size: 0.85rem;
}

.btn {
  border: 0;
  border-radius: 8px;
  padding: 9px 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease;
}

.btn:active {
  transform: scale(0.97);
}

.btn-outline {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.55);
}

.btn-accent {
  background: var(--lime);
  color: #002043;
}

.btn-accent:hover {
  background: #3dcef5;
}

.btn-dark {
  background: var(--green-deep);
  color: #fff;
}

.btn-place {
  width: 100%;
  background: var(--lime);
  color: #002043;
  padding: 14px;
  font-size: 1rem;
}

.btn-place:hover {
  background: #3dcef5;
}

/* Layout */
.layout {
  max-width: 1440px;
  margin: 0 auto;
  padding: 14px 12px 24px;
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr) 300px;
  gap: 12px;
  align-items: start;
}

.sidebar,
.betslip,
.main {
  min-width: 0;
}

.sidebar,
.betslip {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.sidebar {
  padding: 12px;
  position: sticky;
  top: calc(var(--header-h) + 12px);
  max-height: calc(100vh - var(--header-h) - 24px);
  overflow: auto;
}

.search-wrap input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #f7faf7;
  outline: none;
}

.search-wrap input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(11, 187, 239, 0.2);
}

.side-title {
  margin: 16px 0 8px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.league-list,
.sport-list,
.slip-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.league,
.sport-list button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 10px 10px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.9rem;
}

.league:hover,
.sport-list button:hover {
  background: #f0f7ef;
}

.league.is-active {
  background: var(--green);
  color: #fff;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--live);
  box-shadow: 0 0 0 0 rgba(225, 29, 72, 0.5);
  animation: pulse 1.4s infinite;
}

@keyframes pulse {
  70% {
    box-shadow: 0 0 0 8px rgba(225, 29, 72, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(225, 29, 72, 0);
  }
}

/* Main */
.hero-banners {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.banner {
  border-radius: var(--radius);
  padding: 18px;
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  min-height: 120px;
  overflow: hidden;
  position: relative;
}

.banner h2 {
  margin: 4px 0 6px;
  font-size: 1.25rem;
}

.banner p {
  margin: 0;
  opacity: 0.92;
  font-size: 0.9rem;
}

.banner-kicker {
  font-size: 0.75rem !important;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.85 !important;
}

.banner-1 {
  background:
    radial-gradient(circle at 90% 10%, rgba(11, 187, 239, 0.4), transparent 42%),
    linear-gradient(135deg, #1f72b8, #002b72);
}

.banner-2 {
  background:
    radial-gradient(circle at 80% 80%, rgba(11, 187, 239, 0.25), transparent 45%),
    linear-gradient(135deg, #0a3d7a, #021433);
}

.filters {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px;
}

.tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
}

.tab {
  border: 0;
  background: transparent;
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
}

.tab.is-active {
  background: var(--green);
  color: #fff;
}

.market-label {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--muted);
  padding-right: 6px;
}

.matches {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.match-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.match-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #f7faf7;
  border-bottom: 1px solid var(--line);
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 600;
}

.badge-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--live);
  font-weight: 800;
}

.match-body {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(220px, 1fr);
  gap: 12px;
  padding: 12px;
  align-items: center;
}

.teams {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.team {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-weight: 700;
}

.team-name {
  display: flex;
  align-items: center;
  gap: 8px;
}

.crest {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.7rem;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}

.score {
  font-variant-numeric: tabular-nums;
  font-size: 1.05rem;
  min-width: 1.2rem;
  text-align: right;
}

.odds-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.odd-btn {
  border: 1px solid var(--line);
  background: var(--odds);
  border-radius: 8px;
  padding: 8px 6px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.odd-btn small {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.7rem;
}

.odd-btn strong {
  font-size: 0.95rem;
}

.odd-btn:hover {
  background: var(--odds-hover);
}

.odd-btn.is-selected {
  background: var(--odds-active);
  border-color: var(--odds-active);
  color: #fff;
}

.odd-btn.is-selected small {
  color: rgba(255, 255, 255, 0.8);
}

/* Bet slip */
.betslip {
  position: sticky;
  top: calc(var(--header-h) + 12px);
  max-height: calc(100vh - var(--header-h) - 24px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.betslip-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 14px 8px;
}

.betslip-head h2 {
  margin: 0;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.betslip-head h2 span,
.fab-count {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--lime);
  color: var(--green-deep);
  font-size: 0.75rem;
}

.link-btn {
  border: 0;
  background: transparent;
  color: var(--green);
  font-weight: 700;
  cursor: pointer;
}

.slip-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 0 14px 10px;
}

.slip-tabs button {
  border: 1px solid var(--line);
  background: #f7faf7;
  border-radius: 8px;
  padding: 8px;
  font-weight: 700;
  cursor: pointer;
}

.slip-tabs button.is-active {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.slip-empty {
  padding: 36px 18px;
  text-align: center;
  color: var(--muted);
}

.slip-empty p {
  margin: 0 0 4px;
  font-weight: 700;
  color: var(--ink);
}

.slip-list {
  flex: 1;
  overflow: auto;
  padding: 0 10px 10px;
}

.slip-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 8px;
  background: #fbfdfb;
}

.slip-item-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.slip-item-top strong {
  font-size: 0.86rem;
}

.remove-sel {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}

.slip-meta {
  font-size: 0.75rem;
  color: var(--muted);
}

.slip-pick {
  margin-top: 6px;
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  font-size: 0.86rem;
}

.slip-footer {
  border-top: 1px solid var(--line);
  padding: 12px;
  background: #fff;
}

.stake-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  font-weight: 600;
  font-size: 0.88rem;
}

.stake-row input {
  width: 110px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  text-align: right;
  font-weight: 700;
}

.quick-stakes {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 12px;
}

.quick-stakes button {
  border: 1px solid var(--line);
  background: #f3f8f1;
  border-radius: 8px;
  padding: 8px;
  font-weight: 700;
  cursor: pointer;
}

.summary {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
  font-size: 0.88rem;
}

.summary div {
  display: flex;
  justify-content: space-between;
}

.summary strong {
  color: var(--green-dark);
}

.footer {
  max-width: 1440px;
  margin: 0 auto;
  padding: 8px 16px 90px;
  color: var(--muted);
  font-size: 0.78rem;
  text-align: center;
}

.mobile-nav {
  display: none;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 90px;
  transform: translateX(-50%);
  background: var(--green-deep);
  color: #fff;
  padding: 12px 18px;
  border-radius: 999px;
  font-weight: 700;
  z-index: 60;
  box-shadow: var(--shadow);
}

.hidden-desktop-slip {
  display: none !important;
}

@media (max-width: 1100px) {
  .layout {
    grid-template-columns: 200px minmax(0, 1fr);
  }

  .betslip {
    display: none;
  }

  .betslip.is-open-mobile {
    display: flex;
    position: fixed;
    inset: auto 0 56px 0;
    top: auto;
    max-height: 70vh;
    z-index: 50;
    border-radius: 16px 16px 0 0;
  }

  .mobile-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 55;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    background: #fff;
    border-top: 1px solid var(--line);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }

  .mobile-nav button {
    border: 0;
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--muted);
    cursor: pointer;
    padding: 6px 2px;
  }

  .mobile-nav button.is-active,
  .mobile-nav .slip-fab {
    color: var(--green-dark);
  }

  .slip-fab {
    position: relative;
  }

  .fab-count {
    position: absolute;
    top: -2px;
    right: calc(50% - 22px);
  }
}

@media (max-width: 780px) {
  .layout {
    grid-template-columns: 1fr;
    padding: 10px;
  }

  .sidebar {
    position: static;
    max-height: none;
    display: none;
  }

  .sidebar.is-open-mobile {
    display: block;
  }

  .product-nav {
    display: none;
  }

  .balance-chip {
    display: flex;
  }

  .btn-outline {
    display: none;
  }

  .hero-banners {
    grid-template-columns: 1fr;
  }

  .match-body {
    grid-template-columns: 1fr;
  }

  .header-inner {
    gap: 10px;
  }
}
