:root {
  --bg-cream: #fffaf2;
  --bg-soft: #fff3e2;
  --surface: rgba(255, 255, 255, 0.9);
  --surface-strong: #ffffff;
  --text-main: #2b1d35;
  --text-muted: #655270;

  --coral: #ff5e78;
  --coral-dark: #e6425e;
  --amber: #ffb703;
  --amber-soft: #fff2cc;
  --mint: #2ec4b6;
  --mint-soft: #e0fbf8;
  --berry: #b5179e;
  --berry-soft: #fbe5f7;

  --shadow-soft: 0 18px 45px rgba(96, 52, 88, 0.1);
  --shadow-hover: 0 24px 55px rgba(255, 94, 120, 0.18);
  --radius-lg: 28px;
  --radius-md: 20px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Cairo", "Tajawal", system-ui, -apple-system, sans-serif;
  background: linear-gradient(160deg, #fffaf2 0%, #fff1e6 45%, #fdf2ff 100%);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.8;
  overflow-x: hidden;
  position: relative;
}

/* خلفية دوائر ناعمة مبهجة */
.bg-decor {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.45;
  animation: drift 14s ease-in-out infinite alternate;
}

.blob-1 {
  width: 340px;
  height: 340px;
  background: #ffd166;
  top: -80px;
  right: -60px;
}

.blob-2 {
  width: 380px;
  height: 380px;
  background: #ff9ebb;
  bottom: 12%;
  left: -100px;
  animation-delay: 2s;
}

.blob-3 {
  width: 280px;
  height: 280px;
  background: #80ed99;
  top: 45%;
  right: -70px;
  opacity: 0.3;
  animation-delay: 4s;
}

@keyframes drift {
  from {
    transform: translate(0, 0) scale(1);
  }
  to {
    transform: translate(-24px, 28px) scale(1.08);
  }
}

#celebration-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 50;
}

.page-wrapper {
  position: relative;
  z-index: 1;
  max-width: 960px;
  margin: 0 auto;
  padding: 2.2rem 1.25rem 3rem;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.section-card {
  background: var(--surface);
  backdrop-filter: blur(14px);
  border: 2px solid rgba(255, 255, 255, 0.85);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 2.5rem 2rem;
}

/* القسم الترحيبي */
.hero {
  position: relative;
  text-align: center;
  padding: 3.5rem 2rem;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(255, 245, 232, 0.92));
  overflow: hidden;
}

.pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(90deg, #fff0c2, #ffe3ec);
  color: #8c2d52;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.45rem 1.15rem;
  border-radius: 999px;
  margin-bottom: 1.4rem;
  box-shadow: 0 6px 18px rgba(255, 94, 120, 0.14);
}

.hero-title {
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  font-weight: 900;
  line-height: 1.3;
  margin-bottom: 1.2rem;
  color: var(--text-main);
}

.highlight-name {
  display: inline-block;
  background: linear-gradient(120deg, #ff5e78, #ff9f1c, #e040fb);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding: 0 0.25rem;
}

.wave-emoji {
  display: inline-block;
  animation: gentle-bounce 2.2s ease-in-out infinite;
}

@keyframes gentle-bounce {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-6px) rotate(8deg);
  }
}

.hero-subtitle {
  max-width: 650px;
  margin: 0 auto 2rem;
  font-size: 1.12rem;
  color: var(--text-muted);
  font-weight: 500;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

/* الأزرار */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  font-family: inherit;
  font-weight: 800;
  font-size: 1.05rem;
  padding: 0.9rem 1.8rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.btn:hover {
  transform: translateY(-3px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: linear-gradient(135deg, var(--coral), #ff8552);
  color: #fff;
  box-shadow: 0 12px 26px rgba(255, 94, 120, 0.32);
}

.btn-primary:hover {
  box-shadow: 0 16px 32px rgba(255, 94, 120, 0.42);
}

.btn-secondary {
  background: #ffffff;
  color: var(--coral-dark);
  border: 2px solid #ffd0d9;
  box-shadow: 0 8px 20px rgba(43, 29, 53, 0.06);
}

.btn-secondary:hover {
  background: #fff5f7;
}

/* ملصقات طائرة ديكورية */
.floating-stickers .sticker {
  position: absolute;
  font-size: 1.7rem;
  opacity: 0.8;
  pointer-events: none;
  animation: float-sticker 5s ease-in-out infinite;
}

.s1 { top: 18%; right: 8%; animation-delay: 0s; }
.s2 { top: 22%; left: 9%; animation-delay: 1.1s; }
.s3 { bottom: 16%; right: 11%; animation-delay: 2s; }
.s4 { bottom: 18%; left: 10%; animation-delay: 2.8s; }

@keyframes float-sticker {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50% { transform: translateY(-10px) rotate(6deg); }
}

/* عناوين الأقسام */
.section-header {
  text-align: center;
  margin-bottom: 1.8rem;
}

.section-tag {
  display: inline-block;
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--coral-dark);
  background: #ffe8ed;
  padding: 0.28rem 0.95rem;
  border-radius: 999px;
  margin-bottom: 0.65rem;
}

.section-header h2 {
  font-size: clamp(1.55rem, 3.5vw, 2.15rem);
  font-weight: 900;
  color: var(--text-main);
}

.section-desc {
  color: var(--text-muted);
  margin-top: 0.35rem;
  font-size: 0.98rem;
}

/* قسم الرسالة */
.letter-paper {
  position: relative;
  background: linear-gradient(180deg, #fffdf9 0%, #fff7eb 100%);
  border: 2px dashed #ffcad4;
  border-radius: var(--radius-md);
  padding: 2.2rem 2rem;
  font-size: 1.12rem;
  color: #3a2947;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.letter-corner-icon {
  position: absolute;
  top: 1.1rem;
  left: 1.25rem;
  font-size: 1.7rem;
}

.letter-greeting {
  font-size: 1.28rem;
  font-weight: 800;
  color: var(--coral-dark);
}

.letter-footer {
  margin-top: 0.8rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 94, 120, 0.2);
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.signature-label {
  font-size: 0.95rem;
  color: var(--text-muted);
}

.signature-name {
  font-size: 1.18rem;
  font-weight: 800;
  color: var(--text-main);
}

/* بطاقات التقدير */
.traits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1.2rem;
}

.trait-card {
  font-family: inherit;
  text-align: right;
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  padding: 1.6rem 1.35rem;
  background: var(--surface-strong);
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.trait-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}

.trait-icon {
  font-size: 2.1rem;
  margin-bottom: 0.25rem;
}

.trait-card h3 {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-main);
}

.trait-summary {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-muted);
}

.trait-detail {
  font-size: 0.92rem;
  color: #463452;
  margin-top: 0.4rem;
  padding-top: 0.55rem;
  border-top: 1px dashed rgba(0, 0, 0, 0.1);
  display: none;
}

.trait-card.is-open .trait-detail {
  display: block;
  animation: fade-in 0.3s ease;
}

.card-coral { background: linear-gradient(150deg, #ffffff, #fff0f3); border-color: #ffd6df; }
.card-amber { background: linear-gradient(150deg, #ffffff, #fff8e1); border-color: #ffe7a3; }
.card-mint  { background: linear-gradient(150deg, #ffffff, #ebfcf9); border-color: #baf2e9; }
.card-berry { background: linear-gradient(150deg, #ffffff, #fdf0fb); border-color: #f6c9ef; }

/* قسم جرعة السعادة */
.boost-section {
  text-align: center;
  background: linear-gradient(135deg, #fff9e6 0%, #fff0f5 100%);
}

.boost-content h2 {
  font-size: clamp(1.45rem, 3.2vw, 1.95rem);
  font-weight: 900;
  margin-bottom: 0.9rem;
}

.boost-message {
  max-width: 600px;
  min-height: 3.4rem;
  margin: 0 auto 1.4rem;
  padding: 0.95rem 1.3rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.85);
  border: 2px solid #ffe0b5;
  font-size: 1.1rem;
  font-weight: 700;
  color: #5c2443;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s ease;
}

.boost-message.pop {
  animation: pop-card 0.35s ease;
}

@keyframes pop-card {
  0% { transform: scale(0.95); }
  50% { transform: scale(1.03); }
  100% { transform: scale(1); }
}

.btn-boost {
  background: linear-gradient(135deg, #ff9f1c, #ff5e78);
  color: #fff;
  box-shadow: 0 12px 26px rgba(255, 159, 28, 0.32);
}

/* قسم المفاجأة */
.surprise-section {
  text-align: center;
  background: linear-gradient(145deg, #ffffff 0%, #fff1f6 55%, #fff8df 100%);
  border: 3px solid #ffd0df;
  padding: 3rem 2rem;
}

.gift-box {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 1rem;
  font-size: 4rem;
  line-height: 1;
  cursor: pointer;
  animation: gift-wiggle 2.4s ease-in-out infinite;
}

.gift-lid {
  font-size: 2rem;
  margin-bottom: -0.6rem;
}

@keyframes gift-wiggle {
  0%, 100% { transform: rotate(0deg) scale(1); }
  20% { transform: rotate(-5deg) scale(1.04); }
  40% { transform: rotate(5deg) scale(1.04); }
  60% { transform: rotate(-3deg) scale(1.02); }
  80% { transform: rotate(0deg) scale(1); }
}

.surprise-inner h2 {
  font-size: clamp(1.6rem, 3.6vw, 2.2rem);
  font-weight: 900;
  margin-bottom: 0.65rem;
}

.surprise-prompt {
  color: var(--text-muted);
  font-size: 1.08rem;
  margin-bottom: 1.6rem;
}

.btn-surprise {
  background: linear-gradient(135deg, #e040fb, #ff5e78, #ffb703);
  background-size: 200% 200%;
  color: #fff;
  font-size: 1.18rem;
  padding: 1.05rem 2.4rem;
  box-shadow: 0 14px 32px rgba(224, 64, 251, 0.32);
  animation: gradient-shift 4s ease infinite;
}

@keyframes gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.secret-reveal {
  margin-top: 0.5rem;
  padding: 2rem 1.5rem;
  background: linear-gradient(160deg, #fffdf8, #fff2f7);
  border: 2px solid #ffb3c6;
  border-radius: var(--radius-md);
  box-shadow: 0 14px 36px rgba(255, 94, 120, 0.16);
  animation: reveal-up 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes reveal-up {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.secret-hearts {
  font-size: 1.7rem;
  margin-bottom: 0.8rem;
}

.secret-reveal h3 {
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  font-weight: 900;
  color: var(--coral-dark);
  margin-bottom: 0.9rem;
}

.secret-text {
  max-width: 640px;
  margin: 0 auto 1.6rem;
  font-size: 1.12rem;
  color: var(--text-main);
}

.site-footer {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.96rem;
  padding: 0.5rem 0 1.2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.relock-btn {
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid #f0d7df;
  border-radius: 999px;
  padding: 0.35rem 0.95rem;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.relock-btn:hover {
  background: #fff0f4;
  color: var(--coral-dark);
}

/* شاشة القفل بالرقم السري */
.lock-screen {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1.25rem;
}

.lock-screen[hidden] {
  display: none;
}

.lock-card {
  width: 100%;
  max-width: 460px;
  text-align: center;
  padding: 2.8rem 2rem;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(255, 244, 236, 0.94));
}

.lock-card.shake {
  animation: shake-x 0.4s ease;
}

@keyframes shake-x {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-6px); }
  80% { transform: translateX(6px); }
}

.lock-icon {
  font-size: 3.3rem;
  margin-bottom: 0.65rem;
  animation: gentle-bounce 2.4s ease-in-out infinite;
}

.lock-title {
  font-size: clamp(1.7rem, 4vw, 2.25rem);
  font-weight: 900;
  margin-bottom: 0.5rem;
}

.lock-subtitle {
  color: var(--text-muted);
  font-size: 1.02rem;
  margin-bottom: 1.6rem;
}

.lock-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.lock-input-group {
  position: relative;
  display: flex;
  align-items: center;
}

.lock-input {
  width: 100%;
  font-family: inherit;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-align: center;
  direction: ltr;
  color: var(--text-main);
  background: #ffffff;
  border: 2px solid #ffd0df;
  border-radius: 16px;
  padding: 0.9rem 3rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.lock-input:focus {
  border-color: var(--coral);
  box-shadow: 0 0 0 4px rgba(255, 94, 120, 0.16);
}

.toggle-visibility-btn {
  position: absolute;
  left: 0.75rem;
  background: transparent;
  border: none;
  font-size: 1.15rem;
  cursor: pointer;
  padding: 0.3rem;
  opacity: 0.75;
}

.toggle-visibility-btn:hover {
  opacity: 1;
}

.lock-error {
  color: #c9184a;
  background: #ffe5ec;
  border-radius: 12px;
  padding: 0.55rem 0.9rem;
  font-size: 0.94rem;
  font-weight: 700;
}

.lock-submit {
  width: 100%;
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 640px) {
  .section-card {
    padding: 1.8rem 1.25rem;
  }

  .hero {
    padding: 2.6rem 1.25rem;
  }

  .letter-paper {
    padding: 1.6rem 1.25rem;
  }

  .floating-stickers .sticker {
    font-size: 1.3rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
