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

body {
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    background: #2c1810;
}

/* Scene Container */
#scene-container {
    width: 100vw;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    touch-action: none; /* Prevent default touch behaviors */
}

/* Search Overlay */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    pointer-events: auto;
}

.search-overlay .input-group {
    max-width: 500px;
    margin: 0 auto;
}

.search-overlay .form-control {
    background: rgba(255, 255, 255, 0.9);
    border: none;
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #2c1810;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    transition: opacity 0.5s;
}

.loading-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

/* PDF Modal adjustments */
.modal-backdrop {
    z-index: 3000;
}

.modal {
    z-index: 3001;
}

/* Performance optimizations */
#scene-container canvas {
    display: block;
    will-change: transform;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .search-overlay {
        background: rgba(0, 0, 0, 0.8);
    }

    .search-overlay .form-control {
        font-size: 16px; /* Prevent zoom on iOS */
    }
}

/* Prevent selection and text highlighting during interactions */
body {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

/* Allow selection in modals */
.modal-body {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}
