/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background: radial-gradient(circle at center, #2c1e24 0%, #1a1012 100%);
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    overflow: hidden;
}

/* Player Container */
.player-container {
    width: 90%;
    max-width: 1000px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
}

.player-container:hover {
    transform: scale(1.01);
}

.video-wrapper {
    position: relative;
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    background: #000;
    aspect-ratio: 16 / 9;
    /* maintain aspect ratio if needed, or let video decide */
    display: flex;
    /* Remove bottom gap */
}

video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Play Overlay */
.play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.play-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.play-icon {
    width: 80px;
    height: 80px;
    background: rgba(248, 129, 146, 0.9);
    /* #F88192 */
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 30px rgba(248, 129, 146, 0.5);
    transition: transform 0.2s ease;
}

.play-icon svg {
    width: 40px;
    height: 40px;
    fill: white;
    margin-left: 4px;
    /* Optical center adjustment */
}

.video-wrapper:hover .play-icon {
    transform: scale(1.1);
}

/* Controls Bar */
.controls {
    /* Use flex/block flow instead of absolute positioning */
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
    /* Space between video and controls */

    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    padding: 15px 20px;
    border-radius: 16px;
    opacity: 1;
    transition: all 0.3s ease;
}

/* Fix mobile responsiveness as well if needed in later block, but this handles main layout */

/* .video-wrapper:hover .controls rule is no longer needed since it's always visible */


/* Buttons */
button {
    background: none;
    border: none;
    cursor: pointer;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

button:hover {
    color: #F88192;
}

.hidden {
    display: none;
}

/* Time Display */
.time-display {
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    min-width: 80px;
    text-align: center;
}

/* Progress Bar */
.progress-container {
    flex-grow: 1;
    height: 6px;
    background: white;
    /* Unplayed part is WHITE per user request */
    border-radius: 3px;
    cursor: pointer;
    position: relative;
    transition: height 0.1s;
}

.progress-container:hover {
    height: 10px;
}

.progress-bar {
    height: 100%;
    background: #F88192;
    /* Played part is #F88192 */
    width: 0%;
    border-radius: 3px;
    position: relative;
    box-shadow: 0 0 10px rgba(248, 129, 146, 0.7);
}

/* Scrubber Panda */
.progress-bar::after {
    content: '';
    position: absolute;
    right: -15px;
    /* Adjust to center the 30px image on the end of the bar */
    top: 50%;
    transform: translateY(-50%) scale(1);
    width: 30px;
    height: 30px;
    background-image: url('panda_cropped.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    /* transition: transform 0.1s; */
    /* Removed scale transition so it's always there */
    z-index: 10;
    pointer-events: none;
    /* Let clicks pass through to the bar */
}

/* On hover, maybe make the panda jump or pulse? Optional, but keeping it simple first */
.progress-container:hover .progress-bar::after {
    transform: translateY(-50%) scale(1.2);
}

/* Volume */
.volume-control {
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
}


/* Mobile Responsiveness */
@media (max-width: 600px) {
    .player-container {
        width: 100%;
        max-width: 100%;
        border-radius: 0;
        border: none;
        background: transparent;
        padding: 0;
        box-shadow: none;
    }

    .video-wrapper {
        border-radius: 0;
    }

    .controls {
        margin-top: 0;
        /* Attach to bottom of video directly? Or keep spacing? Let's use 0 for "below" feeling */
        border-radius: 0;
        padding: 15px;
        background: rgba(0, 0, 0, 0.8);
    }

    .play-icon {
        width: 60px;
        height: 60px;
    }

    .play-icon svg {
        width: 30px;
        height: 30px;
    }
}