/* ===========================
   FLICKHIVE — style.css
   Responsive: Phone / Tablet / Laptop / Desktop
   =========================== */

:root {
  --bg: #0d0d0f;
  --surface: #16161a;
  --surface2: #1e1e24;
  --accent: #00e5a0;
  --accent2: #ff4f6a;
  --text: #f0f0f5;
  --text-muted: #7a7a8c;
  --sidebar-w: 220px;
  --radius: 12px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

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

/* ===========================
   SIDEBAR
   =========================== */
.sidebar {
  width: var(--sidebar-w);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  padding: 28px 0;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 200;
  border-right: 1px solid rgba(255,255,255,0.04);
  transition: transform 0.3s ease;
  overflow-y: auto;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 24px 32px;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.8rem;
  letter-spacing: 2px;
  color: var(--accent);
  white-space: nowrap;
}

.sidebar-logo i { font-size: 1.4rem; }

.sidebar-nav {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 4px;
  padding: 0 12px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  transition: all 0.2s;
  white-space: nowrap;
}

.nav-item:hover,
.nav-item.active {
  background: rgba(0, 229, 160, 0.08);
  color: var(--accent);
}

.nav-item i {
  width: 18px;
  text-align: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.sidebar-footer {
  padding: 16px 12px 0;
  border-top: 1px solid rgba(255,255,255,0.06);
  margin-top: 16px;
}

/* Sidebar overlay backdrop (mobile) */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 199;
}

.sidebar-backdrop.active { display: block; }

/* ===========================
   MAIN WRAP
   =========================== */
.main-wrap {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  width: calc(100% - var(--sidebar-w));
}

/* ===========================
   TOPBAR
   =========================== */
.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 28px;
  background: rgba(13,13,15,0.9);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 90;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.3rem;
  cursor: pointer;
  padding: 4px;
  flex-shrink: 0;
}

.search-wrap {
  flex: 1;
  max-width: 520px;
  display: flex;
  align-items: center;
  background: var(--surface2);
  border-radius: 30px;
  padding: 9px 16px;
  gap: 10px;
  border: 1px solid rgba(255,255,255,0.06);
  transition: border-color 0.2s;
  min-width: 0;
}

.search-wrap:focus-within { border-color: var(--accent); }

.search-wrap i {
  color: var(--text-muted);
  font-size: 0.9rem;
  flex-shrink: 0;
}

.search-wrap input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.92rem;
  min-width: 0;
}

.search-wrap input::placeholder { color: var(--text-muted); }

.search-wrap button {
  background: var(--accent);
  color: #000;
  border: none;
  border-radius: 20px;
  padding: 6px 16px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: opacity 0.2s;
  flex-shrink: 0;
  white-space: nowrap;
}

.search-wrap button:hover { opacity: 0.85; }

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
  flex-shrink: 0;
}

.lang-badge {
  background: var(--surface2);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface2);
  border: 2px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
}

/* ===========================
   HERO BANNER
   =========================== */
.hero-banner {
  position: relative;
  height: 520px;
  background: var(--surface) center/cover no-repeat;
  overflow: hidden;
  transition: background-image 0.8s ease;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right, rgba(13,13,15,0.96) 30%, rgba(13,13,15,0.4) 65%, transparent 100%),
    linear-gradient(to top, rgba(13,13,15,0.9) 0%, transparent 50%);
}

.hero-info {
  position: relative;
  z-index: 2;
  max-width: 540px;
  padding: 70px 40px;
  animation: fadeUp 0.7s ease forwards;
}

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

.hero-badge {
  display: inline-block;
  background: rgba(0,229,160,0.12);
  color: var(--accent);
  border: 1px solid rgba(0,229,160,0.3);
  border-radius: 20px;
  padding: 4px 14px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 1px;
  margin-bottom: 14px;
}

.hero-info h1 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 3.8rem;
  line-height: 1;
  letter-spacing: 2px;
  margin-bottom: 14px;
  text-shadow: 0 2px 20px rgba(0,0,0,0.5);
}

.hero-info p {
  font-size: 0.9rem;
  color: rgba(240,240,245,0.75);
  line-height: 1.6;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 22px;
  align-items: center;
}

.hero-meta span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.hero-meta .rating { color: #ffd700; }

.genre-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.genre-tag {
  background: rgba(0,229,160,0.1);
  color: var(--accent);
  border: 1px solid rgba(0,229,160,0.2);
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-play {
  background: var(--accent);
  color: #000;
  border: none;
  border-radius: 30px;
  padding: 11px 26px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.2s, opacity 0.2s;
}

.btn-play:hover { transform: scale(1.04); opacity: 0.9; }

.btn-add {
  background: rgba(255,255,255,0.08);
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 30px;
  padding: 11px 22px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background 0.2s;
}

.btn-add:hover { background: rgba(255,255,255,0.14); }

/* ===========================
   CONTENT & SECTIONS
   =========================== */
.content { padding: 0 0 80px; }

.section { padding: 36px 28px 0; }

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

.section-header h2 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.6rem;
  letter-spacing: 1.5px;
  color: var(--text);
}

.see-more {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: gap 0.2s;
  white-space: nowrap;
}

.see-more:hover { gap: 9px; }

/* ===========================
   CARDS GRID
   =========================== */
.cards-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}

/* ===========================
   MOVIE CARD
   =========================== */
.movie-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface2);
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  aspect-ratio: 2/3;
}

.movie-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 16px 40px rgba(0,0,0,0.5);
  z-index: 2;
}

.movie-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: filter 0.3s;
}

.movie-card:hover img { filter: brightness(0.5); }

.card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.88) 40%, transparent 80%);
  opacity: 0;
  transition: opacity 0.3s;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 14px;
}

.movie-card:hover .card-overlay { opacity: 1; }

.card-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.65);
}

.card-rating {
  color: #ffd700;
  font-weight: 700;
  font-size: 0.75rem;
}

.card-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--accent);
  color: #000;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
}

.movie-card:hover .card-play-btn {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.card-rating-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(4px);
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 0.7rem;
  font-weight: 700;
  color: #ffd700;
  display: flex;
  align-items: center;
  gap: 3px;
}

/* ===========================
   SKELETON LOADER
   =========================== */
.skeleton {
  background: linear-gradient(90deg, var(--surface2) 25%, var(--surface) 50%, var(--surface2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--radius);
  aspect-ratio: 2/3;
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ===========================
   SEARCH / CLEAR
   =========================== */
.clear-btn {
  background: none;
  border: 1px solid rgba(255,255,255,0.2);
  color: var(--text);
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background 0.2s;
}

.clear-btn:hover { background: rgba(255,255,255,0.08); }

.no-results {
  color: var(--text-muted);
  padding: 20px 0;
  font-size: 0.95rem;
}

/* ===========================
   RESPONSIVE BREAKPOINTS
   =========================== */

/* Large Desktop (1400px+) */
@media (min-width: 1400px) {
  .cards-row {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  }
  .hero-info h1 { font-size: 4.2rem; }
}

/* Laptop (1024px - 1399px) — default styles apply, minor tweaks */
@media (max-width: 1200px) {
  .hero-banner { height: 480px; }
  .hero-info h1 { font-size: 3.4rem; }
}

/* Tablet Landscape (901px - 1024px) */
@media (max-width: 1024px) {
  :root { --sidebar-w: 200px; }
  .hero-banner { height: 440px; }
  .hero-info { padding: 50px 32px; }
  .hero-info h1 { font-size: 3rem; }
  .section { padding: 28px 20px 0; }
  .cards-row { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px; }
}

/* Tablet Portrait (601px - 900px) — sidebar hides, hamburger shows */
@media (max-width: 900px) {
  .sidebar {
    transform: translateX(-100%);
    z-index: 200;
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 30px rgba(0,0,0,0.5);
  }

  .main-wrap {
    margin-left: 0;
    width: 100%;
  }

  .menu-btn { display: block; }

  .topbar { padding: 12px 20px; }

  .search-wrap { max-width: 100%; }

  .hero-banner { height: 400px; }
  .hero-info { padding: 44px 28px; max-width: 480px; }
  .hero-info h1 { font-size: 2.8rem; }

  .section { padding: 28px 20px 0; }
  .cards-row { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
}

/* Large Phone (481px - 600px) */
@media (max-width: 600px) {
  .topbar { padding: 10px 14px; gap: 8px; }

  .lang-badge { display: none; } /* hide on small phones */

  .search-wrap { padding: 8px 12px; }
  .search-wrap button { padding: 5px 12px; font-size: 0.8rem; }

  .hero-banner { height: 360px; }
  .hero-info { padding: 36px 20px; }
  .hero-info h1 { font-size: 2.4rem; }
  .hero-info p { font-size: 0.85rem; -webkit-line-clamp: 2; }
  .hero-badge { font-size: 0.72rem; }

  .btn-play, .btn-add { padding: 9px 18px; font-size: 0.85rem; }

  .section { padding: 22px 14px 0; }
  .section-header h2 { font-size: 1.3rem; }

  .cards-row { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
}

/* Small Phone (up to 480px) */
@media (max-width: 480px) {
  .topbar { padding: 10px 12px; gap: 8px; }

  .search-wrap i { display: none; } /* hide search icon to save space */

  .hero-banner { height: 320px; }
  .hero-info { padding: 28px 16px; }
  .hero-info h1 { font-size: 2rem; }
  .hero-info p { display: none; } /* hide description on tiny screens */
  .hero-badge { margin-bottom: 10px; }

  .hero-meta { gap: 10px; font-size: 0.75rem; }
  .genre-tags { display: none; } /* too cramped on tiny screens */

  .btn-play { padding: 8px 16px; font-size: 0.82rem; }
  .btn-add { padding: 8px 14px; font-size: 0.82rem; }

  .section { padding: 18px 12px 0; }
  .section-header h2 { font-size: 1.2rem; }
  .see-more { font-size: 0.78rem; }

  .cards-row { grid-template-columns: repeat(3, 1fr); gap: 8px; }

  .card-rating-badge { font-size: 0.62rem; padding: 2px 6px; }
}