:root {
    --primary: #0066cc;
    --secondary: #00a8ff;
    --accent: #ff5722;
    --dark: #0a2e53;
    --light: #f8f9fa;
    --ocean-dark: #005792;
    --ocean-medium: #0080ff;
    --ocean-light: #00b4ff;
    --sand: #f5d76e;
    --white: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background: linear-gradient(135deg, var(--ocean-dark), var(--ocean-medium));
    color: var(--white);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    overflow: hidden;
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(0, 180, 255, 0.3) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(0, 128, 255, 0.3) 0%, transparent 40%);
    z-index: -1;
}

/* Player Container */
.player-container {
    width: 100%;
    max-width: 900px;
    background: rgba(10, 46, 83, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    position: relative;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Water effect */
.water-effect {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 10px;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.4), 
        transparent);
    animation: waterShine 3s infinite;
}

@keyframes waterShine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Home button */
.home-btn {
    position: absolute;
    top: 25px;
    right: 25px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--accent);
    color: white;
    border: none;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 4px 15px rgba(255, 87, 34, 0.4);
    transition: all 0.3s ease;
}

.home-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255, 87, 34, 0.6);
}

/* Video title */
.video-title {
    text-align: center;
    font-size: 28px;
    margin-bottom: 20px;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    color: var(--sand);
    padding-top: 10px;
}

/* Video wrapper with responsive ratio */
.video-wrapper {
    position: relative;
    width: 100%;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    height: 0;
    padding-bottom: 56.25%; /* 16:9 ratio */
}

/* Video styling */
.custom-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 15px;
    display: block;
    z-index: 1;
}

/* Loader */
.loader {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--secondary);
    animation: spin 1s ease-in-out infinite;
    z-index: 5;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Controls */
.controls {
    padding: 20px 0;
    background: rgba(10, 46, 83, 0.7);
    border-radius: 15px;
    margin-top: 20px;
}

.progress-area {
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    margin: 0 20px 20px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 10px;
    transition: width 0.1s ease;
    position: relative;
}

.progress-bar::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: 5px;
    background: white;
    border-radius: 50%;
}

.controls-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.controls-left, .controls-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.control-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.play-btn {
    background: var(--primary);
    font-size: 20px;
}

.volume-area {
    display: flex;
    align-items: center;
    gap: 10px;
}

.volume-slider {
    width: 80px;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    outline: none;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.volume-slider::-webkit-slider-thumb:hover {
    background: var(--primary);
    transform: scale(1.2);
}

.time {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

.speed-btn, .fullscreen {
    font-weight: 600;
}

.fullscreen {
    font-size: 20px;
}

/* Wave bottom */
.wave-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 10px;
    background: url("data:image/svg+xml,..."); /* garder ton SVG existant */
    background-size: cover;
}

/* Fullscreen mode */
.player-container:fullscreen {
    width: 100%;
    height: 100%;
    border-radius: 0;
    padding: 0;
}

.player-container:fullscreen .video-wrapper {
    height: 100%;
    padding-bottom: 0;
}

.player-container:fullscreen .custom-video {
    width: 100%;
    height: 100%;
    border-radius: 0;
    object-fit: cover;
}

/* Responsive */
@media (max-width: 768px) {
    .player-container {
        padding: 15px;
    }

    .video-title {
        font-size: 22px;
    }

    .controls-bottom {
        flex-direction: column;
        gap: 15px;
    }

    .controls-left, .controls-right {
        width: 100%;
        justify-content: center;
    }

    .control-btn {
        width: 40px;
        height: 40px;
    }
}
