/* ============================================================
   PsyWell Women — Custom Styles
   (Supplement to Tailwind CSS CDN)
   ============================================================ */

/* ----------------------------------------------------------
   CSS Custom Properties
   ---------------------------------------------------------- */
:root {
  --color-charcoal: #1E1B2E;
  --color-lavender: #F5F3FF;
}

/* ----------------------------------------------------------
   Charcoal Color Utilities
   ---------------------------------------------------------- */
.bg-charcoal {
  background-color: var(--color-charcoal);
}

.text-charcoal {
  color: var(--color-charcoal);
}

/* ----------------------------------------------------------
   Hero Section
   ---------------------------------------------------------- */
.hero-gradient {
  background: linear-gradient(135deg, #0F0A1A 0%, #1E1B2E 25%, #2E1065 55%, #3B0764 100%);
}

.hero-pattern {
  background-image:
    radial-gradient(circle at 20% 30%, rgba(88, 28, 135, 0.2) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(59, 7, 100, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(46, 16, 101, 0.1) 0%, transparent 60%),
    linear-gradient(135deg, #0F0A1A 0%, #1E1B2E 25%, #2E1065 55%, #3B0764 100%);
}

/* ----------------------------------------------------------
   Button Glow Effects
   ---------------------------------------------------------- */
.btn-glow {
  transition: box-shadow 0.3s ease, transform 0.2s ease;
}

.btn-glow:hover {
  box-shadow: 0 0 18px rgba(139, 92, 246, 0.65), 0 0 36px rgba(139, 92, 246, 0.3);
  transform: translateY(-1px);
}

.btn-glow:active {
  transform: translateY(0);
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
}

.btn-glow-gold {
  transition: box-shadow 0.3s ease, transform 0.2s ease;
}

.btn-glow-gold:hover {
  box-shadow: 0 0 18px rgba(234, 179, 8, 0.65), 0 0 36px rgba(234, 179, 8, 0.3);
  transform: translateY(-1px);
}

.btn-glow-gold:active {
  transform: translateY(0);
  box-shadow: 0 0 10px rgba(234, 179, 8, 0.5);
}

/* ----------------------------------------------------------
   Card Hover — Purple Left Border
   ---------------------------------------------------------- */
.card-hover {
  border-left: 3px solid transparent;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.card-hover:hover {
  border-left-color: #8B5CF6;
  box-shadow: 0 8px 24px rgba(139, 92, 246, 0.12);
  transform: translateY(-2px);
}

/* ----------------------------------------------------------
   Score Gauge (Circular)
   ---------------------------------------------------------- */
.score-gauge {
  position: relative;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: conic-gradient(
    var(--gauge-color, #8B5CF6) var(--gauge-progress, 0deg),
    #E5E7EB var(--gauge-progress, 0deg)
  );
}

.score-gauge::before {
  content: '';
  position: absolute;
  inset: 18px;
  border-radius: 50%;
  background: white;
}

.score-gauge .gauge-label {
  position: relative;
  z-index: 1;
  text-align: center;
  line-height: 1.2;
}

/* ----------------------------------------------------------
   Breathing Animation
   ---------------------------------------------------------- */
@keyframes breatheIn {
  0%   { transform: scale(1);    opacity: 0.7; }
  50%  { transform: scale(1.35); opacity: 1;   }
  100% { transform: scale(1);    opacity: 0.7; }
}

@keyframes breatheOut {
  0%   { transform: scale(1.35); opacity: 1;   }
  50%  { transform: scale(1);    opacity: 0.7; }
  100% { transform: scale(1.35); opacity: 1;   }
}

.breathing-circle {
  border-radius: 50%;
  animation: breatheIn 4s ease-in-out infinite;
  transform-origin: center;
}

.breathing-circle.inhale {
  animation-name: breatheIn;
}

.breathing-circle.exhale {
  animation-name: breatheOut;
}

/* ----------------------------------------------------------
   Progress Fill
   ---------------------------------------------------------- */
.progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #7C3AED, #8B5CF6);
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  width: var(--progress, 0%);
}

/* ----------------------------------------------------------
   Fade-In Animation
   ---------------------------------------------------------- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0);     }
}

.fade-in {
  animation: fadeIn 0.45s ease-out forwards;
}

/* ----------------------------------------------------------
   Timeline — Vertical Purple Line
   ---------------------------------------------------------- */
.timeline-line {
  position: relative;
}

.timeline-line::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, #7C3AED, #C4B5FD);
  transform: translateX(-50%);
}

.timeline-line .timeline-item {
  position: relative;
  z-index: 1;
}

.timeline-line .timeline-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #7C3AED;
  border: 2px solid white;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.25);
}

/* ----------------------------------------------------------
   Heat Map Cells
   ---------------------------------------------------------- */
.heat-none {
  background-color: #F3F4F6;
  border-radius: 3px;
}

.heat-low {
  background-color: #DDD6FE;
  border-radius: 3px;
}

.heat-medium {
  background-color: #A78BFA;
  border-radius: 3px;
}

.heat-high {
  background-color: #7C3AED;
  border-radius: 3px;
}

/* ----------------------------------------------------------
   Modal Overlay
   ---------------------------------------------------------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(30, 27, 46, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease-out forwards;
}

.modal-overlay .modal-content {
  background: white;
  border-radius: 16px;
  box-shadow: 0 25px 60px rgba(30, 27, 46, 0.25);
  max-width: 90vw;
  max-height: 90vh;
  overflow-y: auto;
  animation: fadeIn 0.3s ease-out forwards;
}

/* ----------------------------------------------------------
   Navigation Active State
   ---------------------------------------------------------- */
.nav-active {
  color: #7C3AED;
  font-weight: 600;
  position: relative;
}

.nav-active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #7C3AED, #8B5CF6);
  border-radius: 1px;
}

/* ----------------------------------------------------------
   Mobile Menu — Slide Animation
   ---------------------------------------------------------- */
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0);     }
}

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

.mobile-menu {
  overflow: hidden;
  animation: slideDown 0.25s ease-out forwards;
}

.mobile-menu.closing {
  animation: slideUp 0.2s ease-in forwards;
}

/* ----------------------------------------------------------
   Streak Badge — Pulse
   ---------------------------------------------------------- */
@keyframes streakPulse {
  0%   { box-shadow: 0 0 0 0   rgba(234, 179, 8, 0.55); }
  70%  { box-shadow: 0 0 0 10px rgba(234, 179, 8, 0);   }
  100% { box-shadow: 0 0 0 0   rgba(234, 179, 8, 0);    }
}

.streak-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, #F59E0B, #EAB308);
  color: white;
  font-weight: 700;
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 9999px;
  animation: streakPulse 2s ease-out infinite;
}
