:root {
  --bg-0: #1a0b2e;
  --bg-1: #2d0b4e;
  --gold: #f5d9a8;
  --gold-bright: #ffe9c2;
  --rose: #ff9ecd;
  --text: #fbf4ff;
  --muted: rgba(251, 244, 255, 0.66);
}

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

html {
  height: 100%;
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='36' style='font-size:26px'%3E%3Ctext y='28'%3E💍%3C/text%3E%3C/svg%3E"), auto;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--text);
  background: var(--bg-0);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 20px;
  perspective: 1200px; 
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='36' style='font-size:26px'%3E%3Ctext y='28'%3E💍%3C/text%3E%3C/svg%3E"), auto;
}

.backdrop { position: fixed; inset: 0; z-index: 0; overflow: hidden; }
.slideshow { position: absolute; inset: 0; z-index: 1; }

.slide {
  position: absolute;
  inset: -15%; 
  background-size: cover;
  background-position: center 25%; 
  transform-origin: center 25%;
  opacity: 0;
  will-change: transform, opacity;
}

.backdrop-veil {
  position: absolute;
  inset: 0;
  z-index: 3;
  background:
    radial-gradient(circle at 50% 50%, rgba(26, 11, 46, 0.4) 0%, rgba(26, 11, 46, 0.75) 100%),
    linear-gradient(180deg, rgba(26, 11, 46, 0.3) 0%, rgba(26, 11, 46, 0.65) 100%);
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.25; 
  z-index: 2;
  will-change: transform;
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1); 
}
.orb-1 { width: 500px; height: 500px; background: #9b5de5; top: -10%; left: -10%; }
.orb-2 { width: 450px; height: 450px; background: #f15bb5; bottom: -10%; right: -10%; }
.orb-3 { width: 350px; height: 350px; background: #f5d9a8; top: 30%; left: 40%; }

#fireworksCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 999; 
  pointer-events: none; 
}

/* تم إصلاح العرض وضمان التجاوب الكامل والحماية */
.card {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 760px;
  padding: clamp(24px, 5vw, 64px);
  text-align: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 28px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  transform-style: preserve-3d;
  will-change: transform;
  transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1); 
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='36' style='font-size:26px'%3E%3Ctext y='28'%3E💍%3C/text%3E%3C/svg%3E"), pointer;
}

.audio-control-btn {
  position: absolute;
  top: 24px;
  right: 24px;
  z-index: 50;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  transform: translateZ(20px);
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='36' style='font-size:26px'%3E%3Ctext y='28'%3E💍%3C/text%3E%3C/svg%3E"), pointer;
}
.audio-control-btn:hover {
  background: rgba(245, 217, 168, 0.15);
  border-color: var(--gold);
  transform: translateZ(30px) scale(1.05);
}
.audio-icon {
  width: 20px;
  height: 20px;
  fill: var(--gold-bright);
}
.hidden { display: none !important; }

.rings { position: absolute; inset: 0; pointer-events: none; }
.ring {
  position: absolute;
  border: 1px solid rgba(245, 217, 168, 0.2);
  border-radius: 50%;
}
.ring:nth-child(1) { width: 260px; height: 260px; top: -130px; right: -90px; }
.ring:nth-child(2) { width: 200px; height: 200px; bottom: -110px; left: -70px; border-color: rgba(255, 158, 205, 0.2); }

.eyebrow {
  font-size: 0.85rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 18px;
  transform: translateZ(15px); 
}

.names {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  font-size: clamp(2.2rem, 6vw, 4.5rem);
  line-height: 1.2;          
  padding-bottom: 0.12em;    
  background: linear-gradient(135deg, var(--gold-bright), var(--rose));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 4px;        
  transform: translateZ(25px); 
}

.date-line {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  color: var(--muted);
  margin-bottom: 36px;
  transform: translateZ(12px);
}

.countdown {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(6px, 1.5vw, 16px);
  transform: translateZ(20px);
  width: 100%;
}

.unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
  padding: clamp(12px, 2vw, 20px) 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
}

.value {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: clamp(1.8rem, 5vw, 3.5rem);
  line-height: 1;
  color: var(--gold-bright);
  text-shadow: 0 0 20px rgba(245, 217, 168, 0.3);
}

.label {
  font-size: clamp(0.55rem, 1.2vw, 0.75rem);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.sep {
  font-weight: 500;
  font-size: clamp(1.4rem, 4vw, 2.8rem);
  color: rgba(245, 217, 168, 0.4);
}

.message {
  margin-top: 36px;
  font-size: clamp(0.9rem, 2vw, 1.1rem);
  color: var(--muted);
  letter-spacing: 0.04em;
  transform: translateZ(10px);
}

.foot {
  position: relative;
  z-index: 10;
  margin-top: 28px;
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(251, 244, 255, 0.4);
}

.celebrate .names { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.03); } }

/* تحسين العرض على جميع الشاشات اللوحية والهواتف ليكون شبكة 2x2 متناسقة تماماً */
@media (max-width: 768px) {
  .sep { display: none; }
  .countdown { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .unit { padding: 16px 8px; }
  .audio-control-btn { top: 16px; right: 16px; width: 40px; height: 40px; }
}
