/* ── 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;
}

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;
}

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

/* ── Top bar ───────────────────────────────────────────── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  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;
}

.brand {
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.5px;
}

.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;
}

.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;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

.sub-btn:hover {
  background: var(--accent);
  color: #000;
}

/* ── Player (responsive 9:16 for Shorts, fallback 16:9) ── */
.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.15s, transform 0.1s;
}

.thumb:hover { border-color: var(--text-dim); }
.thumb:active { transform: 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 ─────────────────────────────────────────── */
@keyframes pulse { 0%, 100% { opacity: 0.5; } 50% { opacity: 0.8; } }

.player-skeleton {
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, #141414 30%, #1a1a1a 50%, #141414 70%);
  animation: pulse 1.6s ease-in-out infinite;
}

.thumb-skeleton {
  aspect-ratio: 16 / 9;
  background: linear-gradient(110deg, #141414 30%, #1a1a1a 50%, #141414 70%);
  border: 1px solid var(--border);
  border-radius: 6px;
  animation: pulse 1.6s ease-in-out infinite;
}

/* ── 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 ─────────────────────────────── */
.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;
}

.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);
}

/* ── 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;
}

/* ── 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; }
}
