/* ========== BASE STYLES ========== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --color-black: #000;
    --color-white: #fffbf7;
    --color-gold: gold;
    --color-gold-bright: #ffd700;
    --color-red: red;
    --color-green: green;
    --color-blue: blue;
    --color-gray-dark: #1a1a1a;
    --color-gray-medium: #444;
    --color-gray-light: #aaa;
    --font-primary: 'Raleway', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --transition-fast: 0.2s ease;
    --transition-medium: 0.3s ease;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.5;
    overflow-x: hidden;
    width: 100%;
}

/* ========== UTILITY CLASSES ========== */
.hidden {
    display: none !important;
}

/* ========== SPLASH SCREEN ========== */
.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-black);
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.splash-screen.fade-out {
    opacity: 0;
    visibility: hidden;
}

.splash-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.enter-btn {
    position: relative;
    z-index: 10;
    background: #000;
    color: #fff;
    font-family: var(--font-primary);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    padding: 0;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all var(--transition-medium);
    text-transform: uppercase;
    width: 280px;
    height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
}

.enter-btn-text {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-shadow: 
        -2px -2px 0 #000,
        2px -2px 0 #000,
        -2px 2px 0 #000,
        2px 2px 0 #000;
    color: #fff;
    position: absolute;
    top: 20px;
}

.enter-btn-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.enter-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.9);
}

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

/* ========== MAIN SITE ========== */
.main-site {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
    max-width: 100vw;
    opacity: 0;
    transition: opacity 0.8s ease;
    overflow-x: hidden;
}

.main-site.visible {
    opacity: 1;
}

/* ========== HEADER ========== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--color-black);
    color: var(--color-white);
    padding: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    transition: all var(--transition-medium);
    will-change: background-color, color;
}

.header:hover {
    background-color: var(--color-white);
    color: var(--color-black);
}

.header-left,
.header-right {
    flex: 1;
    cursor: pointer;
    font-size: 1.25rem;
    opacity: 0;
    user-select: none;
}

.header-left {
    text-align: left;
}

.header-right {
    text-align: right;
}

.header-center {
    flex: 2;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.625rem;
    font-size: 1.25rem;
}

.letter {
    cursor: pointer;
    transition: opacity var(--transition-fast);
    user-select: none;
}

.letter:hover,
.letter:focus {
    opacity: 0.7;
    outline: none;
}

.logo-img {
    height: 2.5rem;
    width: 2.5rem;
    cursor: pointer;
    transition: opacity var(--transition-fast);
    object-fit: contain;
    filter: none;
    mix-blend-mode: normal;
}

.header:hover .logo-img {
    filter: none;
}

.logo-img:hover,
.logo-img:focus {
    opacity: 0.7;
    outline: none;
}

/* ========== MAIN CONTENT ========== */
.content-wrapper {
    margin-top: 5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    padding-bottom: 0.625rem;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

.border-frame {
    flex: 1;
    position: relative;
    border: 0.3125rem solid var(--color-gold);
    box-shadow: 
        inset 0 0 0 0.03125rem var(--color-blue),
        inset 0 0 0 0.15625rem var(--color-gold),
        inset 0 0 0 0.1875rem var(--color-red),
        inset 0 0 0 0.34375rem var(--color-gold),
        0 0 0 0.03125rem var(--color-green);
    width: 100%;
}

.main-content {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 25rem;
    background-color: var(--color-gray-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.background-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    opacity: 0.3;
    pointer-events: none;
}

.background-media {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.5;
    pointer-events: none;
}

.countdown-clock {
    position: relative;
    z-index: 10;
    background: rgba(0, 0, 0, 0.7);
    padding: 2.5rem;
    border-radius: 0.625rem;
    color: var(--color-white);
    text-align: center;
}

.countdown-title {
    font-size: 1.5rem;
    margin-bottom: 1.25rem;
    font-weight: 700;
}

.countdown-timer {
    display: flex;
    gap: 1.875rem;
    justify-content: center;
    flex-wrap: wrap;
}

.time-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.time-value {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.time-label {
    font-size: 0.875rem;
    margin-top: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.countdown-message {
    font-size: 0.875rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    max-width: 500px;
    margin: 1.25rem auto 0;
}

/*MUSIC PLAYER*/
.music-player {
    background: linear-gradient(135deg, #191970 0%, #4169E1 100%);
    padding: 0.5rem 1rem;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 -0.5rem 2rem rgba(0, 0, 0, 0.7);
    border-top: 2px solid rgba(255, 255, 255, 0.1);
    position: relative;
    height: 10vh;
    min-height: 50px;
    max-height: 70px;
}

/* Hide left panel (album info & playlist) in compact mode */
.player-left {
    display: none;
}

/* Container 2 - Middle - Controls Only */
.player-middle {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

/* Hide waveform in compact mode */
.waveform-section {
    display: none;
}

/* Controls Section */
.controls-section {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    width: 100%;
}

.player-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.player-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--color-white);
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    transition: all var(--transition-fast);
    backdrop-filter: blur(5px);
}

.player-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--color-white);
    transform: scale(1.05);
}

.player-btn.btn-play {
    width: 2.5rem;
    height: 2.5rem;
    background: var(--color-gold);
    border-color: var(--color-gold);
    color: var(--color-black);
    font-size: 1rem;
}

.player-btn.btn-play:hover {
    background: var(--color-gold-bright);
    transform: scale(1.1);
}

.volume-section {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    max-width: 150px;
}

.volume-icon-btn {
    background: transparent;
    border: none;
    color: var(--color-white);
    cursor: pointer;
    font-size: 1rem;
    padding: 0;
    transition: color var(--transition-fast);
}

.volume-icon-btn:hover {
    color: var(--color-gold);
}

.volume-track {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    position: relative;
    cursor: pointer;
}

.volume-progress {
    height: 100%;
    background: var(--color-gold);
    border-radius: 2px;
    width: 70%;
    transition: width var(--transition-fast);
}

/* Container 3 - Right Side - Album Artwork */
.player-right {
    display: flex;
    align-items: center;
    justify-content: center;
}

.artwork-container {
    position: relative;
    width: 100%;
    max-width: 50px;
    aspect-ratio: 1;
    border-radius: 0.25rem;
    overflow: hidden;
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.artwork-image,
.artwork-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.artwork-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.3) 0%, rgba(255, 215, 0, 0.1) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.5rem;
}

/* Hide these in compact mode */
.layout-toggle,
.album-info,
.playlist-section,
.playlist-header,
.playlist-items,
.waveform-container,
.waveform-progress,
.waveform-bars,
.time-info {
    display: none !important;
}

/* ========== FOOTER ========== */
.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0.625rem;
    background-color: var(--color-white);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1.25rem;
    z-index: 1000;
    font-size: 0.5rem;
}

.social-links {
    display: flex;
    gap: 0.9375rem;
}

.social-links a {
    color: var(--color-black);
    text-decoration: none;
    font-size: 0.5rem;
    transition: opacity var(--transition-fast);
}

.social-links a:hover,
.social-links a:focus {
    opacity: 0.6;
    outline: none;
}

.copyright {
    color: var(--color-black);
    font-size: 0.5rem;
}

/* ========== RESPONSIVE ========== */
@media(max-width:768px){
    .header-center{font-size:1rem;gap:.3125rem}
    .logo-img{height:2rem;width:2rem}
    .countdown-title{font-size:1.25rem}
    .time-value{font-size:2rem}
    .time-label{font-size:.75rem}
    
    /* Splash button mobile */
    .enter-btn {
        width: 240px;
        height: 100px;
    }
    
    .enter-btn-text {
        font-size: 1rem;
        top: 15px;
    }
    
    .enter-btn-logo {
        width: 50px;
        height: 50px;
    }
    
    /* Music Player stays compact */
    .music-player {
        height: 7.5vh;
        min-height: 50px;
        max-height: 70px;
        padding: 0.5rem;
        gap: 0.75rem;
    }
    
    .player-btn {
        width: 1.75rem;
        height: 1.75rem;
        font-size: 0.65rem;
    }
    
    .player-btn.btn-play {
        width: 2.25rem;
        height: 2.25rem;
        font-size: 0.875rem;
    }
    
    .artwork-container {
        max-width: 45px;
    }
    
    .volume-section {
        max-width: 100px;
    }
}

@media(max-width:480px){
    .enter-btn {
        width: 200px;
        height: 90px;
    }
    
    .enter-btn-text {
        font-size: 0.85rem;
        top: 12px;
    }
    
    .enter-btn-logo {
        width: 45px;
        height: 45px;
    }
    
    .music-player {
        gap: 0.5rem;
    }
    
    .player-controls {
        gap: 0.25rem;
    }
    
    .player-btn {
        width: 1.5rem;
        height: 1.5rem;
        font-size: 0.6rem;
    }
    
    .player-btn.btn-play {
        width: 2rem;
        height: 2rem;
        font-size: 0.75rem;
    }
    
    .artwork-container {
        max-width: 40px;
    }
    
    .volume-section {
        max-width: 80px;
    }
}

/* ========== ACCESSIBILITY ========== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}