body {
  font-family: "Cormorant Garamond", serif;
  background-color: #fff8f0;
  background: linear-gradient(to bottom, #fff8f5, #ffefdb);
  color: #5d3a3a;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  line-height: 1.6;
  position: relative;
}

.bg-pattern {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: radial-gradient(#d4af37 1px, transparent 1px);
  background-size: 20px 20px;
  opacity: 0.05;
  pointer-events: none;
  z-index: -1;
}

.container {
  background-color: rgba(255, 252, 248, 0.95);
  border-radius: 12px;
  border: 1px solid #d4af37;
  box-shadow: 0 4px 20px rgba(138, 43, 43, 0.15);
  padding: 40px;
  width: 90%;
  max-width: 600px;
  text-align: center;
  position: relative;
  overflow: visible;
  backdrop-filter: blur(5px);
}

.container::before,
.container::after {
  content: '';
  position: absolute;
  width: 300px;
  height: 300px;
  background-image: url('../images/flowers.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  pointer-events: none;
  z-index: 1;
  opacity: 0;  /* Start invisible */
  transition: opacity 0.3s ease-in; /* Add smooth transition */
}

.container::before {
  top: 0px;
  left: -45px;
  transform: rotate(0deg) scale(1);
}

.container::after {
  bottom: -45px;
  right: 0px;
  transform: rotate(90deg) scaleX(-1) scale(1);
}

.container.images-loaded::before,
.container.images-loaded::after {
  opacity: 0.95;
}

h1 {
  font-size: 3.5rem;
  margin-bottom: 20px;
  color: #9c2542;
  font-weight: 400;
  text-shadow: 0px 1px 1px rgba(0,0,0,0.1);
  font-family: 'Great Vibes', cursive;
  letter-spacing: 2px;
}

h2 {
  font-size: 1.5rem;
  margin-bottom: 30px;
  font-weight: 400;
  color: #8B4513;
  font-family: 'Cormorant Garamond', serif;
}

.names {
  font-size: 3rem;
  margin: 20px 0;
  color: #9c2542;
  font-weight: 400;
  letter-spacing: 1px;
  position: relative;
  display: inline-block;
  padding: 0 20px 10px;
  font-family: 'Great Vibes', cursive;
}

.date {
  margin: 25px 0 20px;
  font-size: 1.2rem;
  color: #5d3a3a;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-family: 'Cormorant Garamond', serif;
}

.venue-details {
  margin: 30px 0;
  background-color: rgba(255, 245, 240, 0.7);
  padding: 20px;
  border-radius: 8px;
  border: 1px dashed #d4af37;
  text-align: center;
  position: relative;
}

.venue-details::before {
  content: '✿ ✿ ✿';
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  color: #d4af37;
  font-size: 14px;
  background-color: rgba(255, 252, 248, 0.92);
  padding: 0 10px;
}

.venue-details h2 {
  margin-top: 0;
  color: #9c2542;
  font-family: 'Cormorant Garamond', serif;
  position: relative;
  display: inline-block;
}

.venue-details p {
  margin: 8px 0;
  font-weight: 500;
  color: #5d3a3a;
}

button {
  background-color: #9c2542;
  color: white;
  border: 2px solid #d4af37;
  padding: 12px 30px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1.1rem;
  transition: all 0.3s;
  margin-top: 20px;
  font-weight: 500;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

button:hover {
  background-color: #7c1938;
  transform: translateY(-2px);
}

button::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #d4af37;
  z-index: -2;
}

button::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 100%;
  background-color: #7c1938;
  transition: all 0.3s;
  z-index: -1;
}

button:hover::before {
  width: 100%;
}

.divider {
  height: 15px;
  margin: 30px 0;
  text-align: center;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, #d4af37, transparent);
}

.divider::after {
  content: '♥';
  font-size: 14px;
  color: #d4af37;
  background-color: rgba(255, 252, 248, 0.92);
  padding: 0 10px;
  position: relative;
  z-index: 1;
}

form {
  text-align: left;
  position: relative;
  z-index: 1;
}

.form-group {
  margin-bottom: 25px;
  position: relative;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #8B4513;
  position: relative;
}

input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #d4af37;
  border-radius: 4px;
  box-sizing: border-box;
  font-family: inherit;
  font-size: 16px;
  background-color: rgba(255, 250, 245, 0.8);
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
  transition: all 0.3s;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #9c2542;
  box-shadow: 0 0 0 3px rgba(156, 37, 66, 0.1);
}

textarea {
  resize: vertical;
  min-height: 100px;
}

/* Radio button styling */
.radio-group {
  margin: 15px 0;
  display: flex;
  gap: 30px;
}

.radio-option {
  position: relative;
}

.radio-group input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 24px;
  height: 24px;
  cursor: pointer;
}

.radio-group label {
  display: inline-block;
  padding-left: 32px;
  cursor: pointer;
  font-weight: normal;
  color: #5d3a3a;
  position: relative;
  margin: 0;
}

.radio-group label::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  border: 2px solid #d4af37;
  border-radius: 50%;
  background: #fff;
  transition: all 0.2s ease;
}

.radio-group input[type="radio"]:checked + label::before {
  border-color: #9c2542;
}

.radio-group input[type="radio"]:checked + label::after {
  content: '';
  position: absolute;
  left: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #9c2542;
  transition: all 0.2s ease;
}

.radio-group input[type="radio"]:focus + label::before {
  box-shadow: 0 0 0 3px rgba(156, 37, 66, 0.1);
}

.success-message,
.error-message {
  display: none;
  padding: 20px;
  border-radius: 4px;
  margin-top: 20px;
  position: relative;
  font-size: 1.2rem;
  font-weight: 500;
  z-index: 2;
}

.success-message {
  background-color: rgba(232, 244, 234, 0.7);
  color: #006400;
  border: 1px solid #d4af37;
}

.error-message {
  background-color: rgba(255, 235, 238, 0.7);
  color: #9c2542;
  border: 1px solid #9c2542;
}

.success-message::before,
.success-message::after {
  content: '✦';
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: #d4af37;
  font-size: 1.2rem;
}

.success-message::before {
  left: 10px;
}

.success-message::after {
  right: 10px;
}

.couple-photos {
  display: flex;
  justify-content: space-around;
  margin: 20px 0;
  align-items: center;
}

.photo-container {
  width: 160px;
  height: 160px;
  text-align: center;
  position: relative;
}

.photo {
  width: 100%;
  height: 100%;
  max-width: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid #d4af37;
  box-sizing: border-box;
  box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}

.photo-caption {
  font-size: 0.9rem;
  color: #8B4513;
  margin-top: 10px;
  font-weight: 500;
}

@media (max-width: 600px) {
  .container {
    padding: 20px;
  }
  
  h1 {
    font-size: 2.8rem;
  }
  
  .names {
    font-size: 2.5rem;
  }
  
  .radio-group {
    flex-direction: column;
    gap: 15px;
  }
}

.reaction-photos {
  display: none;
  margin: 20px 0;
  text-align: center;
}

.happy-photos,
.sad-photos {
  display: none;
}

.info-text {
  background-color: rgba(255, 242, 230, 0.7);
  padding: 12px;
  border-radius: 4px;
  font-style: italic;
  color: #8B4513;
  border-left: 3px solid #d4af37;
  position: relative;
}

/* Background pattern using CSS */
.bg-pattern {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: radial-gradient(#d4af37 1px, transparent 1px);
  background-size: 20px 20px;
  opacity: 0.05;
  pointer-events: none;
}

.murugan-image {
  width: 100px;
  height: 100px;
  margin: 0 auto 10px;
  background-image: url('../images/murugan.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  filter: invert(70%) sepia(41%) saturate(838%) hue-rotate(358deg) brightness(89%) contrast(90%);
  opacity: 0;  /* Start invisible */
  transition: opacity 0.3s ease-in; /* Add smooth transition */
}

.images-loaded .murugan-image {
  opacity: 1;
}

.wedding-of {
  font-size: 1rem;
  color: #5d3a3a;
  font-family: 'Cormorant Garamond', serif;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 15px;
  font-weight: 500;
}