/* Base styles and reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Disable all animations while loading */
body.loading *,
body.loading *::before,
body.loading *::after {
    animation: none !important;
    transition: none !important;
}

/* Exception: Allow loading bar to fade out */
body.loading .loading-bar-container,
body.loading .loading-bar-container * {
    transition: opacity 0.5s ease-out !important;
}

/* While in the loading state, keep main content fully hidden so only the loading bar is visible */
body.loading .scene,
body.loading .text-overlay,
body.loading .bottom-nav,
body.loading .content {
    opacity: 0;
}

/* Basic body setup */
body {
    background-color: #000000;
    min-height: 100vh;
    overflow-x: hidden;
    /* Ensure smooth scrolling */
    scroll-behavior: smooth;
}

@media (pointer: fine) {
    body.has-custom-cursor,
    body.has-custom-cursor * {
        cursor: none !important;
    }
}

html,
body,
body * {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* Hide scrollbar for Chrome, Safari and Opera */
::-webkit-scrollbar {
    display: none;
}

/* Hide scrollbar for IE, Edge and Firefox */
* {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

.custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    background: #ffffff;
    z-index: 9999;
    opacity: 0;
    transition: opacity 120ms ease, transform 150ms ease, width 150ms ease, height 150ms ease, background 150ms ease;
}

.custom-cursor::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.custom-cursor--visible {
    opacity: 1;
}


.custom-cursor--interactive {
    width: 16px;
    height: 16px;
    background: rgba(255, 255, 255, 1);
}

.custom-cursor--cover {
    width: 16px;
    height: 16px;
    background: rgba(255, 255, 255, 1);
}

.custom-cursor--idle {
    background: rgba(255, 255, 255, 1);
}

.custom-cursor--active {
    transform: translate(-50%, -50%) scale(0.85);
}

/* Volume Slider Styles */
.volume-slider {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    padding: 8px 16px;
    transition: opacity 0.3s ease, transform 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}

.volume-slider.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Audio Work data source logo pill */
.audio-logo-pill {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 5px 12px;
    transition: opacity 0.3s ease, transform 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}

.audio-logo-pill.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.audio-logo-text {
    color: rgba(244, 244, 244, 0.95);
    font-size: 0.75rem;
    letter-spacing: 0.02em;
    font-family: var(--app-font-family, Arial, Helvetica, sans-serif);
}

.audio-logo-image {
    height: 14px;
    width: auto;
    display: block;
    filter: grayscale(100%) drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35));
}

.volume-icon {
    color: rgba(244, 244, 244, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    width: 20px;
    height: 20px;
}

.volume-icon svg {
    width: 20px;
    height: 20px;
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 120px;
}

.volume-range {
    -webkit-appearance: none;
    appearance: none;
    width: 80px;
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.35);
    outline: none;
    cursor: pointer;
    transition: background 0.2s ease;
}

.volume-range:hover {
    background: rgba(255, 255, 255, 0.65);
}

.volume-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 0.45);
    transition: all 0.2s ease;
}

.volume-range::-webkit-slider-thumb:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}

.volume-range::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 0.45);
    transition: all 0.2s ease;
}

.volume-range::-moz-range-thumb:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}

.volume-value {
    color: rgba(244, 244, 244, 0.95);
    font-size: 12px;
    font-weight: 500;
    min-width: 35px;
    text-align: center;
    font-family: var(--app-font-family, Arial, Helvetica, sans-serif);
}

/* Loading Bar Styles */
.loading-bar-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.loading-bar-border {
    width: 200px;
    height: 4px;
    border: 1px solid #ffffff;
    background-color: transparent;
    position: relative;
    overflow: hidden;
}

.loading-bar-fill {
    height: 100%;
    width: 0%;
    background-color: #ffffff;
    transition: width 0.1s ease-out;
}

.loading-bar-container.hidden {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease-out;
}
