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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: #fff;
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
    z-index: 9999;
}

body.fade-out::before {
    opacity: 1;
}

/* Video background */
.video-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

#bgVideo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    min-width: 100%;
    min-height: 100%;
}

.veil {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    transition: opacity 0.5s ease;
}

.veil.hidden {
    opacity: 0;
}

/* Logo */
.logo {
    position: fixed;
    top: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.logo-image {
    max-width: 200px;
    height: auto;
    filter: invert(1);
}

/* Menu */
.menu {
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    pointer-events: none;
    padding-top: 100px;
}

#projectList {
    display: flex;
    flex-direction: column;
    gap: 15px;
    text-align: center;
    pointer-events: auto;
}

.project-item {
    font-size: 20px;
    cursor: pointer;
    transition: opacity 0.3s ease;
    text-transform: lowercase;
    letter-spacing: 1px;
}

.project-item:hover {
    opacity: 0.6;
}

.project-item.selected {
    position: relative;
}

.project-item.selected::before {
    content: '👉';
    position: absolute;
    left: -40px;
}



/* Random button */
.random-btn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 20;
    width: 40px;
    height: 40px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: transform 0.3s ease, opacity 0.3s ease;
    mix-blend-mode: difference;
}

.random-btn svg {
    width: 100%;
    height: 100%;
    color: #fff;
}

.random-btn:hover {
    transform: scale(1.1);
}

.random-btn.spinning {
    animation: spin 0.5s ease-in-out;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Volume control */
.volume-control {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.volume-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.volume-btn:hover {
    transform: scale(1.1);
}

.volume-btn svg {
    width: 100%;
    height: 100%;
    color: #fff;
}

.volume-slider {
    transition: opacity 0.3s ease, transform 0.3s ease;
    order: -1;
}

.volume-slider.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
}

#volumeRange {
    width: 4px;
    height: 100px;
    -webkit-appearance: slider-vertical;
    appearance: slider-vertical;
    writing-mode: bt-lr;
    background: rgba(255, 255, 255, 0.2);
    outline: none;
    border-radius: 10px;
    cursor: pointer;
}

#volumeRange::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: #fff;
    cursor: pointer;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease;
}

#volumeRange::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

#volumeRange::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: #fff;
    cursor: pointer;
    border-radius: 50%;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease;
}

#volumeRange::-moz-range-thumb:hover {
    transform: scale(1.2);
}

/* Responsive */
@media (max-width: 768px) {
    .logo {
        top: 20px;
    }

    .logo-image {
        max-width: 120px;
    }

    .project-item {
        font-size: 16px;
    }

    .volume-control {
        bottom: 20px;
        right: 20px;
    }

    .volume-btn {
        width: 35px;
        height: 35px;
    }

    #volumeRange {
        width: 80px;
    }
}
