/* ===== Wedding RSVP — Kem / Vàng champagne / Nâu ===== */
:root {
  --cream: #faf6ef;
  --cream-2: #f4ecdd;
  --gold: #c9a227;
  --champagne: #d4af37;
  --champagne-light: #e8d48b;
  --brown: #5b4636;
  --brown-dark: #3a2a1a;
  --text: #4a3b2d;
  --text-light: #8a7a68;
  --white: #ffffff;
  --radius: 20px;
  --shadow: 0 8px 30px rgba(91, 70, 54, 0.12);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Cormorant Garamond', 'Playfair Display', Georgia, 'Times New Roman', serif;
  background: var(--cream);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.sans { font-family: 'Montserrat', -apple-system, 'Segoe UI', Roboto, sans-serif; }

/* ---------- Animation ---------- */
.fade-in { animation: fadeIn 0.9s ease both; }
.fade-in-up { animation: fadeInUp 0.9s ease both; }
.d1 { animation-delay: 0.15s; } .d2 { animation-delay: 0.3s; }
.d3 { animation-delay: 0.45s; } .d4 { animation-delay: 0.6s; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.05); } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  width: 100%;
  min-height: 78vh;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.hero::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(58,42,26,0.75) 0%, rgba(58,42,26,0.15) 45%, rgba(58,42,26,0.05) 100%);
}
.hero-content {
  position: relative; z-index: 2;
  text-align: center;
  color: var(--white);
  padding: 48px 20px 56px;
  width: 100%;
}
.hero-sub {
  font-size: 0.8rem; letter-spacing: 0.35em; text-transform: uppercase;
  color: var(--champagne-light); margin-bottom: 12px;
}
.hero-names {
  font-size: clamp(2.2rem, 9vw, 3.6rem);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-shadow: 0 2px 16px rgba(0,0,0,0.35);
}
.hero-names .amp { color: var(--champagne-light); font-style: italic; margin: 0 6px; }
.hero-date {
  margin-top: 14px; font-size: 1.15rem; letter-spacing: 0.12em;
}
.divider {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  margin: 18px auto; color: var(--gold);
}
.divider::before, .divider::after {
  content: ''; height: 1px; width: 70px;
  background: linear-gradient(to right, transparent, var(--gold), transparent);
}

/* ---------- Container & Cards ---------- */
.container { max-width: 680px; margin: 0 auto; padding: 0 18px; }
.container-wide { max-width: 1100px; margin: 0 auto; padding: 0 18px; }

.section { padding: 44px 0; }
.section-title {
  text-align: center; font-size: 1.9rem; color: var(--brown-dark);
  font-weight: 600; margin-bottom: 6px;
}
.section-sub { text-align: center; color: var(--text-light); margin-bottom: 28px; font-size: 1rem; }

.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
  border: 1px solid rgba(201, 162, 39, 0.15);
}
.card + .card { margin-top: 20px; }

/* ---------- Couple section ---------- */
.couple-grid {
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px;
  align-items: center; text-align: center;
}
.couple-photo {
  width: clamp(96px, 26vw, 150px); height: clamp(96px, 26vw, 150px);
  border-radius: 50%; object-fit: cover;
  border: 3px solid var(--champagne-light);
  box-shadow: 0 6px 20px rgba(201,162,39,0.25);
  margin: 0 auto 10px; display: block;
}
.couple-name { font-size: 1.25rem; font-weight: 600; color: var(--brown-dark); }
.couple-role { font-size: 0.82rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); }
.couple-heart { font-size: 1.6rem; animation: pulse 2.4s ease infinite; }

/* ---------- Event info ---------- */
.event-card { text-align: center; }
.event-icon { font-size: 2rem; margin-bottom: 8px; }
.event-label { font-size: 0.78rem; letter-spacing: 0.25em; text-transform: uppercase; color: var(--gold); margin-bottom: 6px; }
.event-value { font-size: 1.25rem; color: var(--brown-dark); font-weight: 600; }
.event-detail { color: var(--text-light); font-size: 0.95rem; margin-top: 4px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 30px; border: none; border-radius: 999px;
  font-family: inherit; font-size: 1.05rem; font-weight: 600;
  cursor: pointer; text-decoration: none; transition: all 0.25s ease;
  letter-spacing: 0.03em;
}
.btn-primary {
  background: linear-gradient(135deg, var(--champagne), #b8912b);
  color: var(--white);
  box-shadow: 0 6px 18px rgba(212,175,55,0.4);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(212,175,55,0.5); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.btn-outline {
  background: transparent; color: var(--brown);
  border: 1.5px solid var(--gold);
}
.btn-outline:hover { background: rgba(201,162,39,0.08); }
.btn-block { width: 100%; }
.btn-sm { padding: 9px 18px; font-size: 0.9rem; }

/* ---------- Forms ---------- */
label.field-label {
  display: block; font-size: 0.95rem; font-weight: 600;
  color: var(--brown-dark); margin-bottom: 8px;
}
input[type=text], input[type=tel], input[type=password], select, textarea {
  width: 100%; padding: 13px 16px;
  border: 1.5px solid #e5dcc9; border-radius: 14px;
  font-family: inherit; font-size: 1rem; color: var(--text);
  background: var(--cream);
  transition: border-color 0.2s, box-shadow 0.2s;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,162,39,0.15);
}
textarea { resize: vertical; min-height: 90px; }

/* Radio lựa chọn tham dự */
.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.choice {
  position: relative; cursor: pointer;
}
.choice input { position: absolute; opacity: 0; }
.choice .choice-box {
  border: 2px solid #e5dcc9; border-radius: 16px;
  padding: 16px 10px; text-align: center; transition: all 0.2s ease;
  background: var(--cream);
}
.choice .choice-box .choice-icon { font-size: 1.5rem; display: block; margin-bottom: 6px; }
.choice .choice-box .choice-text { font-weight: 600; color: var(--brown); font-size: 0.95rem; }
.choice input:checked + .choice-box {
  border-color: var(--champagne);
  background: linear-gradient(135deg, rgba(212,175,55,0.12), rgba(232,212,139,0.18));
  box-shadow: 0 4px 14px rgba(212,175,55,0.25);
}

/* ---------- Map ---------- */
.map-wrap { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.map-wrap iframe { width: 100%; height: 300px; border: 0; display: block; }

/* ---------- Music toggle ---------- */
.music-toggle {
  position: fixed; bottom: 20px; right: 20px; z-index: 90;
  width: 52px; height: 52px; border-radius: 50%;
  background: linear-gradient(135deg, var(--champagne), #b8912b);
  color: var(--white); font-size: 1.3rem;
  border: none; cursor: pointer;
  box-shadow: 0 6px 18px rgba(212,175,55,0.45);
  display: flex; align-items: center; justify-content: center;
}
.music-toggle.playing { animation: pulse 2s ease infinite; }

/* ---------- Alerts / notice ---------- */
.notice {
  border-radius: 14px; padding: 14px 18px; margin: 14px 0;
  font-size: 0.95rem;
}
.notice-error { background: #fdecec; color: #a33; border: 1px solid #f3c1c1; }
.notice-success { background: #ecf7ec; color: #2c6e2c; border: 1px solid #c3e2c3; }

/* ---------- QR bank ---------- */
.bank-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.bank-card { text-align: center; }
.bank-card img {
  width: 100%; max-width: 210px; aspect-ratio: 1/1; object-fit: contain;
  border-radius: 14px; border: 1px solid rgba(201,162,39,0.2);
  background: #fff;
}
.bank-name { font-weight: 600; color: var(--brown-dark); margin-top: 10px; font-size: 1rem; }
.bank-sub { color: var(--text-light); font-size: 0.85rem; }

/* ---------- Footer ---------- */
.footer {
  text-align: center; padding: 40px 18px 60px;
  color: var(--text-light); font-size: 0.9rem;
}
.footer .names { color: var(--gold); font-size: 1.1rem; margin-bottom: 6px; }

/* ---------- Loading spinner ---------- */
.spinner {
  width: 34px; height: 34px; margin: 40px auto;
  border: 3px solid rgba(201,162,39,0.25); border-top-color: var(--gold);
  border-radius: 50%; animation: spin 0.9s linear infinite;
}

/* ---------- Admin ---------- */
.admin-topbar {
  position: sticky; top: 0; z-index: 50;
  background: var(--brown-dark); color: #fff;
  padding: 12px 18px; display: flex; align-items: center; justify-content: space-between;
}
.admin-topbar h1 { font-size: 1.05rem; font-weight: 600; letter-spacing: 0.02em; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px; margin: 20px 0; }
.stat-card {
  background: var(--white); border-radius: 16px; padding: 18px;
  text-align: center; box-shadow: var(--shadow); border-top: 3px solid var(--champagne);
}
.stat-value { font-size: 1.9rem; font-weight: 700; color: var(--brown-dark); }
.stat-label { font-size: 0.8rem; color: var(--text-light); letter-spacing: 0.05em; }

table.admin-table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); }
table.admin-table th { background: var(--cream-2); text-align: left; padding: 11px 12px; font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--brown); }
table.admin-table td { padding: 11px 12px; border-top: 1px solid #f0e8d8; font-size: 0.9rem; vertical-align: middle; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 0.75rem; font-weight: 600; }
.badge-yes { background: #e3f2e3; color: #2c6e2c; }
.badge-no { background: #fdecec; color: #a33; }
.badge-pending { background: #fdf3d7; color: #9a7b1d; }

/* ---------- Responsive ---------- */
@media (max-width: 560px) {
  .card { padding: 20px 16px; }
  .bank-grid { grid-template-columns: 1fr; }
  .choice-grid { grid-template-columns: 1fr 1fr; }
  .hero { min-height: 70vh; }
  .admin-scroll { overflow-x: auto; }
}
