:root {
    --bg-color: #000;
    --text-color: #fff;
    --highlight: #333;
    --primary-font: 'Consolas', monospace;
    --header-font: 'Helvetica', sans-serif;
    --player-bg: rgba(0, 0, 0, 0.85);
    --border-color: rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--primary-font);
    overflow: hidden;
    /* Prevent scrolling */
}

a {
    color: var(--text-color);
    text-decoration: none;
    transition: opacity 0.3s ease;
}

a:hover {
    opacity: 0.7;
}

button {
    background: none;
    border: none;
    color: var(--text-color);
    font-family: var(--primary-font);
    cursor: pointer;
}

/* Video Background */
.video-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
}

.bg-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.bg-video.active {
    opacity: 1;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
    /* Slight darkening for readability */
    z-index: -1;
}

/* Top Menu */
.top-menu {
    position: fixed;
    top: 30px;
    right: 40px;
    z-index: 100;
}

.menu-button {
    font-family: var(--header-font);
    font-size: 2rem;
    font-weight: 600;
    cursor: pointer;
    padding: 10px;
    border: none;
    transition: all 0.3s ease;
    background: transparent;
    border-radius: 0;
    color: #fff;
}

.menu-button:hover,
.menu-button.active {
    opacity: 0.7;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 0;
    width: 250px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    padding: 15px 0;
}

.dropdown-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-group {
    padding: 0 20px;
    margin-bottom: 15px;
}

.dropdown-title {
    font-family: var(--header-font);
    display: block;
    font-size: 0.75rem;
    color: #aaa;
    margin-bottom: 10px;
    letter-spacing: 1px;
    font-variant: small-caps;
    text-transform: lowercase;
}

.dropdown-item {
    font-family: var(--header-font);
    display: flex;
    align-items: center;
    padding: 10px 20px;
    width: 100%;
    text-align: left;
    font-size: 0.9rem;
    transition: background 0.2s ease;
    font-variant: small-caps;
    text-transform: lowercase;
}

.dropdown-item i {
    width: 25px;
    margin-right: 10px;
    font-size: 1.1rem;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.1);
    opacity: 1;
}

.divider {
    height: 1px;
    background: var(--border-color);
    margin: 10px 0;
}

/* Overlays */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 90;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}

.overlay-50 {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
}

.overlay-100 {
    background: #000;
}

.overlay-content {
    background: rgba(0, 0, 0, 0.8);
    padding: 40px;
    border: 1px solid var(--border-color);
    border-radius: 0;
    max-width: 600px;
    width: 90%;
    position: relative;
    transform: scale(0.95);
    transition: transform 0.4s ease;
}

.overlay.active .overlay-content {
    transform: scale(1);
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 2rem;
    line-height: 1;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.close-btn:hover {
    opacity: 1;
}

.overlay-content h2 {
    font-family: var(--header-font);
    font-size: 2rem;
    margin-bottom: 20px;
    font-weight: 900;
    font-variant: small-caps;
    text-transform: lowercase;
}

.overlay-content p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #ccc;
}

.projects-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.project-item {
    font-size: 1.2rem;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: padding-left 0.3s ease, color 0.3s ease;
}

.project-item:hover {
    padding-left: 10px;
    color: #fff;
    opacity: 1;
}

/* Music Player */
.player-container {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 90px;
    background: var(--player-bg);
    border-top: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    z-index: 100;
}

.player-controls {
    display: flex;
    gap: 20px;
    align-items: center;
    width: 200px;
}

.control-btn {
    font-size: 1.2rem;
    opacity: 0.7;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.control-btn:hover {
    opacity: 1;
    transform: scale(1.1);
}

#play-btn {
    font-size: 1.8rem;
}

.player-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 600px;
    margin: 0 40px;
}

.song-title {
    font-size: 1rem;
    font-weight: 400;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.progress-container {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 0;
    cursor: pointer;
    position: relative;
    margin-bottom: 5px;
}

.progress-bar {
    height: 100%;
    background: #fff;
    width: 0%;
    border-radius: 0;
    position: relative;
}

.progress-bar::after {
    content: '';
    position: absolute;
    right: -4px;
    top: -3px;
    width: 10px;
    height: 10px;
    background: #fff;
    border-radius: 0;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.progress-container:hover .progress-bar::after {
    opacity: 1;
}

.time-info {
    font-size: 0.8rem;
    color: #aaa;
    width: 100%;
    display: flex;
    justify-content: space-between;
}

.player-features {
    display: flex;
    align-items: center;
    gap: 30px;
    width: 200px;
    justify-content: flex-end;
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

.volume-slider-container {
    width: 80px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 0;
    cursor: pointer;
}

.volume-bar {
    height: 100%;
    background: #fff;
    width: 100%;
    border-radius: 0;
}

.list-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 2rem;
    background: transparent;
    padding: 10px;
    border-radius: 0;
    border: none;
    color: #fff;
}

.list-btn:hover,
.list-btn.active {
    opacity: 0.7;
}

/* Song List Popup */
.song-list-container {
    position: fixed;
    bottom: 110px;
    /* Above player */
    right: 40px;
    width: 350px;
    max-height: calc(100vh - 200px);
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 0;
    z-index: 95;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.song-list-container.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.song-list-content {
    overflow-y: auto;
    padding: 10px 0;
}

.song-list-content::-webkit-scrollbar {
    width: 6px;
}

.song-list-content::-webkit-scrollbar-track {
    background: transparent;
}

.song-list-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 0;
}

.song-group {
    margin-bottom: 15px;
}

.song-group-title {
    font-family: var(--header-font);
    padding: 5px 20px;
    font-size: 0.8rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: rgba(255, 255, 255, 0.05);
}

.song-item {
    padding: 12px 20px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
}

.song-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.song-item.active {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-weight: 600;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .player-container {
        padding: 0 10px;
        gap: 10px;
    }

    #prev-btn,
    #next-btn {
        display: none;
    }

    .player-controls {
        width: auto;
        gap: 10px;
    }

    #play-btn {
        margin: 0 15px;
    }

    .player-features {
        width: auto;
        gap: 10px;
    }

    .volume-control {
        display: flex;
        gap: 0;
        /* No gap when hidden */
    }

    .volume-control:hover {
        gap: 10px;
        /* Bring back gap on hover */
    }

    .volume-slider-container {
        width: 0px;
        opacity: 0;
        visibility: hidden;
        transition: width 0.3s ease, opacity 0.3s ease;
    }

    .volume-control:hover .volume-slider-container {
        width: 50px;
        opacity: 1;
        visibility: visible;
    }

    .song-list-container {
        right: 10px;
        width: calc(100% - 20px);
    }

    .player-info {
        margin: 0 10px;
        min-width: 0;
        overflow: hidden;
        flex: 1;
        white-space: nowrap;
    }

    .song-title {
        display: inline-block;
        padding-left: 100%;
        animation: marquee 10s linear infinite;
        white-space: nowrap;
        text-overflow: clip;
        width: auto;
    }

    @keyframes marquee {
        0% {
            transform: translateX(0);
        }

        100% {
            transform: translateX(-100%);
        }
    }
}