:root {
  --bg-main: #090a0d;
  --bg-card: #13161f;
  --bg-elevated: #1a1e2a;
  --accent-red: #e50914;
  --accent-gold: #f5c518;
  --text-primary: #ffffff;
  --text-secondary: #9ea5b3;
  --text-muted: #6b7280;
  --border-color: rgba(255, 255, 255, 0.08);
  --header-height: 68px;
  --bottom-nav-height: 64px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  padding-bottom: calc(var(--bottom-nav-height) + var(--safe-bottom) + 24px);
  -webkit-font-smoothing: antialiased;
}

/* ================= HEADER ================= */
.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: calc(var(--header-height) + var(--safe-top));
  padding-top: var(--safe-top);
  background: rgba(9, 10, 13, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 100;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.3s ease;
}

.header-inner {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  cursor: pointer;
  flex-shrink: 0;
}

.brand-logo {
  height: 28px;
  width: auto;
  object-fit: contain;
}

.brand-badge {
  font-size: 9px;
  font-weight: 800;
  background: var(--accent-red);
  color: #fff;
  padding: 2px 5px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.search-box {
  flex: 1;
  max-width: 420px;
  position: relative;
  display: flex;
  align-items: center;
}

.search-box input {
  width: 100%;
  height: 38px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 19px;
  padding: 0 36px 0 38px;
  color: #fff;
  font-size: 13.5px;
  outline: none;
  transition: all 0.25s ease;
}

.search-box input:focus, .search-box input.tv-focused {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--accent-red);
  box-shadow: 0 0 14px rgba(229, 9, 20, 0.45);
}

.search-box input::placeholder {
  color: var(--text-muted);
}

.search-icon {
  position: absolute;
  left: 12px;
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  pointer-events: none;
}

.clear-search-btn {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
  padding: 2px 6px;
}

.nav-links {
  display: flex;
  gap: 6px;
}

.nav-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.nav-btn:hover, .nav-btn.active, .nav-btn.tv-focused {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  outline: 2px solid var(--accent-red);
}

/* ================= MAIN CONTAINER ================= */
#mainContent {
  width: 100%;
  padding-top: calc(var(--header-height) + var(--safe-top));
}

/* ================= HERO BANNER ================= */
.hero-section {
  position: relative;
  min-height: 65vh;
  display: flex;
  align-items: flex-end;
  padding: 40px 20px 48px;
  margin-top: 0;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .hero-section {
    min-height: 72vh;
    padding: 60px 40px 54px;
  }
}

.hero-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-size: cover;
  background-position: center 20%;
  z-index: 1;
  transition: background-image 0.5s ease-in-out;
}

.hero-gradient {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(0deg, var(--bg-main) 12%, rgba(9, 10, 13, 0.65) 55%, rgba(9, 10, 13, 0.3) 100%),
              linear-gradient(90deg, var(--bg-main) 0%, rgba(9, 10, 13, 0.4) 45%, transparent 100%);
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 3;
  max-width: 680px;
  margin: 0;
}

.hero-badges {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.quality-badge {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.rating-badge {
  background: var(--accent-gold);
  color: #000;
  font-weight: 800;
}

.rating-badge .star-icon,
.badge.rating-badge .star-icon {
  color: #000 !important;
  fill: #000 !important;
}

.badge-new {
  background: var(--accent-red);
  color: #fff;
  font-weight: 800;
}

.year-badge, .duration-badge {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
}

.hero-title {
  font-size: clamp(26px, 4.5vw, 46px);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 12px;
  text-shadow: 0 4px 16px rgba(0, 0, 0, 0.8);
}

.hero-overview {
  font-size: 14.5px;
  line-height: 1.55;
  color: #e5e7eb;
  margin-bottom: 24px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9);
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ================= PLATFORMLAR BÖLÜMÜ & BUTONLARI ================= */
.quick-platforms-bar {
  padding: 10px 0 16px;
}

.platforms-pill-list {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 6px 20px 14px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.platforms-pill-list::-webkit-scrollbar {
  display: none;
}

.platform-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.25s ease;
  user-select: none;
}

.platform-pill:hover, .platform-pill.tv-focused {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
  border-color: rgba(255, 255, 255, 0.3);
}

.platform-pill.active {
  background: var(--accent-red);
  border-color: var(--accent-red);
  box-shadow: 0 4px 14px rgba(229, 9, 20, 0.4);
}

.platform-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.platform-pill[data-plat="netflix"] .platform-dot { background: #e50914; }
.platform-pill[data-plat="amazon-prime"] .platform-dot { background: #00a8e1; }
.platform-pill[data-plat="disney"] .platform-dot { background: #113ccf; }
.platform-pill[data-plat="blutv"] .platform-dot { background: #00adef; }
.platform-pill[data-plat="hbo-max"] .platform-dot { background: #9d4edd; }
.platform-pill[data-plat="gain"] .platform-dot { background: #10b981; }
.platform-pill[data-plat="exxen"] .platform-dot { background: #facc15; }
.platform-pill[data-plat="tabii"] .platform-dot { background: #ef4444; }

/* ================= BUTTONS ================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 10px;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.btn svg {
  width: 18px;
  height: 18px;
}

.btn-primary {
  background: var(--accent-red);
  color: #fff;
  box-shadow: 0 4px 16px rgba(229, 9, 20, 0.4);
}

.btn-primary:hover, .btn-primary:active, .btn-primary.tv-focused {
  background: #f40612;
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 6px 20px rgba(229, 9, 20, 0.7);
  outline: 3px solid #fff;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.btn-secondary:hover, .btn-secondary:active, .btn-secondary.tv-focused {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px) scale(1.03);
  outline: 3px solid var(--accent-red);
}

.btn-large {
  padding: 14px 32px;
  font-size: 16px;
  width: 100%;
  justify-content: center;
}

/* ================= CATEGORIES & CAROUSELS ================= */
.content-section {
  padding: 24px 0 10px;
  max-width: 1400px;
  margin: 0 auto;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px 14px;
}

.section-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.3px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.media-carousel {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 8px 20px 18px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.media-carousel::-webkit-scrollbar {
  display: none;
}

.media-card {
  flex: 0 0 145px;
  scroll-snap-align: start;
  cursor: pointer;
  position: relative;
  transition: transform 0.25s ease, box-shadow 0.25s ease, outline 0.2s ease;
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

@media (min-width: 768px) {
  .media-card {
    flex: 0 0 175px;
  }
}

.media-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.6);
}

.media-card.tv-focused, .media-card:focus-visible {
  transform: scale(1.08) translateY(-6px) !important;
  outline: 3px solid var(--accent-red) !important;
  box-shadow: 0 0 24px rgba(229, 9, 20, 0.8), 0 14px 32px rgba(0, 0, 0, 0.8) !important;
  z-index: 10;
}

.poster-wrapper {
  position: relative;
  width: 100%;
  padding-top: 150%;
  background: var(--bg-card);
  overflow: hidden;
}

.poster-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.media-card:hover .poster-img, .media-card.tv-focused .poster-img {
  transform: scale(1.05);
}

.card-rating {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  color: var(--accent-gold);
  font-size: 11px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 2px;
}

.card-rating.rating-new {
  background: var(--accent-red);
  color: #fff;
}

.card-quality {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(229, 9, 20, 0.85);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  padding: 2px 5px;
  border-radius: 3px;
}

.card-details {
  padding: 10px 8px 6px;
}

.card-title {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 3px;
}

.card-meta {
  font-size: 11px;
  color: var(--text-secondary);
  display: flex;
  justify-content: space-between;
}

/* ================= GRID ================= */
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 14px;
  padding: 16px 20px 40px;
}

@media (min-width: 600px) {
  .media-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
  }
}

/* ================= BOTTOM NAV (MOBILE) ================= */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(var(--bottom-nav-height) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: rgba(9, 10, 13, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 100;
}

.bottom-nav-item {
  background: none;
  border: none;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 12px;
  transition: color 0.2s ease;
}

.bottom-nav-item svg {
  width: 22px;
  height: 22px;
}

.bottom-nav-item.active, .bottom-nav-item.tv-focused {
  color: var(--accent-red);
}

/* ================= DETAIL MODAL ================= */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.modal-card {
  position: relative;
  z-index: 201;
  background: var(--bg-card);
  border-radius: 16px;
  width: 100%;
  max-width: 880px;
  max-height: 90vh;
  overflow-y: auto;
  border: 1px solid var(--border-color);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85);
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

.modal-close-btn {
  position: sticky;
  top: 16px;
  float: right;
  margin-right: 16px;
  margin-top: 16px;
  margin-bottom: -52px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(15, 15, 20, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 210;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

@media (hover: hover) {
  .modal-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
  }
}

body.tv-mode .modal-close-btn.tv-focused {
  background: var(--accent-red) !important;
  outline: 2px solid #fff;
  transform: scale(1.1);
}

.detail-header {
  position: relative;
  min-height: 280px;
  display: flex;
  align-items: flex-end;
  padding: 24px;
}

.detail-backdrop-img {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.45;
}

.detail-gradient {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(0deg, var(--bg-card) 5%, rgba(19, 22, 31, 0.8) 60%, transparent 100%);
}

.detail-meta {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 20px;
  align-items: flex-end;
  width: 100%;
}

.detail-poster-img {
  width: 120px;
  height: 180px;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.detail-info {
  flex: 1;
}

.detail-info h2 {
  font-size: clamp(20px, 3.5vw, 28px);
  font-weight: 700;
  margin-bottom: 8px;
}

.detail-tags {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.detail-genres {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 14px;
}

.detail-body {
  padding: 24px;
}

.detail-overview {
  font-size: 14px;
  line-height: 1.6;
  color: #d1d5db;
  margin-bottom: 24px;
}

.episodes-heading {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
}

.seasons-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 10px;
  margin-bottom: 16px;
  scrollbar-width: none;
}

.seasons-tabs::-webkit-scrollbar {
  display: none;
}

.season-tab {
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.season-tab.active {
  background: var(--accent-red);
  color: #fff;
  border-color: var(--accent-red);
}

.season-tab.tv-focused {
  outline: 3px solid var(--accent-red);
  transform: scale(1.05);
}

/* ================= ZENGİN BÖLÜM KARTLARI ================= */
.episodes-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: none !important;
  overflow: visible !important;
  padding-right: 0;
}

.episode-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  background: var(--bg-elevated);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.episode-item:hover, .episode-item.tv-focused {
  background: rgba(229, 9, 20, 0.2);
  border-color: var(--accent-red);
  transform: translateX(4px);
}

.episode-thumb-wrapper {
  position: relative;
  width: 96px;
  height: 56px;
  border-radius: 6px;
  overflow: hidden;
  background: #000;
  flex-shrink: 0;
}

.episode-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.episode-thumb-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 24px;
  height: 24px;
  background: rgba(0, 0, 0, 0.65);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

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

.episode-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.episode-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.episode-duration {
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 600;
  flex-shrink: 0;
}

.episode-overview {
  font-size: 11px;
  color: #8b9bb4;
  line-height: 1.35;
  margin-top: 3px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ================= FULLSCREEN VIDEO PLAYER ================= */
.player-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #000;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
}

.player-top-controls {
  position: absolute;
  top: max(24px, calc(var(--safe-top) + 14px));
  right: max(16px, calc(env(safe-area-inset-right, 0px) + 16px));
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 310;
}

.player-control-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(20, 20, 25, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity 0.3s ease, background 0.2s ease, transform 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.player-control-btn svg {
  width: 20px;
  height: 20px;
  stroke: #ffffff;
}

@media (hover: hover) {
  .player-control-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
  }
}

/* Sadece TV Kumanda Modunda ve TV'de kırmızı odaklanma */
body.tv-mode .player-control-btn.tv-focused {
  background: var(--accent-red) !important;
  outline: 2px solid #fff;
  transform: scale(1.15);
}

.video-element {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.player-loading, .player-error, .player-big-play {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: #fff;
  z-index: 20;
  text-align: center;
  padding: 20px;
  background: rgba(9, 10, 13, 0.9);
}

.player-big-play {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.big-play-circle {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: rgba(229, 9, 20, 0.9);
  box-shadow: 0 0 30px rgba(229, 9, 20, 0.6);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.big-play-circle svg {
  width: 36px;
  height: 36px;
  fill: #fff;
  margin-left: 4px;
}

.big-play-circle:hover, .player-big-play:active .big-play-circle {
  transform: scale(1.1);
  background: #ff1f2d;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(255, 255, 255, 0.15);
  border-top-color: var(--accent-red);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Responsive Hide/Show */
@media (min-width: 900px) {
  .mobile-only { display: none !important; }
}

@media (max-width: 899px) {
  .desktop-only { display: none !important; }
}

/* Tam Sayfa Akıcı Modal Deneyimi (Mobil & Tablet) */
@media (max-width: 768px) {
  .modal {
    padding: 0 !important;
    align-items: flex-start !important;
    overflow-y: auto !important;
  }
  .modal-card {
    border-radius: 0 !important;
    min-height: 100vh !important;
    max-height: none !important;
    border: none !important;
    box-shadow: none !important;
  }
  .modal-close-btn {
    position: fixed !important;
    top: calc(env(safe-area-inset-top, 0px) + 16px) !important;
    right: calc(env(safe-area-inset-right, 0px) + 16px) !important;
    margin: 0 !important;
    float: none !important;
    width: 44px !important;
    height: 44px !important;
    font-size: 24px !important;
    background: rgba(20, 22, 30, 0.9) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    touch-action: manipulation !important;
    z-index: 9999 !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6) !important;
  }
}

/* ================= RESUME TOAST (KALDIĞI YERDEN DEVAM) ================= */
.resume-toast {
  position: absolute;
  bottom: max(32px, env(safe-area-inset-bottom, 32px) + 16px);
  right: max(24px, env(safe-area-inset-right, 24px) + 16px);
  background: rgba(18, 20, 29, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50px;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  z-index: 99999;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.85);
  animation: resumeToastIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  pointer-events: auto;
}

@keyframes resumeToastIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.resume-toast.fade-out {
  opacity: 0;
  transform: translateY(12px) scale(0.96);
  transition: all 0.3s ease;
}

.resume-toast-text {
  color: #f1f3f7;
  font-size: 13.5px;
  font-weight: 400;
  letter-spacing: 0.2px;
}

.resume-toast-text b {
  color: #f5c518;
  font-weight: 600;
}

.resume-toast-btn {
  background: rgba(229, 9, 20, 0.85);
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.resume-toast-btn:hover {
  background: #ff1e27;
  transform: scale(1.05);
}

@media (max-width: 600px) {
  .resume-toast {
    left: 16px;
    right: 16px;
    bottom: max(24px, env(safe-area-inset-bottom, 24px) + 12px);
    justify-content: space-between;
    border-radius: 16px;
  }
}


/* ================= YENİ: OYNATICI BAŞLIK VE GELİŞMİŞ UX ================= */
.player-title-bar {
  position: absolute;
  top: max(24px, calc(var(--safe-top) + 14px));
  left: max(20px, calc(env(safe-area-inset-left, 0px) + 20px));
  max-width: calc(100% - 160px);
  z-index: 310;
  display: flex;
  flex-direction: column;
  gap: 3px;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.player-main-title {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-sub-title {
  font-size: 13px;
  font-weight: 500;
  color: #cbd5e1;
  text-shadow: 0 1px 6px rgba(0,0,0,0.8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Çift Dokunma İleri/Geri Sarma Animasyonu */
.seek-ripple {
  position: absolute;
  top: 50%;
  transform: translateY(-50%) scale(0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  z-index: 315;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.seek-ripple svg {
  width: 32px;
  height: 32px;
  fill: #fff;
}

.seek-ripple span {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.seek-ripple-left {
  left: 15%;
}

.seek-ripple-right {
  right: 15%;
}

.seek-ripple.show {
  opacity: 1;
  transform: translateY(-50%) scale(1.15);
}

/* Sonraki Bölüm Otomatik Geçiş Kartı */
.next-episode-card {
  position: absolute;
  bottom: max(32px, calc(env(safe-area-inset-bottom, 24px) + 20px));
  right: max(24px, calc(env(safe-area-inset-right, 0px) + 24px));
  background: rgba(18, 22, 34, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  padding: 16px 20px;
  box-shadow: 0 15px 35px rgba(0,0,0,0.7);
  z-index: 320;
  max-width: 320px;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.next-ep-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.next-ep-tag {
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: #e50914;
}

.next-ep-close-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 22px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

.next-ep-close-btn:hover {
  color: #fff;
}

.next-ep-title {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.next-ep-countdown {
  font-size: 12.5px;
  color: #94a3b8;
  margin-bottom: 12px;
}

.next-ep-actions {
  display: flex;
  gap: 8px;
}

.btn-sm {
  padding: 7px 14px !important;
  font-size: 12px !important;
  border-radius: 8px !important;
}

/* Bölüm Listesi İlerleme Çubuğu ve İzlendi Rozeti */
.episode-thumb-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.2);
  z-index: 5;
}

.episode-thumb-progress-fill {
  height: 100%;
  background: #e50914;
  border-radius: 0 2px 2px 0;
}

.episode-watched-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  background: rgba(16, 185, 129, 0.95);
  color: #fff;
  font-size: 9.5px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.4px;
  backdrop-filter: blur(4px);
  z-index: 5;
}

@media (max-width: 600px) {
  .next-episode-card {
    left: 16px;
    right: 16px;
    max-width: none;
    bottom: max(24px, calc(env(safe-area-inset-bottom, 24px) + 12px));
  }
}

/* ================= YENİ: KUSURSUZ GÖMÜLÜ İÇERİK & OYNATICI SAYFASI ================= */
.watch-page-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  background: #090a0d;
  z-index: 200;
  overflow-y: scroll; /* iOS Safari composited momentum scroll için scroll şart */
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  touch-action: pan-y;
  display: none;
  padding: 0;
}

.watch-page-modal.open {
  display: block !important; /* Flexbox yerine block: iOS WebKit dikey scroll kilidini tamamen çözer */
}

.watch-page-container {
  width: 100%;
  min-height: 100%;
  display: block; /* Standart akış: Sırasıyla navbar, player ve açıklamalar alt alta */
  padding-bottom: max(40px, env(safe-area-inset-bottom, 40px));
}

body.modal-open {
  overflow: hidden !important;
}

/* Üst Navigasyon Barı */
.watch-nav-bar {
  position: sticky;
  top: 0;
  z-index: 250;
  background: rgba(9, 10, 13, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: max(12px, calc(env(safe-area-inset-top, 0px) + 8px)) max(16px, calc(env(safe-area-inset-right, 0px) + 16px)) 12px max(16px, calc(env(safe-area-inset-left, 0px) + 16px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.watch-back-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  color: #fff;
  padding: 8px 16px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.watch-back-btn svg {
  width: 18px;
  height: 18px;
  stroke: #fff;
}

.watch-back-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateX(-2px);
}

body.tv-mode .watch-back-btn.tv-focused {
  background: var(--accent-red) !important;
  outline: 2px solid #fff;
  transform: scale(1.08);
}

.watch-nav-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 55%;
  overflow: hidden;
}

.watch-nav-title {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.watch-action-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.watch-action-btn svg {
  width: 18px;
  height: 18px;
  stroke: #fff;
}

.watch-action-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}

/* 16:9 Gömülü Video Oynatıcı Alanı */
.embedded-player-wrapper {
  position: relative;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  aspect-ratio: 16 / 9 !important;
  min-height: 200px; /* Küçük ekranlarda (iPhone 7) 0px'e çöküşü kesin engeller */
  background: #000;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.8);
  display: block;
}

/* Eski iOS Safari (iOS 14 ve altı) için 16:9 Oran Güvencesi */
@supports not (aspect-ratio: 16 / 9) {
  .embedded-player-wrapper {
    padding-top: 56.25% !important; /* 9 / 16 = 56.25% */
    height: 0 !important;
    min-height: 0 !important;
  }
}

@media (min-width: 900px) {
  .embedded-player-wrapper {
    border-radius: 16px;
    margin-top: 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
  }
}

.embedded-video,
video.video-element {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  background: #000 !important;
  z-index: 2 !important;
  display: block !important;
}

/* Başlangıç Posteri ve Büyük Oynat Butonu */
.player-poster-overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #000;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  transition: opacity 0.3s ease;
}

.player-poster-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(0.65);
  transform: scale(1.02);
  pointer-events: none;
  transition: transform 0.4s ease;
}

.player-poster-gradient {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at center, rgba(0,0,0,0.2) 0%, rgba(9,10,13,0.85) 100%);
}

.center-play-group {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.center-play-button {
  position: relative;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: var(--accent-red, #e50914);
  border: none;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(229, 9, 20, 0.5);
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.center-play-button svg {
  width: 30px;
  height: 30px;
  margin-left: 3px;
  fill: #fff;
}

.player-poster-overlay:hover .center-play-button,
.center-play-group:hover .center-play-button {
  transform: scale(1.12);
  box-shadow: 0 10px 30px rgba(229, 9, 20, 0.7);
}

body.tv-mode .center-play-button.tv-focused {
  outline: 3px solid #fff;
  transform: scale(1.18);
}

.center-play-label {
  position: relative;
  margin-top: 12px;
  font-size: 14.5px;
  font-weight: 700;
  color: #fff;
  pointer-events: none;
  text-shadow: 0 2px 8px rgba(0,0,0,0.8);
  transition: color 0.2s ease;
}

.player-poster-overlay:hover .center-play-label,
.center-play-group:hover .center-play-label {
  color: #ff4d58;
}

/* Oynatıcının Altındaki Bilgi Bölümü */
.watch-meta-container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px 16px 12px;
}

.watch-meta-header {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

@media (min-width: 768px) {
  .watch-meta-header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.watch-titles {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.watch-title {
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  margin: 0;
  line-height: 1.2;
}

.watch-sub-title {
  font-size: 14.5px;
  font-weight: 600;
  color: #38bdf8;
}

.watch-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.watch-genres {
  font-size: 13px;
  color: #94a3b8;
  margin: 0 0 12px 0;
}

.watch-overview {
  font-size: 14px;
  line-height: 1.6;
  color: #cbd5e1;
  margin: 0;
  max-width: 900px;
}

/* Sezonlar ve Bölüm Listesi */
.watch-episodes-section {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 10px 16px 40px;
}

.watch-episodes-section .episodes-heading {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 14px;
}

/* Aktif / Oynatılan Bölüm Vurgusu */
.episode-item.episode-active {
  background: rgba(229, 9, 20, 0.15) !important;
  border-color: rgba(229, 9, 20, 0.5) !important;
}

.episode-item.episode-active .episode-title {
  color: #ff4d58 !important;
}

/* ================= TV KUMANDA ODAK STİLLERİ (WATCH SAYFASI) ================= */
.watch-back-btn.tv-focused,
.watch-back-btn:focus-visible {
  background: var(--accent-red) !important;
  color: #fff !important;
  outline: 3px solid #fff !important;
  transform: scale(1.08) !important;
  box-shadow: 0 0 16px rgba(229, 9, 20, 0.8) !important;
}

.watch-action-btn.tv-focused,
.watch-action-btn:focus-visible {
  background: var(--accent-red) !important;
  outline: 3px solid #fff !important;
  transform: scale(1.1) !important;
  box-shadow: 0 0 16px rgba(229, 9, 20, 0.8) !important;
}

.center-play-button.tv-focused,
.center-play-button:focus-visible {
  transform: scale(1.2) !important;
  background: #ff1f2d !important;
  outline: 4px solid #fff !important;
  box-shadow: 0 0 35px rgba(229, 9, 20, 0.95), 0 0 60px rgba(229, 9, 20, 0.5) !important;
}

.season-tab.tv-focused,
.season-tab:focus-visible {
  background: var(--accent-red) !important;
  color: #fff !important;
  outline: 3px solid #fff !important;
  transform: scale(1.06) !important;
  box-shadow: 0 0 16px rgba(229, 9, 20, 0.7) !important;
}

.episode-item.tv-focused,
.episode-item:focus-visible {
  background: rgba(229, 9, 20, 0.3) !important;
  border-color: var(--accent-red) !important;
  outline: 3px solid #fff !important;
  transform: translateX(8px) scale(1.02) !important;
  box-shadow: 0 4px 20px rgba(229, 9, 20, 0.6) !important;
  z-index: 5;
}

video.embedded-video.tv-focused,
video.embedded-video:focus-visible {
  outline: 3px solid var(--accent-red) !important;
  box-shadow: 0 0 25px rgba(229, 9, 20, 0.7) !important;
}

.resume-toast-btn.tv-focused,
.resume-toast-btn:focus-visible {
  background: var(--accent-red) !important;
  outline: 2px solid #fff !important;
  transform: scale(1.08) !important;
}

/* Kurumsal Bölüm ve Puan İkonları (Emojisiz Tasarım) */
.section-icon {
  width: 22px;
  height: 22px;
  display: inline-block;
  vertical-align: middle;
  margin-right: 8px;
  color: var(--primary, #00d2ff);
  flex-shrink: 0;
}

.section-title {
  display: flex !important;
  align-items: center !important;
  gap: 8px;
}

.star-icon {
  width: 12px;
  height: 12px;
  display: inline-block;
  vertical-align: -1px;
  margin-right: 3px;
  color: #ffb800;
  fill: currentColor;
}

.rating-badge .star-icon,
.badge.rating-badge .star-icon {
  color: #000 !important;
  fill: #000 !important;
}


/* ================= HERO CAROUSEL CONTROLS ================= */
.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  opacity: 0.6;
}
.hero-arrow:hover {
  background: rgba(229, 9, 20, 0.9);
  border-color: rgba(229, 9, 20, 1);
  transform: translateY(-50%) scale(1.12);
  opacity: 1;
  box-shadow: 0 0 16px rgba(229, 9, 20, 0.6);
}
.hero-prev { left: 24px; }
.hero-next { right: 24px; }

.hero-dots {
  position: absolute;
  bottom: 22px;
  right: 40px;
  z-index: 10;
  display: flex;
  gap: 8px;
  align-items: center;
}
.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.hero-dot:hover {
  background: rgba(255, 255, 255, 0.7);
}
.hero-dot.active {
  width: 32px;
  border-radius: 5px;
  background: var(--primary, #e50914);
  box-shadow: 0 0 12px rgba(229, 9, 20, 0.8);
}
@media (max-width: 768px) {
  .hero-arrow {
    display: flex;
    width: 36px;
    height: 36px;
    font-size: 20px;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.2);
    opacity: 0.85;
  }
  .hero-prev { left: 8px; }
  .hero-next { right: 8px; }
  .hero-dots {
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    right: auto;
  }
}

/* Telif & Taslak Bildirim Kartı (Netflix Style) */
.player-notice-box {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, rgba(20, 20, 20, 0.96) 0%, rgba(10, 10, 10, 0.99) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 40;
  padding: 24px;
  text-align: center;
  backdrop-filter: blur(8px);
}
.player-notice-content {
  max-width: 520px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  animation: fadeInNotice 0.3s ease;
}
@keyframes fadeInNotice {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}
.player-notice-icon {
  font-size: 48px;
  line-height: 1;
  filter: drop-shadow(0 4px 12px rgba(229, 9, 20, 0.4));
}
.player-notice-title {
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.3px;
  margin: 0;
}
.player-notice-text {
  color: #b3b3b3;
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
}
.player-notice-actions {
  display: flex;
  gap: 12px;
  margin-top: 10px;
  flex-wrap: wrap;
  justify-content: center;
}
.player-notice-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.player-notice-trailer {
  background: #e50914;
  color: #fff;
  border: none;
  box-shadow: 0 4px 14px rgba(229, 9, 20, 0.4);
}
.player-notice-trailer:hover {
  background: #b80710;
  transform: translateY(-2px);
}
.player-notice-back {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.player-notice-back:hover {
  background: rgba(255, 255, 255, 0.2);
}
