/* =========================================================
   STYLE.CSS • ملاذ شُوش الدافئ • Cozy De-Stress Oasis
   ========================================================= */

:root {
  --bg-deep: #120c18;
  --bg-radial: radial-gradient(circle at 50% 10%, #2a1b35 0%, #170e20 60%, #0a060e 100%);
  --peach-warm: #ffb5a7;
  --rose-glow: #fcd5ce;
  --amber-soft: #fec89a;
  --accent-gold: #f9c74f;
  --text-main: #fdfaf6;
  --text-muted: #d0c4d8;
  --glass-bg: rgba(32, 19, 43, 0.65);
  --glass-border: rgba(255, 181, 167, 0.22);
  --glass-shadow: 0 15px 35px rgba(0, 0, 0, 0.4), 0 0 25px rgba(254, 200, 154, 0.08);
  --radius-xl: 26px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --font-tajawal: 'Tajawal', sans-serif;
  --font-serif: 'Amiri', serif;
}

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

body {
  background: var(--bg-deep);
  background-image: var(--bg-radial);
  background-attachment: fixed;
  color: var(--text-main);
  font-family: var(--font-tajawal);
  min-height: 100vh;
  line-height: 1.8;
  direction: rtl;
  overflow-x: hidden;
  position: relative;
}

/* Background Canvas (Raindrops & Starlight Embers) */
#ambientCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 1;
}

/* Page Container */
.page-container {
  position: relative;
  z-index: 10;
  max-width: 860px;
  margin: 0 auto;
  padding: 100px 20px 60px;
}

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

/* Glass Panels */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: 35px 30px;
  box-shadow: var(--glass-shadow);
  transition: all 0.35s ease;
}

.glass-panel:hover {
  border-color: rgba(255, 181, 167, 0.45);
}

/* FLOATING MOOD AUDIO DOCK */
.mood-audio-bar {
  position: fixed;
  top: 15px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 30px);
  max-width: 860px;
  z-index: 100;
}

.audio-control-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 22px;
  border-radius: 50px;
  border-color: rgba(254, 200, 154, 0.35);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  gap: 15px;
  flex-wrap: wrap;
}

.track-status {
  display: flex;
  align-items: center;
  gap: 12px;
}

.disc-animation {
  font-size: 1.6rem;
  line-height: 1;
  animation: rotateDisc 4s linear infinite;
}

.disc-animation.paused {
  animation-play-state: paused;
}

@keyframes rotateDisc {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.track-details {
  display: flex;
  flex-direction: column;
}

.track-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--amber-soft);
}

.track-sub {
  font-size: 0.75rem;
  color: var(--peach-warm);
  opacity: 0.85;
}

.audio-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-family: var(--font-tajawal);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
}

.pill-btn:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.16);
}

.music-btn.active {
  background: rgba(255, 181, 167, 0.25);
  border-color: var(--peach-warm);
  color: #fff;
  box-shadow: 0 0 15px rgba(255, 181, 167, 0.3);
}

.secondary-pill {
  background: rgba(249, 199, 79, 0.12);
  border-color: rgba(249, 199, 79, 0.35);
  color: var(--accent-gold);
}

.rain-btn.active {
  background: rgba(92, 179, 255, 0.25);
  border-color: #5cb3ff;
  color: #cbebff;
  box-shadow: 0 0 15px rgba(92, 179, 255, 0.35);
}

/* HERO SECTION */
.hero-sanctuary {
  padding: 30px 10px 50px;
}

.sanctuary-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 18px;
  border-radius: 30px;
  background: rgba(255, 181, 167, 0.15);
  border: 1px solid rgba(255, 181, 167, 0.35);
  color: var(--peach-warm);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 25px;
}

.sparkle-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--amber-soft);
  box-shadow: 0 0 8px var(--amber-soft);
  animation: pulseDot 1.5s infinite;
}

@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.5; }
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 900;
  line-height: 1.4;
  margin-bottom: 18px;
}

.gradient-name {
  background: linear-gradient(135deg, #ffb5a7, #fec89a, #f9c74f);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto 30px;
}

.hero-subtitle strong {
  color: var(--amber-soft);
}

.cozy-quote-box {
  max-width: 720px;
  margin: 0 auto;
  border-right: 4px solid var(--peach-warm);
  background: rgba(45, 23, 58, 0.5);
  padding: 22px 28px;
}

.quote-text {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-style: italic;
  color: #fff;
  line-height: 1.8;
  margin-bottom: 8px;
}

.quote-sign {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--amber-soft);
}

/* CARD SECTIONS */
.card-section {
  margin-bottom: 45px;
}

.section-tag {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--peach-warm);
  letter-spacing: 0.5px;
  margin-bottom: 10px;
  background: rgba(255, 181, 167, 0.1);
  padding: 4px 14px;
  border-radius: 20px;
}

.card-heading {
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 10px;
}

.card-desc {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 25px;
}

/* SECTION 1: BREATHING CIRCLE */
.breathing-circle-wrapper {
  position: relative;
  width: 220px;
  height: 220px;
  margin: 30px auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.breathe-circle {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255, 181, 167, 0.4), rgba(254, 200, 154, 0.6));
  border: 2px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 40px rgba(255, 181, 167, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: breatheCycle 14s ease-in-out infinite;
  z-index: 2;
}

.breathe-text {
  font-size: 1.3rem;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.breathe-glow {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(254, 200, 154, 0.3) 0%, transparent 70%);
  animation: glowPulse 14s ease-in-out infinite;
  z-index: 1;
}

@keyframes breatheCycle {
  0% { transform: scale(1); }
  28% { transform: scale(1.45); } /* Inhale (4s) */
  57% { transform: scale(1.45); } /* Hold (4s) */
  100% { transform: scale(1); }   /* Exhale (6s) */
}

@keyframes glowPulse {
  0% { opacity: 0.3; transform: scale(0.9); }
  28% { opacity: 0.8; transform: scale(1.2); }
  57% { opacity: 0.8; transform: scale(1.2); }
  100% { opacity: 0.3; transform: scale(0.9); }
}

.breathe-hint {
  font-size: 1rem;
  color: var(--amber-soft);
  font-weight: 600;
  min-height: 25px;
}

/* SECTION 2: VIRTUAL DRINK */
.drink-options {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 25px;
  flex-wrap: wrap;
}

.drink-choice-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  font-family: var(--font-tajawal);
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.25s ease;
}

.drink-choice-btn.active, .drink-choice-btn:hover {
  background: rgba(254, 200, 154, 0.2);
  border-color: var(--amber-soft);
  color: #fff;
  transform: translateY(-2px);
}

.drink-cup-display {
  position: relative;
  width: 120px;
  margin: 0 auto 20px;
}

.cup-emoji {
  font-size: 4.5rem;
  line-height: 1;
}

.steam-container {
  display: flex;
  justify-content: center;
  gap: 8px;
  height: 25px;
  margin-bottom: -5px;
}

.steam {
  width: 4px;
  height: 20px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 4px;
  filter: blur(1.5px);
  animation: steamRise 2s infinite ease-out;
}

.s2 { animation-delay: 0.6s; }
.s3 { animation-delay: 1.2s; }

@keyframes steamRise {
  0% { transform: translateY(10px) scaleX(1); opacity: 0; }
  50% { opacity: 0.7; transform: translateY(-5px) scaleX(1.3); }
  100% { transform: translateY(-20px) scaleX(1.8); opacity: 0; }
}

.drink-message-box {
  max-width: 620px;
  margin: 0 auto;
  background: rgba(0, 0, 0, 0.25);
  padding: 20px 25px;
  border-radius: var(--radius-md);
  border: 1px dashed rgba(255, 181, 167, 0.3);
}

.drink-message {
  font-size: 1.05rem;
  line-height: 1.8;
  color: #ffe5ec;
}

/* SECTION 3: ARCHITECTURE CARDS GRID */
.arch-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 15px;
}

.arch-card {
  perspective: 1000px;
  height: 220px;
  cursor: pointer;
}

.arch-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.6s cubic-bezier(0.4, 0.2, 0.2, 1);
  transform-style: preserve-3d;
}

.arch-card.flipped .arch-card-inner {
  transform: rotateY(180deg);
}

.arch-front, .arch-back {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: var(--radius-md);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.arch-front {
  background: rgba(45, 25, 60, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.arch-front:hover {
  border-color: var(--amber-soft);
  box-shadow: 0 10px 30px rgba(254, 200, 154, 0.2);
}

.arch-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

.arch-front h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 10px;
}

.tap-hint {
  font-size: 0.8rem;
  color: var(--peach-warm);
}

.arch-back {
  background: linear-gradient(135deg, rgba(60, 25, 80, 0.95), rgba(40, 18, 55, 0.95));
  border: 1px solid var(--amber-soft);
  transform: rotateY(180deg);
  text-align: right;
}

.arch-back h4 {
  font-size: 1.05rem;
  color: var(--amber-soft);
  margin-bottom: 8px;
  font-weight: 800;
}

.arch-back p {
  font-size: 0.9rem;
  color: #fdfaf6;
  line-height: 1.6;
}

/* SECTION 4: VENT & BURN BOX */
.vent-box-wrapper {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.vent-textarea {
  width: 100%;
  background: rgba(0, 0, 0, 0.35);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  color: #fff;
  font-family: var(--font-tajawal);
  font-size: 1rem;
  outline: none;
  resize: vertical;
  transition: all 0.3s ease;
}

.vent-textarea:focus {
  border-color: var(--peach-warm);
  box-shadow: 0 0 20px rgba(255, 181, 167, 0.3);
}

.burn-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(135deg, #f77f00, #d62828);
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: 14px 28px;
  font-size: 1.05rem;
  font-weight: 700;
  font-family: var(--font-tajawal);
  cursor: pointer;
  box-shadow: 0 8px 25px rgba(247, 127, 0, 0.4);
  transition: all 0.3s ease;
}

.burn-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(247, 127, 0, 0.6);
}

.burn-result-message {
  margin-top: 25px;
  padding: 20px;
  background: rgba(46, 196, 182, 0.15);
  border: 1px solid rgba(46, 196, 182, 0.4);
  border-radius: var(--radius-md);
  animation: fadeInScale 0.5s ease-out;
}

.burn-result-message.hidden {
  display: none;
}

.sparkles-icon {
  font-size: 2.2rem;
  margin-bottom: 8px;
}

.burn-done-text {
  font-size: 1.05rem;
  color: #cbf3f0;
  font-weight: 600;
}

/* SECTION 5: SUPPORT LETTER & WHATSAPP */
.support-letter-card {
  padding: 45px 35px;
  border-color: rgba(254, 200, 154, 0.4);
  background: radial-gradient(circle at 50% 20%, rgba(55, 25, 70, 0.8) 0%, rgba(20, 10, 30, 0.95) 100%);
}

.love-letter-icon {
  font-size: 3rem;
  margin-bottom: 12px;
}

.letter-title {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--amber-soft);
  margin-bottom: 25px;
}

.letter-body {
  max-width: 680px;
  margin: 0 auto 35px;
  font-size: 1.15rem;
  line-height: 2.1;
  color: #fae1dd;
  text-align: right;
  background: rgba(0, 0, 0, 0.25);
  padding: 25px 30px;
  border-radius: var(--radius-md);
  border-right: 4px solid var(--amber-soft);
}

.letter-body p {
  margin-bottom: 16px;
}

.letter-body p:last-child {
  margin-bottom: 0;
}

.highlight-text {
  color: #fff;
  font-weight: 700;
}

.emergency-chat-box {
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed rgba(255, 181, 167, 0.35);
  border-radius: var(--radius-md);
  padding: 25px 20px;
  max-width: 580px;
  margin: 0 auto;
}

.chat-prompt {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--peach-warm);
  margin-bottom: 16px;
}

.sos-whatsapp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #25d366;
  color: #fff;
  text-decoration: none;
  border-radius: 50px;
  padding: 16px 28px;
  font-size: 1.05rem;
  font-weight: 800;
  box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4);
  transition: all 0.3s ease;
}

.sos-whatsapp-btn:hover {
  transform: translateY(-2px);
  background: #20ba5a;
  box-shadow: 0 12px 30px rgba(37, 211, 102, 0.6);
}

/* FOOTER */
.cozy-footer {
  padding-top: 40px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.cozy-footer span {
  display: block;
  color: var(--peach-warm);
  font-weight: 600;
  margin-top: 5px;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .audio-control-card {
    flex-direction: column;
    align-items: stretch;
    border-radius: var(--radius-md);
  }

  .audio-actions {
    justify-content: center;
    flex-wrap: wrap;
  }

  .hero-title {
    font-size: 1.8rem;
  }

  .breathing-circle-wrapper {
    width: 180px;
    height: 180px;
  }

  .breathe-circle {
    width: 110px;
    height: 110px;
  }

  .arch-cards-grid {
    grid-template-columns: 1fr;
  }

  .page-container {
    padding-top: 150px;
  }
}

@keyframes fadeInScale {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}
