/* ============================================
   J.A.R.V.I.S. EXTRA STYLES
   - Always-listening indicator
   - Voice visualizer
   - Particle effects
   - Boot overlay
   - Notifications
   ============================================ */

/* ===== BOOT OVERLAY (cinematic) ===== */
.boot-overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle, #000814 0%, #000000 100%);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  animation: boot-fade-in 0.5s ease-out;
}

@keyframes boot-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.boot-overlay.fading-out {
  animation: boot-fade-out 1.5s ease-in forwards;
}

@keyframes boot-fade-out {
  from { opacity: 1; transform: scale(1); }
  to { opacity: 0; transform: scale(1.15); }
}

.boot-reactor-large {
  width: 480px;
  height: 480px;
  position: relative;
  animation: boot-reactor-appear 2s ease-out;
}

@keyframes boot-reactor-appear {
  from { transform: scale(0.3); opacity: 0; filter: blur(20px); }
  to { transform: scale(1); opacity: 1; filter: blur(0); }
}

.boot-overlay .arc-reactor {
  width: 100%;
  height: 100%;
}

.boot-status {
  position: absolute;
  bottom: 80px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 14px;
  color: var(--cyan-bright);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  text-align: center;
  line-height: 2;
  animation: boot-status-glow 2s ease-in-out infinite;
}

@keyframes boot-status-glow {
  0%, 100% { text-shadow: 0 0 10px var(--cyan); }
  50% { text-shadow: 0 0 30px var(--cyan-bright); }
}

.boot-progress {
  position: absolute;
  bottom: 50px;
  width: 400px;
  height: 3px;
  background: rgba(0, 212, 255, 0.2);
  border-radius: 2px;
  overflow: hidden;
}

.boot-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--cyan-bright));
  box-shadow: 0 0 15px var(--cyan-bright);
  width: 0%;
  transition: width 0.3s ease;
}

/* ===== JARVIS STATUS BADGE ===== */
.jarvis-status-badge {
  position: fixed;
  top: 90px;
  right: 30px;
  z-index: 50;
  background: linear-gradient(135deg, rgba(0, 30, 50, 0.95), rgba(0, 10, 25, 0.95));
  border: 1px solid var(--cyan);
  border-radius: 30px;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  backdrop-filter: blur(10px);
  box-shadow: 0 0 25px rgba(0, 212, 255, 0.3);
  font-family: 'Orbitron', sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  transition: all 0.3s;
}

.jarvis-status-badge.awake {
  border-color: var(--gold);
  box-shadow: 0 0 30px var(--gold);
  animation: badge-pulse-gold 0.8s ease-in-out infinite;
}

.jarvis-status-badge.listening {
  border-color: #00ff88;
}

@keyframes badge-pulse-gold {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.status-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
  animation: dot-pulse 1.5s infinite;
}

.jarvis-status-badge.awake .status-dot {
  background: var(--gold);
  box-shadow: 0 0 12px var(--gold);
}

.jarvis-status-badge.listening .status-dot {
  background: #00ff88;
  box-shadow: 0 0 12px #00ff88;
}

@keyframes dot-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(0.7); opacity: 0.5; }
}

.status-text {
  color: var(--cyan-bright);
  font-weight: 600;
}

.jarvis-status-badge.awake .status-text { color: var(--gold); }
.jarvis-status-badge.listening .status-text { color: #00ff88; }

/* ===== VOICE VISUALIZER CANVAS ===== */
.voice-viz {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  background: rgba(0, 10, 20, 0.7);
  border: 1px solid rgba(0, 212, 255, 0.4);
  border-radius: 30px;
  padding: 10px 20px;
  backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  gap: 12px;
}

.voice-viz.active { display: flex; }

.voice-viz canvas {
  width: 200px;
  height: 40px;
}

.voice-viz-label {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.7rem;
  color: var(--cyan-bright);
  letter-spacing: 0.2em;
  white-space: nowrap;
}

/* ===== PARTICLES BACKGROUND ===== */
.particles-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  overflow: hidden;
}

.particle {
  position: absolute;
  width: 2px;
  height: 2px;
  background: var(--cyan-bright);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--cyan-bright);
  animation: particle-float linear infinite;
  opacity: 0;
}

@keyframes particle-float {
  0% { transform: translateY(100vh) translateX(0); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateY(-10vh) translateX(50px); opacity: 0; }
}

/* ===== TOAST NOTIFICATIONS ===== */
.toast-container {
  position: fixed;
  top: 100px;
  left: 30px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 350px;
}

.toast {
  background: linear-gradient(135deg, rgba(0, 30, 50, 0.95), rgba(0, 10, 25, 0.95));
  border: 1px solid var(--cyan);
  border-left: 4px solid var(--cyan-bright);
  border-radius: 4px;
  padding: 12px 16px;
  color: white;
  font-size: 0.85rem;
  backdrop-filter: blur(10px);
  box-shadow: 0 0 25px rgba(0, 212, 255, 0.3);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  animation: toast-slide-in 0.4s ease-out;
}

.toast.success { border-left-color: #00ff88; }
.toast.error { border-left-color: var(--red); }
.toast.warning { border-left-color: var(--gold); }
.toast.secret { border-left-color: var(--red); background: linear-gradient(135deg, rgba(50, 0, 20, 0.95), rgba(20, 0, 0, 0.95)); }

@keyframes toast-slide-in {
  from { transform: translateX(-120%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.toast.removing {
  animation: toast-slide-out 0.4s ease-in forwards;
}

@keyframes toast-slide-out {
  to { transform: translateX(-120%); opacity: 0; }
}

.toast-icon {
  font-size: 16px;
  color: var(--cyan-bright);
  flex-shrink: 0;
  margin-top: 2px;
}

.toast.success .toast-icon { color: #00ff88; }
.toast.error .toast-icon { color: var(--red); }
.toast.warning .toast-icon { color: var(--gold); }

.toast-body { flex: 1; }
.toast-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  color: var(--cyan-bright);
  margin-bottom: 2px;
}
.toast-msg {
  color: rgba(220, 240, 255, 0.95);
  font-size: 0.85rem;
  line-height: 1.4;
}

/* ===== STREAMING TEXT (typewriter) ===== */
.msg-text.streaming::after {
  content: '▌';
  color: var(--cyan-bright);
  animation: cursor-blink 0.8s infinite;
  margin-left: 2px;
}

@keyframes cursor-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* ===== GLITCH EFFECT ===== */
.glitch {
  position: relative;
  display: inline-block;
}
.glitch::before, .glitch::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
}
.glitch::before {
  animation: glitch-1 0.3s infinite;
  color: #ff00ff;
  z-index: -1;
}
.glitch::after {
  animation: glitch-2 0.3s infinite;
  color: #00ffff;
  z-index: -2;
}

@keyframes glitch-1 {
  0%, 100% { transform: translate(0); }
  20% { transform: translate(-2px, 2px); }
  40% { transform: translate(-2px, -2px); }
  60% { transform: translate(2px, 2px); }
  80% { transform: translate(2px, -2px); }
}

@keyframes glitch-2 {
  0%, 100% { transform: translate(0); }
  20% { transform: translate(2px, -2px); }
  40% { transform: translate(2px, 2px); }
  60% { transform: translate(-2px, -2px); }
  80% { transform: translate(-2px, 2px); }
}

/* ===== SECRET PROJECT OVERLAY ===== */
.secret-overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle, rgba(80, 0, 30, 0.9) 0%, rgba(20, 0, 0, 0.95) 100%);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  animation: secret-overlay-in 0.5s ease-out;
}

@keyframes secret-overlay-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.secret-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 3.5rem;
  font-weight: 900;
  color: var(--red);
  text-shadow: 0 0 20px var(--red), 0 0 40px var(--red);
  letter-spacing: 0.3em;
  margin-bottom: 20px;
  animation: secret-pulse 1s ease-in-out infinite;
}

@keyframes secret-pulse {
  0%, 100% { text-shadow: 0 0 20px var(--red), 0 0 40px var(--red); }
  50% { text-shadow: 0 0 40px var(--red), 0 0 80px var(--red); }
}

.secret-warning {
  font-family: 'Share Tech Mono', monospace;
  color: var(--red);
  letter-spacing: 0.3em;
  margin-bottom: 30px;
  animation: secret-warning-blink 0.5s infinite;
}

@keyframes secret-warning-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.secret-content {
  background: linear-gradient(135deg, rgba(100, 0, 30, 0.6), rgba(20, 0, 0, 0.8));
  border: 2px solid var(--red);
  padding: 30px 50px;
  border-radius: 4px;
  max-width: 600px;
  box-shadow: 0 0 40px var(--red);
}

.secret-content h3 {
  font-family: 'Orbitron', sans-serif;
  color: var(--red);
  margin-bottom: 15px;
}

.secret-content p {
  color: rgba(255, 200, 200, 0.9);
  line-height: 1.6;
}

.secret-close-btn {
  margin-top: 20px;
  background: var(--red);
  color: white;
  border: 1px solid var(--red);
  padding: 12px 24px;
  font-family: 'Orbitron', sans-serif;
  letter-spacing: 0.2em;
  cursor: pointer;
  text-transform: uppercase;
  transition: all 0.3s;
}
.secret-close-btn:hover {
  background: white;
  color: var(--red);
}

/* ===== KEYBOARD SHORTCUTS HINT ===== */
.shortcuts-hint {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 30;
  background: rgba(0, 20, 40, 0.8);
  border: 1px solid rgba(0, 212, 255, 0.3);
  border-radius: 4px;
  padding: 10px 14px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.7rem;
  color: rgba(0, 212, 255, 0.7);
  letter-spacing: 0.1em;
  backdrop-filter: blur(8px);
  line-height: 1.6;
}

.shortcuts-hint kbd {
  display: inline-block;
  padding: 2px 6px;
  background: rgba(0, 212, 255, 0.15);
  border: 1px solid rgba(0, 212, 255, 0.5);
  border-radius: 3px;
  color: var(--cyan-bright);
  font-size: 0.7rem;
  margin: 0 2px;
}

/* ===== TYPING DOTS ===== */
.typing-dots {
  display: inline-flex;
  gap: 4px;
}
.typing-dots span {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--cyan);
  animation: typing-dot 1.2s infinite ease-in-out;
}
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing-dot {
  0%, 80%, 100% { transform: scale(0.5); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

/* ===== HUD RADAR (top bar minimap) ===== */
.hud-radar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid var(--cyan);
  position: relative;
  overflow: hidden;
}
.hud-radar::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 50%;
  height: 2px;
  background: linear-gradient(90deg, var(--cyan-bright), transparent);
  transform-origin: left center;
  animation: radar-sweep 3s linear infinite;
}
.hud-radar::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 212, 255, 0.15) 30%, transparent 60%);
}
@keyframes radar-sweep {
  to { transform: rotate(360deg); }
}

/* ===== AREA NAV - active subtle indicator ===== */
.area-btn::before {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0; right: 0;
  height: 2px;
  background: var(--cyan-bright);
  transform: scaleX(0);
  transition: transform 0.3s;
}
.area-btn { position: relative; }
.area-btn.active::before { transform: scaleX(1); }

/* ===== SCROLLABLE LISTS SCROLLBAR ===== */
.tasks-list, .modules-list, .habits-list, .family-list {
  scrollbar-width: thin;
  scrollbar-color: var(--cyan) transparent;
}

/* ===== RESPONSIVE FIX MOBILE ===== */
@media (max-width: 768px) {
  .jarvis-status-badge {
    top: auto;
    bottom: 100px;
    right: 10px;
    font-size: 0.6rem;
    padding: 6px 12px;
  }
  .toast-container { left: 10px; max-width: 90vw; }
  .shortcuts-hint { display: none; }
  .arc-reactor-wrapper { width: 240px; height: 240px; }
  .arc-reactor { width: 220px; height: 220px; }
  .boot-reactor-large { width: 320px; height: 320px; }
}
