/* ============================================
   J.A.R.V.I.S. - Iron Man HUD Interface
   Senhor Gabriel's Personal AI System
   ============================================ */

:root {
  --cyan: #00d4ff;
  --cyan-bright: #5fffff;
  --cyan-dark: #006677;
  --cyan-glow: rgba(0, 212, 255, 0.5);
  --blue: #0088ff;
  --gold: #ffd700;
  --red: #ff0040;
  --bg-deep: #000208;
  --bg-mid: #001a26;
  --grid: rgba(0, 212, 255, 0.08);
}

* {
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-deep);
  color: var(--cyan);
  font-family: 'Rajdhani', 'Orbitron', sans-serif;
  overflow-x: hidden;
  min-height: 100vh;
}

.jarvis-body {
  background:
    radial-gradient(ellipse at center, #001428 0%, #000208 70%, #000000 100%);
  min-height: 100vh;
  position: relative;
}

/* === BACKGROUND GRID === */
.hud-grid-bg {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
  z-index: 0;
  animation: grid-drift 60s linear infinite;
}

@keyframes grid-drift {
  from { background-position: 0 0, 0 0; }
  to { background-position: 50px 50px, 50px 50px; }
}

/* === SCANLINES === */
.hud-scanlines {
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent 0,
    transparent 2px,
    rgba(0, 212, 255, 0.025) 3px,
    transparent 4px
  );
  pointer-events: none;
  z-index: 1;
  animation: scanline-flicker 8s infinite;
}

@keyframes scanline-flicker {
  0%, 95%, 100% { opacity: 1; }
  96% { opacity: 0.3; }
  98% { opacity: 0.8; }
}

/* === HUD CORNERS === */
.hud-corner {
  position: fixed;
  width: 80px;
  height: 80px;
  border: 2px solid var(--cyan);
  z-index: 5;
  opacity: 0.7;
}
.hud-corner-tl { top: 20px; left: 20px; border-right: none; border-bottom: none; }
.hud-corner-tr { top: 20px; right: 20px; border-left: none; border-bottom: none; }
.hud-corner-bl { bottom: 20px; left: 20px; border-right: none; border-top: none; }
.hud-corner-br { bottom: 20px; right: 20px; border-left: none; border-top: none; }

.hud-corner::before, .hud-corner::after {
  content: '';
  position: absolute;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
}
.hud-corner-tl::before { top: 0; left: 0; width: 20px; height: 4px; }
.hud-corner-tl::after { top: 0; left: 0; width: 4px; height: 20px; }
.hud-corner-tr::before { top: 0; right: 0; width: 20px; height: 4px; }
.hud-corner-tr::after { top: 0; right: 0; width: 4px; height: 20px; }
.hud-corner-bl::before { bottom: 0; left: 0; width: 20px; height: 4px; }
.hud-corner-bl::after { bottom: 0; left: 0; width: 4px; height: 20px; }
.hud-corner-br::before { bottom: 0; right: 0; width: 20px; height: 4px; }
.hud-corner-br::after { bottom: 0; right: 0; width: 4px; height: 20px; }

/* === TELEMETRY === */
.hud-telemetry {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  color: var(--cyan);
  opacity: 0.6;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.hud-telemetry-left { left: 40px; }
.hud-telemetry-right { right: 40px; text-align: right; }

.telemetry-line {
  letter-spacing: 0.15em;
  padding: 4px 8px;
  border-left: 2px solid var(--cyan);
  background: linear-gradient(90deg, rgba(0, 212, 255, 0.1), transparent);
}
.hud-telemetry-right .telemetry-line {
  border-left: none;
  border-right: 2px solid var(--cyan);
  background: linear-gradient(-90deg, rgba(0, 212, 255, 0.1), transparent);
}

/* ============================================
   BOOT / LOGIN SCREEN
   ============================================ */
.boot-container {
  position: relative;
  z-index: 10;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  padding: 20px;
}

.jarvis-title {
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(2.5rem, 7vw, 5rem);
  font-weight: 900;
  letter-spacing: 0.3em;
  color: var(--cyan-bright);
  text-shadow:
    0 0 10px var(--cyan),
    0 0 20px var(--cyan),
    0 0 40px var(--cyan),
    0 0 80px var(--cyan);
  margin: 0;
  animation: title-pulse 3s ease-in-out infinite;
}

@keyframes title-pulse {
  0%, 100% { text-shadow: 0 0 10px var(--cyan), 0 0 20px var(--cyan), 0 0 40px var(--cyan); }
  50% { text-shadow: 0 0 20px var(--cyan), 0 0 40px var(--cyan), 0 0 80px var(--cyan), 0 0 120px var(--cyan); }
}

.jarvis-subtitle {
  font-family: 'Rajdhani', sans-serif;
  font-size: clamp(0.8rem, 1.5vw, 1.1rem);
  letter-spacing: 0.4em;
  color: rgba(0, 212, 255, 0.7);
  text-transform: uppercase;
  margin: 5px 0 0 0;
}

.boot-log {
  font-family: 'Share Tech Mono', monospace;
  font-size: 12px;
  color: var(--cyan);
  text-align: left;
  max-width: 500px;
  margin: 20px auto 0;
  min-height: 150px;
  line-height: 1.8;
}

.boot-log .log-line {
  opacity: 0;
  animation: log-appear 0.3s forwards;
}
.boot-log .log-ok { color: #00ff88; }
.boot-log .log-warn { color: var(--gold); }

@keyframes log-appear {
  from { opacity: 0; transform: translateX(-10px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ============================================
   ARC REACTOR
   ============================================ */
.arc-reactor-wrapper {
  position: relative;
  width: 320px;
  height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.arc-reactor {
  position: relative;
  width: 280px;
  height: 280px;
  border-radius: 50%;
}

.arc-outer-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--cyan);
  box-shadow:
    0 0 30px var(--cyan-glow),
    inset 0 0 30px var(--cyan-glow);
  animation: rotate-cw 20s linear infinite;
}
.arc-outer-ring::before {
  content: '';
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 1px dashed rgba(0, 212, 255, 0.4);
}

.arc-mid-ring {
  position: absolute;
  inset: 30px;
  border-radius: 50%;
  border: 1px solid var(--cyan);
  border-top: 3px solid var(--cyan-bright);
  border-right: 3px solid var(--cyan-bright);
  box-shadow: 0 0 20px var(--cyan-glow);
  animation: rotate-ccw 12s linear infinite;
}

.arc-inner-ring {
  position: absolute;
  inset: 60px;
  border-radius: 50%;
  border: 2px solid var(--cyan-bright);
  box-shadow:
    0 0 25px var(--cyan-bright),
    inset 0 0 25px var(--cyan-bright);
  animation: rotate-cw 8s linear infinite;
}

.arc-core {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: radial-gradient(circle, #ffffff 0%, var(--cyan-bright) 30%, var(--cyan) 60%, var(--blue) 100%);
  transform: translate(-50%, -50%);
  box-shadow:
    0 0 60px var(--cyan-bright),
    0 0 100px var(--cyan),
    0 0 150px var(--cyan);
  animation: core-pulse 2s ease-in-out infinite;
}

.arc-core-glow {
  position: absolute;
  inset: -20px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--cyan-bright) 0%, transparent 70%);
  animation: core-pulse 2s ease-in-out infinite alternate;
}

.arc-triangle {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 70px;
  height: 70px;
  transform: translate(-50%, -50%) rotate(0deg);
  background: linear-gradient(135deg, transparent 30%, rgba(255, 255, 255, 0.6) 50%, transparent 70%);
  clip-path: polygon(50% 5%, 95% 90%, 5% 90%);
  filter: drop-shadow(0 0 20px var(--cyan-bright));
  animation: triangle-rotate 10s linear infinite;
}

@keyframes triangle-rotate {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

.arc-segments {
  position: absolute;
  inset: 90px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.arc-segment {
  position: absolute;
  width: 4px;
  height: 30px;
  background: var(--cyan-bright);
  border-radius: 2px;
  box-shadow: 0 0 8px var(--cyan-bright);
  top: 50%;
  left: 50%;
  transform-origin: center 60px;
  opacity: 0.8;
}
.arc-segment:nth-child(1) { transform: translate(-50%, -50%) rotate(0deg); animation: segment-pulse 1.5s ease-in-out infinite; }
.arc-segment:nth-child(2) { transform: translate(-50%, -50%) rotate(30deg); animation: segment-pulse 1.5s ease-in-out infinite 0.1s; }
.arc-segment:nth-child(3) { transform: translate(-50%, -50%) rotate(60deg); animation: segment-pulse 1.5s ease-in-out infinite 0.2s; }
.arc-segment:nth-child(4) { transform: translate(-50%, -50%) rotate(90deg); animation: segment-pulse 1.5s ease-in-out infinite 0.3s; }
.arc-segment:nth-child(5) { transform: translate(-50%, -50%) rotate(120deg); animation: segment-pulse 1.5s ease-in-out infinite 0.4s; }
.arc-segment:nth-child(6) { transform: translate(-50%, -50%) rotate(150deg); animation: segment-pulse 1.5s ease-in-out infinite 0.5s; }
.arc-segment:nth-child(7) { transform: translate(-50%, -50%) rotate(180deg); animation: segment-pulse 1.5s ease-in-out infinite 0.6s; }
.arc-segment:nth-child(8) { transform: translate(-50%, -50%) rotate(210deg); animation: segment-pulse 1.5s ease-in-out infinite 0.7s; }
.arc-segment:nth-child(9) { transform: translate(-50%, -50%) rotate(240deg); animation: segment-pulse 1.5s ease-in-out infinite 0.8s; }
.arc-segment:nth-child(10) { transform: translate(-50%, -50%) rotate(270deg); animation: segment-pulse 1.5s ease-in-out infinite 0.9s; }
.arc-segment:nth-child(11) { transform: translate(-50%, -50%) rotate(300deg); animation: segment-pulse 1.5s ease-in-out infinite 1.0s; }
.arc-segment:nth-child(12) { transform: translate(-50%, -50%) rotate(330deg); animation: segment-pulse 1.5s ease-in-out infinite 1.1s; }

@keyframes segment-pulse {
  0%, 100% { opacity: 0.4; height: 25px; }
  50% { opacity: 1; height: 35px; }
}

@keyframes rotate-cw {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes rotate-ccw {
  from { transform: rotate(360deg); }
  to { transform: rotate(0deg); }
}
@keyframes core-pulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -50%) scale(1.08); }
}

/* ============================================
   LOGIN FORM
   ============================================ */
.login-form {
  background: rgba(0, 20, 40, 0.6);
  border: 1px solid var(--cyan);
  padding: 30px 50px;
  border-radius: 4px;
  position: relative;
  min-width: 380px;
  backdrop-filter: blur(10px);
  box-shadow:
    0 0 30px var(--cyan-glow),
    inset 0 0 20px rgba(0, 212, 255, 0.1);
}

.login-form::before {
  content: '';
  position: absolute;
  top: -1px; left: -1px; right: -1px; bottom: -1px;
  border: 1px solid var(--cyan-bright);
  pointer-events: none;
  animation: login-border 2s ease-in-out infinite alternate;
}

@keyframes login-border {
  from { opacity: 0.3; box-shadow: 0 0 5px var(--cyan); }
  to { opacity: 1; box-shadow: 0 0 20px var(--cyan-bright); }
}

.login-greeting {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.2rem;
  margin: 0 0 8px;
  letter-spacing: 0.05em;
}

.login-name {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--cyan-bright);
  text-shadow: 0 0 10px var(--cyan);
}

.login-prompt {
  font-size: 0.85rem;
  color: rgba(0, 212, 255, 0.7);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin: 15px 0 10px;
}

.pin-input-wrapper {
  position: relative;
  margin: 15px 0;
}

.pin-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.5);
  border: 2px solid var(--cyan);
  color: var(--cyan-bright);
  font-family: 'Share Tech Mono', monospace;
  font-size: 2rem;
  text-align: center;
  letter-spacing: 1rem;
  padding: 15px;
  outline: none;
  border-radius: 4px;
  transition: all 0.3s;
}

.pin-input:focus {
  box-shadow: 0 0 20px var(--cyan-bright);
  border-color: var(--cyan-bright);
}

.login-button {
  width: 100%;
  background: linear-gradient(135deg, var(--cyan-dark), var(--blue));
  border: 1px solid var(--cyan-bright);
  color: white;
  padding: 12px;
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
  letter-spacing: 0.2em;
  cursor: pointer;
  transition: all 0.3s;
  margin-top: 15px;
  text-transform: uppercase;
}

.login-button:hover {
  background: linear-gradient(135deg, var(--cyan), var(--cyan-bright));
  box-shadow: 0 0 25px var(--cyan-bright);
  transform: translateY(-2px);
}

.login-error {
  color: var(--red);
  font-size: 0.85rem;
  text-align: center;
  margin: 10px 0;
  letter-spacing: 0.1em;
}

.login-hint {
  text-align: center;
  font-size: 0.75rem;
  color: rgba(0, 212, 255, 0.5);
  margin: 15px 0 0;
  letter-spacing: 0.1em;
}

/* ============================================
   DASHBOARD
   ============================================ */
.dash-header {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 100px;
  border-bottom: 1px solid rgba(0, 212, 255, 0.3);
  background: linear-gradient(180deg, rgba(0, 30, 50, 0.6), transparent);
}

.dash-header-left {
  display: flex;
  align-items: center;
  gap: 15px;
}

.logo-mini {
  width: 50px; height: 50px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--cyan-bright), var(--blue));
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  color: white;
  box-shadow: 0 0 20px var(--cyan);
  animation: core-pulse 2s ease-in-out infinite;
}

.dash-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  color: var(--cyan-bright);
  text-shadow: 0 0 10px var(--cyan);
}

.dash-subtitle {
  font-size: 0.7rem;
  color: rgba(0, 212, 255, 0.7);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.dash-header-center {
  text-align: center;
}

.dash-clock {
  font-family: 'Orbitron', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--cyan-bright);
  text-shadow: 0 0 10px var(--cyan);
  letter-spacing: 0.1em;
}

.dash-date {
  font-size: 0.75rem;
  color: rgba(0, 212, 255, 0.7);
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

.dash-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.status-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(0, 255, 100, 0.1);
  border: 1px solid #00ff66;
  border-radius: 20px;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  color: #00ff88;
}

.status-blink {
  animation: blink 1.5s infinite;
}

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

.hud-btn {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: rgba(0, 30, 50, 0.6);
  border: 1px solid var(--cyan);
  color: var(--cyan-bright);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  transition: all 0.3s;
}
.hud-btn:hover {
  background: var(--cyan-dark);
  box-shadow: 0 0 15px var(--cyan);
  transform: translateY(-2px);
}
.hud-btn.active {
  background: var(--cyan);
  color: black;
  box-shadow: 0 0 20px var(--cyan-bright);
}

/* === GRID === */
.dash-grid {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: 280px 1fr 320px;
  gap: 20px;
  padding: 20px 100px;
  align-items: start;
}

@media (max-width: 1200px) {
  .dash-grid { grid-template-columns: 1fr; padding: 20px; }
  .dash-header { padding: 20px; }
  .hud-telemetry { display: none; }
  .hud-corner { display: none; }
}

.dash-left, .dash-right {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

/* === HUD CARD === */
.hud-card {
  background: linear-gradient(135deg, rgba(0, 30, 50, 0.6), rgba(0, 10, 25, 0.8));
  border: 1px solid var(--cyan);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
  backdrop-filter: blur(8px);
  box-shadow:
    0 0 20px rgba(0, 212, 255, 0.15),
    inset 0 0 20px rgba(0, 212, 255, 0.05);
}

.hud-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--cyan-bright), transparent);
  animation: card-shine 4s ease-in-out infinite;
}

@keyframes card-shine {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

.hud-card-header {
  padding: 10px 15px;
  background: rgba(0, 212, 255, 0.1);
  border-bottom: 1px solid rgba(0, 212, 255, 0.3);
  font-family: 'Orbitron', sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: var(--cyan-bright);
  text-transform: uppercase;
}

.hud-card-header i {
  margin-right: 8px;
  color: var(--cyan);
}

.hud-card-body {
  padding: 15px;
}

.big-date {
  font-family: 'Orbitron', sans-serif;
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--cyan-bright);
  text-shadow: 0 0 15px var(--cyan);
  line-height: 1;
}

.day-name {
  font-size: 0.85rem;
  color: rgba(0, 212, 255, 0.8);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-top: 5px;
}

.goal-amount {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--gold);
  text-shadow: 0 0 10px var(--gold);
}

.goal-label {
  font-size: 0.75rem;
  color: rgba(255, 215, 0, 0.7);
  letter-spacing: 0.15em;
  margin-bottom: 10px;
}

.progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(0, 212, 255, 0.2);
  border-radius: 3px;
  overflow: hidden;
  margin: 8px 0 4px;
}

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

.weather-body {
  display: flex;
  align-items: center;
  gap: 15px;
}

.weather-temp {
  font-family: 'Orbitron', sans-serif;
  font-size: 3rem;
  font-weight: 800;
  color: var(--cyan-bright);
  text-shadow: 0 0 15px var(--cyan);
  line-height: 1;
}

.weather-info {
  font-size: 0.85rem;
  color: rgba(0, 212, 255, 0.9);
}

.power-circle {
  width: 100px; height: 100px;
  border-radius: 50%;
  border: 4px solid var(--cyan-bright);
  display: flex; align-items: center; justify-content: center;
  margin: 5px auto;
  box-shadow: 0 0 20px var(--cyan-bright), inset 0 0 20px rgba(0, 212, 255, 0.3);
  position: relative;
}

.power-circle::before {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 1px dashed var(--cyan);
  animation: rotate-cw 15s linear infinite;
}

.power-value {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--cyan-bright);
  text-shadow: 0 0 10px var(--cyan);
}

/* === DASH CENTER === */
.dash-center {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
}

.center-reactor {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
}

.arc-reactor-dashboard {
  width: 280px;
  height: 280px;
}

.arc-reactor-dashboard .arc-core { width: 80px; height: 80px; }
.arc-reactor-dashboard .arc-triangle { width: 60px; height: 60px; }

.reactor-label {
  text-align: center;
  margin-top: 15px;
  font-family: 'Orbitron', sans-serif;
}

/* === CHAT === */
.jarvis-chat {
  width: 100%;
  background: linear-gradient(135deg, rgba(0, 30, 50, 0.7), rgba(0, 10, 25, 0.9));
  border: 1px solid var(--cyan);
  border-radius: 4px;
  overflow: hidden;
  box-shadow:
    0 0 30px rgba(0, 212, 255, 0.2),
    inset 0 0 30px rgba(0, 212, 255, 0.05);
}

.chat-header {
  padding: 12px 18px;
  background: rgba(0, 212, 255, 0.15);
  border-bottom: 1px solid var(--cyan);
  font-family: 'Orbitron', sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: var(--cyan-bright);
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-messages {
  max-height: 400px;
  overflow-y: auto;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 200px;
}

.chat-messages::-webkit-scrollbar { width: 6px; }
.chat-messages::-webkit-scrollbar-track { background: rgba(0, 212, 255, 0.05); }
.chat-messages::-webkit-scrollbar-thumb { background: var(--cyan); border-radius: 3px; }

.msg {
  display: flex;
  gap: 12px;
  animation: msg-appear 0.4s ease-out;
}

@keyframes msg-appear {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.msg-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
}

.msg-jarvis .msg-avatar {
  background: radial-gradient(circle, var(--cyan-bright), var(--blue));
  color: white;
  box-shadow: 0 0 15px var(--cyan);
}

.msg-user .msg-avatar {
  background: rgba(0, 212, 255, 0.2);
  border: 1px solid var(--cyan);
  color: var(--cyan-bright);
}

.msg-content { flex: 1; }

.msg-name {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: var(--cyan-bright);
  margin-bottom: 4px;
}

.msg-user .msg-name { color: var(--gold); }

.msg-text {
  font-size: 0.95rem;
  line-height: 1.6;
  color: rgba(220, 240, 255, 0.95);
  white-space: pre-wrap;
}

.chat-input-wrapper {
  display: flex;
  gap: 8px;
  padding: 14px;
  border-top: 1px solid rgba(0, 212, 255, 0.3);
  background: rgba(0, 0, 0, 0.4);
}

.chat-input {
  flex: 1;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(0, 212, 255, 0.5);
  color: white;
  padding: 10px 14px;
  font-family: 'Rajdhani', sans-serif;
  font-size: 1rem;
  outline: none;
  border-radius: 4px;
  transition: all 0.3s;
}
.chat-input:focus {
  border-color: var(--cyan-bright);
  box-shadow: 0 0 12px var(--cyan-glow);
}

.chat-mic-btn, .chat-send-btn {
  width: 42px;
  background: rgba(0, 212, 255, 0.15);
  border: 1px solid var(--cyan);
  color: var(--cyan-bright);
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.3s;
  font-size: 14px;
}
.chat-mic-btn:hover, .chat-send-btn:hover {
  background: var(--cyan);
  color: black;
  box-shadow: 0 0 15px var(--cyan);
}
.chat-mic-btn.recording {
  background: var(--red);
  color: white;
  border-color: var(--red);
  animation: recording-pulse 1s infinite;
}

@keyframes recording-pulse {
  0%, 100% { box-shadow: 0 0 5px var(--red); }
  50% { box-shadow: 0 0 20px var(--red); }
}

/* === MODULES LIST === */
.modules-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.module-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: rgba(0, 212, 255, 0.05);
  border: 1px solid rgba(0, 212, 255, 0.3);
  border-left: 3px solid var(--cyan);
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.2s;
}

.module-item:hover {
  background: rgba(0, 212, 255, 0.15);
  border-left-color: var(--cyan-bright);
  transform: translateX(3px);
}

.module-item.secret {
  border-left-color: var(--red);
  background: rgba(255, 0, 64, 0.05);
}
.module-item.secret:hover {
  background: rgba(255, 0, 64, 0.15);
}

.module-icon {
  width: 32px; height: 32px;
  border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  background: rgba(0, 212, 255, 0.2);
  color: var(--cyan-bright);
  flex-shrink: 0;
}

.module-info { flex: 1; min-width: 0; }
.module-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: white;
  letter-spacing: 0.05em;
}
.module-desc {
  font-size: 0.7rem;
  color: rgba(0, 212, 255, 0.6);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* === TASKS === */
.tasks-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 320px;
  overflow-y: auto;
}
.tasks-list::-webkit-scrollbar { width: 4px; }
.tasks-list::-webkit-scrollbar-thumb { background: var(--cyan); }

.task-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(0, 212, 255, 0.2);
  border-radius: 3px;
  font-size: 0.8rem;
  transition: all 0.2s;
}
.task-item:hover {
  border-color: var(--cyan);
  background: rgba(0, 212, 255, 0.1);
}

.task-check {
  width: 18px; height: 18px;
  border: 2px solid var(--cyan);
  border-radius: 3px;
  cursor: pointer;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px;
  transition: all 0.2s;
}
.task-check:hover { background: rgba(0, 212, 255, 0.2); }
.task-check.done {
  background: var(--cyan);
  color: black;
}

.task-title {
  flex: 1;
  color: white;
  line-height: 1.3;
}
.task-item.done .task-title {
  text-decoration: line-through;
  color: rgba(0, 212, 255, 0.5);
}

.task-priority-1 { border-left: 3px solid var(--red); }
.task-priority-2 { border-left: 3px solid var(--gold); }
.task-priority-3 { border-left: 3px solid var(--cyan); }

.task-area-tag {
  font-size: 0.6rem;
  padding: 2px 6px;
  border-radius: 2px;
  background: rgba(0, 212, 255, 0.2);
  color: var(--cyan-bright);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* === HABITS === */
.habits-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.habit-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(0, 212, 255, 0.2);
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.2s;
}
.habit-item:hover {
  border-color: var(--cyan);
  background: rgba(0, 212, 255, 0.1);
}
.habit-item.checked {
  background: rgba(0, 255, 100, 0.1);
  border-color: #00ff66;
}

.habit-icon {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: rgba(0, 212, 255, 0.2);
  color: var(--cyan-bright);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
}
.habit-item.checked .habit-icon {
  background: #00ff66;
  color: black;
}

.habit-info { flex: 1; }
.habit-name {
  font-size: 0.85rem;
  color: white;
}
.habit-meta {
  font-size: 0.65rem;
  color: rgba(0, 212, 255, 0.7);
  letter-spacing: 0.05em;
}

.habit-streak {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.7rem;
  color: var(--gold);
  font-weight: 700;
}

/* === FAMILY === */
.family-list { display: flex; flex-direction: column; gap: 6px; }
.family-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(0, 212, 255, 0.2);
  border-radius: 3px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}
.family-item:hover {
  border-color: var(--cyan);
  background: rgba(0, 212, 255, 0.1);
}
.family-avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: white;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 13px;
}
.family-info { flex: 1; }
.family-name { color: white; font-size: 0.85rem; }
.family-relation { font-size: 0.65rem; color: rgba(0, 212, 255, 0.7); }

/* === AREA NAVIGATOR === */
.dash-areas {
  position: relative;
  z-index: 5;
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 20px;
  margin-top: 10px;
  border-top: 1px solid rgba(0, 212, 255, 0.3);
  flex-wrap: wrap;
}

.area-btn {
  background: rgba(0, 30, 50, 0.6);
  border: 1px solid rgba(0, 212, 255, 0.5);
  color: var(--cyan);
  padding: 10px 16px;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  cursor: pointer;
  transition: all 0.3s;
  display: flex; align-items: center; gap: 8px;
  border-radius: 3px;
}

.area-btn:hover {
  border-color: var(--cyan-bright);
  box-shadow: 0 0 15px var(--cyan-glow);
  color: var(--cyan-bright);
}

.area-btn.active {
  background: var(--cyan);
  color: black;
  border-color: var(--cyan-bright);
  box-shadow: 0 0 20px var(--cyan-bright);
}

/* === MODAL === */
.jarvis-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 5, 15, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
}
.jarvis-modal.hidden { display: none; }
.modal-content {
  background: linear-gradient(135deg, rgba(0, 30, 50, 0.95), rgba(0, 10, 25, 0.95));
  border: 1px solid var(--cyan-bright);
  border-radius: 6px;
  max-width: 700px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 30px;
  position: relative;
  box-shadow: 0 0 50px var(--cyan-glow);
  animation: modal-appear 0.3s ease-out;
}
@keyframes modal-appear {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}
.modal-close {
  position: absolute;
  top: 15px; right: 15px;
  background: rgba(255, 0, 64, 0.2);
  border: 1px solid var(--red);
  color: var(--red);
  width: 32px; height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.modal-close:hover { background: var(--red); color: white; }

.hidden { display: none !important; }

/* === SECRET PROJECT FLASH === */
.secret-flash {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle, rgba(255, 0, 64, 0.4), transparent);
  pointer-events: none;
  z-index: 200;
  animation: secret-flash 1.5s ease-out forwards;
}
@keyframes secret-flash {
  0% { opacity: 0; }
  20% { opacity: 1; }
  100% { opacity: 0; }
}

/* === SECRET PROJECT BADGE === */
.module-item.secret-unlocked {
  border-left-color: var(--red);
  background: linear-gradient(135deg, rgba(255, 0, 64, 0.15), rgba(255, 0, 64, 0.05));
  position: relative;
  overflow: hidden;
}
.module-item.secret-unlocked::after {
  content: 'CLASSIFICADO';
  position: absolute;
  top: 3px; right: 5px;
  font-size: 0.55rem;
  color: var(--red);
  letter-spacing: 0.2em;
  font-family: 'Orbitron', sans-serif;
}

/* === SCROLLBAR GLOBAL === */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: rgba(0, 212, 255, 0.05); }
::-webkit-scrollbar-thumb { background: var(--cyan-dark); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--cyan); }
