:root {
  --white: rgba(255, 255, 255, 0.95);
  --soft-white: rgba(255, 255, 255, 0.78);
  --glass: rgba(255, 255, 255, 0.10);
  --glass-strong: rgba(255, 255, 255, 0.14);
  --glass-border: rgba(255, 255, 255, 0.20);
  --pink: #ffd6e5;
  --rose: #ff9fc1;
  --deep-rose: #ec6f9f;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Poppins", sans-serif;
  color: white;
  background: #000;
  overflow-x: hidden;
}

/* Background */

#bg-video {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -3;
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at top left, rgba(255, 200, 220, 0.22), transparent 30%),
    radial-gradient(circle at right, rgba(255, 180, 210, 0.18), transparent 28%),
    linear-gradient(to bottom, rgba(20, 12, 22, 0.50), rgba(12, 8, 18, 0.80));
}

.sparkles {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.sparkles span {
  position: absolute;
  bottom: -20px;
  width: 10px;
  height: 10px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.6);
  animation: floatUp linear infinite;
  opacity: 0;
}

.sparkles span:nth-child(1) { left: 8%; width: 8px; height: 8px; animation-duration: 11s; animation-delay: 0s; }
.sparkles span:nth-child(2) { left: 18%; width: 12px; height: 12px; animation-duration: 16s; animation-delay: 2s; }
.sparkles span:nth-child(3) { left: 29%; width: 7px; height: 7px; animation-duration: 13s; animation-delay: 5s; }
.sparkles span:nth-child(4) { left: 41%; width: 10px; height: 10px; animation-duration: 14s; animation-delay: 1s; }
.sparkles span:nth-child(5) { left: 52%; width: 9px; height: 9px; animation-duration: 18s; animation-delay: 4s; }
.sparkles span:nth-child(6) { left: 63%; width: 13px; height: 13px; animation-duration: 17s; animation-delay: 2.5s; }
.sparkles span:nth-child(7) { left: 74%; width: 7px; height: 7px; animation-duration: 12s; animation-delay: 6s; }
.sparkles span:nth-child(8) { left: 84%; width: 11px; height: 11px; animation-duration: 15s; animation-delay: 3s; }
.sparkles span:nth-child(9) { left: 92%; width: 6px; height: 6px; animation-duration: 10s; animation-delay: 1.5s; }
.sparkles span:nth-child(10) { left: 12%; width: 9px; height: 9px; animation-duration: 14s; animation-delay: 2s; }
.sparkles span:nth-child(11) { left: 35%; width: 6px; height: 6px; animation-duration: 11s; animation-delay: 4.5s; }
.sparkles span:nth-child(12) { left: 68%; width: 10px; height: 10px; animation-duration: 16s; animation-delay: 1.2s; }

@keyframes floatUp {
  0% {
    transform: translateY(0) scale(0.8);
    opacity: 0;
  }
  10% {
    opacity: 0.65;
  }
  100% {
    transform: translateY(-110vh) scale(1.15);
    opacity: 0;
  }
}

/* Layout */

.section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  position: relative;
  overflow-x: hidden;
}

.card {
  width: min(92vw, 760px);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 32px;
  box-shadow: var(--shadow);
  overflow: visible;
  position: relative;
}

.card::before {
  content: "";
  position: relative;
  width: 240px;
  height: 240px;
  left: -70px;
  top: -100px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 190, 215, 0.24), transparent 70%);
  pointer-events: none;
}

.card::after {
  content: "";
  position: relative;
  width: 260px;
  height: 260px;
  right: -90px;
  bottom: -120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 220, 235, 0.16), transparent 70%);
  pointer-events: none;
}

/* Landing */

.landing-card {
  padding: 56px 36px;
  text-align: center;
}

.badge {
  display: inline-block;
  padding: 9px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--pink);
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 22px;
  position: relative;
  z-index: 1;
}

.title-script {
  font-family: "Great Vibes", cursive;
  font-size: clamp(3.2rem, 7vw, 5.8rem);
  line-height: 1;
  color: #fff6fa;
  text-shadow: 0 4px 24px rgba(255, 180, 210, 0.35);
  margin-bottom: 10px;
  position: relative;
  z-index: 1;
}

.name {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 700;
  margin-bottom: 10px;
  position: relative;
  z-index: 1;
}

.date {
  font-size: 1.2rem;
  color: var(--soft-white);
  margin-bottom: 22px;
  position: relative;
  z-index: 1;
}

.desc {
  max-width: 520px;
  margin: 0 auto 30px;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.84);
  position: relative;
  z-index: 1;
}

.scroll-hint {
  margin-top: 18px;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.9rem;
  position: relative;
  z-index: 1;
}

/* Buttons */

.primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  padding: 16px 28px;
  min-width: 240px;
  border: none;
  border-radius: 999px;
  color: white;
  font-size: 1rem;
  font-weight: 600;
  background: linear-gradient(135deg, #ff98bd, #eb6b9d);
  box-shadow: 0 12px 32px rgba(235, 107, 157, 0.35);
  cursor: pointer;
  transition: 0.25s ease;
  position: relative;
  z-index: 1;
}

.primary-btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 18px 36px rgba(235, 107, 157, 0.45);
}

.submit-btn {
  margin-top: 4px;
  width: 20%;
  padding-top: 14px;
  padding-bottom: 14px;
  display: block;
  margin-left: auto;
  margin-right: auto;
  
}

.primary-btn,
.submit-btn {
  -webkit-appearance: none;
  appearance: none;
  border: none;
  color: #fff;
  background: linear-gradient(135deg, #ff98bd, #eb6b9d) !important;
  background-color: #eb6b9d !important;
}

.toggle input:checked + .slider {
  background: linear-gradient(135deg, #ff98bd, #eb6b9d) !important;
  background-color: #eb6b9d !important;
}

/* Form section only */

#message-form.section {
  padding: 12px;
}

#message-form .card {
  max-height: none;
}

.form-card {
  padding: 22px 22px;
  background: var(--glass-strong);
}

.form-header {
  text-align: center;
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}

.form-title {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.form-date {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

#message-form .badge {
  padding: 8px 16px;
  margin-bottom: 16px;
  font-size: 0.8rem;
}

.socials {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 12px 0 16px;
  position: relative;
  z-index: 1;
}

.socials a {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: 0.25s ease;
}

.socials a:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.14);
}

.socials svg {
  width: 20px;
  height: 20px;
  fill: white;
}

/* Form controls */

form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  z-index: 1;
}

/* ================= TEXT STYLE ================= */

/* label {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.92);
  margin-top: 2px;
} */

/* Label (English main text) */
label {
  display: block;
  font-size: 0.95rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.95);
  margin-top: 2px;
  /* margin-bottom: 2px; */
  letter-spacing: 0.02em;
}

/* Hint (Thai sub text) */
.hint-text {
  display: block;
  font-size: 0.9rem;
  color: rgba(248, 246, 212, 0.85);
  margin-bottom: 1px;
  line-height: 1.4;
}

input[type="text"],
textarea,
input[type="file"] {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  color: white;
  border-radius: 16px;
  padding: 12px 14px;
  outline: none;
  font-size: 0.94rem;
  transition: 0.25s ease;
  font-family: inherit;
}

input[type="text"]::placeholder,
textarea::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

input[type="text"]:focus,
textarea:focus,
input[type="file"]:focus {
  border-color: rgba(255, 180, 210, 0.5);
  box-shadow: 0 0 0 4px rgba(255, 180, 210, 0.08);
}

textarea {
  min-height: unset;
  height: auto;
  resize: vertical;
}

input[type="file"] {
  padding: 12px;
}

.file-hint {
  display: block;
  margin-top: -4px;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.8rem;
}

.error-text {
  display: block;
  min-height: 14px;
  margin-top: -6px;
  color: #ffc2d6;
  font-size: 0.78rem;
}

.input-error {
  border-color: rgba(255, 120, 160, 0.95) !important;
  box-shadow: 0 0 0 4px rgba(255, 120, 160, 0.10) !important;
}

/* File preview */

/* File preview */

.image-preview {
  position: relative;
  margin-top: 0px;
  width: 100px;
  height: 100px;
  border-radius: 16px;
  overflow: visible; /* สำคัญ */
  background: transparent;
}

.image-preview img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.is-hidden {
  display: none;
}

.remove-btn {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 999px;
  background: rgba(235, 107, 157, 0.95);
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  padding: 0;
  z-index: 10;
}

.remove-btn svg {
  width: 12px;
  height: 12px;
}

.remove-btn:hover {
  background: rgba(235, 107, 157, 1);
}

/* Toggle */

.toggle-row {
  margin-top: 2px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.10);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.toggle-row span {
  font-size: 0.85rem;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.88);
}

.toggle {
  position: relative;
  width: 54px;
  height: 30px;
  flex-shrink: 0;
}

.toggle input {
  display: none;
}

.slider {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  transition: 0.25s ease;
  cursor: pointer;
}

.slider::before {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  left: 4px;
  top: 4px;
  border-radius: 50%;
  background: white;
  transition: 0.25s ease;
}

.toggle input:checked + .slider {
  background: linear-gradient(135deg, #ff98bd, #eb6b9d);
}

.toggle input:checked + .slider::before {
  transform: translateX(24px);
}

/* Footer */

.bottom-note {
  text-align: center;
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.8rem;
}

/* Responsive */

@media (max-width: 640px) {

  .hint-text {
  font-size: 0.82rem;
  }

  .landing-card {
    padding: 42px 22px;
  }

  #message-form.section {
    padding: 18px 14px;
    align-items: center;
  }

  #message-form .card {
    width: min(90vw, 420px);
    max-height: none;
    overflow-y: visible;
    border-radius: 24px;
  }

  .form-card {
    padding: 16px 14px;
  }

  .form-header {
    margin-bottom: 8px;
  }

  #message-form .badge {
    margin-bottom: 10px;
    padding: 7px 14px;
    font-size: 0.75rem;
  }

  .form-header {
    margin-bottom: 8px;
  }

  .form-title {
    font-size: 1.35rem;
    margin-bottom: 4px;
    line-height: 1.2;
  }

  .form-date {
    font-size: 0.78rem;
  }

  .socials {
    gap: 8px;
    margin: 10px 0 12px;
  }

  .socials a {
    width: 36px;
    height: 36px;
  }

  .socials svg {
    width: 18px;
    height: 18px;
  }

  form {
    gap: 6px;
  }

  label {
    font-size: 0.85rem;
    margin-top: 0;
  }

  input[type="text"],
  textarea,
  input[type="file"] {
    padding: 10px 12px;
    font-size: 0.9rem;
    border-radius: 14px;
  }

  textarea {
    min-height: 48px;
  }

  .file-hint {
    font-size: 0.74rem;
    margin-top: -2px;
  }

  .error-text {
    font-size: 0.74rem;
    min-height: 12px;
    margin-top: -4px;
  }

  .image-preview {
    width: 84px;
    height: 84px;
  }

  .toggle-row {
    margin-top: 2px;
    padding: 8px 10px;
    gap: 10px;
    align-items: center;
  }

  .toggle-row span {
    font-size: 0.8rem;
    line-height: 1.3;
  }

  .toggle {
    width: 50px;
    height: 28px;
  }

  .slider::before {
    width: 20px;
    height: 20px;
  }

  .toggle input:checked + .slider::before {
    transform: translateX(22px);
  }

  .submit-btn {
    width: 100%;
    margin-top: 6px;
    padding-top: 12px;
    padding-bottom: 12px;
    font-size: 0.95rem;
  }

  .bottom-note {
    margin-top: 6px;
    font-size: 0.74rem;
  }

  .desc {
  font-size: 0.7rem;
  line-height: 1.6;
}
}


.thank-card {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(8px);
  z-index: 9999;
}

.thank-card.hidden {
  display: none;
}

.card-content {
  width: min(86vw, 320px);
  padding: 24px 20px;
  border-radius: 24px;
  text-align: center;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
  color: white;
}

.thank-image {
  width: 240px;
  height: 240px;
  object-fit: cover;
  display: block;
  margin: 6px auto;
  border-radius: 18px;
}

#thankTitle {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

#thankSubtitle {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.5;
}