/* ============ base ============ */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

:root {
  --bg1: #150c28;
  --bg2: #2a1150;
  --bg3: #1b0f36;
  --pink: #ff4d8d;
  --pink-soft: #ff86ae;
  --violet: #a855f7;
  --blue: #5b8cff;
  --ink: #ffffff;
  --muted: rgba(255, 255, 255, .72);
  --glass: rgba(255, 255, 255, .055);
  --glass-strong: rgba(255, 255, 255, .09);
  --edge: rgba(255, 255, 255, .12);
}

html, body { margin: 0; padding: 0; }

body {
  font-family: "Cairo", "Tajawal", "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(120% 80% at 80% 0%, rgba(168, 85, 247, .22), transparent 60%),
    radial-gradient(100% 70% at 10% 30%, rgba(255, 77, 141, .16), transparent 65%),
    linear-gradient(180deg, var(--bg1) 0%, var(--bg2) 45%, var(--bg3) 100%);
  background-attachment: fixed;
  min-height: 100svh;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

.glass {
  background: var(--glass);
  border: 1px solid var(--edge);
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  box-shadow: 0 10px 30px rgba(6, 2, 18, .35), inset 0 1px 0 rgba(255, 255, 255, .06);
}

/* ============ bokeh blobs ============ */
.bokeh { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.bokeh span {
  position: absolute; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .16), rgba(255, 255, 255, 0) 70%);
  filter: blur(6px);
  animation: drift 14s ease-in-out infinite alternate;
}
.bokeh span:nth-child(1) { width: 160px; height: 160px; top: 6%;  left: 8%;  animation-delay: 0s; }
.bokeh span:nth-child(2) { width: 110px; height: 110px; top: 22%; right: 10%; animation-delay: 1.5s; }
.bokeh span:nth-child(3) { width: 220px; height: 220px; bottom: 8%; left: 20%; animation-delay: .8s; }
.bokeh span:nth-child(4) { width: 90px;  height: 90px;  bottom: 26%; right: 14%; animation-delay: 2.4s; }
.bokeh span:nth-child(5) { width: 140px; height: 140px; top: 44%; left: 44%; animation-delay: 1.1s; }
.bokeh span:nth-child(6) { width: 70px;  height: 70px;  top: 62%; right: 34%; animation-delay: 3s; }
@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); opacity: .55; }
  to   { transform: translate3d(14px, -22px, 0) scale(1.12); opacity: .9; }
}

/* ============ loader ============ */
.loader, .gate {
  position: fixed; inset: 0; z-index: 90;
  display: grid; place-items: center;
  padding: 24px;
  background:
    radial-gradient(90% 60% at 50% 20%, rgba(168, 85, 247, .22), transparent 70%),
    linear-gradient(180deg, #170e2c 0%, #221142 55%, #180e2f 100%);
}

.loader-card {
  position: relative;
  width: min(320px, 82vw);
  padding: 40px 22px 30px;
  border-radius: 26px;
  text-align: center;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .09);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 20px 60px rgba(4, 1, 12, .55);
}

.ring {
  width: 104px; height: 104px; margin: 0 auto 22px;
  border-radius: 50%;
  background: conic-gradient(from 210deg, var(--blue), var(--violet) 45%, var(--pink) 75%, transparent 88%);
  padding: 5px;
  animation: spin 1.35s linear infinite;
  display: grid; place-items: center;
  filter: drop-shadow(0 0 14px rgba(168, 85, 247, .5));
}
.ring-inner {
  width: 100%; height: 100%; border-radius: 50%;
  background: #1d1238;
  display: grid; place-items: center;
  font-size: 26px;
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.12); } }

.loader-text {
  margin: 0 0 18px;
  font-size: 1.05rem; font-weight: 700;
  letter-spacing: .01em;
  color: #fff;
  min-height: 1.7em;
  transition: opacity .3s ease;
}

.dots { display: flex; justify-content: center; gap: 8px; }
.dots i {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--blue);
  animation: bounce 1.1s ease-in-out infinite;
}
.dots i:nth-child(2) { background: var(--violet); animation-delay: .16s; }
.dots i:nth-child(3) { background: var(--pink); animation-delay: .32s; }
@keyframes bounce {
  0%, 100% { transform: translateY(0); opacity: .55; }
  50% { transform: translateY(-7px); opacity: 1; }
}

/* ============ gate ============ */
.gate { z-index: 80; }

.gate-card {
  position: relative;
  width: min(400px, 100%);
  padding: 62px 20px 22px;
  border-radius: 30px;
  text-align: center;
  background: rgba(255, 255, 255, .045);
  border: 1px solid rgba(255, 255, 255, .1);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 24px 70px rgba(4, 1, 12, .6);
  animation: rise .6s cubic-bezier(.2, .8, .3, 1) both;
}
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

.gate-avatar {
  position: absolute; top: -46px; left: 50%; transform: translateX(-50%);
  width: 92px; height: 92px; border-radius: 50%;
  overflow: hidden;
  border: 3px solid rgba(255, 255, 255, .18);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .5);
  background: #2a1150;
}
.gate-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }

.gate-title { margin: 0 0 6px; font-size: 1.9rem; font-weight: 900; }
.gate-sub { margin: 0 0 24px; font-size: .95rem; color: var(--muted); line-height: 1.9; }

.gate-form { display: grid; gap: 14px; }

.gate-input {
  width: 100%; height: 64px;
  border-radius: 18px;
  background: rgba(10, 4, 24, .62);
  border: 1px solid rgba(255, 255, 255, .38);
  color: #fff;
  text-align: center;
  font-family: inherit;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: .32em;
  text-indent: .32em;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.gate-input::placeholder { color: rgba(255, 255, 255, .45); letter-spacing: .1em; text-indent: .1em; font-weight: 600; font-size: 1.05rem; }
.gate-input:focus { border-color: rgba(255, 134, 174, .85); box-shadow: 0 0 0 4px rgba(255, 77, 141, .16); }

.gate-btn {
  width: 100%; height: 58px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, .14);
  background: linear-gradient(180deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, .05));
  color: #fff; font-family: inherit;
  font-size: 1.05rem; font-weight: 800;
  cursor: pointer;
  transition: transform .15s, background .2s;
}
.gate-btn:active { transform: scale(.98); }
.gate-btn.ready {
  background: linear-gradient(135deg, var(--pink), var(--violet));
  border-color: transparent;
  box-shadow: 0 12px 30px rgba(255, 77, 141, .35);
}

.gate-err { margin: 14px 0 0; min-height: 1.4em; font-size: .9rem; color: #ffb3c8; font-weight: 700; }
.shake { animation: shake .4s ease; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(5px); }
}

/* ============ hero ============ */
.hero {
  position: relative;
  height: 100svh; min-height: 560px;
  display: flex; flex-direction: column;
  justify-content: center; align-items: center;
  overflow: hidden;
  padding-bottom: 96px;
}
.hero-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center 35%;
  transform: scale(1.04);
  filter: saturate(.95);
}
.hero-shade {
  position: absolute; inset: 0;
  background:
    radial-gradient(70% 50% at 50% 40%, rgba(20, 8, 40, .15), rgba(20, 8, 40, .72) 100%),
    linear-gradient(180deg, rgba(21, 12, 40, .55) 0%, rgba(21, 12, 40, .25) 35%, rgba(21, 12, 40, .92) 88%, #1a0f36 100%);
}
.hero-content { position: relative; text-align: center; padding: 0 18px; }
.hero-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 20px; margin-bottom: 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .55);
  background: rgba(255, 255, 255, .1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-size: .95rem; font-weight: 700;
}
.hero-names {
  margin: 0;
  font-size: clamp(2rem, 9.5vw, 3rem);
  font-weight: 900;
  letter-spacing: .02em;
  text-shadow: 0 6px 30px rgba(0, 0, 0, .6);
}
.hero-names span { color: var(--pink-soft); font-weight: 700; margin: 0 .18em; }
.hero-line {
  position: absolute; bottom: 108px; left: 0; right: 0;
  margin: 0; padding: 0 20px;
  text-align: center;
  font-size: clamp(1.3rem, 5.6vw, 1.7rem);
  font-weight: 700; line-height: 1.65;
  text-shadow: 0 4px 24px rgba(0, 0, 0, .7);
}
.scroll-hint {
  position: absolute; bottom: 78px; left: 50%; transform: translateX(-50%);
  font-size: 1.6rem; color: rgba(255, 255, 255, .55);
  animation: bob 1.8s ease-in-out infinite;
}
@keyframes bob { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 7px); } }

/* ============ sections ============ */
.sec { max-width: 520px; margin: 0 auto; padding: 46px 18px; }
.sec-title {
  margin: 0 0 22px; text-align: center;
  font-size: clamp(1.45rem, 6.4vw, 1.85rem);
  font-weight: 900; line-height: 1.5;
}
.sec-title.small { font-size: clamp(1.15rem, 5.2vw, 1.4rem); margin-bottom: 18px; }

.sec-meet { text-align: center; padding-top: 26px; }
.meet-card {
  padding: 26px 18px;
  border-radius: 26px;
  background: var(--glass-strong);
  border: 1px solid rgba(255, 255, 255, .14);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 16px 40px rgba(6, 2, 18, .35);
}
.meet-card h2 { margin: 0; font-size: 1.5rem; font-weight: 800; }
.meet-line {
  width: 1px; height: 30px; margin: 0 auto;
  background: linear-gradient(180deg, rgba(255, 255, 255, .35), rgba(255, 255, 255, .05));
}
.date-chip {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 24px;
  border-radius: 999px;
  background: #0c0618;
  border: 1px solid rgba(255, 255, 255, .07);
  box-shadow: 0 0 26px rgba(255, 77, 141, .38), 0 0 60px rgba(168, 85, 247, .22);
  font-size: 1.15rem; font-weight: 800;
  letter-spacing: .05em;
  direction: ltr;
}
.date-chip .cal { filter: hue-rotate(-16deg) saturate(1.4); }

/* counter */
.counter-card { padding: 18px 14px 20px; border-radius: 26px; }
.counter-head {
  margin: 0 0 16px; text-align: center;
  font-size: .92rem; font-weight: 700; color: rgba(255, 255, 255, .88);
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.counter-head .clock { filter: hue-rotate(-16deg) saturate(1.5); }
.counter-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; }
.cell {
  width: calc((100% - 27px) / 4);
  padding: 12px 2px 10px;
  border-radius: 16px;
  text-align: center;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .1);
}
.cell b {
  display: block;
  font-size: 1.45rem; font-weight: 900;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.cell i { display: block; margin-top: 3px; font-size: .68rem; font-style: normal; color: var(--muted); }

/* lines */
.lines { display: grid; gap: 13px; }
.line {
  width: 100%;
  padding: 20px 16px;
  border-radius: 20px;
  font-family: inherit; color: #fff;
  cursor: pointer; text-align: center;
  transition: transform .15s, background .25s;
}
.line:active { transform: scale(.99); }
.line-face { display: flex; align-items: center; justify-content: center; gap: 22px; font-size: 1.25rem; font-weight: 800; }
.line-face .ico { color: var(--pink); font-size: 1.5rem; line-height: 1; }
.line-reveal {
  display: block;
  max-height: 0; opacity: 0; overflow: hidden;
  font-size: .95rem; font-weight: 600; line-height: 1.9; color: rgba(255, 255, 255, .88);
  transition: max-height .45s ease, opacity .35s ease, margin .35s ease;
}
.line.open { background: rgba(255, 77, 141, .1); border-color: rgba(255, 134, 174, .35); }
.line.open .line-reveal { max-height: 200px; opacity: 1; margin-top: 12px; }

/* flip cards */
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.flip {
  position: relative;
  aspect-ratio: 3 / 4;
  padding: 0;
  border-radius: 24px;
  background: transparent;
  border: 0;
  cursor: pointer;
  perspective: 900px;
  font-family: inherit; color: #fff;
}
.flip-in {
  position: absolute; inset: 0;
  transform-style: preserve-3d;
  transition: transform .55s cubic-bezier(.3, .9, .3, 1);
  border-radius: 24px;
}
.flip.on .flip-in { transform: rotateY(180deg); }
.flip-front, .flip-back {
  position: absolute; inset: 0;
  border-radius: 24px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 14px;
  padding: 16px 12px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  background: var(--glass);
  border: 1px solid var(--edge);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 14px 34px rgba(6, 2, 18, .35), inset 0 1px 0 rgba(255, 255, 255, .06);
}
.flip-back {
  transform: rotateY(180deg);
  background: linear-gradient(160deg, rgba(255, 77, 141, .16), rgba(168, 85, 247, .12));
  border-color: rgba(255, 134, 174, .3);
  font-size: .93rem; font-weight: 700; line-height: 1.95;
  text-align: center;
}
.flip-front .heart {
  width: 62px; height: 62px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .05);
  color: var(--pink); font-size: 1.7rem;
  box-shadow: 0 0 22px rgba(255, 77, 141, .25);
}
.flip-label { font-size: 1.08rem; font-weight: 800; }
.flip.on .flip-front { opacity: 0; }

/* gallery */
.shots { display: grid; gap: 16px; }
.shot {
  margin: 0;
  padding: 13px 13px 6px;
  border-radius: 26px;
  opacity: 0; transform: translateY(22px);
  transition: opacity .6s ease, transform .6s ease;
}
.shot.in { opacity: 1; transform: none; }
.shot img {
  display: block; width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 18px;
  background: #241441;
}
.shot figcaption {
  padding: 14px 6px 12px;
  text-align: center;
  font-size: 1.1rem; font-weight: 800; line-height: 1.75;
}

/* footer */
.foot { text-align: center; padding: 34px 18px 128px; }
.foot-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 15px 26px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .2);
  background: rgba(255, 255, 255, .07);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #fff; font-family: inherit;
  font-size: 1rem; font-weight: 800;
  cursor: pointer;
  box-shadow: 0 12px 34px rgba(6, 2, 18, .4);
}
.foot-pill:active { transform: scale(.98); }
.credits { margin: 22px 0 0; font-size: .85rem; color: rgba(255, 255, 255, .5); font-weight: 600; }

/* ============ music bar ============ */
.music {
  position: fixed; bottom: max(10px, env(safe-area-inset-bottom));
  left: 10px; right: 10px;
  max-width: 500px; margin: 0 auto;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(26, 14, 48, .82);
  border: 1px solid rgba(255, 255, 255, .12);
  backdrop-filter: blur(18px) saturate(130%);
  -webkit-backdrop-filter: blur(18px) saturate(130%);
  box-shadow: 0 16px 40px rgba(3, 1, 10, .55);
  z-index: 40;
}
.music-art {
  width: 46px; height: 46px; border-radius: 50%; overflow: hidden; flex: none;
  border: 1px solid rgba(255, 255, 255, .2);
}
.music-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.music-info { flex: 1; min-width: 0; }
.music-title { font-size: .88rem; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.music-status { display: flex; align-items: center; gap: 6px; font-size: .72rem; color: var(--muted); margin-top: 1px; }
.music-status .dot { width: 7px; height: 7px; border-radius: 50%; background: #35d07f; box-shadow: 0 0 8px #35d07f; flex: none; }
.music-bar { height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .16); margin-top: 6px; overflow: hidden; }
.music-fill { height: 100%; width: 0%; border-radius: 3px; background: linear-gradient(90deg, var(--blue), var(--violet), var(--pink)); }
.music-btn {
  flex: none;
  width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .1);
  color: #fff; cursor: pointer;
  display: grid; place-items: center;
}
.music-btn svg { width: 18px; height: 18px; display: block; fill: currentColor; }
.music-btn:active { transform: scale(.95); }

/* ============ modal ============ */
.modal {
  position: fixed; inset: 0; z-index: 70;
  display: grid; place-items: center;
  padding: 20px;
  background: rgba(4, 2, 10, .74);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: fade .25s ease both;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal-card {
  width: 100%; max-width: 400px;
  border-radius: 26px; overflow: hidden;
  background: #14101f;
  border: 1px solid rgba(255, 255, 255, .08);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .7);
  animation: rise .35s cubic-bezier(.2, .8, .3, 1) both;
}
.modal-head {
  position: relative;
  height: 118px;
  display: grid; place-items: center;
  background:
    radial-gradient(70% 120% at 50% 0%, rgba(168, 85, 247, .35), transparent 70%),
    linear-gradient(180deg, #2a1a4d, #1b1233);
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.envelope {
  width: 68px; height: 68px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(10, 6, 20, .78);
  border: 1px solid rgba(255, 255, 255, .1);
  font-size: 1.9rem;
  box-shadow: 0 0 30px rgba(255, 77, 141, .25);
}
.modal-x {
  position: absolute; top: 12px; right: 12px;
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(10, 6, 20, .6);
  color: #fff; font-size: .9rem; cursor: pointer;
  display: grid; place-items: center;
}
.modal-body { padding: 26px 22px 30px; text-align: center; min-height: 200px; }
.modal-body h3 { margin: 0 0 22px; font-size: 1.35rem; font-weight: 800; }
.modal-body p {
  margin: 0; font-size: 1.05rem; font-weight: 600; line-height: 2.05;
  color: #fff;
  text-shadow: 0 0 18px rgba(255, 134, 174, .45);
}
.caret {
  display: inline-block; width: 2px; height: 1.02em; margin: 0 3px;
  vertical-align: -0.16em; border-radius: 1px;
  background: #fff; opacity: .9;
  animation: caretBlink .78s steps(1, end) infinite;
}
.caret.done { animation: none; opacity: 0; transition: opacity .55s ease; }
@keyframes caretBlink { 0%, 49% { opacity: .9; } 50%, 100% { opacity: 0; } }
.modal-foot {
  padding: 16px;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, .06);
  background: rgba(255, 255, 255, .02);
}
.modal-btn {
  padding: 13px 40px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(255, 255, 255, .06);
  color: #fff; font-family: inherit; font-size: 1rem; font-weight: 700;
  cursor: pointer;
}

/* ============ floating hearts ============ */
.hearts { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 1; }
.hearts span {
  position: absolute; bottom: -60px;
  will-change: transform, opacity;
  animation: floatUp linear infinite;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .25));
  opacity: .55;
}

/* keep every piece of content above the heart layer */
.sec, .foot { position: relative; z-index: 2; }
.hero-content, .hero-line, .scroll-hint { z-index: 2; }
.hero-bg, .hero-shade { z-index: 0; }
@keyframes floatUp {
  0%   { transform: translate3d(0, 0, 0) rotate(0deg) scale(1); opacity: 0; }
  12%  { opacity: var(--o, .8); }
  85%  { opacity: var(--o, .8); }
  100% { transform: translate3d(var(--dx, 30px), -112vh, 0) rotate(var(--rot, 25deg)) scale(var(--sc, 1.1)); opacity: 0; }
}

@media (min-width: 560px) {
  .sec { padding: 54px 24px; }
  .flip-label { font-size: 1.15rem; }
}

@media (prefers-reduced-motion: reduce) {
  .hearts, .bokeh span, .scroll-hint, .ring { animation: none !important; }
  .shot { opacity: 1; transform: none; }
}
