* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none;
}

body, html {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: #010206;
    font-family: 'Jura', sans-serif;
    color: #c8e6ff;
}

#canvas-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* CSS Glitch Shake Effect triggered on bass drop */
.glitch-shake {
    animation: glitch-anim 0.15s linear;
}

@keyframes glitch-anim {
    0% { transform: translate(0, 0) skew(0deg); filter: contrast(1) saturate(1); }
    20% { transform: translate(-2px, 2px) skew(-1deg); filter: contrast(1.3) saturate(1.4); }
    40% { transform: translate(2px, -1px) skew(1deg); filter: contrast(1.5) saturate(1.8); }
    60% { transform: translate(-1px, -2px) skew(-0.5deg); filter: contrast(1.2) saturate(1.2); }
    80% { transform: translate(2px, 1px) skew(0deg); filter: contrast(1.4) saturate(1.5); }
    100% { transform: translate(0, 0) skew(0deg); filter: contrast(1) saturate(1); }
}

/* Startup Fullscreen Overlay */
#startup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(10, 20, 40, 0.9) 0%, rgba(2, 4, 12, 0.98) 100%);
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease-out;
}

#startup-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.welcome-box {
    width: 90%;
    max-width: 500px;
    background: rgba(3, 10, 25, 0.75);
    border: 1px solid rgba(0, 240, 255, 0.25);
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), inset 0 0 20px rgba(0, 240, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.welcome-box h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 20px;
    font-weight: 900;
    color: #00f0ff;
    letter-spacing: 2px;
    margin-bottom: 12px;
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.35);
}

.welcome-box p {
    font-size: 13px;
    color: rgba(200, 230, 255, 0.7);
    line-height: 1.6;
    margin-bottom: 25px;
}

.drop-zone {
    border: 2px dashed rgba(0, 240, 255, 0.3);
    background-color: rgba(0, 240, 255, 0.03);
    border-radius: 8px;
    padding: 30px 20px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.drop-zone:hover, .drop-zone.dragover {
    border-color: #00f0ff;
    background-color: rgba(0, 240, 255, 0.08);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.15);
}

.upload-icon {
    font-size: 32px;
    margin-bottom: 10px;
}

.drop-zone .text {
    font-weight: bold;
    font-size: 13px;
    color: #ffffff;
    margin-bottom: 4px;
}

.drop-zone .subtext {
    font-size: 11px;
    color: rgba(200, 230, 255, 0.45);
}

#file-input {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    opacity: 0;
    cursor: pointer;
}

.controls-row {
    margin-top: 10px;
}

.neon-btn {
    width: 100%;
    background-color: rgba(0, 240, 255, 0.1);
    border: 1px solid rgba(0, 240, 255, 0.4);
    border-radius: 6px;
    color: #00f0ff;
    font-family: 'Orbitron', sans-serif;
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 1px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.neon-btn:hover {
    background-color: rgba(0, 240, 255, 0.25);
    border-color: #00f0ff;
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.3);
}

.neon-btn:active {
    transform: scale(0.98);
}

.tip-box {
    margin-top: 20px;
    background-color: rgba(255, 0, 119, 0.05);
    border: 1px solid rgba(255, 0, 119, 0.2);
    border-radius: 6px;
    padding: 12px;
    text-align: left;
    font-size: 11px;
}

.tip-title {
    display: block;
    color: #ff0077;
    font-weight: bold;
    font-family: 'Orbitron', sans-serif;
    margin-bottom: 4px;
}

.tip-desc {
    color: rgba(200, 230, 255, 0.75);
    line-height: 1.4;
}

/* Floating HUD Controls Panel */
#hud-panel {
    position: absolute;
    top: 30px;
    left: 30px;
    width: 320px;
    background: rgba(3, 10, 20, 0.72);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(0, 240, 255, 0.22);
    border-radius: 12px;
    padding: 20px;
    z-index: 5;
    box-shadow: 0 15px 35px rgba(0,0,0,0.7), inset 0 0 15px rgba(0, 240, 255, 0.04);
    opacity: 0;
    transform: translateX(-30px);
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.125);
    max-height: 90%;
    overflow-y: auto;
}

#hud-panel::-webkit-scrollbar {
    width: 4px;
}
#hud-panel::-webkit-scrollbar-thumb {
    background: rgba(0, 240, 255, 0.2);
    border-radius: 2px;
}

#hud-panel.visible {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

.hud-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(0, 240, 255, 0.15);
    padding-bottom: 10px;
}

.status-dot {
    width: 6px;
    height: 6px;
    background-color: #00f0ff;
    border-radius: 50%;
    margin-right: 8px;
    box-shadow: 0 0 8px #00f0ff;
    animation: flash 1.5s infinite;
}

@keyframes flash {
    0% { opacity: 0.3; }
    50% { opacity: 1; }
    100% { opacity: 0.3; }
}

.hud-header h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 2px;
    color: #00f0ff;
}

.hud-row {
    margin-bottom: 12px;
}

.hud-row label {
    display: block;
    font-size: 10px;
    color: rgba(200, 230, 255, 0.5);
    margin-bottom: 6px;
    font-weight: bold;
    letter-spacing: 1px;
}

.hud-row select {
    width: 100%;
    background-color: rgba(0, 240, 255, 0.06);
    border: 1px solid rgba(0, 240, 255, 0.22);
    border-radius: 4px;
    color: #ffffff;
    font-family: 'Jura', sans-serif;
    font-size: 11px;
    padding: 6px;
    outline: none;
}

.hud-row select option {
    background-color: #040815;
    color: #ffffff;
}

.hud-row input[type="range"] {
    width: 100%;
    height: 3px;
    background-color: rgba(0, 240, 255, 0.12);
    outline: none;
    border: none;
    -webkit-appearance: none;
}

.hud-row input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #00f0ff;
    box-shadow: 0 0 6px #00f0ff;
    cursor: pointer;
}

.checkbox-row {
    margin-top: 10px;
    margin-bottom: 10px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    font-size: 10px;
    font-weight: bold;
    cursor: pointer;
    color: #00f0ff;
    letter-spacing: 1px;
}

.neon-pink-text {
    color: #ff0077 !important;
}

.cyan-text {
    color: #00f0ff !important;
}

.checkbox-label input {
    margin-right: 8px;
    accent-color: #00f0ff;
    cursor: pointer;
}

.neon-pink-text input {
    accent-color: #ff0077 !important;
}

/* Camera presets grid */
.preset-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
}

.preset-btn {
    background-color: rgba(0, 240, 255, 0.04);
    border: 1px solid rgba(0, 240, 255, 0.25);
    border-radius: 4px;
    color: #c8e6ff;
    font-family: 'Orbitron', sans-serif;
    font-size: 8px;
    font-weight: bold;
    padding: 6px 0;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.preset-btn:hover, .preset-btn.active {
    background-color: rgba(0, 240, 255, 0.18);
    border-color: #00f0ff;
    color: #00f0ff;
    box-shadow: 0 0 8px rgba(0, 240, 255, 0.2);
}

.file-info {
    border-top: 1px solid rgba(0, 240, 255, 0.12);
    padding-top: 10px;
    font-size: 11px;
}

.active-text {
    color: #00f0ff;
    font-weight: bold;
    word-break: break-all;
}

.hud-footer {
    margin-top: 15px;
}

.hud-btn-small {
    width: 100%;
    background: transparent;
    border: 1px solid rgba(0, 240, 255, 0.2);
    border-radius: 4px;
    color: rgba(0, 240, 255, 0.7);
    font-family: 'Jura', sans-serif;
    font-size: 10px;
    font-weight: bold;
    padding: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.hud-btn-small:hover {
    border-color: #00f0ff;
    color: #00f0ff;
    box-shadow: 0 0 8px rgba(0, 240, 255, 0.15);
}

/* WebXR VR Button Override Styling */
#VRButton {
    border: 1px solid #00f0ff !important;
    background: rgba(3, 10, 25, 0.75) !important;
    color: #00f0ff !important;
    border-radius: 6px !important;
    font-family: 'Orbitron', sans-serif !important;
    font-size: 12px !important;
    letter-spacing: 1px !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5) !important;
    transition: all 0.2s !important;
}

#VRButton:hover {
    background: rgba(0, 240, 255, 0.2) !important;
    box-shadow: 0 0 12px rgba(0, 240, 255, 0.3) !important;
}
