:root {
    --bg-color-dark: #050505;
    --bg-color-card: rgba(18, 18, 18, 0.6);
    --accent-color: #ffdd00;
    --accent-glow: rgba(255, 221, 0, 0.15);
    --text-muted: #888;
    --border-color: rgba(255, 255, 255, 0.08);
    --font-display: Helvetica, Arial, sans-serif;
    --font-body: Helvetica, Arial, sans-serif;
}

/* Ambient Premium Background override */
body {
    background: radial-gradient(circle at center, #151515 0%, var(--bg-color-dark) 100%);
    color: white;
    font-family: var(--font-body);
    margin: 0;
    padding: 0;
    height: 100dvh;
    width: 100vw;
    overflow: hidden;
    box-sizing: border-box;
}

/* Fullscreen Viewport Master Scroll Blocker */
.sections-container {
    width: 100vw;
    height: 100dvh;
    overflow: hidden;
    position: relative;
}

/* Vertical Transition Panel Wrapper */
.sections-wrapper {
    width: 100%;
    height: 200dvh;
    display: flex;
    flex-direction: column;
    transition: transform 0.85s cubic-bezier(0.76, 0, 0.24, 1);
}

.sections-wrapper.show-archive {
    transform: translateY(-100dvh);
}

/* Premium Individual Viewport Section */
.section {
    height: 100dvh;
    width: 100vw;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    box-sizing: border-box;
    overflow: hidden;
}

/* Home Button - Sleek & Floating */
.home-button-T {
    position: fixed;
    top: 25px;
    left: 25px;
    background: rgba(255, 255, 255, 0.05);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    z-index: 1001;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.home-button-T:hover {
    background: var(--accent-color);
    color: black;
    transform: scale(1.1) translateY(-2px);
    border-color: var(--accent-color);
    box-shadow: 0 8px 25px rgba(255, 221, 0, 0.3);
}

@media (max-width: 800px) {
    .home-button-T {
        top: auto;
        bottom: 25px;
        left: auto;
        right: 25px;
    }
}

/* Master Dashboard Wrapper */
.calibration-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 90%;
    width: 460px;
    padding: 20px;
    margin: 0 auto;
    text-align: center;
    z-index: 2;
}

/* Premium Header Styling */
.header-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: 0.15em;
    margin-bottom: 5px;
    text-transform: uppercase;
    background: linear-gradient(135deg, #ffffff 30%, var(--accent-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 8px rgba(255, 255, 255, 0.1));
}

.header-title-row {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 5px;
}

.header-title-row .header-title {
    margin-bottom: 0;
}

.archive-folder-link {
    color: var(--accent-color);
    font-size: 1.4rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: transform 0.3s ease, color 0.3s ease, filter 0.3s ease;
    filter: drop-shadow(0 0 4px var(--accent-glow));
    animation: folder-swing 5.5s infinite ease-in-out;
    transform-origin: 50% 10%;
    will-change: transform;
}

.archive-folder-link:hover {
    color: #ffffff;
    transform: scale(1.2) rotate(15deg);
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.6));
    animation-play-state: paused;
}

@keyframes folder-swing {
    0% {
        transform: rotate(-12deg);
    }

    25% {
        transform: rotate(12deg);
    }

    50% {
        transform: rotate(-12deg);
    }

    75% {
        transform: rotate(12deg);
    }

    100% {
        transform: rotate(-12deg);
    }

    /* @keyframes folder-swing {
    0% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(12deg);
    }

    50% {
        transform: rotate(0deg);
    }

    75% {
        transform: rotate(-12deg);
    }

    100% {
        transform: rotate(0deg);
    } */
}

.header-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.29em;
    text-transform: uppercase;
    margin-bottom: 25px;
}

/* Immersive Player Card - Forced Square */
.player-card {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #000000;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    overflow: hidden;
    backdrop-filter: blur(20px);
    box-shadow:
        0 30px 60px rgba(0, 0, 0, 0.6),
        0 0 50px var(--accent-glow);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

.player-card:hover {
    transform: translateY(-5px);
    box-shadow:
        0 35px 70px rgba(0, 0, 0, 0.7),
        0 0 60px rgba(255, 221, 0, 0.25);
}

/* Video Wrapper - Fills the square player card and clips overflow */
.video-wrapper {
    position: relative;
    background: #000000;
    display: block;
    overflow: hidden;
    width: 100%;
    height: 100%;
}

.video-wrapper video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    /* Centered, zoomed in cover */
}

/* Precise Date Overlay Mask */
.date-overlay {
    position: absolute;
    left: 50%;
    transform: translate(-50%, -40%);
    background-color: #ffffff;
    color: #000000;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-weight: 700;
    text-align: center;
    white-space: nowrap;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    padding-left: 1.55em !important;
    padding-right: 1.55em !important;
    /* box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25); */
}

.date-overlay.theme-dark {
    background-color: #000000;
    color: #ffffff;
    transform: translate(-50%, -70%);
    padding-left: 1.55em !important;
    padding-right: 1.55em !important;
}

/* Video Interactive Control Overlays */
.video-controls {
    position: absolute;
    bottom: 15px;
    left: 0;
    right: 0;
    padding: 0 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 12;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.player-card:hover .video-controls {
    opacity: 1;
}

.control-pill {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.control-pill:hover {
    background: white;
    color: black;
    border-color: white;
    transform: scale(1.05);
}

/* Active glowing states for interactive pills (e.g. Shuffle Playback) */
.control-pill.active {
    background: var(--accent-color);
    color: black;
    border-color: var(--accent-color);
    box-shadow: 0 0 12px rgba(255, 221, 0, 0.4);
}

.control-pill.active:hover {
    background: white;
    color: black;
    border-color: white;
}

/* Custom Interactive Progress Bar */
.progress-bar-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    z-index: 12;
}

.progress-bar-fill {
    height: 100%;
    width: 0;
    background: var(--accent-color);
    box-shadow: 0 0 10px var(--accent-color);
    transition: width 0.1s linear;
}

/* Quote Engine Below Card */
.quote-container {
    margin-top: 25px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quote-text {
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-style: italic;
    font-weight: 400;
    color: #d5d5d5;
    line-height: 1.5;
    opacity: 1;
    transition: opacity 0.4s ease;
    max-width: 380px;
}

.accent-dot {
    color: var(--accent-color);
}

/* Animated Section Navigation Arrows */
.scroll-arrow {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(12px);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.scroll-arrow i {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.scroll-arrow:hover {
    background: var(--accent-color);
    color: black;
    border-color: var(--accent-color);
    box-shadow: 0 8px 25px rgba(255, 221, 0, 0.4);
}

.scroll-down {
    bottom: 35px;
    animation: bounce-down 2s infinite;
}

.scroll-up {
    top: 35px;
    animation: bounce-up 2s infinite;
}

.scroll-down:hover i {
    transform: translateY(2px);
}

.scroll-up:hover i {
    transform: translateY(-2px);
}

@keyframes bounce-down {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    40% {
        transform: translateX(-50%) translateY(-8px);
    }

    60% {
        transform: translateX(-50%) translateY(-4px);
    }
}

@keyframes bounce-up {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    40% {
        transform: translateX(-50%) translateY(8px);
    }

    60% {
        transform: translateX(-50%) translateY(4px);
    }
}

/* Hover-Active Track Indicator Overlay */
.video-track-indicator {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    font-family: var(--font-body);
    letter-spacing: 0.05em;
    z-index: 12;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.player-card:hover .video-track-indicator {
    opacity: 1;
}

/* Circular 10s Rewind/Forward Skip Buttons */
.archive-skip-btn {
    position: absolute;
    bottom: 65px;
    /* Vertically above the video-controls at the bottom */
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 13;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.archive-skip-btn i {
    font-size: 0.85rem;
    margin-top: 1px;
}

.archive-skip-btn span {
    font-size: 0.55rem;
    font-weight: 800;
    font-family: var(--font-body);
    margin-top: -1px;
    letter-spacing: -0.02em;
}

#archive-backward-btn {
    left: 15px;
}

#archive-forward-btn {
    right: 15px;
}

.player-card:hover .archive-skip-btn {
    opacity: 1;
}

.archive-skip-btn:hover {
    background: var(--accent-color);
    color: black;
    border-color: var(--accent-color);
    transform: scale(1.12) translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 221, 0, 0.4);
}

.archive-skip-btn:active {
    transform: scale(0.95) translateY(0);
}

/* Mobile adjustment for bottom section controls: icons only */
@media (max-width: 600px) {
    #bottom-section .control-pill span {
        display: none !important;
    }

    #bottom-section .control-pill {
        width: 38px;
        height: 38px;
        padding: 0;
        justify-content: center;
        border-radius: 50%;
        gap: 0;
    }
}

/* Headphone Menu Container & Button */
.headphone-menu-container {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 1001;
}

.headphone-toggle-btn {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    cursor: pointer;
    backdrop-filter: blur(12px);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    font-size: 1.2rem;
    outline: none;
}

.headphone-toggle-btn:hover,
.headphone-menu-container.active .headphone-toggle-btn {
    background: var(--accent-color);
    color: black;
    transform: scale(1.1) translateY(-2px);
    border-color: var(--accent-color);
    box-shadow: 0 8px 25px rgba(255, 221, 0, 0.3);
}

/* Expanding Vertical Menu Panel */
.headphone-menu-panel {
    position: absolute;
    bottom: 100%;
    right: 0;
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 180px;
    background: rgba(10, 10, 10, 0.85);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 8px;
    backdrop-filter: blur(20px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: none;
}

.headphone-menu-container.active .headphone-menu-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* Menu Links */
.headphone-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    color: rgba(255, 255, 255, 0.85);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.headphone-menu-item i {
    font-size: 0.95rem;
    width: 18px;
    text-align: center;
    color: var(--text-muted);
    transition: color 0.2s ease;
}

.headphone-menu-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--accent-color);
    transform: translateX(4px);
}

.headphone-menu-item:hover i {
    color: var(--accent-color);
}

/* Responsive Mobile Layout Adjustments */
@media (max-width: 800px) {
    .headphone-menu-container {
        bottom: 90px;
        /* Placed exactly 15px above the home button (50px height + 25px bottom) */
    }
}

/* Learning Menu Container & Button */
.learning-menu-container {
    position: fixed;
    bottom: 25px;
    right: 90px;
    /* Aligns to the left of the headphone button (on desktop) or home button (on mobile) */
    z-index: 1001;
}

.learning-toggle-btn {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    cursor: pointer;
    backdrop-filter: blur(12px);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    font-size: 1.2rem;
    outline: none;
}

.learning-toggle-btn:hover,
.learning-menu-container.active .learning-toggle-btn {
    background: var(--accent-color);
    color: black;
    transform: scale(1.1) translateY(-2px);
    border-color: var(--accent-color);
    box-shadow: 0 8px 25px rgba(255, 221, 0, 0.3);
}

/* Expanding Vertical Menu Panel */
.learning-menu-panel {
    position: absolute;
    bottom: 100%;
    right: 0;
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 200px;
    background: rgba(10, 10, 10, 0.85);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 8px;
    backdrop-filter: blur(20px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: none;
}

.learning-menu-container.active .learning-menu-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* Menu Links */
.learning-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    color: rgba(255, 255, 255, 0.85);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.learning-menu-item i {
    font-size: 0.95rem;
    width: 18px;
    text-align: center;
    color: var(--text-muted);
    transition: color 0.2s ease;
}

.learning-menu-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--accent-color);
    transform: translateX(4px);
}

.learning-menu-item:hover i {
    color: var(--accent-color);
}