:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #141418;
  --bg-card: #1a1a22;
  --bg-hover: #22222e;
  --accent: #e50914;
  --accent-hover: #f40612;
  --accent-dim: rgba(229,9,20,0.15);
  --text-primary: #ffffff;
  --text-secondary: #a0a0b0;
  --text-muted: #606070;
  --border: rgba(255,255,255,0.08);
  --border-hover: rgba(255,255,255,0.18);
  --gold: #f5c518;
  --green: #46d369;
  --shadow: 0 8px 32px rgba(0,0,0,0.6);
  --radius: 8px;
  --radius-lg: 14px;
  --nav-h: 68px;
  --font: 'Inter', -apple-system, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font-family: 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(180deg, rgba(10,10,15,0.98) 0%, rgba(10,10,15,0) 100%);
  transition: background 0.3s;
}
.navbar.scrolled { background: rgba(10,10,15,0.98) !important; }
.navbar-brand { display: flex; align-items: center; gap: 10px; }
.navbar-logo {
  font-size: 1.7rem; font-weight: 900; letter-spacing: -1px;
  color: var(--accent);
}
.navbar-nav { display: flex; align-items: center; gap: 6px; margin-left: 2rem; }
.navbar-nav a {
  padding: 6px 14px; border-radius: 6px;
  font-size: 0.875rem; color: var(--text-secondary);
  transition: color 0.2s, background 0.2s;
}
.navbar-nav a:hover, .navbar-nav a.active { color: #fff; background: rgba(255,255,255,0.08); }
.navbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.search-box {
  display: flex; align-items: center;
  background: rgba(255,255,255,0.06); border: 1px solid var(--border);
  border-radius: 8px; padding: 6px 14px; gap: 8px;
  transition: border-color 0.2s, background 0.2s;
}
.search-box:focus-within { border-color: var(--border-hover); background: rgba(255,255,255,0.1); }
.search-box input {
  background: none; border: none; outline: none;
  color: var(--text-primary); width: 180px; font-size: 0.875rem;
}
.search-box svg { color: var(--text-muted); flex-shrink: 0; }
.btn-avatar {
  width: 36px; height: 36px; border-radius: 8px;
  background: var(--accent); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.875rem; color: #fff;
}
.dropdown { position: relative; }
.dropdown-menu {
  position: absolute; top: calc(100% + 10px); right: 0;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); min-width: 180px; padding: 6px;
  box-shadow: var(--shadow); display: none;
}
.dropdown:hover .dropdown-menu { display: block; }
.dropdown-menu a, .dropdown-menu button {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 9px 12px;
  border-radius: 6px; font-size: 0.875rem;
  color: var(--text-secondary); border: none; background: none; cursor: pointer;
  transition: color 0.2s, background 0.2s;
}
.dropdown-menu a:hover, .dropdown-menu button:hover { color: #fff; background: var(--bg-hover); }
.dropdown-menu hr { border: none; border-top: 1px solid var(--border); margin: 4px 0; }

/* ── Hero ── */
.hero {
  position: relative; height: 90vh; min-height: 580px;
  display: flex; align-items: flex-end;
  padding: 4% 4% 5%;
}
.hero-backdrop {
  position: absolute; inset: 0; z-index: 0;
  background-size: cover; background-position: center top;
}
.hero-backdrop::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(0deg, var(--bg-primary) 0%, rgba(10,10,15,0.4) 50%, rgba(10,10,15,0.1) 100%);
}
.hero-backdrop::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(10,10,15,0.85) 0%, rgba(10,10,15,0) 60%);
}
.hero-content { position: relative; z-index: 1; max-width: 560px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--accent); color: #fff;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
  padding: 4px 12px; border-radius: 4px; margin-bottom: 1rem;
}
.hero-title { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 800; line-height: 1.1; margin-bottom: 1rem; }
.hero-meta { display: flex; align-items: center; gap: 16px; margin-bottom: 1rem; flex-wrap: wrap; }
.hero-meta span { font-size: 0.875rem; color: var(--text-secondary); }
.hero-meta .imdb { color: var(--gold); font-weight: 700; }
.hero-meta .quality { border: 1px solid var(--border-hover); padding: 2px 8px; border-radius: 4px; font-size: 0.75rem; }
.hero-desc { font-size: 1rem; line-height: 1.6; color: var(--text-secondary); margin-bottom: 1.5rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px; border-radius: 8px;
  font-size: 0.9375rem; font-weight: 600; border: none; cursor: pointer;
  transition: transform 0.15s, background 0.2s, opacity 0.2s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-outline {
  background: rgba(255,255,255,0.12); color: #fff;
  border: 1px solid rgba(255,255,255,0.25);
  backdrop-filter: blur(8px);
}
.btn-outline:hover { background: rgba(255,255,255,0.22); }
.btn-sm { padding: 7px 16px; font-size: 0.8125rem; }
.btn-icon { padding: 10px; border-radius: 50%; }

/* ── Sections ── */
.section { padding: 2.5rem 4%; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; }
.section-title { font-size: 1.3rem; font-weight: 700; }
.section-more { font-size: 0.8125rem; color: var(--accent); transition: color 0.2s; }
.section-more:hover { color: var(--accent-hover); }

/* ── Movie Grid ── */
.movie-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
}
.movie-grid.wide { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

.movie-card {
  border-radius: var(--radius);
  overflow: hidden; cursor: pointer;
  background: var(--bg-card);
  transition: transform 0.25s, box-shadow 0.25s;
  position: relative;
}
.movie-card:hover { transform: scale(1.04) translateY(-4px); box-shadow: 0 20px 50px rgba(0,0,0,0.7); z-index: 2; }
.movie-card-poster {
  aspect-ratio: 2/3; object-fit: cover; width: 100%;
  background: var(--bg-hover);
}
.movie-card-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(10,10,15,0.95) 0%, rgba(10,10,15,0) 50%);
  opacity: 0; transition: opacity 0.25s;
  display: flex; flex-direction: column; justify-content: flex-end; padding: 12px;
}
.movie-card:hover .movie-card-overlay { opacity: 1; }
.movie-card-title { font-size: 0.875rem; font-weight: 600; line-height: 1.3; }
.movie-card-meta { font-size: 0.75rem; color: var(--text-secondary); margin-top: 4px; }
.movie-card-badge {
  position: absolute; top: 8px; left: 8px;
  background: var(--accent); color: #fff;
  font-size: 0.65rem; font-weight: 700; padding: 3px 7px; border-radius: 4px;
}
.movie-card-badge.dizi { background: #0070f3; }

/* ── Movie Row (horizontal scroll) ── */
.movie-row { position: relative; }
.movie-row-inner {
  display: flex; gap: 12px;
  overflow-x: auto; padding-bottom: 8px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin; scrollbar-color: var(--bg-hover) transparent;
}
.movie-row-inner::-webkit-scrollbar { height: 4px; }
.movie-row-inner::-webkit-scrollbar-track { background: transparent; }
.movie-row-inner::-webkit-scrollbar-thumb { background: var(--bg-hover); border-radius: 2px; }
.movie-row-inner .movie-card { flex: 0 0 160px; scroll-snap-align: start; }

/* ── Tags / Badges ── */
.tag {
  display: inline-flex; align-items: center;
  padding: 4px 10px; border-radius: 5px;
  font-size: 0.75rem; font-weight: 600;
  background: rgba(255,255,255,0.08); color: var(--text-secondary);
}
.tag-accent { background: var(--accent-dim); color: var(--accent); }
.rating-star { color: var(--gold); }

/* ── Forms ── */
.form-group { margin-bottom: 1.25rem; }
.form-label { display: block; font-size: 0.8125rem; font-weight: 500; color: var(--text-secondary); margin-bottom: 6px; }
.form-control {
  width: 100%; padding: 10px 14px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 8px; color: var(--text-primary); font-size: 0.9375rem;
  outline: none; transition: border-color 0.2s;
}
.form-control:focus { border-color: var(--accent); }
.form-control::placeholder { color: var(--text-muted); }
select.form-control option { background: var(--bg-card); }
textarea.form-control { resize: vertical; min-height: 100px; }
.form-hint { font-size: 0.75rem; color: var(--text-muted); margin-top: 4px; }

/* ── Auth Pages ── */
.auth-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at 50% 0%, rgba(229,9,20,0.15) 0%, var(--bg-primary) 60%);
  padding: 2rem;
}
.auth-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 2.5rem;
  width: 100%; max-width: 420px;
}
.auth-logo { font-size: 2rem; font-weight: 900; color: var(--accent); text-align: center; margin-bottom: 0.5rem; }
.auth-subtitle { text-align: center; color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 2rem; }

/* ── Alert / Flash ── */
.alert {
  padding: 12px 16px; border-radius: 8px; margin-bottom: 1.25rem;
  font-size: 0.875rem; display: flex; align-items: center; gap: 10px;
}
.alert-success { background: rgba(70,211,105,0.12); color: #46d369; border: 1px solid rgba(70,211,105,0.25); }
.alert-danger  { background: rgba(229,9,20,0.12);  color: #ff6b6b;  border: 1px solid rgba(229,9,20,0.25); }
.alert-info    { background: rgba(0,112,243,0.12); color: #60a5fa;  border: 1px solid rgba(0,112,243,0.25); }

/* ── Video Player ── */
.player-page { padding-top: var(--nav-h); min-height: 100vh; }
.player-wrapper {
  position: relative; background: #000;
  aspect-ratio: 16/9; max-height: 70vh; width: 100%;
}
.player-wrapper iframe, .player-wrapper video { width: 100%; height: 100%; border: none; }
.player-meta { padding: 2rem 4%; }
.player-title { font-size: 1.75rem; font-weight: 800; margin-bottom: 0.5rem; }
.player-info { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 1.5rem; }
.player-info span { font-size: 0.875rem; color: var(--text-secondary); }

/* ── Episodes ── */
.episodes-list { margin-top: 1rem; }
.episode-item {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 12px; border-radius: 8px;
  cursor: pointer; transition: background 0.2s;
  border-bottom: 1px solid var(--border);
}
.episode-item:hover { background: var(--bg-hover); }
.episode-thumb { width: 140px; flex-shrink: 0; aspect-ratio: 16/9; object-fit: cover; border-radius: 6px; background: var(--bg-hover); }
.episode-info h4 { font-size: 0.9375rem; font-weight: 600; margin-bottom: 4px; }
.episode-info p  { font-size: 0.8125rem; color: var(--text-secondary); line-height: 1.5; }

/* ── Pagination ── */
.pagination { display: flex; justify-content: center; gap: 6px; padding: 2rem 0; }
.page-btn {
  width: 36px; height: 36px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.875rem; border: 1px solid var(--border);
  background: var(--bg-card); color: var(--text-secondary);
  cursor: pointer; transition: all 0.2s;
}
.page-btn:hover, .page-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ── Footer ── */
footer {
  padding: 3rem 4% 2rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
}
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 2rem; margin-bottom: 2rem; }
.footer-title { font-size: 0.875rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 0.75rem; }
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.footer-links a { font-size: 0.8125rem; color: var(--text-muted); transition: color 0.2s; }
.footer-links a:hover { color: var(--text-primary); }
.footer-bottom { font-size: 0.8125rem; text-align: center; padding-top: 2rem; border-top: 1px solid var(--border); }

/* ── Loading skeleton ── */
.skeleton { background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-hover) 50%, var(--bg-card) 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: 6px; }
@keyframes shimmer { 0%{background-position:200% 0} 100%{background-position:-200% 0} }

/* ── Utility ── */
.container { max-width: 1400px; margin: 0 auto; padding: 0 4%; }
.text-accent { color: var(--accent); }
.text-muted { color: var(--text-muted); }
.text-gold { color: var(--gold); }
.text-green { color: var(--green); }
.d-flex { display: flex; }
.align-center { align-items: center; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.mt-1 { margin-top: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.main-content { padding-top: var(--nav-h); }

/* ── Responsive ── */
@media (max-width: 768px) {
  .navbar-nav { display: none; }
  .search-box input { width: 120px; }
  .hero { height: 75vh; padding: 4%; }
  .hero-actions .btn { padding: 10px 20px; font-size: 0.875rem; }
  .movie-row-inner .movie-card { flex: 0 0 130px; }
  .player-title { font-size: 1.25rem; }
  .episode-thumb { width: 100px; }
}

@media (max-width: 480px) {
  .section { padding: 1.5rem 4%; }
  .movie-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Canlı yayın */
.movie-card-badge.canli {
  background: var(--accent);
  animation: pulse-badge 1.5s infinite;
}
@keyframes pulse-badge {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}
