/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    height: 100%;
    width: 100%;
    overflow: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    touch-action: manipulation;
}

/* Full-screen background container */
.fullscreen-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background-color: #000; /* Ultimate fallback */
}

/* Blurred cover background - fills entire area behind contained image */
.bg-cover-blur {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(10px);          /* Adjust blur intensity as needed */
    transform: scale(1.1);       /* Hide blur edges */
    z-index: 0;
}

/* Foreground contained image - shows entire image without cropping */
.bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    z-index: 1;
}

/* Audio controls - Responsive */
.audio-controls {
    position: absolute;
    bottom: 20px;
    right: 20px;
    z-index: 4;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 50px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.volume-slider {
    width: 80px;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    outline: none;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
}

.volume-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    border: none;
}

.audio-btn {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.audio-btn:hover, .audio-btn:active {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Loading overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    transition: opacity 0.8s ease;
}

.loading-spinner {
    border: 5px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    border-top: 5px solid white;
    width: 60px;
    height: 60px;
    animation: spin 1.5s linear infinite;
    margin-bottom: 20px;
}

.loading-text {
    font-size: 1.2rem;
    letter-spacing: 2px;
    text-align: center;
    padding: 0 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Mobile Landscape Orientation */
@media (max-height: 600px) and (orientation: landscape) {
    .audio-controls {
        bottom: 15px;
        right: 15px;
        padding: 10px;
    }
}

/* Mobile Phones */
@media (max-width: 767px) {
    .audio-controls {
        bottom: 15px;
        right: 15px;
        padding: 10px;
        gap: 10px;
    }
    
    .volume-slider {
        width: 60px;
    }
    
    .audio-btn {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }
    
    .loading-text {
        font-size: 1rem;
    }
}

/* Very Small Phones */
@media (max-width: 480px) {
    .audio-controls {
        bottom: 10px;
        right: 10px;
        padding: 8px;
        gap: 8px;
    }
    
    .volume-slider {
        width: 50px;
    }
}

/* Extra Small Phones (iPhone SE, etc.) */
@media (max-width: 320px) {
    .audio-controls {
        bottom: 10px;
        right: 10px;
        padding: 8px;
        gap: 8px;
    }
    
    .volume-slider {
        width: 40px;
    }
}

/* Prevent text selection */
.no-select {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}