/* ============================================================
   FLUX STREAMING — Global Stylesheet
   ============================================================ */

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

/* ─── CSS VARIABLES ─── */
:root {
  --bg:          #080a0f;
  --surface:     #0f1218;
  --surface2:    #161b24;
  --border:      rgba(255, 255, 255, 0.06);
  --text:        #f0f2f7;
  --muted:       #6b7585;
  --accent:      #e8c547;
  --accent2:     #e05c3a;
  --card-radius: 10px;
  --font-display: 'Bebas Neue', sans-serif;
  --font-body:    'DM Sans', sans-serif;
  --font-mono:    'DM Mono', monospace;
}

/* ─── RESET ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ─── SCROLLBAR ─── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--surface2); border-radius: 4px; }

/* ============================================================
   NAVIGATION
   ============================================================ */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 0 48px;
  height: 64px;
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(to bottom, rgba(8,10,15,0.98) 0%, rgba(8,10,15,0) 100%);
  transition: background 0.3s, backdrop-filter 0.3s;
}
nav.scrolled {
  background: rgba(8,10,15,0.97);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-logo {
  font-family: var(--font-display);
  font-size: 28px; letter-spacing: 3px;
  color: var(--accent);
  cursor: pointer; user-select: none;
  text-decoration: none;
}
.nav-links { display: flex; gap: 32px; list-style: none; }
.nav-links a {
  color: var(--muted); text-decoration: none; font-size: 13px;
  font-weight: 500; letter-spacing: 0.5px; transition: color 0.2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-right { display: flex; align-items: center; gap: 20px; }
.nav-search {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 7px 14px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 13px; width: 180px; outline: none;
  transition: border-color 0.2s, width 0.3s;
}
.nav-search:focus { border-color: var(--accent); width: 220px; }
.nav-search::placeholder { color: var(--muted); }
.nav-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600; cursor: pointer; color: var(--bg);
  flex-shrink: 0;
}

@media screen and (max-width: 447px) {
  .nav-search{
    display: none;
  }
}

/* ============================================================
   SHARED BUTTONS
   ============================================================ */
.btn-play {
  display: flex; align-items: center; gap: 10px;
  background: var(--text); color: var(--bg);
  border: none; border-radius: 6px;
  padding: 14px 28px;
  font-family: var(--font-body); font-size: 15px; font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}
.btn-play:hover { background: #d4d8e2; transform: translateY(-1px); }
.btn-play svg { flex-shrink: 0; }
.btn-info {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,0.1); color: var(--text);
  border: 1px solid var(--border); border-radius: 6px;
  padding: 14px 28px;
  font-family: var(--font-body); font-size: 15px; font-weight: 500;
  cursor: pointer; backdrop-filter: blur(8px);
  transition: background 0.2s, transform 0.15s;
}
.btn-info:hover { background: rgba(255,255,255,0.16); transform: translateY(-1px); }

/* ============================================================
   SHARED SECTION HEADERS
   ============================================================ */
.section { padding: 48px 48px 0; }
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px;
}
.section-title { font-family: var(--font-display); font-size: 22px; letter-spacing: 1.5px; }
.section-link {
  font-size: 12px; font-weight: 500; letter-spacing: 0.5px;
  color: var(--muted); text-decoration: none;
  display: flex; align-items: center; gap: 4px;
  transition: color 0.2s; cursor: pointer;
}
.section-link:hover { color: var(--accent); }

/* ============================================================
   MOVIE CARD
   ============================================================ */

/* Default: horizontal scroll row (desktop) */
.movies-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
  padding: 8px 48px 32px;
}

.movie-card {
  width: 100%;
  cursor: pointer; position: relative;
  transition: transform 0.25s ease;
}
.movie-card:hover { transform: scale(1.06) translateY(-4px); z-index: 10; }
.card-poster {
  width: 100%; aspect-ratio: 2/3;
  border-radius: var(--card-radius);
  overflow: hidden; position: relative;
  background: var(--surface2);
}
.card-poster img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: opacity 0.3s;
}
.card-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(8,10,15,0.9) 0%, transparent 50%);
  opacity: 0; transition: opacity 0.25s;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 12px; border-radius: var(--card-radius);
}
.movie-card:hover .card-overlay { opacity: 1; }
.card-play {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--text);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  transition: transform 0.2s;
}
.card-play:hover { transform: scale(1.1); }
.card-play svg { margin-left: 2px; }
.card-rating-badge {
  position: absolute; top: 8px; right: 8px;
  background: rgba(8,10,15,0.8);
  border: 1px solid rgba(232,197,71,0.3);
  border-radius: 4px; padding: 3px 7px;
  font-size: 11px; font-weight: 600; color: var(--accent);
  font-family: var(--font-mono);
}
.card-info { margin-top: 10px; padding: 0 2px; }
.card-title {
  font-size: 13px; font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: 4px;
}
.card-meta { font-size: 11px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.card-meta .dot { width: 2px; height: 2px; border-radius: 50%; background: var(--muted); }

/* ============================================================
   CATEGORY TABS
   ============================================================ */
.category-tabs {
  display: flex; gap: 8px; overflow-x: auto;
  padding: 0 48px; scrollbar-width: none; margin-bottom: 4px;
}
.category-tabs::-webkit-scrollbar { display: none; }
.cat-tab {
  flex-shrink: 0; padding: 8px 18px;
  border-radius: 20px; border: 1px solid var(--border);
  background: transparent; color: var(--muted);
  font-family: var(--font-body); font-size: 13px; font-weight: 500;
  cursor: pointer; transition: all 0.2s; white-space: nowrap;
  text-decoration: none;
}
.cat-tab:hover { border-color: rgba(255,255,255,0.15); color: var(--text); }
.cat-tab.active {
  background: var(--accent); border-color: var(--accent);
  color: var(--bg); font-weight: 600;
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  border-top: 1px solid var(--border);
  padding: 32px 48px;
  display: flex; align-items: center; justify-content: space-between;
}
.footer-logo { font-family: var(--font-display); font-size: 22px; letter-spacing: 3px; color: var(--accent); opacity: 0.6; }
.footer-text { font-size: 12px; color: var(--muted); }

@media screen and (max-width: 420px) {
  .footer-text{
    display: none;
  }
}
/* ============================================================
   TOAST
   ============================================================ */
.toast {
  position: fixed; bottom: 32px; right: 32px; z-index: 999;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 8px; padding: 14px 20px; font-size: 13px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  opacity: 0; pointer-events: none; transform: translateY(8px);
  transition: opacity 0.3s, transform 0.3s;
}
.toast.show { opacity: 1; pointer-events: auto; transform: translateY(0); }

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  nav { padding: 0 20px; }
  .nav-links { display: none; }
  .section, .category-tabs, .movies-row, footer { padding-left: 20px; padding-right: 20px; }
}

@media (max-width: 480px) {
  .movies-row {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
    padding: 8px 20px 24px;
  }
}
