/**
 * Nediyo 9:16 Dikey Video Oynatıcı & Bölüm Seçici Bileşeni (CSS)
 * 
 * Tasarım Sistemi: tokens.json v2.7.0 (Koyu Petrol & Bakır Teması)
 * Standartlar: Apple iOS 18 HIG (≥44pt dokunma alanı), 100dvh, sıfır CLS, WCAG 2.2 AAA
 * Görev: INF-5753 (INF-5619 UX spesifikasyonu temelinde)
 */

:root {
  --nd-player-bg: #0E1617;
  --nd-player-surface: #162426;
  --nd-player-surface-raised: #1F3336;
  --nd-player-surface-active: #263F42;
  --nd-player-border: #2A4548;
  --nd-player-divider: #1C3336;

  --nd-player-text-primary: #F6EFDF;
  --nd-player-text-secondary: #B8B5A8;
  --nd-player-text-secondary-aaa: #C5C2B6;
  --nd-player-text-tertiary: #A8B0AC;
  --nd-player-text-tertiary-aaa: #C5C2B6;

  --nd-player-accent: #E58A5E;
  --nd-player-accent-dark: #B04C28;
  --nd-player-accent-light: #F29D74;
  --nd-player-accent-aaa: #F29D74;

  --nd-player-overlay-scrim: rgba(14, 22, 23, 0.88);
  --nd-player-touch-min: 44px;
  --nd-player-radius-modal: 36px;
  --nd-player-radius-card: 14px;
  --nd-player-radius-pill: 9999px;
  --nd-player-font: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ========================================================= */
/* BACKDROP & MODAL ROOT                                     */
/* ========================================================= */
.nediyo-player-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s cubic-bezier(0.2, 0.8, 0.4, 1);
  contain: strict;
}

.nediyo-player-backdrop.is-active {
  opacity: 1;
  pointer-events: auto;
}

/* 9:16 Oynatıcı Çerçevesi */
.nediyo-player-frame {
  width: 430px;
  height: 932px;
  max-width: 100vw;
  max-height: 98vh;
  background: var(--nd-player-bg);
  border-radius: var(--nd-player-radius-modal);
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.08);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: translateY(20px) scale(0.97);
  transition: transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: auto;
  font-family: var(--nd-player-font);
  color: var(--nd-player-text-primary);
  user-select: none;
  -webkit-user-select: none;
  contain: layout size;
}

.nediyo-player-frame.is-animating,
.nediyo-player-frame.is-dragging {
  will-change: transform;
}

.nediyo-player-backdrop.is-active .nediyo-player-frame {
  transform: translateY(0) scale(1);
}

/* Mobil 100dvh Tam Ekran Modu */
@media (max-width: 860px) {
  .nediyo-player-backdrop {
    background: #000;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .nediyo-player-frame {
    width: 100vw !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    border: none !important;
    position: fixed;
    inset: 0;
    overflow: hidden !important;
    overscroll-behavior: none !important;
  }
}

/* ========================================================= */
/* 9:16 MEDYA VE CANVAS SAHNESİ                              */
/* ========================================================= */
.nediyo-player-media-stage {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--nd-player-bg);
  z-index: 1;
}

.nediyo-player-media-box {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: calc(100dvh * 9 / 16);
  max-height: calc(100vw * 16 / 9);
  aspect-ratio: 9 / 16;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.nediyo-player-media-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.nediyo-player-native-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  z-index: 2;
  background: transparent;
}

/* ========================================================= */
/* DOKUNMATİK JESTUR YÜZEYİ & RIPPLE                          */
/* ========================================================= */
.nediyo-player-gesture-surface {
  position: absolute;
  inset: 0;
  z-index: 10;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-touch-callout: none;
}

/* Çift Dokunuş Ripple Dalgası */
.nediyo-player-ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(229, 138, 94, 0.38);
  transform: translate(-50%, -50%) scale(0);
  animation: ndPlayerRipple 0.65s cubic-bezier(0.2, 0.8, 0.4, 1) forwards;
  pointer-events: none;
  z-index: 15;
}

@keyframes ndPlayerRipple {
  0% { transform: translate(-50%, -50%) scale(0.2); opacity: 0.95; }
  100% { transform: translate(-50%, -50%) scale(3.2); opacity: 0; }
}

/* ±5 sn Dinamik Sarma Rozet Hapı */
.nediyo-player-seek-pill {
  position: absolute;
  top: 48%;
  background: rgba(14, 22, 23, 0.92);
  border: 1.5px solid var(--nd-player-accent);
  color: #FFF;
  padding: 10px 18px;
  border-radius: var(--nd-player-radius-pill);
  font-size: 15px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  z-index: 25;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.65);
}

.nediyo-player-seek-pill.is-left {
  left: 32px;
  transform: translateY(-50%) translateX(-15px);
}

.nediyo-player-seek-pill.is-right {
  right: 32px;
  transform: translateY(-50%) translateX(15px);
}

.nediyo-player-seek-pill.is-active {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

/* 2× Hızlandırma Bildirim Toast'ı */
.nediyo-player-speed-toast {
  position: absolute;
  top: 96px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: rgba(229, 138, 94, 0.96);
  color: #0E1617;
  padding: 8px 18px;
  border-radius: var(--nd-player-radius-pill);
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  z-index: 35;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 6px 20px rgba(229, 138, 94, 0.4);
}

.nediyo-player-speed-toast.is-active {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Merkez Oynat/Duraklat Rozeti */
.nediyo-player-center-indicator {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(14, 22, 23, 0.86);
  border: 2px solid var(--nd-player-accent);
  color: #FFF;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 25;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.75);
}

.nediyo-player-center-indicator.is-active {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* ========================================================= */
/* ÜST KONTROL VE JESTUR ÇUBUĞU                               */
/* ========================================================= */
.nediyo-player-top-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: max(74px, calc(env(safe-area-inset-top, 59px) + 16px)) 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: linear-gradient(180deg, rgba(14, 22, 23, 0.96) 0%, rgba(14, 22, 23, 0.72) 65%, transparent 100%);
  z-index: 30;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.nediyo-player-top-bar.is-hidden {
  opacity: 0;
  pointer-events: none;
}

/* Drag Handle (Aşağı Kaydırma Tutamacı) */
.nediyo-player-drag-handle {
  position: absolute;
  top: max(71px, calc(env(safe-area-inset-top, 59px) + 12px));
  left: 50%;
  transform: translateX(-50%);
  width: 44px;
  height: 5px;
  background: rgba(255, 255, 255, 0.35);
  border-radius: var(--nd-player-radius-pill);
  cursor: grab;
  touch-action: none;
  z-index: 35;
}

@media (min-width: 861px) {
  .nediyo-player-drag-handle { top: 12px; }
  .nediyo-player-top-bar { padding-top: 24px; }
}

.nediyo-player-drag-handle::before {
  content: "";
  position: absolute;
  top: -20px;
  bottom: -20px;
  left: -16px;
  right: -16px;
}

/* Ses HUD Bildirim Kartı (Toast) */
.nediyo-player-audio-toast {
  position: absolute;
  /* Anchor below the complete header, including wrapped titles and safe area. */
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  background: rgba(14, 22, 23, 0.94);
  border: 1px solid var(--nd-player-border);
  color: var(--nd-player-text-primary);
  padding: 6px 14px;
  border-radius: var(--nd-player-radius-pill);
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  z-index: 45;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
}

.nediyo-player-audio-toast.is-active {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.nediyo-player-audio-toast-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--nd-player-accent);
}

.nediyo-player-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
}

.nediyo-player-category-badge {
  background: rgba(229, 138, 94, 0.2);
  border: 1px solid rgba(229, 138, 94, 0.5);
  color: var(--nd-player-accent);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--nd-player-radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.nediyo-player-soon-badge {
  background: rgba(235, 201, 164, 0.15);
  border: 1px solid rgba(235, 201, 164, 0.4);
  color: #EBC9A4;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: var(--nd-player-radius-pill);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.nediyo-player-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #EBC9A4;
  display: inline-block;
}

.nediyo-player-drawer-soon-tag {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #EBC9A4;
  background: rgba(235, 201, 164, 0.12);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgba(235, 201, 164, 0.3);
}

.nediyo-player-btn-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Apple HIG ≥44×44 pt İkon Butonları */
.nediyo-player-icon-btn {
  width: var(--nd-player-touch-min);
  height: var(--nd-player-touch-min);
  min-width: var(--nd-player-touch-min);
  min-height: var(--nd-player-touch-min);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #FFF;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transition: background 0.15s ease, transform 0.1s ease;
  padding: 0;
}

.nediyo-player-icon-btn:active {
  transform: scale(0.92);
}

.nediyo-player-book-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nediyo-player-book-title {
  font-size: 18px;
  font-weight: 700;
  color: #FFF;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
  line-height: 22px;
}

.nediyo-player-chapter-subtitle {
  font-size: 13px;
  color: var(--nd-player-accent-light);
  font-weight: 600;
  line-height: 17px;
}

/* ========================================================= */
/* KARAOKE ALTYAZI KUTUSU                                    */
/* ========================================================= */
.nediyo-player-karaoke-box {
  position: absolute;
  bottom: 280px;
  left: 20px;
  right: 20px;
  background: rgba(14, 22, 23, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.14);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border-radius: 16px;
  padding: 12px 16px;
  color: #FFF;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
  z-index: 25;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.6);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.nediyo-player-karaoke-box.is-hidden {
  opacity: 0;
}

.nediyo-player-karaoke-highlight {
  color: var(--nd-player-accent);
  font-weight: 700;
  background: rgba(229, 138, 94, 0.15);
  padding: 2px 4px;
  border-radius: 4px;
}

/* ========================================================= */
/* SCRUBBER & ZAMAN ÇUBUĞU                                   */
/* ========================================================= */
.nediyo-player-scrubber-bar {
  position: absolute;
  bottom: 224px;
  left: 20px;
  right: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 25;
  transition: opacity 0.25s ease;
}

.nediyo-player-scrubber-bar.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.nediyo-player-scrubber-track {
  flex: 1;
  height: var(--nd-player-touch-min); /* Apple HIG min 44pt touch hitbox */
  display: flex;
  align-items: center;
  cursor: pointer;
  position: relative;
  touch-action: none;
}

.nediyo-player-scrubber-rail {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: var(--nd-player-radius-pill);
  position: relative;
  overflow: hidden;
}

.nediyo-player-scrubber-fill {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 0%;
  background: var(--nd-player-accent);
  border-radius: var(--nd-player-radius-pill);
  transition: width 0.08s linear;
}

.nediyo-player-scrubber-thumb {
  position: absolute;
  left: 0%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #FFF;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
  transition: left 0.08s linear, transform 0.15s ease;
  pointer-events: none;
}

.nediyo-player-scrubber-track:active .nediyo-player-scrubber-thumb,
.nediyo-player-scrubber-thumb.is-dragging {
  transform: translate(-50%, -50%) scale(1.35);
}

.nediyo-player-time-label {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  font-variant-numeric: tabular-nums;
  min-width: 64px;
  text-align: right;
}

/* ========================================================= */
/* YATAY BÖLÜM SEÇİCİ KARUSELİ                               */
/* ========================================================= */
.nediyo-player-carousel-bar {
  position: absolute;
  bottom: 84px;
  left: 0;
  right: 0;
  z-index: 25;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 0 4px;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.nediyo-player-carousel-bar.is-hidden {
  opacity: 0;
  pointer-events: none;
}

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

.nediyo-player-carousel-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--nd-player-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.nediyo-player-btn-see-all {
  background: none;
  border: none;
  color: var(--nd-player-accent);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: var(--nd-player-touch-min);
  padding: 10px 8px;
  font-family: inherit;
}

.nediyo-player-scroll-row {
  display: flex;
  gap: 10px;
  padding: 0 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.nediyo-player-scroll-row::-webkit-scrollbar {
  display: none;
}

.nediyo-player-chapter-chip {
  flex: 0 0 135px;
  height: 82px;
  background: rgba(22, 36, 38, 0.85);
  border: 1px solid var(--nd-player-border);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-radius: var(--nd-player-radius-card);
  padding: 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  scroll-snap-align: start;
  transition: all 0.15s ease;
  position: relative;
  overflow: hidden;
}

.nediyo-player-chapter-chip.is-active {
  background: rgba(229, 138, 94, 0.18);
  border-color: var(--nd-player-accent);
  box-shadow: 0 4px 16px rgba(229, 138, 94, 0.25);
}

.nediyo-player-chip-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nediyo-player-chip-num {
  font-size: 11px;
  font-weight: 700;
  color: var(--nd-player-accent);
}

.nediyo-player-chip-tag {
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.nediyo-player-chip-tag.is-watching {
  background: var(--nd-player-accent);
  color: #0E1617;
}

.nediyo-player-chip-tag.is-locked {
  background: rgba(255, 255, 255, 0.12);
  color: var(--nd-player-text-secondary);
}

.nediyo-player-chip-title {
  font-size: 11px;
  font-weight: 600;
  color: #FFF;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.nediyo-player-chip-duration {
  font-size: 11px;
  color: var(--nd-player-text-secondary);
  font-variant-numeric: tabular-nums;
}

/* ========================================================= */
/* YAPIŞKAN DÖNÜŞÜM DOKU (APP STORE CTA)                     */
/* ========================================================= */
.nediyo-player-dock {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  min-height: calc(56px + env(safe-area-inset-bottom, 34px));
  height: auto;
  background: var(--nd-player-bg);
  border-top: 1px solid var(--nd-player-divider);
  padding: 10px 20px max(24px, env(safe-area-inset-bottom, 34px));
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 30;
}

.nediyo-player-dock-text {
  display: flex;
  flex-direction: column;
}

.nediyo-player-dock-main {
  font-size: 12px;
  font-weight: 700;
  color: var(--nd-player-text-primary);
}

.nediyo-player-dock-sub {
  font-size: 11px;
  color: var(--nd-player-text-secondary);
}

.nediyo-player-btn-dock {
  background: #FFF;
  color: #0E1617;
  height: var(--nd-player-touch-min);
  min-height: var(--nd-player-touch-min);
  padding: 10px 18px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
  transition: transform 0.15s ease;
  font-family: inherit;
}

.nediyo-player-btn-dock:active {
  transform: scale(0.96);
}

/* ========================================================= */
/* BÖLÜM SEÇİCİ ÇEKMECESİ (DRAWER SHEET)                     */
/* ========================================================= */
.nediyo-player-drawer {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(14, 22, 23, 0.96);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  z-index: 60;
  display: flex;
  flex-direction: column;
  border-top-left-radius: var(--nd-player-radius-modal);
  border-top-right-radius: var(--nd-player-radius-modal);
  transform: translateY(100%);
  transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1);
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.85);
  touch-action: pan-y;
}

.nediyo-player-drawer.is-open {
  transform: translateY(120px);
}

.nediyo-player-drawer-handle {
  width: 44px;
  height: 5px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: var(--nd-player-radius-pill);
  margin: 12px auto 14px;
  cursor: pointer;
  position: relative;
  touch-action: none;
}

.nediyo-player-drawer-handle::before {
  content: "";
  position: absolute;
  top: -20px;
  bottom: -20px;
  left: -16px;
  right: -16px;
}

.nediyo-player-drawer-header {
  padding: 0 20px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--nd-player-divider);
}

.nediyo-player-drawer-header h4 {
  font-size: 16px;
  font-weight: 700;
  color: #FFF;
  margin: 0;
}

.nediyo-player-drawer-meta {
  font-size: 12px;
  color: var(--nd-player-accent);
}

.nediyo-player-drawer-list {
  flex: 1;
  overflow-y: auto;
  padding: 14px 20px 140px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  -webkit-overflow-scrolling: touch;
}

.nediyo-player-drawer-item {
  background: var(--nd-player-surface-raised);
  border: 1px solid var(--nd-player-border);
  border-radius: var(--nd-player-radius-card);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.15s ease;
  min-height: 56px;
}

.nediyo-player-drawer-item.is-active {
  background: rgba(229, 138, 94, 0.15);
  border-color: var(--nd-player-accent);
}

.nediyo-player-drawer-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nediyo-player-drawer-item-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--nd-player-bg);
  color: var(--nd-player-accent);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nediyo-player-drawer-item-titles {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nediyo-player-drawer-item-title {
  font-size: 13px;
  font-weight: 600;
  color: #FFF;
}

.nediyo-player-drawer-item-sub {
  font-size: 11px;
  color: var(--nd-player-text-secondary);
}

/* ========================================================= */
/* COMPLETED STATE / FRAGMAN SONU KARTI                       */
/* ========================================================= */
.nediyo-player-completed {
  position: absolute;
  inset: 0;
  background: rgba(14, 22, 23, 0.96);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  z-index: 55;
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 20px;
  padding: max(72px, calc(env(safe-area-inset-top, 59px) + 16px)) max(20px, calc(env(safe-area-inset-left, 0px) + 20px)) max(34px, calc(env(safe-area-inset-bottom, 34px) + 16px)) max(20px, calc(env(safe-area-inset-right, 0px) + 20px));
  box-sizing: border-box;
  animation: ndPlayerFadeIn 0.32s cubic-bezier(0.2, 0.0, 0, 1.0) forwards;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  contain: layout style;
}

.nediyo-player-completed.is-active {
  display: flex;
}

@keyframes ndPlayerFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.nediyo-player-completed-card {
  position: relative;
  background: #142022;
  border: 1px solid var(--nd-player-border);
  border-radius: 20px;
  padding: 24px 20px;
  text-align: center;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.70), 0 0 0 1px rgba(242, 157, 116, 0.12);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 382px;
  box-sizing: border-box;
  animation: ndCardPop 0.38s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes ndCardPop {
  0% {
    transform: scale(0.92) translateY(12px);
    opacity: 0;
  }
  100% {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

.nediyo-player-completed-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--nd-player-text-secondary-aaa);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  z-index: 2;
  -webkit-tap-highlight-color: transparent;
}

.nediyo-player-completed-close:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #FFFFFF;
}

.nediyo-player-completed-badge {
  background: linear-gradient(135deg, #F29D74 0%, #E58A5E 100%);
  color: #0E1617;
  font-size: 11px;
  line-height: 14px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: var(--nd-player-radius-pill);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 10px rgba(229, 138, 94, 0.35);
  animation: ndBadgePop 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.1s backwards;
}

@keyframes ndBadgePop {
  0% {
    transform: scale(0.75);
    opacity: 0;
  }
  65% {
    transform: scale(1.08);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.nediyo-player-completed-title {
  font-size: 20px;
  line-height: 26px;
  font-weight: 700;
  color: #FFFFFF;
  letter-spacing: -0.3px;
  text-wrap: balance;
  margin: 0;
}

.nediyo-player-completed-streak {
  font-size: 13px;
  line-height: 18px;
  color: var(--nd-player-accent-aaa);
  font-weight: 600;
  letter-spacing: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.nediyo-player-completed-takeaways {
  text-align: left;
  background: #0B1213;
  border: 1px solid var(--nd-player-border);
  border-radius: 14px;
  padding: 14px 16px;
  width: 100%;
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-sizing: border-box;
}

.nediyo-player-takeaways-header {
  font-size: 11px;
  line-height: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--nd-player-text-tertiary-aaa);
  display: flex;
  align-items: center;
  gap: 6px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(42, 69, 72, 0.45);
}

.nediyo-player-takeaway-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  line-height: 18px;
  color: var(--nd-player-text-secondary-aaa);
  animation: ndTakeawaySlide 0.35s cubic-bezier(0.0, 0.0, 0.2, 1) backwards;
}

.nediyo-player-takeaway-item:nth-of-type(1) { animation-delay: 0.16s; }
.nediyo-player-takeaway-item:nth-of-type(2) { animation-delay: 0.24s; }
.nediyo-player-takeaway-item:nth-of-type(3) { animation-delay: 0.32s; }

@keyframes ndTakeawaySlide {
  0% {
    transform: translateY(6px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

.nediyo-player-takeaway-num {
  width: 18px;
  height: 18px;
  min-width: 18px;
  border-radius: 6px;
  background: rgba(242, 157, 116, 0.15);
  border: 1px solid rgba(242, 157, 116, 0.35);
  color: var(--nd-player-accent-aaa);
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-variant-numeric: tabular-nums;
  margin-top: 1px;
  flex-shrink: 0;
}

.nediyo-player-takeaway-body {
  flex: 1;
  letter-spacing: -0.1px;
}

.nediyo-player-takeaway-body strong {
  color: var(--nd-player-accent-aaa);
  font-weight: 700;
}

.nediyo-player-completed-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 382px;
  box-sizing: border-box;
}

.nediyo-player-btn-completed-appstore {
  background: #FFFFFF;
  color: #0E1617;
  height: 52px;
  min-height: 52px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.2px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45), 0 0 24px rgba(229, 138, 94, 0.32);
  font-family: inherit;
  transition: transform 0.12s ease, filter 0.12s ease, box-shadow 0.12s ease;
  animation: ndActionSlide 0.38s cubic-bezier(0.0, 0.0, 0.2, 1) 0.32s backwards;
  -webkit-tap-highlight-color: transparent;
}

.nediyo-player-btn-completed-appstore:hover {
  filter: brightness(1.03);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5), 0 0 28px rgba(229, 138, 94, 0.45);
}

.nediyo-player-btn-completed-appstore:active {
  transform: scale(0.97) translateY(0);
  filter: brightness(0.95);
}

.nediyo-player-btn-next-chapter {
  background: var(--nd-player-surface-raised);
  border: 1px solid var(--nd-player-border);
  color: #FFFFFF;
  height: 44px;
  min-height: 44px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.1px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease;
  animation: ndActionSlide 0.38s cubic-bezier(0.0, 0.0, 0.2, 1) 0.40s backwards;
  -webkit-tap-highlight-color: transparent;
}

.nediyo-player-btn-next-chapter:hover {
  background: #263F42;
  border-color: var(--nd-player-accent-aaa);
}

.nediyo-player-btn-next-chapter:active {
  transform: scale(0.98);
}

.nediyo-player-countdown-label {
  font-variant-numeric: tabular-nums;
}

@keyframes ndActionSlide {
  0% {
    transform: translateY(10px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ========================================================= */
/* YÜKLENİYOR / BUFFER SPINNER                               */
/* ========================================================= */
.nediyo-player-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  z-index: 40;
  pointer-events: none;
}

.nediyo-player-loading.is-active {
  display: flex;
}

.nediyo-player-spinner {
  width: var(--nd-player-touch-min);
  height: var(--nd-player-touch-min);
  border: 3px solid rgba(229, 138, 94, 0.2);
  border-top-color: var(--nd-player-accent);
  border-radius: 50%;
  animation: ndPlayerSpin 0.8s linear infinite;
}

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

.nediyo-player-loading-text {
  font-size: 12px;
  color: var(--nd-player-text-secondary);
  font-weight: 600;
}

/* ========================================================= */
/* KOMPAKT VE STANDART MOBİL EKRANLAR İÇİN SAFE ZONE AYARI   */
/* ========================================================= */
@media (max-height: 860px) {
  .nediyo-player-karaoke-box {
    bottom: 236px;
  }
  .nediyo-player-scrubber-bar {
    bottom: 190px;
  }
  .nediyo-player-carousel-bar {
    bottom: 74px;
  }
}

@media (max-height: 740px) {
  .nediyo-player-completed {
    padding-top: max(48px, calc(env(safe-area-inset-top, 40px) + 8px));
    padding-bottom: max(24px, calc(env(safe-area-inset-bottom, 24px) + 8px));
    gap: 12px;
  }
  .nediyo-player-completed-card {
    padding: 16px 14px;
    gap: 8px;
  }
  .nediyo-player-completed-title {
    font-size: 18px;
    line-height: 22px;
  }
  .nediyo-player-completed-takeaways {
    padding: 10px 12px;
    gap: 6px;
  }
}
