body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #000;
    color: #fff;
    overflow-x: hidden;
}

.dark-theme {
    background-color: #0a0a0a;
}

#splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 1;
    transition: opacity 1s ease-in-out;
}

#splash-logo {
    width: 300px;
    opacity: 0;
}

.fade-in {
    animation: fadeIn 4s forwards;
}

.fade-out {
    animation: fadeOut 1s forwards;
}

@keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

@keyframes fadeOut {
    0% { opacity: 1; }
    100% { opacity: 0; }
}

.hidden {
    opacity: 0;
    visibility: hidden;
    transition: opacity 1s ease-in-out;
}

.visible {
    opacity: 1 !important;
    visibility: visible !important;
}

.content-fade-in {
    animation: fadeIn 2s forwards;
}

.header-slide-in {
    animation: slideIn 1.5s forwards;
}

@keyframes slideIn {
    0% {
        transform: translateY(-100%);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Header & Navigation */
header {
    background-color: #111;
    padding: 5px 0;
    border-bottom: 2px solid #333;
}

.menu-bar {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 0 30px;
    gap: 40px;
}

.logo-container {
    position: relative;
    height: 30px;
    width: 60px; /* Adjust width based on logo aspect ratio */
}

.nav-logo {
    position: absolute;
    top: 0;
    left: 0;
    height: 30px;
    transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
}

.menu-bar:hover .nav-logo {
    transform: scale(1.1);
}

.hover-logo {
    opacity: 0;
}

.menu-bar:hover .default-logo {
    opacity: 0;
}

.menu-bar:hover .hover-logo {
    opacity: 1;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 30px;
    margin: 0;
    padding: 0;
}

.nav-links a {
    text-decoration: none;
    color: #fff;
    font-weight: 300;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #00f; /* Sundstrom Blue (Approximation) */
}

/* Main Content Layout */
.layout-container {
    display: flex;
    width: 100%;
    transition: all 0.8s ease-in-out;
    background-color: #000; /* Ensure background is black in fullscreen */
}

.layout-container:fullscreen {
    display: flex !important;
    width: 100vw;
    height: 100vh;
    background-color: #000;
}

.layout-container:fullscreen .info-panel.panel-active {
    width: 30%;
    max-width: 500px;
}

.layout-container:fullscreen .video-container {
    padding: 0;
}

/* Pseudo-fullscreen for iOS support */
.pseudo-fullscreen {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 9999 !important;
    background: #000;
    display: flex !important;
}

.pseudo-fullscreen .video-container {
    padding: 0;
}

.pseudo-fullscreen .info-panel.panel-active {
    width: 30%;
    max-width: 500px;
}

@media (max-width: 768px) {
    .pseudo-fullscreen {
        flex-direction: row;
    }
    .pseudo-fullscreen .info-panel.panel-active {
        width: 40%;
    }
}

@media (max-width: 480px) {
    .pseudo-fullscreen {
        flex-direction: column;
    }
    .pseudo-fullscreen .info-panel.panel-active {
        width: 100%;
        height: 50%;
    }
}
@media (max-width: 768px) {
    .menu-bar {
        flex-direction: column;
        padding: 10px;
        gap: 15px;
        text-align: center;
    }

    .logo-container {
        margin-bottom: 5px;
    }

    .nav-links {
        gap: 15px;
        font-size: 12px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .layout-container {
        flex-direction: column;
    }

    .video-container {
        height: auto;
        padding: 10px;
    }

    .custom-video-player {
        max-width: 100%;
    }

    .info-panel.panel-active {
        width: 100%;
        height: auto;
        border-left: none;
        border-top: 1px solid #333;
    }

    .video-notification {
        top: 10px;
        right: 10px;
        padding: 8px;
        gap: 8px;
    }

    .video-notification img {
        height: 40px;
    }

    .notification-text p {
        font-size: 11px;
    }

    .video-controls {
        padding: 5px;
        gap: 8px;
    }

    #volume-bar {
        width: 50px;
    }

    .time-display {
        font-size: 11px;
        min-width: 60px;
    }

    .layout-container:fullscreen {
        flex-direction: row; /* Keep side-by-side in landscape fullscreen */
    }

    .layout-container:fullscreen .info-panel.panel-active {
        width: 40%;
    }
}

@media (max-width: 480px) {
    .layout-container:fullscreen {
        flex-direction: column; /* Stack in portrait fullscreen */
    }
    
    .layout-container:fullscreen .info-panel.panel-active {
        width: 100%;
        height: 50%;
    }
}

/* Info Panel */
.info-panel {
    width: 0;
    background-color: #1a1a1a;
    border-left: 1px solid #333;
    overflow-y: auto;
    height: 90vh;
    transition: width 0.8s ease-in-out;
    position: relative;
    padding-top: 20px;
}

.info-panel.panel-active {
    width: 400px;
    padding: 20px;
}

.panel-content {
    opacity: 0;
    transition: opacity 0.5s 0.8s;
}

.info-panel.panel-active .panel-content {
    opacity: 1;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 30px;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
}

.panel-book-img {
    width: 150px;
    display: block;
    margin: 0 auto 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}

.author { font-style: italic; color: #aaa; }
.rating { color: #f90; margin: 10px 0; }
.price { font-size: 1.5em; color: #fff; font-weight: bold; }
.warning { color: #f33; border: 1px solid #f33; padding: 10px; border-radius: 5px; }

/* Notification Box */
.video-notification {
    position: absolute;
    top: 40px;
    right: 40px;
    background-color: rgba(0,0,0,0.9);
    border: 2px solid #00f;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-radius: 8px;
    cursor: pointer;
    z-index: 2147483647; /* Ensure it stays above fullscreen video */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    box-shadow: 0 0 25px rgba(0,0,0,0.7);
}

.notification-in {
    animation: slideInRight 0.5s forwards;
    pointer-events: auto;
}

.notification-out {
    animation: slideOutRight 0.5s forwards;
    pointer-events: none;
}

.video-notification img {
    height: 60px;
}

.notification-text p {
    margin: 0;
    font-size: 14px;
    font-weight: 300;
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOutRight {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

.custom-video-player {
    position: relative;
    width: 100%;
    max-width: 1200px;
    background-color: #000;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border: 1px solid #333;
}

video {
    width: 100%;
    display: block;
}

.video-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    padding: 10px;
    box-sizing: border-box;
    gap: 15px;
}

.control-btn {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    font-weight: bold;
}

/* Video Sliders */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    background: #333;
    height: 5px;
    border-radius: 5px;
    outline: none;
    transition: background 0.3s;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 15px;
    height: 15px;
    background: #00aaff; /* Sundstrom Blue */
    cursor: pointer;
    border-radius: 50%;
    border: none;
}

input[type="range"]::-moz-range-thumb {
    width: 15px;
    height: 15px;
    background: #00aaff;
    cursor: pointer;
    border-radius: 50%;
    border: none;
}

#volume-bar {
    width: 80px; /* Smaller width */
}

/* Control Buttons */
.control-btn {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, color 0.2s;
}

.control-btn svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.control-btn:hover {
    color: #00aaff;
    transform: scale(1.1);
}

.time-display {
    font-size: 14px;
    min-width: 80px;
    font-family: 'Segoe UI', sans-serif;
    font-weight: 300;
}
