/* public/css/style.css */
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Netflix+Sans:wght@300;400;500;700&display=swap');

:root {
  --red: #E50914;
  --red-dark: #b20710;
  --black: #141414;
  --dark: #1a1a1a;
  --card-bg: #2f2f2f;
  --text: #e5e5e5;
  --muted: #999;
  --white: #fff;
  --nav-h: 68px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: linear-gradient(135deg, #09090b 0%, #18181b 50%, #0f0f13 100%);
  background-attachment: fixed;
  color: var(--text);
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }

/* ===== NAVBAR ===== */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  padding: 0 4%;
  background: linear-gradient(to bottom, rgba(0,0,0,.9) 0%, transparent 100%);
  transition: background .3s;
}
.navbar.scrolled { background: var(--black); border-bottom: 1px solid #222; }
.navbar-brand { display: flex; align-items: center; gap: 32px; }
.logo { font-size: 2rem; font-weight: 900; color: var(--red); letter-spacing: -1px; }

.nav-links { display: flex; gap: 20px; list-style: none; align-items: center; }
.nav-links a { font-size: .95rem; color: var(--muted); font-weight: 500; transition: color .2s; }
.nav-links a:hover,
.nav-links a.active { color: var(--white); }

.navbar-right { margin-left: auto; display: flex; align-items: center; gap: 20px; }
.nav-search { background: none; border: none; color: var(--white); font-size: 1.1rem; cursor: pointer; }
.nav-avatar {
  width: 36px; height: 36px; border-radius: 4px;
  background: var(--red); display: flex; align-items: center; justify-content: center;
  font-weight: 700; cursor: pointer; position: relative;
}
.nav-avatar img { width: 100%; height: 100%; border-radius: 4px; object-fit: cover; }
.dropdown {
  display: none; position: absolute; top: 44px; right: 0;
  background: rgba(0,0,0,.95); border: 1px solid #444;
  min-width: 180px; border-radius: 4px; overflow: hidden; z-index: 1010;
}
.nav-avatar:hover .dropdown { display: block; }
.dropdown a { display: block; padding: 12px 16px; font-size: .85rem; transition: background .2s; color: var(--text); }
.dropdown a:hover { background: rgba(255,255,255,.1); color: var(--white); }
.dropdown hr { border-color: #444; margin: 4px 0; }

/* ===== SEARCH OVERLAY ===== */
.search-bar {
  display: none; position: fixed; top: 0; left: 0; right: 0; z-index: 1001;
  background: rgba(20,20,20,.98); padding: 20px 4%;
  align-items: center; gap: 16px;
}
.search-bar.open { display: flex; }
.search-bar input {
  flex: 1; background: none; border: none; border-bottom: 2px solid var(--white);
  color: var(--white); font-size: 1.5rem; padding: 8px 4px; outline: none;
}
.search-bar input::placeholder { color: var(--muted); }
.search-close { background: none; border: none; color: var(--white); font-size: 1.5rem; cursor: pointer; }

/* ===== HERO SLIDER ===== */
.slider-wrap { position: relative; height: 56vw; max-height: 620px; overflow: hidden; }
.slide {
  position: absolute; inset: 0; opacity: 0;
  transition: opacity .8s ease-in-out;
  background-size: cover; background-position: center top;
}
.slide.active { opacity: 1; z-index: 1; }
.slide::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to right, rgba(0,0,0,.85) 30%, transparent 70%),
              linear-gradient(to top, rgba(15,15,18,1) 0%, transparent 40%);
}
.slide-content {
  position: absolute; bottom: 15%; left: 4%; z-index: 2; max-width: 480px;
}
.slide-tags { font-size: .78rem; color: var(--muted); margin-bottom: 10px; letter-spacing: .5px; }
.slide-title { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 700; line-height: 1.1; margin-bottom: 12px; }
.slide-desc { font-size: .95rem; color: #ccc; line-height: 1.5; margin-bottom: 20px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.slide-btns { display: flex; gap: 12px; }
.btn-play, .btn-list {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 22px; border-radius: 4px;
  font-size: .95rem; font-weight: 700; cursor: pointer; border: none;
  transition: all .2s;
}
.btn-play { background: var(--white); color: #000; }
.btn-play:hover { background: rgba(255,255,255,.75); }
.btn-list { background: rgba(109,109,110,.7); color: var(--white); }
.btn-list:hover { background: rgba(109,109,110,.5); }
.slider-dots {
  position: absolute; bottom: 16px; right: 4%; z-index: 3; display: flex; gap: 8px;
}
.dot { width: 10px; height: 3px; background: rgba(255,255,255,.4); border: none; cursor: pointer; transition: all .3s; border-radius: 2px; }
.dot.active { background: var(--white); width: 24px; }
.slider-arrows { position: absolute; top: 50%; z-index: 3; transform: translateY(-50%); display: flex; justify-content: space-between; width: 100%; padding: 0 2%; }
.arrow-btn {
  background: rgba(0,0,0,.5); border: none; color: var(--white);
  width: 42px; height: 72px; font-size: 1.5rem; cursor: pointer;
  border-radius: 4px; display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .3s;
}
.slider-wrap:hover .arrow-btn { opacity: 1; }

/* ===== CONTENT ROWS ===== */
.content-section { padding: 0 4% 24px; }
.section-title { font-size: 1.25rem; font-weight: 700; margin-bottom: 12px; color: #e5e5e5; }
.cards-row { display: flex; gap: 6px; overflow-x: auto; scroll-behavior: smooth; scrollbar-width: none; -ms-overflow-style: none; }
.cards-row::-webkit-scrollbar { display: none; }

/* layout_type = 'horizontal' (default/classic scrolling row) */
.cards-row.layout-horizontal { display: flex; overflow-x: auto; }

/* layout_type = 'vertical' -> a static, wrapping multi-row grid
   ("cards below each other") using the admin's Items Per Row setting. */
.cards-row.layout-vertical {
  display: grid;
  grid-template-columns: repeat(var(--items-per-row, 6), 1fr);
  gap: 10px;
  overflow: visible;
}
.cards-row.layout-vertical .card { flex: none; min-width: 0; max-width: none; width: 100%; }

/* section_size modifiers */
.cards-row.layout-horizontal.size-small .card   { flex-basis: calc(100% / 7 - 6px); min-width: 120px; max-width: 160px; }
.cards-row.layout-horizontal.size-medium .card  { flex-basis: calc(100% / 5 - 6px); min-width: 170px; max-width: 240px; }
.cards-row.layout-horizontal.size-large .card   { flex-basis: calc(100% / 3 - 6px); min-width: 220px; max-width: 320px; }
.cards-row.layout-vertical.size-small   { grid-template-columns: repeat(calc(var(--items-per-row, 6) + 2), 1fr); }
.cards-row.layout-vertical.size-large   { grid-template-columns: repeat(max(2, calc(var(--items-per-row, 6) - 2)), 1fr); }

@media (max-width: 640px) {
  .cards-row.layout-vertical { grid-template-columns: repeat(3, 1fr); }
  .cards-row.layout-vertical.size-small { grid-template-columns: repeat(4, 1fr); }
  .cards-row.layout-vertical.size-large { grid-template-columns: repeat(2, 1fr); }
}

.featured-section .section-title { color: #f5c518; }

/* ===== SHOW DETAIL / EPISODES LIST — premium redesign ===== */
.episodes-list { display: flex; flex-direction: column; gap: 14px; max-width: 900px; }

.episode-row {
  display: flex; gap: 16px; align-items: center; cursor: pointer;
  background: linear-gradient(145deg, #161616, #101010);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 12px; padding: 12px; position: relative;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease, background .25s ease;
}
.episode-row:hover {
  transform: translateY(-2px);
  border-color: rgba(229,9,20,.4);
  background: linear-gradient(145deg, #1d1d1d, #131313);
  box-shadow: 0 10px 28px rgba(0,0,0,.45), 0 0 0 1px rgba(229,9,20,.08);
}

.episode-thumb {
  position: relative; flex: 0 0 168px; width: 168px; aspect-ratio: 16/9;
  border-radius: 8px; overflow: hidden; background: var(--card-bg);
  box-shadow: 0 4px 14px rgba(0,0,0,.4);
}
.episode-thumb img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .35s ease;
}
.episode-row:hover .episode-thumb img { transform: scale(1.08); }

/* Premium fallback box when no episode thumbnail is set */
.episode-thumb-fallback {
  width: 100%; height: 100%; position: relative; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background:
    radial-gradient(circle at 30% 20%, rgba(229,9,20,.18), transparent 55%),
    linear-gradient(135deg, #232323 0%, #151515 60%, #0c0c0c 100%);
}
.episode-thumb-fallback::before {
  /* subtle film-strip accent */
  content: '';
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(90deg, rgba(255,255,255,.05) 0 2px, transparent 2px 14px);
  opacity: .5;
}
.episode-thumb-fallback .ep-num {
  position: relative; font-size: 1.7rem; font-weight: 800; color: #fff;
  line-height: 1; letter-spacing: -.5px;
  text-shadow: 0 2px 10px rgba(0,0,0,.5);
}
.episode-thumb-fallback .ep-num small {
  display: block; font-size: .62rem; font-weight: 700; letter-spacing: 1.5px;
  color: var(--red); margin-bottom: 2px; text-transform: uppercase;
}

.episode-play-icon {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.1rem; background: rgba(0,0,0,.4); opacity: 0; transition: opacity .25s ease;
}
.episode-play-icon::before {
  content: ''; position: absolute; width: 46px; height: 46px; border-radius: 50%;
  background: var(--red); z-index: -1; box-shadow: 0 4px 16px rgba(229,9,20,.5);
}
.episode-row:hover .episode-play-icon { opacity: 1; }

.episode-badge {
  position: absolute; top: 6px; left: 6px; z-index: 2;
  background: rgba(0,0,0,.65); backdrop-filter: blur(4px);
  color: #fff; font-size: .68rem; font-weight: 700; letter-spacing: .3px;
  padding: 3px 8px; border-radius: 20px; border: 1px solid rgba(255,255,255,.15);
}

.episode-info { flex: 1; min-width: 0; }
.episode-title { font-weight: 700; font-size: 1rem; margin-bottom: 5px; color: #f2f2f2; }
.episode-duration {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: .75rem; color: var(--muted); margin-bottom: 6px;
  background: rgba(255,255,255,.06); padding: 2px 8px; border-radius: 20px;
}
.episode-desc { font-size: .83rem; color: #999; line-height: 1.55; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

@media (max-width: 640px) {
  .episode-row { gap: 12px; padding: 10px; border-radius: 10px; }
  .episode-thumb { flex-basis: 118px; width: 118px; }
  .episode-thumb-fallback .ep-num { font-size: 1.3rem; }
  .episode-title { font-size: .9rem; }
  .episode-desc { display: none; }
}

.card {
  flex: 0 0 calc(100% / 5 - 6px);
  min-width: 170px; max-width: 240px;
  position: relative; cursor: pointer; border-radius: 4px; overflow: visible;
  transition: transform .3s, z-index 0s;
}
.card:hover { transform: scale(1.15); z-index: 10; }
.card-img {
  width: 100%; aspect-ratio: 2/3; object-fit: cover;
  border-radius: 4px; display: block;
  background: var(--card-bg);
}
.card-overlay {
  position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.9) 0%, transparent 50%);
  border-radius: 4px; opacity: 0; transition: opacity .3s;
  display: flex; flex-direction: column; justify-content: flex-end; padding: 12px;
}
.card:hover .card-overlay { opacity: 1; }
.card-title-over { font-size: .8rem; font-weight: 700; margin-bottom: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-actions { display: flex; gap: 6px; }
.card-actions button {
  background: rgba(255,255,255,.2); border: 1.5px solid rgba(255,255,255,.5);
  color: var(--white); width: 28px; height: 28px; border-radius: 50%; font-size: .75rem;
  cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background .2s;
}
.card-actions button:hover { background: rgba(255,255,255,.4); }
.card-badge {
  position: absolute; top: 6px; left: 6px;
  background: var(--red); color: var(--white); font-size: .65rem; font-weight: 700;
  padding: 2px 6px; border-radius: 2px; text-transform: uppercase;
}
.no-poster { background: linear-gradient(135deg, #2a2a2a, #1a1a1a); display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: .8rem; }

/* ===== VIDEO MODAL ===== */
.modal-overlay {
  display: none; position: fixed; inset: 0; z-index: 2000;
  background: rgba(0,0,0,.9); align-items: center; justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal-box { background: #181818; border-radius: 8px; max-width: 900px; width: 95%; overflow: hidden; position: relative; max-height: 90vh; overflow-y: auto; }
.modal-close { position: absolute; top: 12px; right: 12px; z-index: 10; background: rgba(0,0,0,.7); border: none; color: var(--white); width: 32px; height: 32px; border-radius: 50%; font-size: 1rem; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.video-container { position: relative; padding-top: 56.25%; background: #000; }
.video-container iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: none; }
.modal-info { padding: 20px 24px; }
.modal-title { font-size: 1.5rem; font-weight: 700; margin-bottom: 8px; }
.modal-meta { display: flex; gap: 12px; font-size: .85rem; color: var(--muted); margin-bottom: 12px; flex-wrap: wrap; }
.modal-meta span { display: flex; align-items: center; gap: 4px; }
.modal-desc { font-size: .9rem; color: #ccc; line-height: 1.6; }
.modal-tags { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; }
.modal-tag { background: rgba(255,255,255,.1); padding: 4px 10px; border-radius: 12px; font-size: .75rem; }

/* ===== AUTH PAGES ===== */
.auth-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(rgba(0,0,0,.6), rgba(0,0,0,.6)), url('../images/auth-bg.jpg') center/cover;
  padding: 20px;
}
.auth-box {
  background: rgba(0,0,0,.85); padding: 48px 40px; border-radius: 8px;
  width: 100%; max-width: 420px;
}
.auth-logo { font-size: 2rem; font-weight: 900; color: var(--red); margin-bottom: 28px; }
.auth-title { font-size: 2rem; font-weight: 700; margin-bottom: 24px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: .85rem; color: var(--muted); margin-bottom: 4px; }
.form-group input {
  width: 100%; padding: 14px 16px; background: #333; border: 1px solid #555;
  border-radius: 4px; color: var(--white); font-size: 1rem;
  transition: border-color .2s; outline: none;
}
.form-group input:focus { border-color: var(--white); background: #454545; }
.btn-submit {
  width: 100%; padding: 14px; background: var(--red); color: var(--white);
  border: none; border-radius: 4px; font-size: 1rem; font-weight: 700;
  cursor: pointer; margin-top: 8px; transition: background .2s;
}
.btn-submit:hover { background: var(--red-dark); }
.auth-footer { margin-top: 16px; color: var(--muted); font-size: .9rem; }
.auth-footer a { color: var(--white); font-weight: 700; }
.alert { padding: 12px 16px; border-radius: 4px; margin-bottom: 16px; font-size: .9rem; }
.alert-error { background: rgba(229,9,20,.2); border: 1px solid var(--red); color: #ff6b6b; }
.alert-success { background: rgba(70,211,105,.15); border: 1px solid #46d369; color: #46d369; }

/* ===== PROFILE ===== */
.profile-page { padding: calc(var(--nav-h) + 40px) 4% 60px; max-width: 900px; margin: 0 auto; }
.profile-header { display: flex; align-items: center; gap: 24px; margin-bottom: 40px; }
.profile-avatar { width: 80px; height: 80px; border-radius: 8px; background: var(--red); display: flex; align-items: center; justify-content: center; font-size: 2rem; font-weight: 700; overflow: hidden; }
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-name { font-size: 1.8rem; font-weight: 700; }
.profile-email { color: var(--muted); }
.profile-section { margin-bottom: 32px; }
.profile-section h3 { font-size: 1.2rem; margin-bottom: 16px; border-bottom: 1px solid #333; padding-bottom: 8px; }
.profile-form .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.profile-form .form-group input { background: #2a2a2a; border-color: #444; }
.btn-save { padding: 12px 28px; background: var(--red); color: var(--white); border: none; border-radius: 4px; font-weight: 700; cursor: pointer; transition: background .2s; }
.btn-save:hover { background: var(--red-dark); }
.watchlist-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.watchlist-item { position: relative; border-radius: 4px; overflow: hidden; cursor: pointer; }
.watchlist-item img { width: 100%; aspect-ratio: 2/3; object-fit: cover; display: block; }
.watchlist-remove { position: absolute; top: 4px; right: 4px; background: rgba(0,0,0,.7); border: none; color: #fff; width: 24px; height: 24px; border-radius: 50%; cursor: pointer; font-size: .75rem; display: none; justify-content: center; align-items: center; }
.watchlist-item:hover .watchlist-remove { display: flex; }

/* ===== CONTACT ===== */
.contact-page { padding: calc(var(--nav-h) + 60px) 4% 60px; max-width: 700px; margin: 0 auto; }
.contact-page h1 { font-size: 2.5rem; font-weight: 700; margin-bottom: 8px; }
.contact-page p.sub { color: var(--muted); margin-bottom: 32px; }
.contact-form .form-group textarea { width: 100%; padding: 14px 16px; background: #333; border: 1px solid #555; border-radius: 4px; color: var(--white); font-size: 1rem; resize: vertical; min-height: 140px; outline: none; font-family: inherit; }
.contact-form .form-group textarea:focus { border-color: var(--white); }

/* ===== POLICY PAGE ===== */
.policy-page { padding: calc(var(--nav-h) + 60px) 4% 60px; max-width: 800px; margin: 0 auto; }
.policy-page h1 { font-size: 2rem; font-weight: 700; margin-bottom: 24px; }
.policy-content h2 { font-size: 1.4rem; margin: 24px 0 8px; }
.policy-content p { color: #ccc; line-height: 1.7; margin-bottom: 12px; }

/* ===== FOOTER ===== */
footer {
  background: #141414; border-top: 1px solid #333;
  padding: 48px 4% 24px; color: var(--muted); font-size: .85rem;
}
.footer-top { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 32px; margin-bottom: 32px; }
.footer-brand .logo { font-size: 1.5rem; display: block; margin-bottom: 12px; }
.footer-brand p { line-height: 1.6; }
.footer-col h4 { color: var(--white); font-size: .9rem; margin-bottom: 14px; text-transform: uppercase; letter-spacing: .5px; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col ul a { color: var(--muted); transition: color .2s; }
.footer-col ul a:hover { color: var(--white); }
.footer-bottom { border-top: 1px solid #333; padding-top: 20px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.footer-bottom p { margin-bottom: 4px; }

/* ===== BROWSE/SEARCH — premium grid ===== */
.browse-page { padding: calc(var(--nav-h) + 30px) 4% 60px; }
.browse-page h1 {
  font-size: 1.6rem; font-weight: 800; margin-bottom: 22px; letter-spacing: -.3px;
  position: relative; padding-left: 14px;
}
.browse-page h1::before {
  content: ''; position: absolute; left: 0; top: 4px; bottom: 4px; width: 4px;
  background: linear-gradient(180deg, var(--red), #8a060c); border-radius: 3px;
}

.browse-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
@media (min-width: 480px) { .browse-grid { grid-template-columns: repeat(4, 1fr); gap: 14px; } }
@media (min-width: 700px) { .browse-grid { grid-template-columns: repeat(5, 1fr); gap: 16px; } }
@media (min-width: 1000px) { .browse-grid { grid-template-columns: repeat(6, 1fr); gap: 18px; } }
@media (min-width: 1300px) { .browse-grid { grid-template-columns: repeat(7, 1fr); gap: 18px; } }

.browse-card { cursor: pointer; }
.browse-card-poster {
  position: relative; width: 100%; aspect-ratio: 2/3; border-radius: 10px; overflow: hidden;
  background: var(--card-bg);
  box-shadow: 0 4px 14px rgba(0,0,0,.35);
  transition: transform .2s ease, box-shadow .2s ease;
}
.browse-card-poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.browse-card-fallback {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; padding: 10px;
  background: radial-gradient(circle at 30% 20%, rgba(229,9,20,.16), transparent 55%), linear-gradient(135deg,#242424,#131313);
}
.browse-card-fallback span { font-size: .78rem; font-weight: 700; color: #bbb; text-align: center; line-height: 1.35; }
.browse-card-shade {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.55) 0%, transparent 45%);
  pointer-events: none;
}
.browse-card:active .browse-card-poster,
.browse-card:hover .browse-card-poster {
  transform: scale(1.04);
  box-shadow: 0 10px 26px rgba(0,0,0,.55), 0 0 0 2px rgba(229,9,20,.5);
}

.browse-card-tag {
  position: absolute; top: 7px; right: 7px; z-index: 2;
  background: var(--red); color: #fff; font-size: .58rem; font-weight: 800; letter-spacing: .5px;
  padding: 3px 7px; border-radius: 4px;
}
.browse-card-rating {
  position: absolute; top: 7px; left: 7px; z-index: 2;
  background: rgba(0,0,0,.6); backdrop-filter: blur(4px); color: #ffd54a;
  font-size: .62rem; font-weight: 700; padding: 2px 7px; border-radius: 20px;
  border: 1px solid rgba(255,255,255,.12);
}
.browse-card-add {
  position: absolute; bottom: 7px; right: 7px; z-index: 2;
  width: 26px; height: 26px; border-radius: 50%; border: 1px solid rgba(255,255,255,.35);
  background: rgba(0,0,0,.55); backdrop-filter: blur(4px); color: #fff; font-size: .85rem;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  transition: background .2s, transform .2s;
}
.browse-card-add:hover { background: var(--red); transform: scale(1.1); }
.browse-card-play {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%) scale(.7);
  width: 40px; height: 40px; border-radius: 50%; background: rgba(229,9,20,.9);
  color: #fff; font-size: .95rem; display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .2s ease, transform .2s ease; box-shadow: 0 6px 18px rgba(229,9,20,.5);
  pointer-events: none;
}
.browse-card:hover .browse-card-play,
.browse-card:active .browse-card-play {
  opacity: 1; transform: translate(-50%,-50%) scale(1);
}

.browse-card-title {
  margin-top: 8px; font-size: .8rem; font-weight: 600; color: #e0e0e0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

@media (max-width: 480px) {
  .browse-card-title { font-size: .74rem; }
  .browse-card-add { width: 22px; height: 22px; font-size: .75rem; }
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--black); }
::-webkit-scrollbar-thumb { background: #555; border-radius: 3px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .card { flex: 0 0 calc(100% / 3 - 6px); min-width: 120px; }
  .auth-box { padding: 32px 24px; }
  .profile-form .form-row { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .card { flex: 0 0 calc(50% - 6px); }
  .slide-title { font-size: 1.8rem; }
  .slide-desc { display: none; }
}

/* ===== MOBILE CARD SIZE FIX ===== */
@media (max-width: 768px) {
  .card { flex: 0 0 calc(100% / 4 - 5px) !important; min-width: 75px !important; max-width: 130px !important; }
  .cards-row { gap: 4px; }
  .content-section { padding: 0 3% 16px; }
  .section-title { font-size: 1rem; margin-bottom: 8px; }
}
@media (max-width: 480px) {
  .card { flex: 0 0 calc(100% / 4 - 4px) !important; min-width: 70px !important; max-width: 115px !important; }
  .cards-row { gap: 3px; }
  .section-title { font-size: .92rem; }
  .btn-play, .btn-list { padding: 8px 14px; font-size: .82rem; }
}

/* ===== MOBILE CARD FIX v3 ===== */
@media (max-width: 768px) {
  .cards-row { gap: 4px; }
  .card {
    flex: 0 0 calc(40.333% - 4px) !important;
    min-width: 0 !important;
    max-width: none !important;
    width: calc(33.333% - 4px) !important;
  }
  .content-section { padding: 0 3% 16px; }
  .section-title { font-size: 1rem; margin-bottom: 8px; }
}
@media (max-width: 480px) {
  .cards-row { gap: 3px; }
  .card {
    flex: 0 0 calc(25% - 3px) !important;
    min-width: 0 !important;
    max-width: none !important;
    width: calc(25% - 3px) !important;
  }
  .section-title { font-size: .9rem; }
}

/* ===== U/A BADGE ===== */
.ua-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.2);
  color: #ccc;
  font-size: .6rem;
  font-weight: 700;
  letter-spacing: .5px;
  padding: 1px 5px;
  border-radius: 3px;
  line-height: 1.4;
  pointer-events: none;
  user-select: none;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 4px 2px;
}
/* ===== FLOATING PILL MOBILE BOTTOM NAVIGATION ===== */
.home-bottom-nav {
  display: none; /* Desktop par hidden rahega */
}

@media (max-width: 768px) {
  .home-bottom-nav {
    display: flex !important;
    position: fixed;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 380px;
    height: 60px;
    background: rgba(26, 26, 30, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    z-index: 9999;
    justify-content: space-around;
    align-items: center;
    padding: 0 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  }

  .home-bottom-nav-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #888;
    text-decoration: none;
    flex: 1;
    height: 100%;
    transition: color 0.2s ease;
  }

  /* Active item ke upar choti si indicator line (jaise image me hai) */
  .home-bottom-nav-item.active::before {
    content: '';
    position: absolute;
    top: 4px;
    width: 16px;
    height: 3px;
    background: var(--red, #E50914);
    border-radius: 2px;
  }

  .home-bottom-nav-item span.icon {
    font-size: 1.4rem;
    line-height: 1;
  }

  .home-bottom-nav-item:hover,
  .home-bottom-nav-item.active {
    color: #fff;
  }

  /* Mobile me content floating bar ke peeche na chupe, isliye extra bottom space */
  body {
    padding-bottom: 85px !important;
  }
}
