@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=DM+Sans:wght@300;400;500;600&display=swap');

:root {
  --bg: #0a0a0f;
  --bg2: #111118;
  --bg3: #1a1a24;
  --bg4: #22222f;
  --accent: #e50914;
  --accent2: #ff4d57;
  --gold: #f5c518;
  --text: #f0f0f0;
  --text2: #a0a0b0;
  --text3: #606070;
  --border: rgba(255,255,255,0.07);
  --card-radius: 10px;
  --nav-h: 64px;
}

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

html { scroll-behavior: smooth; }

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

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { cursor: pointer; font-family: inherit; }
ul { list-style: none; }

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: var(--bg4); border-radius: 2px; }

/* ── NAV ── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 40px;
  background: linear-gradient(to bottom, rgba(10,10,15,0.98) 0%, transparent 100%);
  border-bottom: 0.5px solid transparent;
  transition: background 0.3s, border-color 0.3s;
}
.nav.scrolled {
  background: rgba(10,10,15,0.97);
  border-bottom-color: var(--border);
  backdrop-filter: blur(12px);
}
.nav-logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 28px;
  letter-spacing: 2px;
  color: var(--accent);
}
.nav-logo span { color: var(--text); }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a {
  font-size: 14px; font-weight: 500; color: var(--text2);
  transition: color 0.2s;
  position: relative;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-links a.active::after {
  content: ''; position: absolute; bottom: -4px; left: 0; right: 0;
  height: 2px; background: var(--accent); border-radius: 1px;
}
.nav-right { display: flex; align-items: center; gap: 16px; }
.nav-search-btn {
  background: none; border: none; color: var(--text2);
  padding: 8px; border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}
.nav-search-btn:hover { color: var(--text); background: var(--bg3); }
.nav-search-btn svg { width: 18px; height: 18px; }
.nav-vip {
  background: var(--accent); color: #fff;
  font-size: 12px; font-weight: 600; letter-spacing: 0.5px;
  padding: 6px 16px; border-radius: 20px; border: none;
  transition: background 0.2s, transform 0.1s;
}
.nav-vip:hover { background: var(--accent2); transform: translateY(-1px); }

/* ── SEARCH OVERLAY ── */
.search-overlay {
  display: none; position: fixed; inset: 0; z-index: 200;
  background: rgba(10,10,15,0.96); backdrop-filter: blur(20px);
  align-items: flex-start; justify-content: center;
  padding-top: 100px;
}
.search-overlay.active { display: flex; }
.search-box {
  width: 100%; max-width: 680px; padding: 0 20px;
}
.search-input-wrap {
  display: flex; align-items: center; gap: 16px;
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 12px; padding: 14px 20px;
}
.search-input-wrap svg { width: 20px; height: 20px; color: var(--text3); flex-shrink: 0; }
.search-input-wrap input {
  flex: 1; background: none; border: none; outline: none;
  font-family: inherit; font-size: 18px; color: var(--text);
}
.search-input-wrap input::placeholder { color: var(--text3); }
.search-close {
  background: none; border: none; color: var(--text2);
  font-size: 14px; padding: 4px 8px; border-radius: 6px;
  transition: color 0.2s; white-space: nowrap;
}
.search-close:hover { color: var(--text); }
.search-results { margin-top: 20px; }
.search-results-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}
.search-hint {
  text-align: center; color: var(--text3); font-size: 14px;
  padding: 40px 0;
}

/* ── HERO ── */
.hero {
  position: relative; min-height: 90vh;
  display: flex; align-items: flex-end;
  padding: 0 40px 80px;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center top;
}
.hero-bg::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(
    to right,
    rgba(10,10,15,0.95) 0%,
    rgba(10,10,15,0.7) 40%,
    rgba(10,10,15,0.2) 70%,
    transparent 100%
  ),
  linear-gradient(to top, var(--bg) 0%, transparent 50%);
}
.hero-content {
  position: relative; z-index: 1;
  max-width: 560px;
  animation: fadeUp 0.8s ease both;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--accent); color: #fff;
  font-size: 11px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase;
  padding: 4px 12px; border-radius: 4px; margin-bottom: 16px;
}
.hero-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(52px, 8vw, 88px);
  line-height: 0.95; letter-spacing: 1px;
  margin-bottom: 16px;
}
.hero-meta { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.hero-rating { display: flex; align-items: center; gap: 4px; color: var(--gold); font-size: 14px; font-weight: 600; }
.hero-year, .hero-genre {
  font-size: 13px; color: var(--text2);
  background: var(--bg3); padding: 3px 10px; border-radius: 4px;
}
.hero-desc {
  font-size: 15px; color: var(--text2); line-height: 1.7;
  margin-bottom: 28px; max-width: 460px;
}
.hero-btns { display: flex; gap: 12px; flex-wrap: wrap; }
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent); color: #fff;
  font-size: 15px; font-weight: 600;
  padding: 13px 28px; border-radius: 8px; border: none;
  transition: background 0.2s, transform 0.15s;
}
.btn-primary:hover { background: var(--accent2); transform: translateY(-2px); }
.btn-secondary {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.1); color: var(--text);
  font-size: 15px; font-weight: 500;
  padding: 13px 28px; border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.15);
  transition: background 0.2s, transform 0.15s;
  backdrop-filter: blur(4px);
}
.btn-secondary:hover { background: rgba(255,255,255,0.18); transform: translateY(-2px); }
.btn-primary svg, .btn-secondary svg { width: 16px; height: 16px; }

/* ── SECTIONS ── */
.section { padding: 40px 40px; }
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.section-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 26px; letter-spacing: 1px;
}
.section-title span { color: var(--accent); }
.section-more {
  font-size: 13px; color: var(--text3);
  display: flex; align-items: center; gap: 4px;
  transition: color 0.2s;
}
.section-more:hover { color: var(--accent); }

/* ── CARDS GRID (horizontal scroll) ── */
.cards-scroll {
  display: flex; gap: 14px;
  overflow-x: auto; padding-bottom: 12px;
  scrollbar-width: thin;
}
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 16px;
}

/* ── CARD ── */
.card {
  flex-shrink: 0; width: 170px;
  cursor: pointer; border-radius: var(--card-radius);
  overflow: hidden; background: var(--bg2);
  transition: transform 0.25s, box-shadow 0.25s;
  position: relative;
}
.cards-grid .card { width: auto; }
.card:hover { transform: translateY(-6px) scale(1.02); box-shadow: 0 20px 50px rgba(0,0,0,0.6); }
.card-poster {
  aspect-ratio: 2/3; overflow: hidden; position: relative;
}
.card-poster img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.4s;
}
.card:hover .card-poster img { transform: scale(1.05); }
.card-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(10,10,15,0.95) 0%, transparent 60%);
  opacity: 0; transition: opacity 0.3s;
  display: flex; align-items: flex-end; padding: 12px;
}
.card:hover .card-overlay { opacity: 1; }
.card-play {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--accent); border: none; color: #fff;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.2s;
}
.card-play:hover { transform: scale(1.1); }
.card-play svg { width: 14px; height: 14px; margin-left: 2px; }
.card-info { padding: 10px 10px 12px; }
.card-title { font-size: 13px; font-weight: 500; line-height: 1.3; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-meta { display: flex; align-items: center; gap: 6px; }
.card-year { font-size: 11px; color: var(--text3); }
.card-rating { font-size: 11px; color: var(--gold); display: flex; align-items: center; gap: 2px; }
.card-type-badge {
  position: absolute; top: 8px; left: 8px;
  font-size: 9px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase;
  padding: 3px 7px; border-radius: 3px;
}
.badge-movie { background: var(--accent); color: #fff; }
.badge-tv { background: #1a6ef5; color: #fff; }
.badge-sport { background: #16a34a; color: #fff; }
.badge-live { background: var(--accent); color: #fff; animation: pulse 1.5s infinite; }

/* ── SPORT CARDS (wide format) ── */
.sport-card {
  flex-shrink: 0; width: 300px;
  background: var(--bg2); border: 0.5px solid var(--border);
  border-radius: 12px; padding: 20px;
  cursor: pointer; transition: transform 0.2s, border-color 0.2s;
}
.sport-card:hover { transform: translateY(-4px); border-color: rgba(255,255,255,0.15); }
.sport-league { font-size: 11px; color: var(--text3); font-weight: 600; letter-spacing: 0.8px; text-transform: uppercase; margin-bottom: 14px; }
.sport-teams { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sport-team { display: flex; flex-direction: column; align-items: center; gap: 8px; flex: 1; }
.sport-team-logo {
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--bg3); display: flex; align-items: center; justify-content: center;
  font-size: 22px;
}
.sport-team-name { font-size: 13px; font-weight: 500; text-align: center; }
.sport-vs { font-family: 'Bebas Neue'; font-size: 22px; color: var(--text3); flex-shrink: 0; }
.sport-score { font-family: 'Bebas Neue'; font-size: 32px; letter-spacing: 2px; text-align: center; }
.sport-time {
  margin-top: 14px; text-align: center;
  font-size: 12px; color: var(--text3);
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.live-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); display: inline-block;
  animation: pulse 1.5s infinite;
}

/* ── GENRE PAGE ── */
.page-header {
  padding: 120px 40px 40px;
  background: linear-gradient(to bottom, var(--bg2) 0%, var(--bg) 100%);
  border-bottom: 0.5px solid var(--border);
}
.page-header h1 { font-family: 'Bebas Neue'; font-size: 52px; letter-spacing: 2px; }
.page-header p { color: var(--text2); font-size: 15px; margin-top: 8px; }
.genre-tabs {
  display: flex; gap: 8px; padding: 20px 40px;
  overflow-x: auto; flex-wrap: wrap;
}
.genre-tab {
  padding: 8px 20px; border-radius: 20px; font-size: 13px; font-weight: 500;
  background: var(--bg3); border: 1px solid var(--border); color: var(--text2);
  cursor: pointer; transition: all 0.2s; white-space: nowrap;
}
.genre-tab:hover, .genre-tab.active {
  background: var(--accent); border-color: var(--accent); color: #fff;
}

/* ── DETAIL PAGE ── */
.detail-hero {
  position: relative; min-height: 70vh;
  display: flex; align-items: flex-end;
  padding: 0 40px 60px;
}
.detail-hero-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
}
.detail-hero-bg::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to top, var(--bg) 0%, rgba(10,10,15,0.85) 50%, rgba(10,10,15,0.4) 100%);
}
.detail-content { position: relative; z-index: 1; max-width: 700px; }
.detail-title { font-family: 'Bebas Neue'; font-size: clamp(40px,6vw,70px); line-height: 1; margin-bottom: 12px; }
.detail-stats { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }
.detail-stat {
  font-size: 13px; padding: 4px 12px; border-radius: 4px;
  background: var(--bg3); color: var(--text2);
}
.detail-stat.rating { color: var(--gold); background: rgba(245,197,24,0.12); }
.detail-overview { font-size: 15px; color: var(--text2); line-height: 1.75; max-width: 580px; margin-bottom: 28px; }
.detail-player-wrap {
  padding: 0 40px 40px;
  background: var(--bg);
}
.player-container {
  width: 100%; aspect-ratio: 16/9;
  background: #000; border-radius: 12px; overflow: hidden;
  border: 0.5px solid var(--border);
}
.player-container iframe { width: 100%; height: 100%; border: none; display: block; }
.player-sources {
  display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap;
}
.source-btn {
  font-size: 12px; font-weight: 600; letter-spacing: 0.3px;
  padding: 7px 16px; border-radius: 6px;
  border: 1px solid var(--border); background: var(--bg3); color: var(--text2);
  cursor: pointer; transition: all 0.2s;
}
.source-btn:hover, .source-btn.active {
  background: var(--accent); border-color: var(--accent); color: #fff;
}

/* ── FOOTER ── */
footer {
  background: var(--bg2); border-top: 0.5px solid var(--border);
  padding: 40px 40px 24px; margin-top: 60px;
}
.footer-top { display: flex; gap: 40px; flex-wrap: wrap; justify-content: space-between; margin-bottom: 32px; }
.footer-logo { font-family: 'Bebas Neue'; font-size: 26px; letter-spacing: 2px; color: var(--accent); margin-bottom: 10px; }
.footer-logo span { color: var(--text); }
.footer-desc { font-size: 13px; color: var(--text3); max-width: 240px; line-height: 1.6; }
.footer-col h4 { font-size: 12px; font-weight: 600; letter-spacing: 0.8px; text-transform: uppercase; color: var(--text3); margin-bottom: 14px; }
.footer-col a { display: block; font-size: 13px; color: var(--text2); margin-bottom: 8px; transition: color 0.2s; }
.footer-col a:hover { color: var(--text); }
.footer-bottom {
  border-top: 0.5px solid var(--border); padding-top: 20px;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: gap;
  font-size: 12px; color: var(--text3);
}

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.fade-in { animation: fadeUp 0.6s ease both; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .nav { padding: 0 20px; }
  .nav-links { display: none; }
  .hero { padding: 0 20px 60px; min-height: 80vh; }
  .section { padding: 30px 20px; }
  .detail-hero { padding: 0 20px 40px; }
  .detail-player-wrap { padding: 0 20px 40px; }
  .page-header, .genre-tabs { padding-left: 20px; padding-right: 20px; }
  footer { padding: 30px 20px 20px; }
}

/* SILVA STYLE ENHANCEMENTS */
.badge-quality { position: absolute; top: 10px; right: 10px; background: #2ecc71; color: #fff; font-size: 9px; font-weight: 800; padding: 3px 6px; border-radius: 4px; z-index: 5; text-transform: uppercase; }
.badge-trending { position: absolute; top: 35px; right: 10px; background: #f1c40f; color: #000; font-size: 9px; font-weight: 800; padding: 3px 6px; border-radius: 4px; z-index: 5; text-transform: uppercase; }

.nav-surprise-btn { background: #1a1a1a; border: 1px solid var(--border); border-radius: 50%; width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: 0.3s; margin-right: 15px; }
.nav-surprise-btn:hover { background: var(--accent); border-color: var(--accent); transform: rotate(15deg); }
.nav-surprise-btn svg { width: 18px; height: 18px; color: #fff; }

/* PWA BANNER */
.pwa-banner { position: fixed; bottom: -100px; left: 50%; transform: translateX(-50%); width: 90%; max-width: 500px; background: #1a1a1a; border: 1px solid var(--border); border-radius: 16px; padding: 15px 25px; display: flex; align-items: center; justify-content: space-between; z-index: 5000; box-shadow: 0 15px 40px rgba(0,0,0,0.8); border-left: 4px solid var(--accent); transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275); opacity: 0; pointer-events: none; }
.pwa-banner.active { bottom: 30px; opacity: 1; pointer-events: auto; }
.pwa-info h4 { font-family: 'Bebas Neue'; font-size: 20px; margin-bottom: 4px; color: #fff; }
.pwa-info p { font-size: 11px; color: var(--text3); }
.pwa-btn { background: var(--accent); color: #fff; border: none; padding: 10px 18px; border-radius: 8px; font-weight: 800; font-size: 13px; cursor: pointer; }
.pwa-close { color: var(--text3); font-size: 20px; cursor: pointer; margin-left: 15px; background: none; border: none; }

/* DETAIL PAGE BUTTONS (Silva Style) */
.action-row { display: flex; gap: 12px; margin-top: 30px; flex-wrap: wrap; }
.btn-action { background: #1a1a1a; border: 1px solid #333; color: var(--text); padding: 10px 20px; border-radius: 8px; display: flex; align-items: center; gap: 8px; font-weight: 700; cursor: pointer; transition: 0.3s; font-size: 13px; text-decoration: none; }
.btn-action:hover { background: #2a2a2a; border-color: #444; }
.btn-action.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-action.primary:hover { background: #ff0f1e; }
.btn-action svg { width: 16px; height: 16px; }

/* NEWS TICKER (Silva Sports) */
.ticker-wrap { background: #900; color: #fff; padding: 8px 0; overflow: hidden; position: relative; width: 100%; border-bottom: 1px solid #000; }
.ticker-content { display: flex; white-space: nowrap; animation: ticker 60s linear infinite; gap: 60px; width: fit-content; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-100%); } }
.ticker-item { font-weight: 800; font-size: 13px; text-transform: uppercase; display: flex; align-items: center; gap: 10px; }
.ticker-item i { color: #f1c40f; font-style: normal; }
