* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-left: env(safe-area-inset-left, 0px);
    --safe-right: env(safe-area-inset-right, 0px);
}

html, body {
    width: 100%;
    height: 100%;
    min-height: 100vh;
    min-height: 100svh;
    min-height: 100dvh;
    overflow: hidden;
}



.swiper {
    width: 100%;
    height: 100%;
}

.swiper-slide {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Video slide (middle) */
.video-slide {
    width: 100%;
    height: 100%;
    position: relative;
}

video {
    position: absolute;
    top: var(--safe-top);
    left: var(--safe-left);
    right: var(--safe-right);
    bottom: var(--safe-bottom);
    width: calc(100% - var(--safe-left) - var(--safe-right));
    height: calc(100% - var(--safe-top) - var(--safe-bottom));
    object-fit: contain;
}

/* Player logo */
.player-logo {
    position: absolute;
    top: calc(20px + var(--safe-top));
    right: calc(20px + var(--safe-right));
    height: 30px;
    width: auto;
    opacity: 1;
    z-index: 10;
    pointer-events: none;
}

/* Bandwidth overlay */
.bandwidth-overlay {
    position: absolute;
    top: calc(10px + var(--safe-top));
    left: calc(10px + var(--safe-left));
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 4px 8px;
    font-family: monospace;
    font-size: 12px;
    border-radius: 3px;
    pointer-events: none;
    z-index: 1000;
}

/* Level toggle button */
.level-toggle {
    position: absolute;
    top: calc(10px + var(--safe-top));
    left: calc(100px + var(--safe-left));
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 4px 8px;
    font-family: monospace;
    font-size: 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    cursor: pointer;
    z-index: 1000;
    pointer-events: auto;
}

.level-toggle:hover {
    background: rgba(50, 50, 50, 0.9);
}

/* Poster slides (first and third) */
.poster-slide {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.poster-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Video controls overlay */
.video-controls {
    position: absolute;
    bottom: calc(60px + var(--safe-bottom));
    right: calc(15px + var(--safe-right));
    display: flex;
    flex-direction: column;
    gap: 35px;
    z-index: 100;
}

.control-btn {
    width: 48px;
    height: 48px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s;
    padding: 0;
    position: relative;
}

.control-btn:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: scale(1.1);
}

.control-btn:active {
    transform: scale(0.95);
}

.control-btn svg {
    pointer-events: none;
}

/* Control labels */
.control-label {
    position: absolute;
    bottom: -18px;
    font-size: 10px;
    color: white;
    font-weight: 500;
    white-space: nowrap;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    pointer-events: none;
    text-transform: uppercase;
}

/* Hide muted icon by default; revealed when button has .muted */
.muted-icon {
    display: none;
}

/* Liked state */
.control-btn.liked svg {
    fill: #ff2e63;
    stroke: #ff2e63;
}

/* Muted state - toggle icons and add white background */
.control-btn.muted .unmuted-icon {
    display: none;
}

.control-btn.muted .muted-icon {
    display: block;
}

.control-btn.muted {
    background: rgba(255, 255, 255, 0.9);
}

.control-btn.muted svg {
    stroke: #000;
}

/* Pulse animation for mute button to draw attention */
@keyframes pulse-attention {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(255, 255, 255, 0);
    }
}

#mute-btn.pulse-hint {
    animation: pulse-attention 2s ease-out 3;
    background: rgba(255, 255, 255, 0.95);
}

#mute-btn.pulse-hint svg {
    stroke: #000;
}

/* Plus button with primary background */
.control-btn.plus-btn {
    background: #450693;
}

.control-btn.plus-btn:hover {
    background: #5a0bb8;
}

.plus-text {
    font-size: 10px;
    font-weight: 600;
    color: white;
    text-align: center;
    line-height: 1.2;
    pointer-events: none;
    white-space: nowrap;
}

/* Play icon overlay */
.play-icon-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
    z-index: 50;
}

.play-icon-overlay.show {
    opacity: 1;
}

.play-icon-overlay svg {
    width: 90px;
    height: 90px;
    fill: white;
}

/* Swipe hint overlay */
.swipe-hint {
    position: absolute;
    left: 50%;
    bottom: calc(110px + var(--safe-bottom));
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 18px;
    letter-spacing: 0.2px;
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
    z-index: 120;
    text-align: center;
}

.swipe-hint svg {
    width: 24px;
    height: 24px;
}

.swipe-hint.show {
    opacity: 1;
}

/* Submit Your POTE button - bottom left */
.submit-pote-btn {
    position: absolute;
    bottom: calc(40px + var(--safe-bottom));
    left: calc(20px + var(--safe-left));
    background: #450693;
    border: none;
    border-radius: 25px;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    z-index: 100;
    transition: background 0.2s, transform 0.2s;
}

.submit-pote-btn:hover {
    background: #5a0bb8;
    transform: scale(1.05);
}

.submit-pote-btn:active {
    transform: scale(0.98);
}

.submit-pote-btn span {
    color: white;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.submit-pote-btn svg {
    flex-shrink: 0;
}
/* Desktop Next Arrow - Only visible on desktop */
.desktop-next-arrow {
    display: none; /* Hidden by default (mobile) */
    position: absolute;
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 100;
    transition: background 0.2s;
    align-items: center;
    justify-content: center;
    /* Position will be set by JavaScript */
}

.desktop-next-arrow:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: scale(1.1);
}

.desktop-next-arrow:active {
    transform: scale(0.95);
}

.desktop-next-arrow svg {
    width: 24px;
    height: 24px;
    pointer-events: none;
}

/* Show desktop next arrow only on screens wider than 768px */
@media (min-width: 768px) {
    .desktop-next-arrow {
        display: flex;
    }
}

#share-btn {
    background: var(--success);
}