/* ═══════════════════════════════════════════════════════════
   ANIME GRAVITY — GLOBAL STYLES
   Premium dark anime streaming platform
═══════════════════════════════════════════════════════════ */

/* ── Fonts ─────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=Sora:wght@400;600;700;800&display=swap');

/* ── CSS Variables ──────────────────────────────────────── */
:root {
  --bg: #060c18;
  --bg-soft: #0b1427;
  --bg-card: rgba(11, 20, 40, 0.7);
  --bg-elevated: rgba(18, 30, 58, 0.85);
  --line: rgba(100, 160, 255, 0.12);
  --line-bright: rgba(100, 160, 255, 0.22);
  --text: #e8f0ff;
  --text-muted: #7a9cc8;
  --text-dim: #445a7a;
  --accent: #5eead4;
  --accent-2: #f97316;
  --accent-3: #a78bfa;
  --accent-glow: rgba(94, 234, 212, 0.25);
  --accent2-glow: rgba(249, 115, 22, 0.25);
  --red: #f87171;
  --green: #4ade80;
  --shadow-sm: 0 4px 20px rgba(0,0,0,0.2);
  --shadow: 0 12px 40px rgba(0,0,0,0.35);
  --shadow-lg: 0 24px 80px rgba(0,0,0,0.5);
  --radius-sm: 12px;
  --radius: 20px;
  --radius-lg: 28px;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Plyr Theme Overrides */
  --plyr-color-main: var(--accent);
  --plyr-video-background: #000;
  --plyr-menu-background: var(--bg-elevated);
  --plyr-menu-color: var(--text);
}

/* ── Reset ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Space Grotesk', sans-serif;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 50% at 20% -10%, rgba(94,234,212,0.12) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 5%, rgba(167,139,250,0.1) 0%, transparent 50%),
    radial-gradient(ellipse 50% 60% at 50% 100%, rgba(249,115,22,0.07) 0%, transparent 60%);
  min-height: 100vh;
}

/* Animated background grid */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(94,234,212,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(94,234,212,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
button, input, textarea, select { font: inherit; }
ul, ol { list-style: none; }

/* ── Scrollbar ─────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(94,234,212,0.3); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: rgba(94,234,212,0.5); }

/* ── Layout ────────────────────────────────────────────── */
.container {
  position: relative;
  z-index: 1;
  width: min(1300px, calc(100% - 40px));
  margin: 0 auto;
}

/* ── Navbar ────────────────────────────────────────────── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 16px 0;
  background: rgba(6, 12, 24, 0.85);
  backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--line);
  transition: background var(--transition);
}

.navbar .container {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.nav-logo {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-3));
  display: grid;
  place-items: center;
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  font-size: 1.2rem;
  color: #06101d;
  flex-shrink: 0;
  box-shadow: 0 0 20px var(--accent-glow);
}

.nav-title {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
}

.nav-subtitle {
  font-size: 0.72rem;
  color: var(--text-muted);
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.nav-link {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: all var(--transition);
  white-space: nowrap;
}

.nav-link:hover, .nav-link.active {
  color: var(--text);
  background: rgba(255,255,255,0.06);
}

.nav-search {
  flex: 1;
  max-width: 320px;
  position: relative;
}

.nav-search input {
  width: 100%;
  padding: 9px 16px 9px 40px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  font-size: 0.88rem;
  outline: none;
  transition: all var(--transition);
}

.nav-search input:focus {
  border-color: var(--accent);
  background: rgba(94,234,212,0.05);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.nav-search .search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.9rem;
  pointer-events: none;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 600;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-3));
  color: #06101d;
  box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-primary:hover { box-shadow: 0 8px 30px var(--accent-glow); }

.btn-secondary {
  background: rgba(255,255,255,0.06);
  color: var(--text);
  border: 1px solid var(--line-bright);
}

.btn-secondary:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.2); }

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--line);
}

.btn-ghost:hover { color: var(--text); border-color: var(--line-bright); background: rgba(255,255,255,0.04); }

.btn-danger {
  background: rgba(248,113,113,0.15);
  color: var(--red);
  border: 1px solid rgba(248,113,113,0.3);
}

.btn-danger:hover { background: rgba(248,113,113,0.25); }

.btn-sm {
  padding: 7px 14px;
  font-size: 0.82rem;
}

.btn-icon {
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 12px;
  justify-content: center;
}

/* User Avatar */
.user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent);
  cursor: pointer;
}

/* Dropdown */
.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 200px;
  background: var(--bg-elevated);
  border: 1px solid var(--line-bright);
  border-radius: var(--radius);
  padding: 8px;
  backdrop-filter: blur(24px);
  box-shadow: var(--shadow-lg);
  z-index: 200;
  display: none;
  animation: fadeDown 0.2s ease;
}

.dropdown-menu.open { display: block; }

@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all var(--transition);
}

.dropdown-item:hover { color: var(--text); background: rgba(255,255,255,0.05); }
.dropdown-item.danger { color: var(--red); }
.dropdown-item.danger:hover { background: rgba(248,113,113,0.1); }

.dropdown-sep { height: 1px; background: var(--line); margin: 6px 0; }

/* ── Glass Card ────────────────────────────────────────── */
.glass {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
}

/* ── Hero Section ──────────────────────────────────────── */
.hero {
  min-height: 92vh;
  display: flex;
  align-items: center;
  padding: 120px 0 80px;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.hero-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.15;
  filter: blur(2px);
  animation: heroPulse 8s ease-in-out infinite;
}

@keyframes heroPulse {
  0%, 100% { transform: scale(1.02); }
  50% { transform: scale(1.06); }
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right,
    rgba(6,12,24,0.98) 0%,
    rgba(6,12,24,0.7) 50%,
    rgba(6,12,24,0.3) 100%
  );
}

.hero .container {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.2fr 0.9fr;
  gap: 60px;
  align-items: center;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid rgba(94,234,212,0.3);
  background: rgba(94,234,212,0.07);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
}

.hero-title {
  font-family: 'Sora', sans-serif;
  font-size: clamp(2.6rem, 6vw, 5rem);
  font-weight: 800;
  line-height: 1.05;
  margin-bottom: 20px;
  color: var(--text);
}

.hero-title span {
  background: linear-gradient(135deg, var(--accent), var(--accent-3));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: 1.1rem;
  line-height: 1.75;
  color: var(--text-muted);
  max-width: 54ch;
  margin-bottom: 36px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.hero-stats {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-value {
  font-family: 'Sora', sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
}

/* Hero Panel (Trending) */
.hero-panel {
  padding: 28px;
  position: relative;
  overflow: hidden;
}

.hero-panel::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(167,139,250,0.2) 0%, transparent 70%);
}

.panel-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.panel-label::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: blink 1.5s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.trending-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}

.trending-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.025);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  color: var(--text);
}

.trending-item:hover {
  border-color: var(--line-bright);
  background: rgba(255,255,255,0.05);
  transform: translateX(4px);
}

.trending-rank {
  font-family: 'Sora', sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-dim);
  width: 32px;
  text-align: center;
  flex-shrink: 0;
}

.trending-rank.r1 { color: var(--accent-2); }
.trending-rank.r2 { color: var(--text-muted); }

.trending-cover {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg-soft);
}

.trending-info { flex: 1; min-width: 0; }

.trending-title {
  font-family: 'Sora', sans-serif;
  font-size: 0.92rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.trending-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 3px;
}

/* ── Section Headers ───────────────────────────────────── */
.section {
  padding: 70px 0;
  position: relative;
  z-index: 1;
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 36px;
}

.section-kicker {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
  display: block;
}

.section-title {
  font-family: 'Sora', sans-serif;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  color: var(--text);
  line-height: 1.1;
}

/* ── Anime Grid ────────────────────────────────────────── */
.anime-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;
}

.anime-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  transition: all var(--transition);
  cursor: pointer;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
}

.anime-card:hover {
  border-color: var(--line-bright);
  transform: translateY(-6px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 40px rgba(94,234,212,0.08);
}

.anime-thumb {
  position: relative;
  aspect-ratio: 3/4;
  overflow: hidden;
}

.anime-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.anime-card:hover .anime-thumb img {
  transform: scale(1.06);
}

.anime-thumb-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(6,12,24,0.95) 0%, rgba(6,12,24,0.1) 60%, transparent 100%);
}

.anime-badges {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.badge {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.badge-trend { background: var(--accent-2); color: #fff; }
.badge-new { background: var(--accent); color: #06101d; }
.badge-editor { background: var(--accent-3); color: #fff; }
.badge-tamamlandi { background: rgba(74,222,128,0.2); color: var(--green); border: 1px solid rgba(74,222,128,0.3); }
.badge-devam { background: rgba(94,234,212,0.1); color: var(--accent); border: 1px solid rgba(94,234,212,0.2); }
.badge-cat {
  background: rgba(255,255,255,0.1);
  color: var(--text-muted);
  border: 1px solid var(--line);
}

.anime-rating {
  position: absolute;
  bottom: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(8px);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #fbbf24;
}

.anime-play-btn {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition);
}

.anime-card:hover .anime-play-btn { opacity: 1; }

.play-circle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(94,234,212,0.9);
  display: grid;
  place-items: center;
  color: #06101d;
  font-size: 1.2rem;
  box-shadow: 0 0 30px var(--accent-glow);
}

.anime-body {
  padding: 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.anime-title {
  font-family: 'Sora', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 6px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.anime-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
  margin-bottom: 14px;
}

.anime-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
}

.anime-ep {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
}

.like-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.82rem;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
}

.like-btn:hover, .like-btn.liked {
  border-color: rgba(248, 113, 113, 0.4);
  color: var(--red);
  background: rgba(248, 113, 113, 0.08);
}

/* ── Category Filters ──────────────────────────────────── */
.category-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.chip {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.03);
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all var(--transition);
}

.chip:hover { border-color: var(--line-bright); color: var(--text); }
.chip.active {
  border-color: var(--accent);
  background: rgba(94,234,212,0.1);
  color: var(--accent);
}

/* ── Video Player ──────────────────────────────────────── */
.player-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg), 0 0 60px rgba(94,234,212,0.1);
}

.player-wrap iframe, .player-wrap video {
  width: 100%;
  height: 100%;
  border: none;
}

.player-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: radial-gradient(circle at center, rgba(94,234,212,0.08) 0%, transparent 70%);
  color: var(--text-muted);
}

.player-placeholder svg { font-size: 3rem; }

/* Popout Blocker (Google Drive) */
.player-popout-blocker {
  position: absolute;
  top: 0;
  right: 0;
  width: 120px;
  height: 60px;
  background: transparent;
  z-index: 10;
  cursor: default;
  display: none;
}

.player-popout-blocker.active {
  display: block;
}

/* ── Comments ──────────────────────────────────────────── */
.comment-form {
  display: flex;
  gap: 12px;
  margin-bottom: 28px;
}

.comment-form textarea {
  flex: 1;
  min-height: 80px;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  resize: none;
  outline: none;
  transition: all var(--transition);
  font-size: 0.9rem;
  line-height: 1.6;
}

.comment-form textarea:focus {
  border-color: var(--accent);
  background: rgba(94,234,212,0.04);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.comment-item {
  padding: 18px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.02);
  margin-bottom: 12px;
  transition: border-color var(--transition);
}

.comment-item:hover { border-color: var(--line-bright); }

.comment-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.comment-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.comment-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
}

.comment-username {
  font-weight: 600;
  font-size: 0.9rem;
}

.comment-date {
  font-size: 0.78rem;
  color: var(--text-dim);
}

.comment-text {
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.comment-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Forum ─────────────────────────────────────────────── */
.forum-card {
  padding: 22px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.02);
  transition: all var(--transition);
  text-decoration: none;
  color: var(--text);
  display: block;
}

.forum-card:hover {
  border-color: var(--line-bright);
  background: rgba(255,255,255,0.04);
  transform: translateY(-2px);
}

.forum-card-title {
  font-family: 'Sora', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.3;
}

.forum-card-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ── Auth Page ─────────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  padding: 44px 40px;
}

.auth-title {
  font-family: 'Sora', sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.auth-subtitle {
  color: var(--text-muted);
  margin-bottom: 32px;
  font-size: 0.95rem;
}

.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.form-input {
  width: 100%;
  padding: 13px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  outline: none;
  transition: all var(--transition);
  font-size: 0.95rem;
}

.form-input:focus {
  border-color: var(--accent);
  background: rgba(94,234,212,0.04);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-input::placeholder { color: var(--text-dim); }

.form-error {
  color: var(--red);
  font-size: 0.82rem;
  margin-top: 6px;
  display: none;
}

.form-error.show { display: block; }

.auth-switch {
  text-align: center;
  margin-top: 24px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.auth-switch a { color: var(--accent); font-weight: 600; }
.auth-switch a:hover { text-decoration: underline; }

/* ── Admin ─────────────────────────────────────────────── */
.admin-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: calc(100vh - 80px);
  gap: 0;
}

.admin-sidebar {
  padding: 32px 20px;
  border-right: 1px solid var(--line);
  background: rgba(6,12,24,0.5);
  position: sticky;
  top: 80px;
  height: calc(100vh - 80px);
  overflow-y: auto;
}

.admin-sidebar-title {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 12px;
  padding: 0 8px;
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
  font-size: 0.9rem;
  margin-bottom: 2px;
}

.sidebar-nav-item:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.sidebar-nav-item.active { color: var(--accent); background: rgba(94,234,212,0.08); }

.admin-content {
  padding: 36px;
  overflow-y: auto;
}

.admin-section { display: none; }
.admin-section.active { display: block; }

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th {
  text-align: left;
  padding: 12px 16px;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  border-bottom: 1px solid var(--line);
}

.admin-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
  color: var(--text-muted);
  vertical-align: middle;
}

.admin-table td:first-child { color: var(--text); }

.admin-table tr:hover td { background: rgba(255,255,255,0.02); }

.admin-thumb {
  width: 48px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
}

/* ── Modals ────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--bg-elevated);
  border: 1px solid var(--line-bright);
  border-radius: var(--radius-lg);
  padding: 36px;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  transform: scale(0.94);
  transition: transform 0.25s ease;
}

.modal-overlay.open .modal { transform: scale(1); }

.modal-title {
  font-family: 'Sora', sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 28px;
}

.modal-footer {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

/* ── Toast ─────────────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  padding: 14px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--line-bright);
  background: var(--bg-elevated);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-lg);
  font-size: 0.9rem;
  max-width: 320px;
  animation: toastIn 0.3s ease;
  display: flex;
  align-items: center;
  gap: 10px;
}

.toast.success { border-color: rgba(74,222,128,0.3); color: var(--green); }
.toast.error { border-color: rgba(248,113,113,0.3); color: var(--red); }
.toast.info { border-color: rgba(94,234,212,0.3); color: var(--accent); }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ── Page Header ───────────────────────────────────────── */
.page-header {
  padding: 50px 0 30px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 50px;
}

/* ── Anime Detail Page ─────────────────────────────────── */
.anime-detail-hero {
  position: relative;
  min-height: 420px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  border-radius: var(--radius-lg);
  margin-bottom: 40px;
}

.anime-detail-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(1px);
}

.anime-detail-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top,
    rgba(6,12,24,1) 0%,
    rgba(6,12,24,0.5) 50%,
    rgba(6,12,24,0.2) 100%
  );
}

.anime-detail-content {
  position: relative;
  z-index: 1;
  padding: 40px;
  width: 100%;
}

.anime-detail-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 40px;
  align-items: start;
}

/* ── Episode List ──────────────────────────────────────── */
.episode-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.episode-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.02);
  cursor: pointer;
  transition: all var(--transition);
}

.episode-item:hover {
  border-color: var(--accent);
  background: rgba(94,234,212,0.05);
}

.episode-item.playing {
  border-color: var(--accent);
  background: rgba(94,234,212,0.08);
}

.ep-number {
  font-family: 'Sora', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  width: 36px;
  flex-shrink: 0;
}

.episode-item.playing .ep-number { color: var(--accent); }

.ep-info { flex: 1; }

.ep-title {
  font-size: 0.92rem;
  font-weight: 600;
  margin-bottom: 3px;
}

.ep-duration {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ── Profile ───────────────────────────────────────────── */
.profile-banner {
  height: 200px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(94,234,212,0.2), rgba(167,139,250,0.2));
  border: 1px solid var(--line);
  margin-bottom: -60px;
  position: relative;
  overflow: hidden;
}

.profile-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(94,234,212,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(94,234,212,0.05) 1px, transparent 1px);
  background-size: 30px 30px;
}

.profile-info {
  padding: 0 40px 30px;
  display: flex;
  align-items: flex-end;
  gap: 24px;
}

.profile-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.profile-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--bg);
  box-shadow: 0 0 0 2px var(--accent);
}

/* ── Watchlist Grid ────────────────────────────────────── */
.watchlist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}

/* ── Admin Login ───────────────────────────────────────── */
.admin-login {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Input row ─────────────────────────────────────────── */
.input-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* ── Divider ───────────────────────────────────────────── */
.divider {
  height: 1px;
  background: var(--line);
  margin: 32px 0;
}

/* ── Empty State ───────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-state svg { font-size: 3rem; opacity: 0.4; margin-bottom: 16px; }

/* ── Footer ────────────────────────────────────────────── */
.footer {
  margin-top: 80px;
  padding: 40px 0;
  border-top: 1px solid var(--line);
  text-align: center;
  color: var(--text-dim);
  font-size: 0.85rem;
  position: relative;
  z-index: 1;
}

.footer span { color: var(--accent); }

/* ── Responsive ────────────────────────────────────────── */

/* ═══ 1100px — Tablet Landscape ═══ */
@media (max-width: 1100px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero-panel { display: none; }
  .anime-detail-layout { grid-template-columns: 1fr; }
  .anime-detail-layout > div:last-child { order: -1; } /* Bölümler üste gelsin */
  .input-row { grid-template-columns: 1fr 1fr; }
}

/* ═══ 768px — Tablet Portrait / Mobile ═══ */
@media (max-width: 768px) {

  /* Container padding */
  .container { width: calc(100% - 28px); }

  /* Navbar */
  .nav-links { display: none; }
  .nav-search { display: none; }
  .nav-brand .nav-subtitle { display: none; }
  .navbar .container { gap: 12px; }
  .nav-actions { gap: 6px; }
  .btn-sm { padding: 6px 10px; font-size: 0.78rem; }

  /* Hero */
  .hero { padding: 90px 0 50px; min-height: auto; }
  .hero-title { font-size: clamp(2rem, 8vw, 3rem); }
  .hero-desc { font-size: 0.95rem; }
  .hero-actions { gap: 10px; }
  .hero-stats { gap: 20px; }
  .stat-value { font-size: 1.4rem; }

  /* Section */
  .section { padding: 44px 0; }
  .section-header { flex-direction: column; align-items: flex-start; gap: 12px; }
  .section-header > div:last-child { width: 100%; }
  .section-header select { width: 100%; }

  /* Anime Grid */
  .anime-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }

  /* Category Chips */
  .category-row { gap: 6px; }
  .chip { padding: 6px 12px; font-size: 0.8rem; }

  /* Forum card */
  .forum-card { padding: 16px; }
  .forum-card-meta { flex-wrap: wrap; gap: 8px; }

  /* Auth */
  .auth-card { padding: 28px 20px; }

  /* Modals */
  .modal { padding: 24px; }
  .modal-title { font-size: 1.2rem; }

  /* Toast */
  .toast-container { bottom: 16px; right: 16px; left: 16px; }
  .toast { max-width: 100%; }

  /* Anime Detail */
  .anime-detail-hero { min-height: 300px; border-radius: var(--radius); }
  .anime-detail-content { padding: 20px; }
  .anime-detail-content h1 { font-size: clamp(1.4rem, 5vw, 2rem) !important; }
  .anime-detail-layout { gap: 24px; }
  .anime-detail-layout > div:last-child { position: static !important; } /* sticky iptal */

  /* Poster */
  .anime-detail-poster-wrap { display: none; }

  /* Player */
  .player-wrap { border-radius: var(--radius); }

  /* Episode list */
  .episode-item { padding: 10px 14px; gap: 10px; }
  .ep-num { width: 28px; font-size: 0.8rem; }

  /* Comment form */
  .comment-form { flex-direction: column; }

  /* Profile */
  .profile-info { padding: 0 20px 24px; flex-direction: column; align-items: center; text-align: center; }
  .profile-banner { height: 140px; margin-bottom: -40px; }
  .profile-avatar { width: 72px; height: 72px; }
  .watchlist-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }

  /* Admin */
  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar {
    position: static;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--line);
    padding: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    overflow-x: auto;
    overflow-y: visible;
  }
  .admin-sidebar-title { display: none; }
  .sidebar-nav-item {
    margin-bottom: 0;
    white-space: nowrap;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 0.82rem;
    border: 1px solid var(--line);
  }
  .admin-content { padding: 20px 16px; }
  .admin-table { font-size: 0.82rem; }
  .admin-table th, .admin-table td { padding: 10px; }
  .input-row { grid-template-columns: 1fr !important; }
  .ep-form-row {
    grid-template-columns: 50px 1fr !important;
    gap: 8px;
  }
  .ep-form-row input:nth-child(3),
  .ep-form-row input:nth-child(4) {
    grid-column: 1 / -1;
  }

  /* Buttons action row */
  .hero-actions .btn { font-size: 0.85rem; padding: 10px 16px; }
}

/* ═══ 480px — Small Mobile ═══ */
@media (max-width: 480px) {
  html { font-size: 15px; }

  /* Navbar — sadece logo + buton */
  .nav-brand .nav-title { font-size: 1rem; }
  .nav-actions .btn:not(:last-child) { display: none; }

  /* Hero */
  .hero-eyebrow { font-size: 0.7rem; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .hero-stats { gap: 14px; }

  /* Anime grid — 2 sütun küçük */
  .anime-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .anime-body { padding: 12px; }
  .anime-title { font-size: 0.88rem; }
  .anime-desc { display: none; }

  /* Anime detail */
  .anime-detail-hero { min-height: 220px; border-radius: var(--radius-sm); }
  .anime-detail-content { padding: 14px; }

  /* Watchlist */
  .watchlist-grid { grid-template-columns: repeat(2, 1fr); }

  /* Auth */
  .auth-card { padding: 22px 16px; }
  .auth-title { font-size: 1.5rem; }

  /* Toast */
  .toast { font-size: 0.82rem; padding: 10px 14px; }

  /* Footer */
  .footer { margin-top: 40px; padding: 28px 0; }
}

/* ── Utility ───────────────────────────────────────────── */
.hidden { display: none !important; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }
.w-full { width: 100%; }
.text-muted { color: var(--text-muted); }
.text-accent { color: var(--accent); }
.font-sora { font-family: 'Sora', sans-serif; }
.fw-bold { font-weight: 700; }
.text-sm { font-size: 0.85rem; }
.text-xs { font-size: 0.75rem; }

/*  Splash Screen  */
#splash-screen {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  background: var(--bg);
  z-index: 99999;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: opacity 0.6s ease-out, visibility 0.6s ease-out;
}
#splash-screen.fade-out {
  opacity: 0;
  visibility: hidden;
}
.splash-logo {
  width: 120px;
  height: 120px;
  border-radius: 24px;
  box-shadow: 0 10px 30px rgba(249,115,22,0.2);
  animation: float 3s ease-in-out infinite;
  margin-bottom: 24px;
  object-fit: cover;
}
.splash-text {
  font-family: 'Sora', sans-serif;
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: 2px;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: pulseLogo 2s infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-15px); }
}
@keyframes pulseLogo {
  0% { opacity: 0.8; filter: drop-shadow(0 0 5px rgba(249,115,22,0.3)); }
  50% { opacity: 1; filter: drop-shadow(0 0 15px rgba(249,115,22,0.6)); }
  100% { opacity: 0.8; filter: drop-shadow(0 0 5px rgba(249,115,22,0.3)); }
}

/*  Search Dropdown  */
.search-results-container {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  min-width: 300px;
  max-height: 400px;
  overflow-y: auto;
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-top: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  z-index: 1000;
  display: none;
  flex-direction: column;
}
.search-results-container.active {
  display: flex;
}
.search-result-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: var(--text);
  transition: background 0.2s;
}
.search-result-item:hover {
  background: rgba(255,255,255,0.05);
}
.search-result-item:last-child {
  border-bottom: none;
}
.search-result-img {
  width: 50px;
  height: 70px;
  object-fit: cover;
  border-radius: 6px;
}
.search-result-info {
  flex: 1;
  overflow: hidden;
}
.search-result-title {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.search-result-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
