/* ── Reset + base ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0a0a0a;
  --bg-card: #141414;
  --border: #1f1f1f;
  --text: #f0f0f0;
  --text-dim: #8a8a8a;
  --accent: #ffffff;
  --glow-warm: rgba(255, 247, 235, 0.09);
  --gold: #e8c789;
  --cream: #f5e6c8;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

/* ── Aurora — koyu zeminde yavaş kayan soft glow blob'lar ─
   Kids Cloud'daki aurora tekniğinin koyu/premium versiyonu.
   position:fixed + z-index:-1 → tüm sayfanın arkasında sabit durur. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-color: var(--bg);
  background-image:
    radial-gradient(55% 46% at 14% 10%, rgba(200, 130, 50, 0.45) 0%, transparent 72%),
    radial-gradient(48% 42% at 88% 14%, rgba(230, 175, 90, 0.38) 0%, transparent 72%),
    radial-gradient(58% 52% at 22% 88%, rgba(180, 110, 40, 0.40) 0%, transparent 72%),
    radial-gradient(50% 44% at 82% 90%, rgba(220, 160, 80, 0.36) 0%, transparent 72%);
  background-repeat: no-repeat;
  background-size: 200% 200%;
  animation: aurora-drift 48s ease-in-out infinite;
}

@keyframes aurora-drift {
  0%   { background-position: 0% 0%,   100% 0%,  0% 100%,   100% 100%; }
  50%  { background-position: 12% 14%, 86% 10%,  10% 84%,   88% 92%; }
  100% { background-position: 0% 0%,   100% 0%,  0% 100%,   100% 100%; }
}

a { color: var(--text); text-decoration: none; }

/* ── Top bar ───────────────────────────────────────────── */
.topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 10;
}
.topbar > .brand { grid-column: 2; justify-self: center; }
.topbar > .lang { grid-column: 3; justify-self: end; }

.brand {
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.5px;
  background: linear-gradient(120deg, var(--cream) 0%, var(--gold) 45%, var(--cream) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: brand-sheen 6s ease-in-out infinite;
}

@keyframes brand-sheen {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

.lang { display: flex; gap: 4px; }
.lang a { padding: 6px 12px; font-size: 0.85rem; color: var(--text-dim); border-radius: 4px; transition: color 0.15s, background 0.15s; }
.lang a:hover { color: var(--text); }
.lang a.active { color: var(--text); background: var(--bg-card); }

/* ── Container ─────────────────────────────────────────── */
.container { width: 100%; max-width: 760px; margin: 0 auto; padding: 40px 20px 60px; flex: 1; }

/* ── Series cards ──────────────────────────────────────── */
.series {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 28px;
  transition: box-shadow 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}
.series:hover {
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.05), 0 16px 44px -18px var(--glow-warm), 0 0 60px -24px var(--glow-warm);
  transform: translateY(-2px);
}
.series-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; flex-wrap: wrap; }
.series-head h2 { font-size: 1.25rem; font-weight: 600; letter-spacing: -0.01em; }
.series-desc { color: var(--text-dim); font-size: 0.92rem; margin-bottom: 18px; }

.sub-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  font-size: 0.82rem;
  font-weight: 500;
  border: 1px solid var(--text);
  border-radius: 999px;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, transform 0.2s ease, box-shadow 0.2s ease;
}
.sub-btn:hover {
  background: var(--accent);
  color: #000;
  transform: scale(1.06);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.15), 0 8px 20px -8px rgba(255, 255, 255, 0.28);
}
.sub-btn:active { transform: scale(0.97); }

/* ── "Made for Kids" rozeti (3EA Studio) ──────────────────*/
.kids-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  padding: 3px 10px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #FFB347;
  background: rgba(255, 179, 71, 0.15);
  border-radius: 999px;
  white-space: nowrap;
  vertical-align: middle;
}

/* 3EA Studio — apricot accent */
.series[data-key="3ea_studio"] {
  border-left: 3px solid #FFB347;
}
.series[data-key="3ea_studio"]:hover {
  box-shadow: 0 0 0 1px rgba(255, 179, 71, 0.25), 0 0 24px rgba(255, 179, 71, 0.18);
}
.series[data-key="3ea_studio"] .placeholder-link {
  background: #FFB347;
  color: #0a0a0a;
}

/* ── Player ─────────────────────────────────────────────── */
.player { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: 8px; overflow: hidden; }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ── Thumbnail grid ────────────────────────────────────── */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.thumb {
  display: flex;
  flex-direction: column;
  background: #000;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  padding: 0;
  font: inherit;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.2s ease, transform 0.18s ease, box-shadow 0.2s ease;
}
.thumb:hover {
  border-color: rgba(255, 255, 255, 0.35);
  transform: translateY(-3px);
  box-shadow: 0 12px 26px -12px rgba(255, 255, 255, 0.20);
}
.thumb:active { transform: translateY(-1px) scale(0.98); }
.thumb.active { border-color: var(--accent); }
.thumb img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.thumb-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 0.78rem; line-height: 1.35; padding: 8px 10px; color: var(--text); }
.thumb.active .thumb-title { color: var(--accent); font-weight: 500; }

/* ── Skeletons (shimmer sweep) ─────────────────────────── */
@keyframes shimmer-sweep {
  0%   { background-position: -150% 0; }
  100% { background-position: 150% 0; }
}
.player-skeleton,
.thumb-skeleton {
  background: linear-gradient(110deg, #141414 20%, #1e1e1e 40%, #272727 50%, #1e1e1e 60%, #141414 80%);
  background-size: 250% 100%;
  animation: shimmer-sweep 1.8s ease-in-out infinite;
}
.player-skeleton { position: absolute; inset: 0; }
.thumb-skeleton { aspect-ratio: 16 / 9; border: 1px solid var(--border); border-radius: 6px; }

/* ── Grid error ────────────────────────────────────────── */
.grid-error { grid-column: 1 / -1; text-align: center; padding: 24px 16px; border: 1px dashed var(--border); border-radius: 8px; color: var(--text-dim); }
.grid-error p { margin-bottom: 4px; }
.grid-error-sub { font-size: 0.82rem; opacity: 0.7; }
.grid-error a { display: inline-block; margin-top: 10px; color: var(--text); border-bottom: 1px solid var(--text-dim); }

/* ── "YouTube'da aç" link ──────────────────────────────── */
.yt-link { display: inline-block; margin-top: 14px; font-size: 0.85rem; color: var(--text-dim); transition: color 0.15s; }
.yt-link:hover { color: var(--text); }

/* ── "Yakında" placeholder (subtle shimmer/breathing glow) ─ */
.placeholder {
  aspect-ratio: 16 / 9;
  background: #000;
  border: 1px dashed var(--border);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
  animation: placeholder-shimmer 4s ease-in-out infinite;
}
@keyframes placeholder-shimmer {
  0%, 100% {
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03), 0 0 0 rgba(255, 214, 150, 0);
  }
  50% {
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.10), 0 0 22px rgba(255, 214, 150, 0.14);
  }
}
.placeholder-icon { font-size: 2rem; margin-bottom: 8px; }
.placeholder-title { font-size: 1.05rem; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.placeholder-sub { font-size: 0.85rem; color: var(--text-dim); }
.placeholder-link { display: inline-block; margin-top: 14px; padding: 8px 16px; background: var(--text); color: var(--bg); text-decoration: none; border-radius: 999px; font-size: 0.85rem; font-weight: 500; transition: transform 0.2s; }
.placeholder-link:hover { transform: translateY(-1px); }

/* ── Coming Soon page ──────────────────────────────────── */
.container.soon { display: flex; align-items: center; justify-content: center; min-height: calc(100vh - 140px); }
.soon-card { text-align: center; padding: 60px 30px; max-width: 420px; }
.soon-card h1 { font-size: 2rem; font-weight: 700; margin-bottom: 16px; letter-spacing: -0.02em; }
.soon-card p { color: var(--text-dim); margin-bottom: 8px; }
.soon-card .soon-sub { font-size: 0.9rem; }
.back-link { display: inline-block; margin-top: 24px; padding: 8px 18px; border: 1px solid var(--border); border-radius: 999px; font-size: 0.88rem; color: var(--text-dim); transition: color 0.15s, border-color 0.15s; }
.back-link:hover { color: var(--text); border-color: var(--text); }

/* ── Footer ────────────────────────────────────────────── */
.foot { border-top: 1px solid var(--border); padding: 24px; text-align: center; color: var(--text-dim); font-size: 0.85rem; }
/* footer sosyal satırı — sarınca düzgün dursun diye flex+wrap, ayraç yok */
.foot-social { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 18px; margin: 0 0 14px; }
.foot-social a { color: var(--text-dim); transition: color 0.15s; }
.foot-social a:hover { color: var(--text); }

/* footer'daki yazı satırı — video kartlarından ayrı dursun diye ince ve sönük */
.foot .yazi { margin: 0 0 12px; }
.foot .yazi a { color: var(--text); border-bottom: 1px solid var(--border); transition: border-color 0.15s; }
.foot .yazi a:hover { border-bottom-color: var(--text-dim); }

/* ── Mobile ────────────────────────────────────────────── */
@media (max-width: 540px) {
  .topbar { padding: 14px 16px; }
  .container { padding: 24px 14px 40px; }
  .series { padding: 18px; margin-bottom: 20px; }
  .series-head h2 { font-size: 1.1rem; }
  .sub-btn { font-size: 0.78rem; padding: 5px 12px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .thumb-title { font-size: 0.72rem; padding: 6px 8px; }
}

/* ── Reduced motion — animasyonları durdur, statik glow bırak ─ */
@media (prefers-reduced-motion: reduce) {
  body::before,
  .brand,
  .placeholder,
  .player-skeleton,
  .thumb-skeleton {
    animation: none !important;
  }
  .series:hover,
  .thumb:hover,
  .sub-btn:hover {
    transform: none !important;
  }
}
