* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', sans-serif;
}
html, body {
  height: 100%;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 1rem;
  background-color: #ffffff;
}
.glass-popup-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  -webkit-backdrop-filter: blur(8px); /* Safari prefix */
}

.glass-popup-content {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 1.25rem 1.5rem;  /* use rem for scaling */
  width: 100%;
  max-width: 320px;         /* max width for large screens */
  min-width: 260px;         /* minimum width for small screens */
  text-align: center;
  color: white;
  backdrop-filter: blur(15px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  font-family: 'Segoe UI', sans-serif;
  animation: fadeIn 0.4s ease-out;
  box-sizing: border-box;   /* ensures padding doesn't increase width */
}

/* Guest title */
.guest-title {
  font-family: 'Dancing Script', cursive;
  font-size: 1.8rem;
  background: linear-gradient(90deg, #f9d29d, #ffd6e8, #a1c4fd);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  text-shadow: 2px 2px 8px rgba(255, 255, 255, 0.2);
  letter-spacing: 1px;
  margin-bottom: 1.25rem;
  animation: shimmer 3s infinite ease-in-out;
}

/* Button */
.glass-popup-content button {
  margin-top: 1.25rem;
  padding: 0.625rem 1.25rem;
  background: rgba(255, 255, 255, 0.3);
  border: none;
  border-radius: 10px;
  color: white;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s ease;
}

.glass-popup-content button:hover {
  background: rgba(255, 255, 255, 0.5);
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes shimmer {
  0% { opacity: 0.85; }
  50% { opacity: 1; text-shadow: 0 0 10px rgba(255, 255, 255, 0.5); }
  100% { opacity: 0.85; }
}
/* Responsive container */
.container {
  perspective: 1200px;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  padding: 1rem;
}

/* Card */
.card {
  width: 100%;
  height: min(90vh, 660px);
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.9s ease-in-out;
  cursor: pointer;

}

.card-front {
  background-image: url('cards.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Flip behavior */
.card.flipped {
  transform: rotateY(180deg);
}

.card-face {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 20px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between; /* this pushes footer to bottom */
  align-items: center;
  padding-bottom: 0.5rem; /* add more space at bottom */
}

/* Content area grows and fills the space */
.card-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  align-items: stretch; /* stretch to full width */
  text-align: center;
  justify-content: flex-start; /* align content to top */
  gap: 10rem;
}

.card-content form {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  width: 100%;
  margin-top: -1rem; /* move form up by 1rem */
}

.form-group {
  margin-top: 0.5rem; /* tighten spacing above each toggle group */
}

.toggle-group {
  margin-top: -0.3rem; /* pull toggle buttons a bit higher */
}

.card-content input,
.card-content button {
  padding: 0.30rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  width: 100%;
  background-color: rgb(206, 187, 14);
}

.card-content button {
  background-color: rgb(202, 123, 5);
  color: white;
  border: none;
  cursor: pointer;
}

.card-content button:hover {
  background-color: rgb(160, 100, 4);
}

.card-content button[type="submit"] {
  width: auto;                 /* shrink to fit content */
  padding: 0.4rem 1.2rem;     /* comfortable padding */
  font-size: 1rem;
  border-radius: 12px;
  background-color: rgb(202, 123, 5);
  color: white;
  border: none;
  cursor: pointer;
  align-self: center;          /* center in flex container */
}

.card-content button[type="submit"]:hover {
  background-color: rgb(160, 100, 4);
}

.form-group {
  text-align: left;
  margin-top: 0.5rem; /* margin above each group */
}

.form-group label {
  display: block;
  margin-bottom: 0.3rem;
  font-weight: 500;
  font-size: 0.9rem;
}

.input-row {
  display: flex;
  gap: 1rem; /* space between inputs */
  margin-bottom: 1rem; /* space below the row */
}

.input-row input[name="full-name"] {
  flex-grow: 1; /* take remaining space */
}

.input-row input[name="guest-count"] {
  flex-grow: 0;
  width: 80px; /* shorter width */
}

/*
.radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.5rem;
}

.radio-group label {
  font-weight: normal;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
*/


.toggle-group {
  background: transparent; /* ensure transparent */
  padding: 0;
  margin: 0;
  display: flex;
  gap: 0.8rem;
  margin-top: -0.8rem;
  justify-content: center;  /* add this */
}

.toggle-button {
  background-color: #dacb48; /* your desired toggle background */
  padding: 0.2rem 0.6rem;
  border-width: 1px;
  border-radius: 20px;
  border: 1.5px solid #ccc;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;

  /* Remove default margin */
  margin: 0;
}

.toggle-button input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.toggle-button .toggle-label {
  font-weight: 600;
  color: #555;
  font-weight: 600;
  font-size: 0.85rem;          /* smaller font size */
  color: #555;
  padding: 0;                  /* remove padding here, handled by toggle-button */
  display: inline-block;
  white-space: nowrap;
  margin: 0;

}



.toggle-button input[type="radio"]:checked + .toggle-label {
  background-color: #dfb030;
  padding: 0.25rem 0.6rem;     /* match smaller padding */
  border-radius: 20px;
  color: white;
}

.toggle-button input[type="radio"]:checked + .toggle-label,
.toggle-button input[type="radio"]:focus + .toggle-label {
  outline: none; /* Remove the outline */
  box-shadow: none; /* Remove any box shadow */
  border-color: #dfb030; /* Match your active border */
  background-color: #dfb030; /* Your active bg */
  color: white;
  padding: 0.25rem 0.6rem;
  border-radius: 20px;
}

.toggle-button .toggle-label:focus {
  outline: none;
  box-shadow: none;
}

.card-footer {
  font-size: 0.70rem;
  color: rgb(240, 240, 235);
  background-color: rgb(17, 16, 16);
  text-align: center;
  margin-top: 2rem;
  /*text-shadow: 0 0 5px rgba(0, 195, 255, 0.7), 
               0 0 10px rgba(0, 195, 255, 0.6), 
               0 0 15px rgba(76, 0, 255, 0.5); /* Blue glow */

}


.card-back {
  transform: rotateY(180deg);
}

.card-back{
  background-image: url('back.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.card-back .card-content {
  display: flex;
  flex-direction: column;
  justify-content: flex-end; /* pushes all content to the bottom */
  height: 100%;              /* fill the entire height */
  padding-bottom: 2rem;      /* add some space from bottom */
}

.card-back .card-content form {
  margin-top: 0;    /* reset margin */
  transform: none;  /* reset transform */
}

/* Wobble animation (optional) */
@keyframes sideWobble {
  0%   { transform: rotateY(var(--angle)); }
  25%  { transform: rotateY(calc(var(--angle) + 3deg)); }
  50%  { transform: rotateY(calc(var(--angle) - 3deg)); }
  75%  { transform: rotateY(calc(var(--angle) + 2deg)); }
  100% { transform: rotateY(var(--angle)); }
}

.card.wobble {
  animation: sideWobble 0.5s ease-out;                                      
}

/* Mobile tweaks */
@media (max-width: 480px) {
  .card {
    height: 85vh;
  }

  .card-face {
    padding: 1rem;
  }
}

@media (max-width: 768px) {
  .card-content {
    gap: 4rem; /* smaller gap on tablets and phones */
  }
}

@media (max-width: 480px) {
  .card-content {
    gap: 2rem; /* even smaller gap on mobile */
  }
}

@media (max-width: 480px) {
  .input-row {
    flex-direction: column;
    gap: 0.5rem;
  }
  .input-row input[name="guest-count"] {
    width: 100%; /* full width */
  }
}

@media (max-width: 480px) {
  .card-content input,
  .card-content button {
    font-size: 0.85rem;
    padding: 0.25rem;
  }

  .toggle-button {
    padding: 0.15rem 0.5rem;
  }

  .toggle-button .toggle-label {
    font-size: 0.7rem;
  }

  .card-footer {
    font-size: 0.6rem;
  }
}

/* Media queries for tablets and mobiles */
@media (max-width: 768px) {
  .glass-popup-content {
    max-width: 280px;
    padding: 1rem 1.25rem;
    font-size: 0.9rem;
    border-radius: 15px;
  }

  .guest-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
  }

  .glass-popup-content button {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .glass-popup-content {
    max-width: 220px;
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
    border-radius: 12px;
  }

  .guest-title {
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
  }

  .glass-popup-content button {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
  }

  .glass-popup-overlay {
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    background: rgba(0, 0, 0, 0.25);
  }
}