/* --- General Slider Container --- */
.slider-container {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

/* --- Main Photo Slider Viewport --- */
.photo-slider {
    position: relative;
    width: 100%;
    min-width: 100%;
    aspect-ratio: 1067 / 597;
    overflow: hidden;
    cursor: pointer;
    user-select: none;
    touch-action: pan-y;
}
.photo-slider.dragging { cursor: grabbing; }
.quality-selector {
    /* Your existing styles */
    opacity: 0;
    transition: opacity 0.2s ease;
}

.photo-slider:hover .quality-selector {
    opacity: 1;
}

/* --- Wrapper for all slides --- */
.slider-wrapper {
    display: flex;
    height: 100%;
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    will-change: transform;
}

/* --- Individual Slide --- */
.slide {
    width: 100%;
    height: 100%;
    flex-shrink: 0;
    position: relative;
}
.slide img,
.slide video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}
.slide video { pointer-events: auto; }

/* --- Content Indicator --- */
.content-indicator {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 5;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 12px;
}

/* --- Navigation Areas --- */
.navigation-area {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 25%;
    display: flex;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    -webkit-tap-highlight-color: transparent;
    z-index: 5;

    /* Visual only */
    pointer-events: none;
}

/* CHANGED: Individual hover states instead of global hover */
.prev-area:hover {
    opacity: 1;
}

.next-area:hover {
    opacity: 1;
}

.prev-area {
    left: 0;
    justify-content: flex-start;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.5), transparent);
}
.next-area {
    right: 0;
    justify-content: flex-end;
    background: linear-gradient(to left, rgba(0, 0, 0, 0.5), transparent);
}

/* --- Hitbox only controls clicks --- */
.nav-hitbox {
    position: absolute;
    top: var(--controls-safe-height-top, 0px);
    left: 0;
    right: 0;
    bottom: var(--controls-safe-height, 60px); /* hole at bottom */
    pointer-events: auto;
}

/* --- Buttons are visually stable --- */
.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    color: white;
    width: 60px;
    height: 60px;
    border: none;
    pointer-events: auto; /* allow clicks */
}

.prev-btn { left: 40px; }
.next-btn { right: 40px; }

.slide video {
    cursor: pointer;
}

/* --- Dots --- */
.slider-dots {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 15px;
    padding: 2px 0; /* This gives space for the 1.2 scale (20% larger) */
}
.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(135, 206, 235, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}
.dot.active {
    background: var(--accent-color, deepskyblue);
    transform: scale(1.2);
}

/* --- HLS ---- */

.hls-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    background: rgba(0,0,0,0.8);
    padding: 20px;
    border-radius: 8px;
    z-index: 4;
}

.quality-selector {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 4;
}

.quality-selector select {
    background: rgba(0,0,0,0.8);
    color: white;
    border: 1px solid #444;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
}



/* ----- Big play button ----- */

/* make sure slide is positioned */
.slide { position: relative; }

/* CENTRAL HIT AREA: middle 50% (between left/right nav strips) */
.drag-overlay {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 25%;
    right: 25%;
    z-index: 4;               /* below navigation-area (nav has z-index: 5) */
    pointer-events: auto;     /* must accept clicks/hover */
    /* invisible visually */
    background: transparent;
}

/* Play overlay covers whole slide but doesn't block clicks (button does) */
.video-play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;     /* allow drag-overlay to receive clicks except the button */
    z-index: 4;
}

/* actual button accepts pointer events */
.play-button {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.6);
  cursor: pointer;
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.play-button::before {
  content: "";
  display: block;
  margin-left: 6px; /* keeps it optically centered */
  border-style: solid;
  border-width: 20px 0 20px 32px; /* bigger triangle */
  border-color: transparent transparent transparent white;
}


/* icon looks centered visually */
.play-button svg { color: white; transform: translateX(2px); }

/* SCALE when central area is hovered (adjacent sibling + fallback class) */
.drag-overlay:hover + .video-play-overlay .play-button,
.drag-overlay:focus + .video-play-overlay .play-button,
.video-play-overlay.hovered .play-button {
    transform: scale(1.12);
}


/* --- Mobile Adjustments --- */
@media (max-width: 768px) {
    /* CHANGED: Remove the global hover disable and apply individual states */
    .prev-area:hover,
    .next-area:hover {
        opacity: 0;
    }
    
    .prev-btn, .next-btn {
        opacity: 0.7;
        pointer-events: auto;
        width: 40px;
        height: 40px;
        background: rgba(30, 30, 30, 0.7);
    }
    .prev-btn { left: 15px; }
    .next-btn { right: 15px; }
    .play-button { opacity: 0; }
}