@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 300 500;
  font-display: swap;
  src: url('./fonts/dmsans-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 700 900;
  font-display: swap;
  src: url('./fonts/playfair-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Playfair Display';
  font-style: italic;
  font-weight: 700;
  font-display: swap;
  src: url('./fonts/playfair-italic-latin.woff2') format('woff2');
}

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

:root {
  --deep: #0a1628;
  --ocean: #0d2d4a;
  --mid: #0e4d72;
  --surface: #1a7a9e;
  --foam: #a8d8ea;
  --light: #e8f4f8;
  --warm: #f5d76e;
  --coral: #e8876a;
  --text: #e8f4f8;
  --muted: rgba(168,216,234,0.6);
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--deep);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Ocean background */
.ocean-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.ocean-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 80%, rgba(14,77,114,0.7) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 20%, rgba(13,45,74,0.9) 0%, transparent 60%),
    linear-gradient(180deg, #0a1628 0%, #0d2d4a 40%, #0e4d72 100%);
}

.bubbles { position: absolute; inset: 0; }

.bubble {
  position: absolute;
  border-radius: 50%;
  background: rgba(168,216,234,0.06);
  animation: rise linear infinite;
}

.bubble:nth-child(1) { width:8px; height:8px; left:10%; animation-duration:12s; }
.bubble:nth-child(2) { width:14px; height:14px; left:25%; animation-duration:18s; animation-delay:3s; }
.bubble:nth-child(3) { width:6px; height:6px; left:40%; animation-duration:10s; animation-delay:1s; }
.bubble:nth-child(4) { width:20px; height:20px; left:60%; animation-duration:22s; animation-delay:5s; }
.bubble:nth-child(5) { width:10px; height:10px; left:75%; animation-duration:15s; animation-delay:2s; }
.bubble:nth-child(6) { width:5px; height:5px; left:88%; animation-duration:8s; animation-delay:4s; }

@keyframes rise {
  from { transform: translateY(110vh); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 0.5; }
  to { transform: translateY(-10vh) translateX(20px); opacity: 0; }
}

.rays {
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 200%;
  height: 80%;
  background: repeating-conic-gradient(
    from 270deg at 50% 0%,
    rgba(168,216,234,0.03) 0deg,
    transparent 3deg,
    transparent 12deg,
    rgba(168,216,234,0.02) 15deg
  );
  animation: sway 20s ease-in-out infinite alternate;
}

@keyframes sway {
  from { transform: translateX(-50%) rotate(-3deg); }
  to { transform: translateX(-50%) rotate(3deg); }
}

/* Layout */
.site-wrapper {
  position: relative;
  z-index: 1;
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 20px 60px;
}

/* Header */
header.banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0 18px;
  flex-wrap: wrap;
}

.banner-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.banner-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }

.whale-icon {
  display: inline-flex;
  animation: bob 4s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-4px) rotate(2deg); }
}

.site-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.4rem, 3.2vw, 2rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--foam);
  text-shadow: 0 0 40px rgba(168,216,234,0.3);
}

.site-title em { color: var(--warm); font-style: italic; }

.subtitle {
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Status */
.status-bar {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px;
  background: rgba(14,77,114,0.5);
  border: 1px solid rgba(168,216,234,0.2);
  border-radius: 100px;
  backdrop-filter: blur(8px);
  flex-shrink: 0;
}

.pulse-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--coral);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(232,135,106,0.7); }
  50% { box-shadow: 0 0 0 8px rgba(232,135,106,0); }
}

.status-text {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--foam);
  letter-spacing: 0.04em;
}

/* Grid */
.main-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-auto-flow: row;
  gap: 16px;
  margin-bottom: 16px;
  align-items: start;
}

.stream-card { grid-column: 1; }
.news-card { grid-column: 1; }
.ticker-card { grid-column: 2; grid-row: 1 / span 3; }
.bet-card { grid-column: 1; }

@media (max-width: 900px) {
  .main-grid { grid-template-columns: 1fr; }
  .stream-card, .news-card, .ticker-card, .bet-card {
    grid-column: 1;
    grid-row: auto;
  }
}

/* Card */
.card {
  background: rgba(13,45,74,0.7);
  border: 1px solid rgba(168,216,234,0.15);
  border-radius: 20px;
  backdrop-filter: blur(12px);
  overflow: hidden;
  transition: border-color 0.3s, transform 0.3s;
}

.card:hover {
  border-color: rgba(168,216,234,0.35);
  transform: translateY(-2px);
}

/* Stream */
.stream-card {
  display: grid;
  grid-template-columns: 240px 1fr;
  overflow: hidden;
}

.stream-info {
  padding: 18px 20px;
  border-right: 1px solid rgba(168,216,234,0.1);
  background: rgba(10,22,40,0.25);
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  transition: none;
}

.info-toggle {
  position: absolute;
  top: 10px;
  right: 6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid rgba(168,216,234,0.2);
  background: rgba(13,45,74,0.8);
  color: var(--muted);
  font-size: 0.7rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
  transition: color 0.2s, border-color 0.2s;
}
.info-toggle:hover { color: var(--foam); border-color: rgba(168,216,234,0.45); }

.stream-card.info-collapsed { grid-template-columns: 40px 1fr; }
.stream-card.info-collapsed .stream-info > *:not(.info-toggle) { display: none; }
.stream-card.info-collapsed .info-toggle { right: 50%; transform: translateX(50%); }

.stream-info .card-label { margin-bottom: 2px; }
.stream-info .stat-row.compact { gap: 2px; }
.stream-info .stat-row.compact .stat-item { padding: 6px 0; }
.stream-info .stat-row.compact .stat-label { font-size: 0.72rem; }
.stream-info .stat-row.compact .stat-value { font-size: 0.9rem; }

.stream-main { min-width: 0; display: flex; flex-direction: column; }

@media (max-width: 720px) {
  .stream-card { grid-template-columns: 1fr; }
  .stream-info { border-right: none; border-bottom: 1px solid rgba(168,216,234,0.1); }
}

.stream-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px 0;
}

.card-label {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.live-badge {
  background: var(--coral);
  color: white;
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  border-radius: 100px;
  animation: fadeLive 2s ease-in-out infinite alternate;
}

@keyframes fadeLive { from { opacity: 0.7; } to { opacity: 1; } }

.stream-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  overflow: hidden;
}

.stream-embed iframe,
.stream-embed video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #000;
}

.stream-placeholder {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at center, rgba(14,77,114,0.7) 0%, rgba(10,22,40,0.95) 70%),
    linear-gradient(180deg, #0a1628 0%, #0d2d4a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.stream-load-btn {
  background: none;
  border: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 28px 32px;
  max-width: 480px;
  text-align: center;
  border-radius: 16px;
  transition: background 0.2s;
}

.stream-load-btn:hover,
.stream-load-btn:focus-visible {
  background: rgba(168,216,234,0.08);
  outline: none;
}

.stream-load-btn .play-icon {
  font-size: 2.4rem;
  color: var(--coral);
  line-height: 1;
  filter: drop-shadow(0 0 16px rgba(232,135,106,0.5));
}

.stream-load-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--foam);
}

.stream-load-note {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.5;
  max-width: 360px;
}

.stream-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.9rem;
}

.ticker-video {
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  width: 100%;
  font: inherit;
  color: inherit;
}

.ticker-video .ticker-type { color: var(--coral); }
.ticker-video .ticker-dot { background: var(--coral); box-shadow: 0 0 8px rgba(232,135,106,0.6); }

.stream-tabs {
  display: flex;
  gap: 6px;
  padding: 12px 22px;
  flex-wrap: wrap;
}

.tab-sources { margin-left: auto; }

.tab-btn {
  background: rgba(168,216,234,0.08);
  border: 1px solid rgba(168,216,234,0.15);
  color: var(--muted);
  padding: 6px 16px;
  border-radius: 100px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'DM Sans', sans-serif;
}

.tab-btn.active, .tab-btn:hover {
  background: rgba(168,216,234,0.18);
  border-color: rgba(168,216,234,0.4);
  color: var(--foam);
}

.stream-sources {
  display: none;
  padding: 0 22px 22px;
  gap: 10px;
  flex-direction: column;
}

.stream-sources.visible { display: flex; }

.source-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(168,216,234,0.06);
  border: 1px solid rgba(168,216,234,0.12);
  border-radius: 10px;
  text-decoration: none;
  color: var(--text);
  transition: all 0.2s;
  font-size: 0.9rem;
}

.source-link:hover {
  background: rgba(168,216,234,0.14);
  border-color: rgba(168,216,234,0.3);
  transform: translateX(4px);
}

.source-link span { color: var(--muted); font-size: 0.8rem; }

/* News */
.news-card { padding: 20px 22px; }
.news-card .card-label { margin-bottom: 16px; }

.news-item {
  display: block;
  padding: 14px 0;
  border-bottom: 1px solid rgba(168,216,234,0.08);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  transition: padding-left 0.2s;
}

.news-item:last-child { border-bottom: none; padding-bottom: 0; }
.news-item:first-child { padding-top: 0; }
.news-item:hover { padding-left: 6px; }

.news-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
}

.news-source {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--warm);
}

.news-time { font-size: 0.7rem; color: var(--muted); }

.news-headline {
  font-family: 'Playfair Display', serif;
  font-size: 0.95rem;
  line-height: 1.4;
  color: var(--foam);
  font-weight: 700;
}

/* Info */
.info-card { padding: 20px 22px; }
.info-card .card-label { margin-bottom: 14px; }

.stat-row { display: flex; flex-direction: column; gap: 10px; }

.stat-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 8px 0;
  border-bottom: 1px solid rgba(168,216,234,0.06);
}

.stat-item:last-child { border-bottom: none; }
.stat-label { font-size: 0.8rem; color: var(--muted); }

.stat-value {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--foam);
  text-align: right;
}

.stat-value.highlight { color: var(--warm); }
.stat-value.danger { color: var(--coral); }

.stat-value-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.stat-source {
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  opacity: 0.5;
  transition: opacity 0.2s, color 0.2s;
}
.stat-source:hover { opacity: 1; color: var(--foam); }

/* Ticker */
.ticker-card {
  padding: 20px 22px;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 120px);
  position: sticky;
  top: 16px;
}

.ticker-feed {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  padding-right: 4px;
}

.ticker-feed::-webkit-scrollbar { width: 6px; }
.ticker-feed::-webkit-scrollbar-thumb { background: rgba(168,216,234,0.2); border-radius: 3px; }

.ticker-kind {
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid currentColor;
}

.ticker-kind.kind-liveblog { color: var(--foam); }
.ticker-kind.kind-video { color: var(--coral); }

.ticker-summary {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.5;
  margin-top: 4px;
}

.ticker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.ticker-status {
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.ticker-feed { display: flex; flex-direction: column; gap: 2px; }

.ticker-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 10px;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  border-left: 2px solid transparent;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.ticker-item:hover {
  background: rgba(168,216,234,0.06);
  border-left-color: var(--warm);
  transform: translateX(2px);
}

.ticker-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--warm);
  margin-top: 7px;
  flex-shrink: 0;
  box-shadow: 0 0 8px rgba(245,215,110,0.6);
}

.ticker-body { flex: 1; min-width: 0; }

.ticker-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 3px;
}

.ticker-type {
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--warm);
}

.ticker-time { font-size: 0.7rem; color: var(--muted); }

.ticker-source {
  font-size: 0.68rem;
  color: var(--muted);
  text-transform: lowercase;
  letter-spacing: 0.04em;
}
.ticker-source:not(:empty)::before { content: '· '; opacity: 0.5; }

.ticker-title {
  font-family: 'Playfair Display', serif;
  font-size: 0.95rem;
  line-height: 1.4;
  color: var(--foam);
  font-weight: 700;
}

.ticker-empty {
  font-size: 0.85rem;
  color: var(--muted);
  padding: 8px 4px;
}

/* Bet */
.bet-card {
  padding: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: rgba(13,45,74,0.5);
  border: 1px dashed rgba(168,216,234,0.2);
}

@media (max-width: 500px) { .bet-card { flex-direction: column; text-align: center; } }

.bet-content h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--warm);
  margin-bottom: 6px;
}

.bet-content p {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.6;
  max-width: 400px;
}

.bet-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 180px;
}

.bet-btn {
  padding: 10px 20px;
  border-radius: 10px;
  border: 1px solid;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.bet-btn.optimist {
  background: rgba(245,215,110,0.1);
  border-color: rgba(245,215,110,0.3);
  color: var(--warm);
}

.bet-btn.pessimist {
  background: rgba(232,135,106,0.1);
  border-color: rgba(232,135,106,0.3);
  color: var(--coral);
}

.bet-btn:hover { transform: translateX(-4px); filter: brightness(1.2); }

.bet-btn .odds { font-size: 0.75rem; opacity: 0.6; font-weight: 300; }

.coming-soon-tag {
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: rgba(168,216,234,0.1);
  border: 1px solid rgba(168,216,234,0.2);
  color: var(--muted);
  padding: 3px 10px;
  border-radius: 100px;
  margin-bottom: 10px;
  display: inline-block;
}

/* Footer */
footer {
  text-align: center;
  padding: 24px 0;
  font-size: 0.78rem;
  color: rgba(168,216,234,0.3);
  line-height: 1.8;
}

footer a { color: rgba(168,216,234,0.5); text-decoration: none; }
footer a:hover { color: var(--foam); }

.legal-nav {
  margin-top: 10px;
  display: flex;
  justify-content: center;
  gap: 12px;
  color: var(--muted);
  font-size: 0.8rem;
}

.legal-page {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 40px auto;
  padding: 40px 44px;
  background: rgba(13,45,74,0.7);
  border: 1px solid rgba(168,216,234,0.15);
  border-radius: 20px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--text);
}

.legal-page .legal-back {
  display: inline-block;
  margin-bottom: 20px;
  font-size: 0.85rem;
  color: var(--muted);
  text-decoration: none;
}
.legal-page .legal-back:hover { color: var(--foam); }

.legal-page h1 {
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  font-size: 2.2rem;
  margin-bottom: 24px;
  color: var(--foam);
}
.legal-page h2 {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 1.3rem;
  margin: 28px 0 10px;
  color: var(--foam);
}
.legal-page h3 {
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  font-size: 1rem;
  margin: 18px 0 6px;
  color: var(--foam);
}
.legal-page p, .legal-page li {
  font-size: 0.95rem;
  line-height: 1.65;
  color: rgba(232,244,248,0.85);
  margin-bottom: 10px;
}
.legal-page a {
  color: var(--foam);
  text-decoration: underline;
  text-decoration-color: rgba(168,216,234,0.4);
}
.legal-page a:hover { text-decoration-color: var(--foam); }
.legal-page code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.85em;
  background: rgba(168,216,234,0.08);
  padding: 1px 6px;
  border-radius: 4px;
}
.legal-page .legal-note {
  margin-top: 28px;
  font-size: 0.8rem;
  color: var(--muted);
}

@media (max-width: 640px) {
  .legal-page { margin: 20px 16px; padding: 28px 22px; }
  .legal-page h1 { font-size: 1.7rem; }
}
