/* ============================================================
   Luxury Islamic Invitation — Custom Styles
   ============================================================ */

:root {
  --emerald-deep: #0a3d2c;
  --emerald-royal: #0f5132;
  --emerald-forest: #145c40;
  --emerald-jade: #1e8a5a;
  --gold-dark: #9c7a2a;
  --gold-royal: #c9a44b;
  --gold-soft: #e0c587;
  --gold-light: #f3e3b0;
  --cream-warm: #fbf6ec;
  --cream-soft: #f7efe0;
  --cream-ivory: #fefcf6;
}

html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; }

/* ===== Islamic Geometric Pattern (SVG bg) ===== */
.islamic-pattern {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'><g fill='none' stroke='%23e0c587' stroke-width='0.6'><path d='M40 0 L80 40 L40 80 L0 40 Z'/><path d='M40 10 L70 40 L40 70 L10 40 Z'/><circle cx='40' cy='40' r='20'/><path d='M40 20 L60 40 L40 60 L20 40 Z'/><circle cx='40' cy='40' r='6'/></g></svg>");
  background-size: 80px 80px;
}
.islamic-pattern-light {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'><g fill='none' stroke='%23c9a44b' stroke-width='0.5'><path d='M40 0 L80 40 L40 80 L0 40 Z'/><path d='M40 10 L70 40 L40 70 L10 40 Z'/><circle cx='40' cy='40' r='20'/><circle cx='40' cy='40' r='6'/></g></svg>");
  background-size: 80px 80px;
}

/* ===== Gold Shimmer Text ===== */
.gold-shimmer {
  background: linear-gradient(
    100deg,
    #c9a44b 10%,
    #f3e3b0 30%,
    #ffffff 50%,
    #f3e3b0 70%,
    #c9a44b 90%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: shimmer 4s linear infinite;
}

@keyframes shimmer {
  0% { background-position: 0% center; }
  100% { background-position: 200% center; }
}

/* ===== Hero Reveal Animation ===== */
.hero-reveal {
  opacity: 0;
  transform: translateY(30px);
  animation: heroReveal 1.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes heroReveal {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 30px rgba(201, 164, 75, 0.3); }
  50%      { box-shadow: 0 0 60px rgba(201, 164, 75, 0.6); }
}

/* ===== Glassmorphism Cards ===== */
.glass-card {
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(201, 164, 75, 0.35);
  box-shadow: 0 20px 50px -20px rgba(10, 61, 44, 0.25);
}
.dark .glass-card {
  background: rgba(10, 61, 44, 0.55);
  border-color: rgba(201, 164, 75, 0.3);
  color: var(--cream-soft);
}

.glass-card-dark {
  background: rgba(10, 61, 44, 0.45);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(201, 164, 75, 0.4);
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.5);
}

/* ===== Countdown Cards ===== */
.countdown-card {
  position: relative;
  padding: 1.5rem 1rem;
  border-radius: 1.5rem;
  background: linear-gradient(145deg, rgba(255,255,255,0.85), rgba(247,239,224,0.7));
  backdrop-filter: blur(12px);
  border: 1px solid rgba(201, 164, 75, 0.4);
  box-shadow:
    0 10px 30px -10px rgba(10, 61, 44, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.countdown-card:hover {
  transform: translateY(-6px);
  box-shadow:
    0 20px 40px -10px rgba(10, 61, 44, 0.35),
    0 0 30px rgba(201, 164, 75, 0.25);
}
.dark .countdown-card {
  background: linear-gradient(145deg, rgba(15, 81, 50, 0.6), rgba(10, 61, 44, 0.7));
  color: var(--gold-light);
}
.countdown-value {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  font-weight: 700;
  background: linear-gradient(180deg, var(--gold-royal), var(--gold-dark));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
}
.countdown-label {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--emerald-deep);
  opacity: 0.7;
}
.dark .countdown-label { color: var(--gold-soft); }

/* ===== Event Detail Rows ===== */
.detail-row {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.detail-icon {
  flex-shrink: 0;
  width: 3rem;
  height: 3rem;
  border-radius: 1rem;
  background: linear-gradient(135deg, rgba(201, 164, 75, 0.25), rgba(201, 164, 75, 0.1));
  border: 1px solid rgba(201, 164, 75, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-light);
  font-size: 1.1rem;
}
.detail-label {
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold-soft);
  margin-bottom: 0.25rem;
}
.detail-value {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  color: var(--gold-light);
  line-height: 1.4;
}

/* ===== Buttons ===== */
.btn-gold {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 1.75rem;
  border-radius: 9999px;
  font-weight: 600;
  letter-spacing: 0.05em;
  background: linear-gradient(135deg, var(--gold-royal), var(--gold-dark));
  color: var(--cream-ivory);
  border: 1px solid rgba(243, 227, 176, 0.5);
  box-shadow: 0 10px 30px -10px rgba(201, 164, 75, 0.6);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}
.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 35px -10px rgba(201, 164, 75, 0.8);
}
.btn-gold:active { transform: translateY(0); }

.btn-outline-gold {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 1.75rem;
  border-radius: 9999px;
  font-weight: 600;
  letter-spacing: 0.05em;
  background: transparent;
  color: var(--gold-light);
  border: 1px solid var(--gold-royal);
  transition: all 0.3s ease;
  cursor: pointer;
}
.btn-outline-gold:hover {
  background: rgba(201, 164, 75, 0.15);
  color: var(--gold-light);
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: 9999px;
  font-weight: 500;
  background: linear-gradient(135deg, var(--emerald-royal), var(--emerald-deep));
  color: var(--gold-light);
  border: 1px solid rgba(201, 164, 75, 0.4);
  transition: all 0.3s ease;
  cursor: pointer;
}
.copy-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 25px -10px rgba(10, 61, 44, 0.6);
}

/* ===== Form Inputs ===== */
.form-label {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold-soft);
  margin-bottom: 0.5rem;
}
.form-input,
.form-input-dark {
  width: 100%;
  padding: 0.85rem 1.1rem;
  border-radius: 1rem;
  font-family: inherit;
  font-size: 1rem;
  outline: none;
  transition: all 0.3s ease;
}
.form-input {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(201, 164, 75, 0.4);
  color: var(--emerald-deep);
}
.dark .form-input {
  background: rgba(10, 61, 44, 0.5);
  color: var(--cream-ivory);
}
.form-input:focus {
  background: rgba(255, 255, 255, 0.95);
  border-color: var(--gold-royal);
  box-shadow: 0 0 0 4px rgba(201, 164, 75, 0.15);
}
.form-input-dark {
  background: rgba(10, 61, 44, 0.5);
  border: 1px solid rgba(201, 164, 75, 0.4);
  color: var(--cream-ivory);
}
.form-input-dark::placeholder { color: rgba(247, 239, 224, 0.5); }
.form-input-dark:focus {
  background: rgba(10, 61, 44, 0.75);
  border-color: var(--gold-royal);
  box-shadow: 0 0 0 4px rgba(201, 164, 75, 0.2);
}

/* ===== RSVP Choice ===== */
.rsvp-choice { cursor: pointer; }
.rsvp-choice-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 1.25rem;
  border-radius: 1rem;
  background: rgba(10, 61, 44, 0.4);
  border: 1px solid rgba(201, 164, 75, 0.3);
  color: var(--cream-soft);
  font-weight: 500;
  transition: all 0.3s ease;
}
.rsvp-choice:hover .rsvp-choice-inner {
  border-color: var(--gold-royal);
  background: rgba(201, 164, 75, 0.15);
}
.rsvp-choice input:checked + .rsvp-choice-inner {
  background: linear-gradient(135deg, var(--gold-royal), var(--gold-dark));
  color: var(--emerald-deep);
  border-color: var(--gold-light);
  box-shadow: 0 8px 20px -8px rgba(201, 164, 75, 0.6);
}

/* ===== Masonry Gallery ===== */
.masonry-grid {
  column-count: 1;
  column-gap: 1.25rem;
}
@media (min-width: 640px) { .masonry-grid { column-count: 2; } }
@media (min-width: 1024px) { .masonry-grid { column-count: 3; } }

.masonry-item {
  break-inside: avoid;
  margin-bottom: 1.25rem;
  border-radius: 1.5rem;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  border: 1px solid rgba(201, 164, 75, 0.3);
  box-shadow: 0 10px 30px -10px rgba(10, 61, 44, 0.25);
  transition: transform 0.5s ease, box-shadow 0.5s ease;
}
.masonry-item:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 20px 40px -10px rgba(10, 61, 44, 0.4);
}
.masonry-item .placeholder {
  width: 100%;
  background: linear-gradient(135deg, var(--emerald-royal), var(--emerald-deep), var(--gold-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-light);
  position: relative;
  overflow: hidden;
}
.masonry-item .placeholder::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='60' height='60'><g fill='none' stroke='%23e0c587' stroke-width='0.5' opacity='0.3'><path d='M30 0 L60 30 L30 60 L0 30 Z'/><circle cx='30' cy='30' r='15'/></g></svg>");
  opacity: 0.4;
}
.masonry-item .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(10, 61, 44, 0.85));
  display: flex;
  align-items: flex-end;
  padding: 1.25rem;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.masonry-item:hover .overlay { opacity: 1; }
.masonry-item .overlay span {
  color: var(--gold-light);
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 1.1rem;
}

/* ===== Wish Cards ===== */
.wish-card {
  padding: 1.5rem;
  border-radius: 1.5rem;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.75), rgba(247, 239, 224, 0.6));
  border: 1px solid rgba(201, 164, 75, 0.35);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px -15px rgba(10, 61, 44, 0.3);
  transition: transform 0.3s ease;
}
.wish-card:hover { transform: translateY(-3px); }
.dark .wish-card {
  background: linear-gradient(145deg, rgba(15, 81, 50, 0.6), rgba(10, 61, 44, 0.7));
  color: var(--cream-soft);
}
.wish-card .wish-author {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  color: var(--emerald-deep);
  margin-bottom: 0.25rem;
}
.dark .wish-card .wish-author { color: var(--gold-light); }
.wish-card .wish-time {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-bottom: 0.75rem;
}
.dark .wish-card .wish-time { color: var(--gold-soft); }
.wish-card .wish-text {
  color: rgba(10, 61, 44, 0.85);
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.6;
}
.dark .wish-card .wish-text { color: var(--cream-soft); }

/* ===== Gift Card ===== */
.gift-card {
  padding: 2rem;
  border-radius: 2rem;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.7), rgba(247, 239, 224, 0.5));
  border: 1px solid rgba(201, 164, 75, 0.4);
  backdrop-filter: blur(12px);
  box-shadow: 0 20px 50px -20px rgba(10, 61, 44, 0.3);
  transition: transform 0.4s ease;
}
.gift-card:hover { transform: translateY(-4px); }
.dark .gift-card {
  background: linear-gradient(145deg, rgba(15, 81, 50, 0.55), rgba(10, 61, 44, 0.7));
  color: var(--cream-soft);
}

/* ===== QRIS Card ===== */
.qris-card { position: relative; overflow: hidden; }
.qris-card::before {
  content: "";
  position: absolute;
  inset: -40% -20% auto auto;
  width: 320px;
  height: 320px;
  background: radial-gradient(closest-side, rgba(201, 164, 75, 0.18), transparent 70%);
  pointer-events: none;
}
.qris-frame {
  position: relative;
  width: 100%;
  max-width: 360px;
  padding: 6px;
  border-radius: 28px;
  background: linear-gradient(135deg, #c9a44b, #9c7a2a 45%, #f3e3b0 75%, #c9a44b);
  box-shadow:
    0 25px 55px -25px rgba(10, 61, 44, 0.45),
    0 0 0 1px rgba(201, 164, 75, 0.35);
}
.qris-inner {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #ffffff;
  border-radius: 22px;
  padding: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.dark .qris-inner { background: #fefcf6; }
.qris-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}
.qris-corner {
  position: absolute;
  width: 26px;
  height: 26px;
  border: 3px solid var(--gold-royal, #c9a44b);
  pointer-events: none;
}
.qris-corner-tl { top: 10px; left: 10px; border-right: none; border-bottom: none; border-top-left-radius: 10px; }
.qris-corner-tr { top: 10px; right: 10px; border-left: none; border-bottom: none; border-top-right-radius: 10px; }
.qris-corner-bl { bottom: 10px; left: 10px; border-right: none; border-top: none; border-bottom-left-radius: 10px; }
.qris-corner-br { bottom: 10px; right: 10px; border-left: none; border-top: none; border-bottom-right-radius: 10px; }

@media (max-width: 480px) {
  .qris-frame { max-width: 300px; }
  .qris-inner { padding: 16px; }
  .qris-corner { width: 20px; height: 20px; border-width: 2.5px; }
}

/* ===== Social Icons ===== */
.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 9999px;
  background: rgba(201, 164, 75, 0.1);
  border: 1px solid rgba(201, 164, 75, 0.4);
  color: var(--gold-light);
  transition: all 0.3s ease;
}
.social-icon:hover {
  background: var(--gold-royal);
  color: var(--emerald-deep);
  transform: translateY(-3px);
  box-shadow: 0 10px 20px -10px rgba(201, 164, 75, 0.7);
}

/* ===== Toast ===== */
#toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ===== Music Toggle Active ===== */
#musicToggle.playing {
  background: linear-gradient(135deg, var(--gold-royal), var(--gold-dark));
  color: var(--emerald-deep);
}

/* ===== Lightbox ===== */
#lightbox.open { display: flex; }
#lbContent .placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--emerald-royal), var(--emerald-deep), var(--gold-dark));
  color: var(--gold-light);
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 1.5rem;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--cream-warm); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--gold-royal), var(--gold-dark));
  border-radius: 10px;
}
.dark ::-webkit-scrollbar-track { background: var(--emerald-deep); }

/* ===== Selection ===== */
::selection {
  background: var(--gold-royal);
  color: var(--emerald-deep);
}

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

/* ===== Mobile tweaks ===== */
@media (max-width: 640px) {
  .detail-value { font-size: 1.25rem; }
  .gift-card { padding: 1.5rem; }
}
