/* ===== HOME PAGE ===== */
.home-page { padding-top: 0; }
.home-rows { padding-bottom: 4rem; }

/* ===== INFO PAGES ===== */
.info-page { padding-top: 0; animation: pageReveal var(--transition-page) var(--ease-out) both; }
.info-hero {
  position: relative; width: 100%;
  height: 68vh; min-height: 440px; max-height: 760px; overflow: hidden;
}
.info-hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center 20%; }
.info-hero-grad {
  position: absolute; inset: 0;
  background:
    linear-gradient(to right, rgba(8,8,16,0.98) 32%, rgba(8,8,16,0.15) 100%),
    linear-gradient(to top, #080810 0%, rgba(8,8,16,0) 58%);
}
.info-hero-content {
  position: absolute; bottom: 8%; left: var(--page-px);
  max-width: 620px; animation: slideUp 0.55s var(--ease-out) both;
}
.info-title { font-size: clamp(2rem,4.5vw,3.5rem); font-weight: 900; letter-spacing: -0.035em; line-height: 1.05; margin-bottom: 0.75rem; }
.info-meta { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 1rem; }
.info-meta-item { font-size: 0.875rem; color: var(--text-muted); font-weight: 600; }
.info-meta-sep { color: var(--text-subtle); font-size: 0.625rem; }
.info-rating { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.875rem; font-weight: 800; color: #fbbf24; }
.info-genres { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.info-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.info-poster-col {
  position: absolute; right: var(--page-px); bottom: -3rem;
  width: min(220px, 25vw);
  border-radius: var(--radius-xl); overflow: hidden;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--glass-border);
}
.info-poster-col img { width: 100%; display: block; }

.info-body { padding: var(--page-px); display: grid; grid-template-columns: 1fr 300px; gap: 3rem; }

.info-section { margin-bottom: 2.5rem; }
.info-section-label { font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-muted); margin-bottom: 0.85rem; }
.info-overview { font-size: 1rem; color: var(--text-secondary); line-height: 1.78; }
.info-overview.clamped { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.expand-btn { font-size: 0.875rem; font-weight: 700; color: var(--accent); cursor: pointer; margin-top: 0.5rem; display: inline-block; transition: color var(--transition-fast); }
.expand-btn:hover { color: var(--accent-hover); }

.info-stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.85rem; }
.info-stat {
  background: var(--glass-bg);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border); border-radius: var(--radius-lg);
  padding: 1rem; transition: all var(--transition-fast);
  position: relative; overflow: hidden;
}
.info-stat::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gloss-line), transparent);
}
.info-stat:hover { background: var(--glass-bg-hover); border-color: var(--border-hover); }
.info-stat-label { font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); margin-bottom: 0.3rem; }
.info-stat-value { font-size: 1rem; font-weight: 800; }

.season-selector-row { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.episodes-list { display: flex; flex-direction: column; gap: 0.75rem; }

@media (max-width: 900px) {
  .info-body { grid-template-columns: 1fr; }
  .info-poster-col { display: none; }
  .info-stat-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 600px) {
  .info-stat-grid { grid-template-columns: repeat(2, 1fr); }
  .info-hero { height: 58vh; }
}

/* ===== WATCH PAGE ===== */
.watch-page { min-height: 100vh; padding-top: var(--navbar-h); background: var(--bg-primary); animation: pageReveal var(--transition-page) var(--ease-out) both; }
.watch-ambient { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.watch-ambient-bg {
  position: absolute; inset: -20%;
  background-size: cover; background-position: center;
  filter: blur(80px) saturate(0.6) brightness(0.18);
  transform: scale(1.3);
}
.watch-player-section { padding: 1rem var(--page-px) 0; }
.watch-player-wrap {
  position: relative; width: 100%; aspect-ratio: 16/9;
  background: #000; border-radius: var(--radius-xl); overflow: hidden;
  box-shadow: 0 0 0 1px var(--glass-border), 0 24px 80px rgba(0,0,0,0.9), 0 0 60px var(--accent-glow-soft);
  max-height: calc(100vh - var(--navbar-h) - 180px);
}
.watch-player-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; }

.watch-info-bar {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 1.25rem var(--page-px) 0.5rem; gap: 1rem; flex-wrap: wrap;
}
.watch-show-title { font-size: 1.375rem; font-weight: 900; letter-spacing: -0.025em; }
.watch-ep-title { font-size: 0.9375rem; color: var(--text-muted); margin-top: 0.2rem; }
.watch-controls { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.watch-nav-btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.5rem 1.1rem; border-radius: var(--radius-md);
  font-size: 0.875rem; font-weight: 700;
  background: var(--glass-bg); color: var(--text-secondary);
  border: 1px solid var(--glass-border); transition: all var(--transition-fast);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.watch-nav-btn:hover:not(:disabled) { background: var(--glass-bg-hover); color: #fff; border-color: var(--border-hover); transform: scale(1.04); }
.watch-nav-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.watch-nav-btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; }

.watch-selectors { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem var(--page-px); flex-wrap: wrap; }
.autoplay-toggle { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.875rem; color: var(--text-muted); cursor: pointer; font-weight: 600; }
.autoplay-toggle input[type="checkbox"] { accent-color: var(--accent); width: 16px; height: 16px; cursor: pointer; }

.watch-body { padding: 1.5rem var(--page-px) 4rem; display: grid; grid-template-columns: 1fr 340px; gap: 2.5rem; }
.watch-synopsis { font-size: 0.9375rem; color: var(--text-secondary); line-height: 1.75; }
.watch-synopsis.clamped { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.watch-ep-grid { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 1.5rem; }
.watch-ep-item {
  display: grid; grid-template-columns: 104px 1fr; gap: 0.75rem;
  padding: 0.65rem; border-radius: var(--radius-md); cursor: pointer;
  border: 1px solid transparent; transition: all var(--transition-fast);
}
.watch-ep-item:hover { background: var(--glass-bg); border-color: var(--glass-border); transform: translateX(3px); }
.watch-ep-item.current { background: var(--accent-dim); border-color: var(--accent); }
.watch-ep-thumb { aspect-ratio: 16/9; border-radius: var(--radius-sm); overflow: hidden; background: var(--bg-elevated); }
.watch-ep-thumb img { width: 100%; height: 100%; object-fit: cover; }
.watch-ep-meta { display: flex; flex-direction: column; justify-content: center; }
.watch-ep-num { font-size: 0.75rem; font-weight: 700; color: var(--accent); }
.watch-ep-name { font-size: 0.8125rem; font-weight: 700; line-height: 1.3; }
.watch-ep-dur  { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.15rem; }

@media (max-width: 960px) {
  .watch-body { grid-template-columns: 1fr; gap: 2rem; }
  .watch-aside { order: 1; }
}

@media (max-width: 600px) {
  .watch-page { padding-top: calc(var(--navbar-h) - 10px); }
  .watch-player-section { padding: 0; }
  .watch-player-wrap {
    border-radius: 0;
    max-height: none;
    aspect-ratio: 16/9;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border: none;
    border-bottom: 1px solid var(--glass-border);
  }
  .watch-info-bar { padding: 1.25rem 1rem 0.75rem; }
  .watch-show-title { font-size: 1.25rem; }
  .watch-controls { width: 100%; margin-top: 0.5rem; justify-content: flex-start; }
  .watch-nav-btn { flex: 1; justify-content: center; padding: 0.6rem; font-size: 0.8125rem; }
  .watch-selectors { padding: 0.5rem 1rem; }
  .watch-body { padding: 1rem 1rem 3rem; gap: 1.5rem; }
  .watch-ep-item { grid-template-columns: 80px 1fr; gap: 0.6rem; padding: 0.5rem; }
  .watch-ep-num { font-size: 0.7rem; }
  .watch-ep-name { font-size: 0.75rem; }
}

/* ===== SEARCH PAGE ===== */
.search-page { min-height: 100vh; padding: calc(var(--navbar-h) + 3rem) var(--page-px) 4rem; animation: pageReveal var(--transition-page) var(--ease-out) both; }
.search-hero { text-align: center; margin-bottom: 3rem; }
.search-hero-title { font-size: clamp(2rem,4vw,3rem); font-weight: 900; letter-spacing: -0.04em; margin-bottom: 0.5rem; }
.search-hero-sub { color: var(--text-muted); font-weight: 500; }
.search-bar-wrap { position: relative; max-width: 700px; margin: 1.5rem auto 0; }
.search-bar-icon { position: absolute; left: 1.25rem; top: 50%; transform: translateY(-50%); color: var(--text-muted); width: 20px; height: 20px; }
.search-bar-input {
  width: 100%; padding: 1rem 1rem 1rem 3.5rem;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border); border-radius: var(--radius-full);
  color: var(--text-primary); font-size: 1rem; font-weight: 500;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
  font-family: var(--font-family);
}
.search-bar-input:focus {
  outline: none; border-color: var(--accent);
  background: var(--glass-bg-mid);
  box-shadow: 0 0 0 3px var(--accent-dim), var(--shadow-glass);
}
.search-bar-input::placeholder { color: var(--text-subtle); }
.search-tabs { display: flex; gap: 0.5rem; margin-bottom: 2rem; }
.search-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); gap: 1rem; }
@media (max-width: 480px) { .search-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); } }

/* ===== WATCHLIST PAGE ===== */
.watchlist-page { padding: calc(var(--navbar-h) + 2rem) var(--page-px) 4rem; min-height: 100vh; animation: pageReveal var(--transition-page) var(--ease-out) both; }
.watchlist-header { margin-bottom: 2rem; }
.watchlist-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 1.25rem; }
@media (max-width: 480px) { .watchlist-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); } }

/* ===== PROFILE PAGE ===== */
.profile-page { padding: calc(var(--navbar-h) + 2rem) var(--page-px) 4rem; min-height: 100vh; animation: pageReveal var(--transition-page) var(--ease-out) both; }
.profile-hero { margin-bottom: 3rem; background: var(--glass-bg); padding: 2rem; border-radius: var(--radius-xl); border: 1px solid var(--glass-border); box-shadow: var(--shadow-glass); }
.profile-hero-content { display: flex; gap: 2rem; align-items: center; }
.profile-avatar-large { width: 90px; height: 90px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), #ff5757); display: flex; align-items: center; justify-content: center; font-size: 2.5rem; font-weight: 800; color: #fff; box-shadow: var(--shadow-md); flex-shrink: 0; }
.profile-hero-info { flex: 1; }
.profile-name { font-size: 2rem; font-weight: 800; letter-spacing: -0.03em; margin-bottom: 0.5rem; }
.profile-meta-row { display: flex; gap: 1rem; align-items: center; margin-bottom: 1.5rem; flex-wrap: wrap; }
.profile-meta-item { display: flex; align-items: center; gap: 0.35rem; font-size: 0.85rem; color: var(--text-muted); font-weight: 500; }
.profile-stats-row { display: flex; gap: 2rem; flex-wrap: wrap; }
.profile-stat { text-align: left; }
.profile-stat-val { font-size: 1.5rem; font-weight: 800; color: var(--text-primary); line-height: 1; }
.profile-stat-label { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); margin-top: 0.25rem; }

.profile-body { display: grid; grid-template-columns: 1fr; gap: 3rem; }
@media (min-width: 900px) { .profile-body { grid-template-columns: 350px 1fr; } }

.profile-section-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 1.25rem; display: flex; align-items: center; gap: 0.5rem; color: var(--text-primary); }
.profile-card { background: var(--glass-bg); backdrop-filter: var(--glass-blur); border: 1px solid var(--glass-border); border-radius: var(--radius-lg); padding: 1.5rem; box-shadow: var(--shadow-md); }

.profile-history-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
.profile-history-item { display: block; border-radius: var(--radius-md); overflow: hidden; background: var(--bg-card); border: 1px solid var(--border-glass); transition: all var(--transition-fast); text-decoration: none; }
.profile-history-item:hover { border-color: var(--border-hover); transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.profile-history-thumb { position: relative; aspect-ratio: 16/9; background: var(--bg-surface); }
.profile-history-thumb img { width: 100%; height: 100%; object-fit: cover; }
.profile-history-thumb-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 2rem; color: var(--text-muted); }
.profile-history-play { position: absolute; inset: 0; background: rgba(0,0,0,0.4); display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity var(--transition-fast); font-size: 1.5rem; color: #fff; }
.profile-history-item:hover .profile-history-play { opacity: 1; }
.profile-history-info { padding: 0.75rem; }
.profile-history-title { font-size: 0.85rem; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 0.25rem; }
.profile-history-sub { font-size: 0.75rem; color: var(--text-muted); font-weight: 500; }

@media (max-width: 600px) {
  .profile-hero-content { flex-direction: column; text-align: center; gap: 1.5rem; }
  .profile-meta-row { justify-content: center; }
  .profile-stats-row { justify-content: center; }
}
