/* ==========================================================================
   CareCircle Pure OLED Reddish Cyber-Clinical Design System (Crimson Obsidian Edition)
   ========================================================================== */

:root {
  --primary: #f43f5e;                /* Radiant Rose / Crimson */
  --primary-glow: rgba(244, 63, 94, 0.45);
  --primary-container: #be123c;      /* Deep Carmine */
  --on-primary: #ffffff;
  --secondary: #fb7185;              /* Soft Coral Rose */
  --tertiary: #fda4af;
  --surface: #000000;                /* Pure OLED Black */
  --surface-dim: #000000;
  --surface-card: rgba(14, 5, 8, 0.88); /* Obsidian with Wine Tint */
  --on-surface: #fff1f2;
  --on-surface-variant: #e2cbd1;
  --outline: #881337;                /* Dark Garnet */
  --outline-variant: rgba(244, 63, 94, 0.16);
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #e11d48;
  --font-sans: 'Plus Jakarta Sans', 'Google Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

body {
  font-family: var(--font-sans);
  background-color: #000000;
  color: #fff1f2;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  position: relative;
}

/* Pure OLED Cyber-Grid Matrix with subtle Crimson Dots */
.bg-cyber-grid {
  background-color: #000000;
  background-image: 
    radial-gradient(rgba(244, 63, 94, 0.1) 1px, transparent 1px);
  background-size: 28px 28px;
}

/* Material Symbols Outlined */
.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  display: inline-block;
  vertical-align: middle;
  line-height: 1;
}

/* Fix hidden class priority */
.hidden {
  display: none !important;
}

/* OLED Glassmorphism Hierarchy (Obsidian + Carmine Specular Edges) */
.glass-l1 {
  background: rgba(10, 4, 6, 0.86);
  backdrop-filter: blur(24px) saturate(200%);
  -webkit-backdrop-filter: blur(24px) saturate(200%);
  border: 1px solid rgba(244, 63, 94, 0.12);
  box-shadow: 0 4px 24px -2px rgba(0, 0, 0, 0.98);
}

.glass-l2 {
  background: linear-gradient(135deg, rgba(16, 5, 8, 0.86) 0%, rgba(6, 2, 4, 0.96) 100%);
  backdrop-filter: blur(28px) saturate(200%);
  -webkit-backdrop-filter: blur(28px) saturate(200%);
  border: 1px solid rgba(244, 63, 94, 0.16);
  box-shadow: 
    inset 0 1px 0 0 rgba(255, 120, 150, 0.14),
    0 14px 44px -4px rgba(0, 0, 0, 0.98);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-l2:hover {
  border-color: rgba(244, 63, 94, 0.45);
  box-shadow: 
    inset 0 1px 0 0 rgba(255, 120, 150, 0.25),
    0 18px 50px -4px rgba(225, 29, 72, 0.28);
}

.glass-l3 {
  background: linear-gradient(135deg, rgba(22, 6, 10, 0.96) 0%, rgba(4, 1, 2, 0.98) 100%);
  backdrop-filter: blur(36px);
  -webkit-backdrop-filter: blur(36px);
  border: 1px solid rgba(244, 63, 94, 0.45);
  box-shadow: 
    inset 0 1px 0 0 rgba(255, 150, 175, 0.22),
    0 0 40px -4px rgba(225, 29, 72, 0.35);
}

/* Ambient Glow Animations */
@keyframes pulse-halo {
  0%, 100% { opacity: 0.35; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.06); }
}

@keyframes live-wave {
  0% { stroke-dashoffset: 600; }
  100% { stroke-dashoffset: 0; }
}

@keyframes emergency-beat {
  0%, 100% { box-shadow: 0 0 0 0 rgba(244, 63, 94, 0.4); }
  50% { box-shadow: 0 0 32px 10px rgba(244, 63, 94, 0.75); }
}

@keyframes scan-laser-anim {
  0% { top: 0%; opacity: 0.9; }
  50% { top: 96%; opacity: 1; }
  100% { top: 0%; opacity: 0.9; }
}

@keyframes eq-bounce {
  0%, 100% { height: 4px; }
  50% { height: 22px; }
}

@keyframes radar-sweep {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes shimmer-sheen {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(200%); }
}

.pulse-halo-anim {
  animation: pulse-halo 7s ease-in-out infinite alternate;
}

.emergency-glow {
  animation: emergency-beat 2.2s infinite;
}

.scan-laser {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #f43f5e, #fb7185, #f43f5e, transparent);
  box-shadow: 0 0 14px 2px rgba(244, 63, 94, 0.85);
  animation: scan-laser-anim 2.4s ease-in-out infinite;
}

/* Audio Visualizer Equalizer Bars — OLED Reddish Gradient */
.eq-bar {
  width: 3.5px;
  border-radius: 9999px;
  background: linear-gradient(to top, #be123c, #fb7185);
  animation: eq-bounce 1.2s ease-in-out infinite;
}
.eq-bar:nth-child(1) { animation-delay: 0.1s; height: 12px; }
.eq-bar:nth-child(2) { animation-delay: 0.3s; height: 18px; }
.eq-bar:nth-child(3) { animation-delay: 0.15s; height: 24px; }
.eq-bar:nth-child(4) { animation-delay: 0.4s; height: 14px; }
.eq-bar:nth-child(5) { animation-delay: 0.25s; height: 20px; }

/* Holographic Targeting Reticle — Reddish */
.hud-corner-tl { top: -2px; left: -2px; border-top: 2px solid #f43f5e; border-left: 2px solid #f43f5e; }
.hud-corner-tr { top: -2px; right: -2px; border-top: 2px solid #f43f5e; border-right: 2px solid #f43f5e; }
.hud-corner-bl { bottom: -2px; left: -2px; border-bottom: 2px solid #f43f5e; border-left: 2px solid #f43f5e; }
.hud-corner-br { bottom: -2px; right: -2px; border-bottom: 2px solid #f43f5e; border-right: 2px solid #f43f5e; }

/* Modal styles — OLED pitch black wine glass */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 16px;
}

.modal-content {
  background: #080204;
  border-radius: 28px;
  max-width: 640px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 
    0 30px 80px -12px rgba(0, 0, 0, 0.98),
    inset 0 1px 0 0 rgba(255, 120, 150, 0.16);
  border: 1px solid rgba(244, 63, 94, 0.35);
  color: var(--on-surface);
}

/* Professional Clinical Action Buttons */
.btn-elder-primary {
  background: #ffffff;
  color: #09090b;
  font-size: 1.05rem;
  font-weight: 700;
  border-radius: 14px;
  padding: 14px 24px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 16px rgba(255, 255, 255, 0.12);
}

.btn-elder-primary:hover {
  background: #fff1f2;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(244, 63, 94, 0.25);
}

.btn-elder-success {
  background: #e11d48;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 14px;
  padding: 14px 22px;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 4px 16px rgba(225, 29, 72, 0.35);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-elder-success:hover {
  background: #f43f5e;
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(244, 63, 94, 0.45);
}

/* SOS Emergency Action Button */
.btn-sos {
  background: #be123c;
  color: #ffffff;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  border-radius: 16px;
  padding: 18px 32px;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 8px 24px rgba(190, 18, 60, 0.4);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  transition: all 0.2s ease;
}

.btn-sos:hover {
  background: #e11d48;
  transform: translateY(-1px);
  box-shadow: 0 10px 30px rgba(225, 29, 72, 0.6);
}

/* Custom Scrollbars — OLED Pitch Black with Carmine Accent */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
::-webkit-scrollbar-track {
  background: #000000;
}
::-webkit-scrollbar-thumb {
  background: #270810;
  border-radius: 4px;
  border: 1px solid rgba(244, 63, 94, 0.12);
}
::-webkit-scrollbar-thumb:hover {
  background: #e11d48;
}
