@tailwind base;
@tailwind components;
@tailwind utilities;

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: fixed;
    background-color: #030712;
    color: #f8fafc;
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

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

/* Glassmorphic UI HUD */
.glass-panel {
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.glass-pill {
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

/* Crosshair / Proximity Prompt */
.interact-bubble {
    position: absolute;
    bottom: 22%;
    left: 50%;
    transform: translateX(-50%) translateY(0);
    z-index: 30;
    pointer-events: auto;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.interact-bubble.hidden {
    opacity: 0;
    transform: translateX(-50%) translateY(12px);
    pointer-events: none;
}

/* Virtual Joystick for Mobile */
#joystick-zone {
    position: absolute;
    bottom: 30px;
    left: 30px;
    width: 130px;
    height: 130px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.15) 0%, rgba(15, 23, 42, 0.4) 70%);
    border: 2px solid rgba(56, 189, 248, 0.4);
    z-index: 40;
    touch-action: none;
    display: none;
}

#joystick-knob {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 54px;
    height: 54px;
    margin-left: -27px;
    margin-top: -27px;
    border-radius: 50%;
    background: radial-gradient(circle, #38bdf8 0%, #0284c7 100%);
    box-shadow: 0 4px 15px rgba(2, 132, 199, 0.6), inset 0 2px 4px rgba(255, 255, 255, 0.4);
    touch-action: none;
}

/* Camera Mode Drone HUD overlay */
.drone-grid {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 20;
    display: none;
    border: 2px solid rgba(16, 185, 129, 0.4);
    box-shadow: inset 0 0 80px rgba(16, 185, 129, 0.15);
}

.drone-grid.active {
    display: block;
}

.drone-scanline {
    width: 100%;
    height: 2px;
    background: rgba(16, 185, 129, 0.7);
    animation: scan 4s linear infinite;
}

@keyframes scan {
    0% { transform: translateY(0); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(100vh); opacity: 0; }
}

/* Pulsing audio speech waveform */
.waveform-bar {
    width: 4px;
    background: #38bdf8;
    border-radius: 2px;
    animation: wave 0.8s ease-in-out infinite alternate;
}
.waveform-bar:nth-child(2) { animation-delay: 0.15s; }
.waveform-bar:nth-child(3) { animation-delay: 0.3s; }
.waveform-bar:nth-child(4) { animation-delay: 0.45s; }
.waveform-bar:nth-child(5) { animation-delay: 0.2s; }

@keyframes wave {
    0% { height: 6px; }
    100% { height: 26px; }
}

/* Custom scrollbars inside modals */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.6);
}
::-webkit-scrollbar-thumb {
    background: rgba(56, 189, 248, 0.4);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(56, 189, 248, 0.8);
}
