/* ============================================================
   Daylight B'Day Celebration — Custom Styles
   (Melengkapi Tailwind CDN dengan detail mewah yang sulit
   dicapai lewat utility class saja)
   ============================================================ */

* { -webkit-tap-highlight-color: transparent; }

html, body { height: 100%; }

body {
  background: #0c0b09;
  overflow-x: hidden;
}

::selection { background: #c9a55c; color: #0c0b09; }

/* Custom scrollbar (webkit) */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #3a3427; border-radius: 8px; }

/* ---------------- Background ambience ----------------
   Satu lapisan glow saja (bukan beberapa gradient bertumpuk)
   agar tidak muncul "belang" kuning yang tidak rata, dan
   ukurannya relatif (%) supaya tetap pas & center di layar
   sekecil apa pun atau selebar desktop ultra-wide. */
.bg-glow {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(60% 42% at 50% 12%, rgba(201,165,92,0.12), transparent 72%);
}
/* Vignette lembut di tepi layar — membuat area kosong di kiri/kanan
   pada layar lebar terasa disengaja, bukan "ruang kosong" polos. */
.bg-glow::after {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(120% 90% at 50% 25%, transparent 45%, rgba(0,0,0,0.5) 100%);
}

.bg-particles { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.bg-particles span {
  position: absolute;
  bottom: -10px;
  width: 3px; height: 3px;
  background: #c9a55c;
  border-radius: 50%;
  opacity: 0.35;
  animation: floatUp linear infinite;
}
@keyframes floatUp {
  0%   { transform: translateY(0) translateX(0); opacity: 0; }
  10%  { opacity: 0.5; }
  90%  { opacity: 0.35; }
  100% { transform: translateY(-110vh) translateX(20px); opacity: 0; }
}

/* ---------------- Layout / views ---------------- */
.view { animation: viewIn .5s ease both; }
@keyframes viewIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.frame {
  position: relative;
  padding: 2.25rem 1.5rem;
  border: 1px solid rgba(201,165,92,0.28);
  border-radius: 1.25rem;
  background: linear-gradient(180deg, rgba(30,27,20,0.6), rgba(22,20,15,0.4));
  box-shadow: 0 0 0 1px rgba(201,165,92,0.06), 0 25px 60px -20px rgba(0,0,0,0.7);
}
.frame::before, .frame::after {
  content: ""; position: absolute; width: 22px; height: 22px;
  border: 1px solid #c9a55c; opacity: 0.65;
}
.frame::before { top: -1px; left: -1px; border-right: none; border-bottom: none; border-top-left-radius: 1.1rem; }
.frame::after  { bottom: -1px; right: -1px; border-left: none; border-top: none; border-bottom-right-radius: 1.1rem; }

.eyebrow {
  font-size: 0.68rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: #a89f8c;
}

.ornament { display: flex; align-items: center; justify-content: center; gap: 10px; }
.ornament span { width: 40px; height: 1px; background: linear-gradient(90deg, transparent, #c9a55c); }
.ornament span:last-child { background: linear-gradient(90deg, #c9a55c, transparent); }
.ornament i {
  width: 6px; height: 6px; background: #c9a55c; transform: rotate(45deg);
  display: inline-block; flex-shrink: 0;
}

/* ---------------- Info cards ---------------- */
.info-card {
  display: flex; align-items: center; gap: 0.9rem;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(201,165,92,0.18);
  border-radius: 0.9rem;
  background: rgba(255,255,255,0.02);
}
.info-icon {
  width: 40px; height: 40px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: 0.7rem;
  background: rgba(201,165,92,0.12);
  font-size: 1.1rem;
}

/* ---------------- Countdown ---------------- */
.count-box {
  border: 1px solid rgba(201,165,92,0.2);
  border-radius: 0.7rem;
  padding: 0.55rem 0.25rem;
  background: rgba(255,255,255,0.02);
  text-align: center;
}
.count-num { font-family: 'Playfair Display', serif; font-size: 1.35rem; color: #e8cf94; line-height: 1; }
.count-lbl { font-size: 0.6rem; letter-spacing: 0.1em; text-transform: uppercase; color: #a89f8c; margin-top: 4px; }

/* ---------------- Buttons ---------------- */
.btn-gold {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.95rem 1.5rem;
  border-radius: 0.9rem;
  font-weight: 600; font-size: 0.92rem; letter-spacing: 0.03em;
  color: #0c0b09;
  background: linear-gradient(135deg, #e8cf94, #c9a55c 55%, #9c7c3d);
  box-shadow: 0 12px 30px -10px rgba(201,165,92,0.55);
  transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
}
.btn-gold:active { transform: translateY(1px) scale(0.99); }
.btn-gold:disabled { opacity: 0.4; box-shadow: none; pointer-events: none; }

.btn-ghost {
  padding: 0.95rem 1.5rem;
  border-radius: 0.9rem;
  font-weight: 500; font-size: 0.92rem;
  color: #cfc6b4;
  border: 1px solid rgba(201,165,92,0.3);
  background: transparent;
  transition: background .15s ease;
}
.btn-ghost:active { background: rgba(255,255,255,0.04); }

.back-link {
  align-self: flex-start;
  font-size: 0.8rem;
  color: #c9a55c;
  letter-spacing: 0.02em;
}

/* ---------------- Friend list ---------------- */
.friend-item {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  padding: 0.95rem 1.1rem;
  border-radius: 0.9rem;
  border: 1px solid rgba(201,165,92,0.18);
  background: rgba(255,255,255,0.02);
  text-align: left;
  transition: border-color .15s ease, background .15s ease, transform .1s ease;
}
.friend-item:active:not(:disabled) { transform: scale(0.98); }
.friend-item:not(:disabled):hover { border-color: rgba(201,165,92,0.5); background: rgba(201,165,92,0.06); }
.friend-item:disabled { opacity: 0.4; }
.friend-item .name { font-weight: 500; }
.friend-item .tag {
  font-size: 0.65rem; padding: 0.2rem 0.55rem; border-radius: 999px;
  letter-spacing: 0.05em; text-transform: uppercase; flex-shrink: 0;
}
.friend-item.is-me { border-color: #c9a55c; background: rgba(201,165,92,0.1); }
.friend-item.is-me .tag { background: #c9a55c; color: #0c0b09; }
.friend-item.is-locked .tag { background: rgba(255,255,255,0.08); color: #a89f8c; }

/* ---------------- RSVP Wizard (step-by-step) ---------------- */
.step-indicator { margin-bottom: 1.75rem; }
.step-dots { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 0.6rem; }
.step-dot {
  width: 8px; height: 8px; border-radius: 999px;
  background: rgba(201,165,92,0.2);
  transition: all .25s ease;
}
.step-dot.done { background: #9c7c3d; }
.step-dot.active { width: 22px; background: linear-gradient(90deg, #e8cf94, #c9a55c); }
.step-label { text-align: center; font-size: 0.68rem; letter-spacing: 0.18em; text-transform: uppercase; color: #a89f8c; }

.step-panel { animation: viewIn .4s ease both; }

.step-title {
  display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem;
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  color: #e8cf94;
  margin-bottom: 1.1rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid rgba(201,165,92,0.22);
}
.step-emoji { font-size: 1.3rem; line-height: 1; }
.step-title .req { font-family: 'Jost', sans-serif; font-size: 1rem; }
.step-title .info-btn { margin-left: -0.15rem; }

.opt-tag {
  font-family: 'Jost', sans-serif;
  font-size: 0.68rem; font-weight: 500;
  color: #a89f8c;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(201,165,92,0.2);
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  letter-spacing: 0.02em;
}

.step-back-btn {
  width: 52px; height: 52px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: 0.9rem;
  border: 1px solid rgba(201,165,92,0.3);
  color: #c9a55c;
  font-size: 1.1rem;
  transition: background .15s ease;
}
.step-back-btn:active { background: rgba(201,165,92,0.1); }

/* ---------------- Form ---------------- */
.form-block { margin-bottom: 1.5rem; }
.form-label { display: block; font-size: 0.85rem; font-weight: 500; color: #f5efe3; margin-bottom: 0.6rem; }
.req { color: #d98a8a; }
.opt { color: #a89f8c; font-weight: 400; font-size: 0.75rem; }

.info-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 17px; height: 17px; flex-shrink: 0;
  border-radius: 50%;
  border: 1px solid rgba(201,165,92,0.55);
  color: #c9a55c;
  font-size: 0.65rem; font-weight: 600; line-height: 1;
  transition: all .15s ease;
}
.info-btn:active { background: rgba(201,165,92,0.18); transform: scale(0.92); }

.input-field {
  width: 100%;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(201,165,92,0.22);
  border-radius: 0.8rem;
  padding: 0.8rem 1rem;
  color: #f5efe3;
  font-family: inherit;
  font-size: 0.9rem;
  resize: vertical;
}
.input-field::placeholder { color: #6b6353; }
.input-field:focus { outline: none; border-color: #c9a55c; box-shadow: 0 0 0 3px rgba(201,165,92,0.15); }

.choice-btn {
  display: flex; flex-direction: column; align-items: center; gap: 0.35rem;
  padding: 1rem 0.5rem;
  border-radius: 0.9rem;
  border: 1px solid rgba(201,165,92,0.22);
  background: rgba(255,255,255,0.02);
  font-size: 0.85rem; font-weight: 500; color: #cfc6b4;
  transition: all .15s ease;
}
.choice-btn.selected {
  border-color: #c9a55c;
  background: rgba(201,165,92,0.14);
  color: #e8cf94;
  box-shadow: 0 0 0 1px rgba(201,165,92,0.3) inset;
}

.option-list { display: flex; flex-direction: column; gap: 0.6rem; }
.option-group-title {
  font-size: 0.68rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: #c9a55c;
  padding: 0.5rem 0.1rem 0.1rem;
  margin-top: 0.2rem;
}
.option-group-title:first-child { margin-top: 0; padding-top: 0; }
.option-pill {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.8rem 1rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(201,165,92,0.18);
  background: rgba(255,255,255,0.02);
  text-align: left;
  transition: all .15s ease;
}
.option-pill:disabled { opacity: 0.35; }
.option-pill .dot {
  width: 18px; height: 18px; flex-shrink: 0;
  border-radius: 50%;
  border: 1.5px solid rgba(201,165,92,0.5);
  display: flex; align-items: center; justify-content: center;
}
.option-pill.checkbox-style .dot { border-radius: 6px; }
.option-pill .dot i { width: 8px; height: 8px; border-radius: 50%; background: #c9a55c; opacity: 0; transform: scale(0.4); transition: all .15s ease; }
.option-pill.checkbox-style .dot i { border-radius: 2px; }
.option-pill.selected { border-color: #c9a55c; background: rgba(201,165,92,0.1); }
.option-pill.selected .dot { border-color: #c9a55c; }
.option-pill.selected .dot i { opacity: 1; transform: scale(1); }
.option-pill .meta { flex: 1; min-width: 0; }
.option-pill .meta .n { font-size: 0.88rem; font-weight: 500; color: #f5efe3; }
.option-pill .meta .d { font-size: 0.75rem; color: #a89f8c; margin-top: 1px; }

/* ---------------- Toggle switch ---------------- */
.toggle-switch {
  width: 50px; height: 28px; border-radius: 999px; flex-shrink: 0;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(201,165,92,0.25);
  position: relative;
  transition: background .2s ease;
}
.toggle-switch .toggle-knob {
  position: absolute; top: 2px; left: 2px;
  width: 22px; height: 22px; border-radius: 50%;
  background: #cfc6b4;
  transition: transform .2s ease, background .2s ease;
}
.toggle-switch[aria-pressed="true"] { background: #c9a55c; }
.toggle-switch[aria-pressed="true"] .toggle-knob { transform: translateX(22px); background: #0c0b09; }

/* ---------------- Modal ---------------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 50;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.65);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  padding: 1.25rem;
  animation: fadeIn .2s ease both;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-box {
  width: 100%; max-width: 340px;
  background: #16140f;
  border: 1px solid rgba(201,165,92,0.3);
  border-radius: 1.1rem;
  padding: 1.75rem 1.5rem;
  box-shadow: 0 30px 70px -20px rgba(0,0,0,0.8);
  animation: popIn .2s ease both;
}
@keyframes popIn { from { opacity: 0; transform: scale(0.94); } to { opacity: 1; transform: scale(1); } }

/* ---------------- Toast ---------------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 60;
  transform: translate(-50%, 20px);
  background: #1e1b14;
  border: 1px solid rgba(201,165,92,0.35);
  color: #f5efe3;
  font-size: 0.83rem;
  padding: 0.8rem 1.2rem;
  border-radius: 0.8rem;
  max-width: 90vw;
  box-shadow: 0 20px 40px -15px rgba(0,0,0,0.7);
  opacity: 0;
  pointer-events: none;
  transition: all .25s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { border-color: rgba(217,138,138,0.5); }

.hidden { display: none !important; }
