/* AYBÜ ÖĞMER - Premium Video Player */

/* ── Player Container ── */
.aybu-player {
  position: relative;
  width: 100%;
  background: #0f0f14;
  border-radius: var(--radius2);
  overflow: hidden;
  aspect-ratio: 16/9;
  user-select: none;
  box-shadow: 0 4px 24px rgba(0,0,0,.35);
}
.aybu-player video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #000;
}
.aybu-player.fullscreen {
  border-radius: 0;
  position: fixed;
  inset: 0;
  z-index: 9999;
  aspect-ratio: auto;
}

/* ── Loading Spinner ── */
.player-loader {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15,15,20,.6);
  z-index: 10;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
}
.aybu-player.loading .player-loader {
  opacity: 1;
  pointer-events: auto;
}
.player-loader .spinner {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(255,255,255,.15);
  border-top-color: var(--accent, #5b2bd9);
  border-radius: 50%;
  animation: playerSpin .8s linear infinite;
}
@keyframes playerSpin {
  to { transform: rotate(360deg); }
}

/* ── Big Play Button (center) ── */
.player-big-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  cursor: pointer;
  background: rgba(0,0,0,.25);
  transition: opacity .3s;
}
.aybu-player.playing .player-big-play,
.aybu-player.loading .player-big-play {
  opacity: 0;
  pointer-events: none;
}
.player-big-play .play-circle {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(91,43,217,.85);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .2s, background .2s;
  box-shadow: 0 4px 20px rgba(91,43,217,.4);
}
.player-big-play:hover .play-circle {
  transform: scale(1.1);
  background: rgba(91,43,217,1);
}
.player-big-play .play-circle svg {
  width: 28px;
  height: 28px;
  fill: #fff;
  margin-left: 3px;
}

/* ── Controls Bar ── */
.player-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 15;
  background: linear-gradient(transparent, rgba(10,10,18,.92));
  padding: 32px 14px 10px;
  opacity: 0;
  transition: opacity .3s;
}
.aybu-player:hover .player-controls,
.aybu-player.paused .player-controls,
.aybu-player.controls-visible .player-controls {
  opacity: 1;
}

/* ── Progress Bar ── */
.player-progress {
  position: relative;
  width: 100%;
  height: 4px;
  background: rgba(255,255,255,.18);
  border-radius: 4px;
  cursor: pointer;
  margin-bottom: 8px;
  transition: height .15s;
}
.player-progress:hover {
  height: 7px;
}
.player-progress .progress-buffered {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: rgba(255,255,255,.2);
  border-radius: 4px;
  pointer-events: none;
}
.player-progress .progress-filled {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: var(--accent, #5b2bd9);
  border-radius: 4px;
  pointer-events: none;
  transition: width .1s linear;
}
.player-progress .progress-thumb {
  position: absolute;
  top: 50%;
  width: 14px;
  height: 14px;
  background: #fff;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 1px 4px rgba(0,0,0,.4);
  opacity: 0;
  transition: opacity .15s;
  pointer-events: none;
}
.player-progress:hover .progress-thumb {
  opacity: 1;
}

/* ── Controls Row ── */
.player-controls-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.player-controls-row .spacer {
  flex: 1;
}

/* ── Control Buttons ── */
.player-btn {
  border: none;
  background: transparent;
  color: #fff;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
  position: relative;
}
.player-btn:hover {
  background: rgba(255,255,255,.12);
}
.player-btn svg {
  width: 22px;
  height: 22px;
  fill: #fff;
}

/* ── Time Display ── */
.player-time {
  color: rgba(255,255,255,.85);
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  padding: 0 4px;
  white-space: nowrap;
}

/* ── Volume ── */
.player-volume {
  display: flex;
  align-items: center;
  gap: 4px;
}
.player-volume .volume-slider {
  width: 0;
  overflow: hidden;
  transition: width .2s;
}
.player-volume:hover .volume-slider {
  width: 70px;
}
.volume-slider input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 70px;
  height: 4px;
  background: rgba(255,255,255,.25);
  border-radius: 4px;
  outline: none;
  cursor: pointer;
}
.volume-slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
}
.volume-slider input[type="range"]::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  border: none;
  cursor: pointer;
}

/* ── Speed Menu ── */
.player-speed {
  position: relative;
}
.player-speed .speed-label {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,.2);
  background: transparent;
  transition: background .15s;
}
.player-speed .speed-label:hover {
  background: rgba(255,255,255,.12);
}
.speed-menu {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  right: 0;
  background: rgba(20,20,30,.96);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  padding: 4px 0;
  min-width: 90px;
  box-shadow: 0 4px 16px rgba(0,0,0,.5);
}
.speed-menu.open {
  display: block;
}
.speed-menu button {
  display: block;
  width: 100%;
  border: none;
  background: transparent;
  color: rgba(255,255,255,.8);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  cursor: pointer;
  text-align: left;
  transition: background .1s;
}
.speed-menu button:hover {
  background: rgba(255,255,255,.1);
}
.speed-menu button.active {
  color: var(--accent, #5b2bd9);
}

/* ── Complete Lecture Overlay ── */
.player-complete-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10,10,18,.88);
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
  z-index: 20;
}
.player-complete-overlay.visible {
  display: flex;
}
.player-complete-overlay .complete-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(91,43,217,.2);
  display: flex;
  align-items: center;
  justify-content: center;
}
.player-complete-overlay .complete-icon svg {
  width: 32px;
  height: 32px;
  fill: var(--accent, #5b2bd9);
}
.player-complete-overlay .complete-text {
  color: #fff;
  font-size: 18px;
  font-weight: 700;
}
.player-complete-overlay .complete-btn {
  padding: 12px 28px;
  border: none;
  border-radius: 999px;
  background: var(--accent, #5b2bd9);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  transition: filter .15s;
}
.player-complete-overlay .complete-btn:hover {
  filter: brightness(1.1);
}

/* ── Learn Layout ── */
.learn-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  min-height: calc(100vh - 70px);
}
.learn-main {
  padding: 20px 24px;
  background: var(--bg);
}
.learn-sidebar {
  border-left: 1px solid var(--border);
  background: var(--surface);
  overflow-y: auto;
  max-height: calc(100vh - 70px);
  position: sticky;
  top: 70px;
}

/* ── Sidebar Section ── */
.learn-sidebar .sidebar-section {
  border-bottom: 1px solid var(--border);
}
.learn-sidebar .section-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 14px 16px;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  transition: background .15s;
}
.learn-sidebar .section-toggle:hover {
  background: rgba(0,0,0,.03);
}
.learn-sidebar .section-toggle .section-meta {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  margin-top: 2px;
}
.learn-sidebar .section-toggle .caret-icon {
  width: 16px;
  height: 16px;
  fill: var(--muted);
  transition: transform .2s;
  flex-shrink: 0;
}
.learn-sidebar .section-toggle.open .caret-icon {
  transform: rotate(180deg);
}
.learn-sidebar .section-lectures {
  display: none;
}
.learn-sidebar .section-lectures.open {
  display: block;
}

/* ── Sidebar Lecture Item ── */
.learn-sidebar .lecture-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px 10px 20px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  transition: background .15s;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
}
.learn-sidebar .lecture-link:hover {
  background: rgba(91,43,217,.06);
}
.learn-sidebar .lecture-link.active {
  background: rgba(91,43,217,.1);
  border-left: 3px solid var(--accent);
}
.learn-sidebar .lecture-link .lec-check {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.learn-sidebar .lecture-link.completed .lec-check {
  background: var(--accent);
  border-color: var(--accent);
}
.learn-sidebar .lecture-link.completed .lec-check svg {
  width: 10px;
  height: 10px;
  fill: #fff;
}
.learn-sidebar .lecture-link .lec-title {
  flex: 1;
  font-weight: 600;
}
.learn-sidebar .lecture-link .lec-dur {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}

/* ── Learn Progress Header ── */
.learn-progress-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.learn-progress-header h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
}
.learn-progress-header .progress-pct {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
}
.learn-progress-bar {
  height: 3px;
  background: var(--border);
}
.learn-progress-bar .fill {
  height: 100%;
  background: var(--accent);
  transition: width .3s;
}

/* ── Learn Main Info ── */
.learn-lecture-title {
  font-size: 20px;
  font-weight: 800;
  margin: 16px 0 8px;
  color: var(--text);
}
.learn-course-title {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 16px;
}

/* ── No Video Placeholder ── */
.player-placeholder {
  width: 100%;
  aspect-ratio: 16/9;
  background: #1a1a24;
  border-radius: var(--radius2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.5);
  font-size: 15px;
  font-weight: 600;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .learn-layout {
    grid-template-columns: 1fr;
  }
  .learn-sidebar {
    border-left: none;
    border-top: 1px solid var(--border);
    max-height: none;
    position: static;
  }
}
@media (max-width: 600px) {
  .player-controls {
    padding: 20px 8px 6px;
  }
  .player-btn svg {
    width: 18px;
    height: 18px;
  }
  .player-time {
    font-size: 11px;
  }
  .player-big-play .play-circle {
    width: 56px;
    height: 56px;
  }
  .player-big-play .play-circle svg {
    width: 22px;
    height: 22px;
  }
}