/* ═══════════════════════════════════════════════════════════════
   Home Page — Three-column layout, Hero, Content, Bets
   ═══════════════════════════════════════════════════════════════ */

/* --- Three-Column Layout --- */
.page-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  padding: 1rem 0;
}
.sidebar-left, .sidebar-right { display: none; }

/* --- Hero Banner --- */
.hero-banner {
  position: relative;
  background: linear-gradient(135deg, var(--color-dark) 0%, #1a1c26 50%, var(--color-bg) 100%);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  overflow: hidden;
  min-height: 280px;
  display: flex;
  align-items: center;
}
.hero-banner::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 4px;
  height: 100%;
}
.hero-banner .eth-flag-stripe {
  position: absolute;
  top: 0;
  left: 0;
  width: 5px;
  height: 100%;
}
.hero-banner .eth-flag-stripe .g { height: 33.33%; background: #078930; }
.hero-banner .eth-flag-stripe .y { height: 33.33%; background: #FCDD09; }
.hero-banner .eth-flag-stripe .r { height: 33.33%; background: #DA121A; }
.hero-banner::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 60%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,209,0,.08) 0%, transparent 70%);
  pointer-events: none;
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 600px;
}
.hero-content h1 {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  color: #fff;
  margin-bottom: .75rem;
  line-height: 1.15;
}
.hero-content h1 span { color: var(--color-primary); }
.hero-content p {
  color: var(--color-muted);
  font-size: 1rem;
  margin-bottom: 1.25rem;
  line-height: 1.6;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
}
.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: 1rem;
}
.hero-badges .badge {
  background: var(--color-surface);
  color: var(--color-muted);
  font-size: .7rem;
  border: 1px solid var(--color-border);
}

/* --- Game Tiles Row --- */
.game-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: .75rem;
  padding: 1rem 0;
}
.game-tile {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
  cursor: pointer;
}
.game-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.game-tile .tile-img {
  width: 100%;
  aspect-ratio: 4/3;
  background: var(--color-surface-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-muted);
  font-size: 2rem;
}
.game-tile .tile-label {
  padding: .4rem .5rem;
  font-size: .72rem;
  font-weight: 600;
  color: var(--color-text);
  text-align: center;
}

/* --- Featured Matches --- */
.featured-matches {
  padding: 1rem 0;
}
.featured-matches h3 {
  font-size: .95rem;
  color: var(--color-text);
  margin-bottom: .75rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.match-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  padding: .6rem .75rem;
  background: var(--color-surface);
  border-radius: var(--radius-sm);
  margin-bottom: .35rem;
  font-size: .82rem;
  transition: background var(--transition);
}
.match-row:hover { background: var(--color-surface-light); }
.match-teams {
  flex: 1;
  min-width: 0;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.match-league {
  font-size: .68rem;
  color: var(--color-muted);
  margin-bottom: .15rem;
}
.match-odds {
  display: flex;
  gap: .3rem;
}
.match-time {
  font-size: .7rem;
  color: var(--color-muted);
  white-space: nowrap;
}
.odds-example-note {
  font-size: .7rem;
  color: var(--color-muted);
  text-align: center;
  padding: .3rem 0;
  font-style: italic;
}

/* --- Left Sidebar --- */
.sidebar-left .sidebar-block {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-bottom: .75rem;
}
.sidebar-left .sidebar-title {
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--color-primary);
  letter-spacing: .04em;
  margin-bottom: .6rem;
}
.sidebar-left .sports-list li {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .4rem .3rem;
  font-size: .82rem;
  color: var(--color-text);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}
.sidebar-left .sports-list li:hover { background: var(--color-surface-light); }
.sidebar-left .sports-list li .sport-icon { font-size: 1rem; width: 20px; text-align: center; }
.sidebar-left .sports-list li .sport-count {
  margin-left: auto;
  font-size: .7rem;
  color: var(--color-muted);
  background: var(--color-bg);
  padding: .1rem .4rem;
  border-radius: var(--radius-sm);
}
.sidebar-left .toggle-live {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .5rem .75rem;
  background: var(--color-bg);
  border-radius: var(--radius-md);
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: .75rem;
}
.sidebar-left .toggle-live .live-dot-sm {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--color-live);
  animation: pulse-dot 1.5s infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: .4; }
}

/* --- Right Sidebar (Bet Slip) --- */
.sidebar-right .bet-slip-box {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-bottom: .75rem;
}
.sidebar-right .bet-slip-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .75rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid var(--color-border);
}
.sidebar-right .bet-slip-header h4 {
  font-size: .85rem;
  color: var(--color-text);
}
.bet-slip-empty {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--color-muted);
  font-size: .82rem;
}
.bet-slip-empty svg {
  width: 48px;
  height: 48px;
  margin: 0 auto .75rem;
  opacity: .3;
}
.recent-winners {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: 1rem;
}
.recent-winners h4 {
  font-size: .82rem;
  color: var(--color-primary);
  margin-bottom: .6rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.winner-row {
  display: flex;
  justify-content: space-between;
  padding: .35rem 0;
  font-size: .78rem;
  border-bottom: 1px solid rgba(255,255,255,.04);
}
.winner-row .w-name { color: var(--color-muted); }
.winner-row .w-amount { color: var(--color-live); font-weight: 600; }

/* --- Content Section Banners --- */
.section-banner {
  position: relative;
  background: linear-gradient(135deg, var(--color-dark) 0%, #1c1e28 100%);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  overflow: hidden;
  margin-bottom: 1.5rem;
}
.section-banner::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 5px;
  height: 100%;
}
.section-banner .eth-flag-stripe {
  position: absolute;
  top: 0;
  left: 0;
  width: 5px;
  height: 100%;
}
.section-banner .eth-flag-stripe .g { height: 33.33%; background: #078930; }
.section-banner .eth-flag-stripe .y { height: 33.33%; background: #FCDD09; }
.section-banner .eth-flag-stripe .r { height: 33.33%; background: #DA121A; }
.section-banner::after {
  content: '';
  position: absolute;
  top: -30%;
  right: -10%;
  width: 40%;
  height: 160%;
  background: radial-gradient(circle, rgba(255,209,0,.06) 0%, transparent 60%);
  pointer-events: none;
}
.section-banner h2 {
  position: relative;
  z-index: 2;
  color: #fff;
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  margin-bottom: .5rem;
}
.section-banner p {
  position: relative;
  z-index: 2;
  color: var(--color-muted);
  font-size: .88rem;
  margin-bottom: 1rem;
}

/* --- Mobile Bottom Bar --- */
.mobile-bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--bottom-bar-h);
  background: var(--color-dark);
  border-top: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 80;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.mobile-bottom-bar a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .15rem;
  color: var(--color-muted);
  font-size: .62rem;
  font-weight: 600;
  padding: .25rem;
  min-width: 56px;
  text-align: center;
  transition: color var(--transition);
}
.mobile-bottom-bar a svg { width: 22px; height: 22px; }
.mobile-bottom-bar a.active { color: var(--color-primary); }
.mobile-bottom-bar a:hover { color: var(--color-primary); }

/* ═══ RESPONSIVE ═══ */
@media (min-width: 601px) and (max-width: 1024px) {
  .page-layout {
    grid-template-columns: 1fr;
  }
  .sidebar-left, .sidebar-right { display: none; }
  .hero-banner { padding: 2rem 1.5rem; min-height: 240px; }
  .game-tiles { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
  .mobile-bottom-bar { display: flex; }
}
@media (min-width: 1025px) {
  .page-layout {
    grid-template-columns: var(--sidebar-w) 1fr var(--right-sidebar-w);
    gap: 1rem;
    padding: 1rem;
  }
  .sidebar-left, .sidebar-right { display: block; }
  .sidebar-left { position: sticky; top: calc(var(--header-h) + var(--nav-h) + 1rem); align-self: start; max-height: calc(100vh - var(--header-h) - var(--nav-h) - 2rem); overflow-y: auto; }
  .sidebar-right { position: sticky; top: calc(var(--header-h) + var(--nav-h) + 1rem); align-self: start; }
  .mobile-bottom-bar { display: none; }
  .hero-banner { padding: 3rem 2.5rem; min-height: 320px; }
  .game-tiles { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}
@media (max-width: 600px) {
  .mobile-bottom-bar { display: flex; }
  body { padding-bottom: calc(var(--bottom-bar-h) + 8px); }
  .hero-banner { padding: 1.5rem 1rem; min-height: 220px; }
  .hero-content h1 { font-size: 1.35rem; }
  .game-tiles { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: .5rem; }
  .match-row { font-size: .75rem; padding: .5rem; }
  .section-banner { padding: 1.5rem 1rem; }
}


@media (max-width: 600px) {
  .page-layout { padding: .65rem .75rem; }
  .hero-banner { border-radius: var(--radius-md); }
  .hero-cta .btn { flex: 1 1 140px; }
  .hero-badges .badge { font-size: .64rem; }
  .game-tile .tile-label { font-size: .68rem; }
  .featured-matches h3 { flex-wrap: wrap; }
  .match-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
  .match-odds { grid-column: 1 / -1; grid-row: 2; }
  .match-time { grid-column: 2; grid-row: 1; }
  .sidebar-left, .sidebar-right { display: none; }
}
@media (min-width: 601px) and (max-width: 1100px) {
  .page-layout { padding-left: 1rem; padding-right: 1rem; }
}
