:root {
    --bg-dark: #0b0f19;
    --card-bg: #151b2b;
    --neon-green: #00ff88;
    --neon-blue: #00f0ff;
    --text-main: #e2e8f0;
    --text-muted: #64748b;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Space Grotesk', sans-serif; }
body { background: var(--bg-dark); color: var(--text-main); overflow: hidden; height: 100vh; display: flex; flex-direction: column; }

/* Screens */
.screen { display: none; height: 100%; width: 100%; flex-direction: column; }
.screen.active { display: flex; }

/* PIN Screen */
.pin-container { margin: auto; text-align: center; position: relative; }
.glow-orb { width: 100px; height: 100px; background: var(--neon-green); filter: blur(60px); position: absolute; top: -50px; left: 50%; transform: translateX(-50%); opacity: 0.3; }
h1 { font-weight: 700; letter-spacing: 2px; margin-bottom: 5px; }
.pin-container p { color: var(--text-muted); margin-bottom: 20px; }
#pin-input { 
    display: block;
    margin: 0 auto 20px auto;
    width: 200px; padding: 15px; border-radius: 12px; border: 1px solid #334155; 
    background: var(--card-bg); color: white; text-align: center; font-size: 24px; 
    letter-spacing: 10px; outline: none; 
}
#pin-input:focus { border-color: var(--neon-green); box-shadow: 0 0 15px rgba(0,255,136,0.2); }

/* Buttons */
#login-btn, #logout-btn, #map-btn { 
    background: var(--neon-green); color: var(--bg-dark); border: none; 
    padding: 10px 20px; border-radius: 8px; font-weight: 700; cursor: pointer; transition: 0.2s; 
}
#login-btn { display: block; margin: 0 auto; padding: 12px 30px; }
#login-btn:active, #logout-btn:active, #map-btn:active { transform: scale(0.95); }

#map-btn { background: transparent; border: 1px solid var(--neon-blue); color: var(--neon-blue); margin-right: 10px; }
#map-btn:hover { background: rgba(0, 240, 255, 0.1); }
#logout-btn { background: #334155; color: white; }
#logout-btn:hover { background: #ef4444; color: white; }

/* App Screen Header */
header { display: flex; justify-content: space-between; align-items: center; padding: 20px; background: rgba(11, 15, 25, 0.9); backdrop-filter: blur(10px); border-bottom: 1px solid #1e293b; }
.header-left { display: flex; align-items: center; gap: 10px; }
.header-actions { display: flex; align-items: center; }
.status-dot { width: 10px; height: 10px; border-radius: 50%; background: #ef4444; box-shadow: 0 0 10px #ef4444; }
.status-dot.connected { background: var(--neon-green); box-shadow: 0 0 10px var(--neon-green); }

/* Chat */
#chat-container { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 15px; scroll-behavior: smooth; }
.msg { max-width: 85%; padding: 15px; border-radius: 16px; line-height: 1.5; font-size: 15px; animation: fadeIn 0.3s ease; }
.msg.user { align-self: flex-end; background: #1e293b; border-bottom-right-radius: 4px; }
.msg.ai { align-self: flex-start; background: var(--card-bg); border-bottom-left-radius: 4px; border-left: 3px solid var(--neon-green); }

/* Code Blocks & Copy Button */
pre { background: #000 !important; padding: 15px; border-radius: 8px; overflow-x: auto; margin-top: 10px; position: relative; }
pre code { font-family: monospace; font-size: 13px; }
.copy-btn { position: absolute; top: 10px; right: 10px; background: #334155; color: white; border: none; padding: 5px 10px; border-radius: 4px; font-size: 11px; cursor: pointer; }

/* Controls & Visualizer */
.controls { padding: 20px; background: var(--card-bg); text-align: center; border-top: 1px solid #1e293b; position: relative; }
.mic-btn { width: 70px; height: 70px; border-radius: 50%; border: none; background: #1e293b; color: white; cursor: pointer; display: flex; align-items: center; justify-content: center; margin: 0 auto 10px auto; transition: 0.3s; z-index: 2; position: relative; }
.mic-btn.active { background: var(--neon-green); color: var(--bg-dark); transform: scale(1.1); box-shadow: 0 0 30px rgba(0,255,136,0.4); }
#status-text { color: var(--text-muted); font-size: 13px; }
.visualizer { 
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); 
    width: 70px; height: 70px; border-radius: 50%; border: 2px solid var(--neon-green); 
    opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
.visualizer.active { opacity: 1; animation: pulse 0.8s infinite alternate ease-out; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse { 
    0% { width: 70px; height: 70px; border-width: 2px; } 
    100% { width: 140px; height: 140px; border-width: 8px; opacity: 0; } 
}