body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden;
}

#video-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

#background-video {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
}

/* Loading overlay */
#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 900;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

#loading-overlay.hidden {
    opacity: 0;
    visibility: hidden;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: #333;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Bottom toolbar with logo and icons */
#bottom-toolbar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: white;
    padding: 15px 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.toolbar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo-container {
    display: flex;
    align-items: center;
}

.company-logo {
    max-height: 35px;
    max-width: 180px;
    width: auto;
}

.icons-container {
    display: flex;
    gap: 15px;
}

.icon-button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: #333;
    transition: color 0.3s ease, transform 0.2s ease;
    padding: 8px;
    border-radius: 50%;
}

.icon-button:hover {
    color: #0078d7;
    transform: scale(1.1);
}

.icon-button:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 120, 215, 0.5);
}

/* Sliding Panel Styles */
.sliding-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: white;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 999; /* Below toolbar but above everything else */
    transform: translateY(100%); /* Start fully below the viewport */
    transition: transform 0.3s ease-out;
    max-height: 80vh; /* Maximum height of 80% of viewport */
    display: flex;
    flex-direction: column;
}

.sliding-panel.active {
    transform: translateY(0); /* Move up to be fully visible */
}

.panel-header {
    display: flex;
    justify-content: center; /* Center the content horizontally */
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #eaeaea;
}

.panel-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: #333;
    text-align: center;
}

.panel-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

/* For portrait mode (height > width) */
@media (orientation: portrait) {
    #background-video {
        height: 100%;
        width: auto;
        min-width: unset;
        min-height: unset;
    }
    
    .company-logo {
        max-height: 28px;
        max-width: 140px;
        width: auto;
    }
    
    .sliding-panel {
        max-height: 85vh;
    }
}

/* For landscape mode (width > height) */
@media (orientation: landscape) {
    #background-video {
        width: 100%;
        height: auto;
        min-width: unset;
        min-height: unset;
    }
    
    .sliding-panel {
        max-height: 70vh;
    }
}

/* Responsive adjustments */
@media (max-width: 480px) {
    #bottom-toolbar {
        padding: 10px 0;
    }
    
    .company-logo {
        max-height: 30px;
        max-width: 150px;
        width: auto; /* Maintain aspect ratio */
    }
    
    .icon-button {
        font-size: 1.2rem;
        padding: 6px;
    }
    
    .panel-header h2 {
        font-size: 1.3rem;
    }
    
    .sliding-panel {
        max-height: 90vh;
    }
}

@media (min-width: 1200px) {
    .company-logo {
        max-height: 40px;
        max-width: 200px;
    }
    
    .icon-button {
        font-size: 1.8rem;
    }
}