/* 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: var(--black);
  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); }
.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: 18px; list-style: none; }
.nav-links a { font-size: .9rem; color: var(--text); transition: color .2s; }
.nav-links a:hover { 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,.9); border: 1px solid #444;
  min-width: 180px; border-radius: 4px; overflow: hidden;
}
.nav-avatar:hover .dropdown { display: block; }
.dropdown a { display: block; padding: 12px 16px; font-size: .85rem; transition: background .2s; }
.dropdown a:hover { background: rgba(255,255,255,.1); }
.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(20,20,20,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; }
.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: gap; }
.footer-bottom p { margin-bottom: 4px; }

/* ===== BROWSE/SEARCH ===== */
.browse-page { padding: calc(var(--nav-h) + 40px) 4% 60px; }
.browse-page h1 { font-size: 1.8rem; font-weight: 700; margin-bottom: 24px; }
.browse-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; }

/* ===== 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 — paste at bottom of public/css/style.css ===== */

.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;
}

/* Sits below card image */
.card-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 4px 2px;
}
