:root {
  --primary: #038599;
  --primary-hover: #026b7a;
  --accent: #ffcc00;
  --text-main: #2d3748;
  --text-muted: #4a5568;
  --bg-dark: #1a202c;
  --white: #ffffff;
  --error: #e53e3e;
}

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

body {
  font-family: 'Open Sans', sans-serif;
  color: var(--text-main);
  background-color: var(--bg-dark);
  background-image: url('https://offertabs.s3.amazonaws.com/offer/82qzyz/site/media/6a6784f57a5d40.18265721.png');
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  background-attachment: fixed;
  min-height: 100vh;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

/* Background dark overlay for better text/card contrast */
body::before {
  content: '';
  position: absolute;
  top: 0; 
  left: 0; 
  right: 0; 
  bottom: 0;
  background: rgba(15, 23, 42, 0.6);
  z-index: 0;
}

/* Mandatory Utility Class */
.hidden {
  display: none !important;
}

/* Layout container following best practices for tall content */
.page-wrapper {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 2rem 1rem;
  max-width: 640px;
  margin: 0 auto;
}

/* margin: auto 0 keeps the content centered vertically without cutting off the top if it overflows */
.main-content {
  margin: auto 0;
  width: 100%;
}

.card, .message-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 20px;
  padding: 2.5rem;
  width: 100%;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.message-card {
  text-align: center;
}

.message-card h2 {
  color: var(--primary);
  margin-bottom: 1rem;
  font-family: 'Montserrat', sans-serif;
}

.card-header {
  text-align: center;
  margin-bottom: 2rem;
}

.badge {
  display: inline-block;
  background: rgba(3, 133, 153, 0.1);
  color: var(--primary);
  padding: 0.4rem 1.2rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1.2rem;
}

h1 {
  font-family: 'Montserrat', sans-serif;
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--text-main);
  letter-spacing: -0.5px;
}

.highlight {
  background: linear-gradient(135deg, #038599, #05b0ca);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.card-header p {
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1.6;
}

/* Announcement Box Styles */
.announcement-box {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 1.25rem;
  border-radius: 12px;
  margin-bottom: 2rem;
}

.announcement-icon {
  background: rgba(3, 133, 153, 0.1);
  color: var(--primary);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.announcement-icon svg {
  width: 24px;
  height: 24px;
}

.announcement-text {
  text-align: left;
}

.announcement-text strong {
  display: block;
  color: var(--primary);
  font-family: 'Montserrat', sans-serif;
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.announcement-text p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0;
  line-height: 1.4;
}

.form-group {
  margin-bottom: 1.5rem;
  text-align: left;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.form-group input[type="text"],
.form-group input[type="email"] {
  width: 100%;
  padding: 1rem;
  font-size: 1rem;
  font-family: inherit;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  transition: all 0.3s ease;
  background: var(--white);
  color: var(--text-main);
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(3, 133, 153, 0.1);
}

.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.checkbox-group input[type="checkbox"] {
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.15rem;
  cursor: pointer;
  accent-color: var(--primary);
}

.checkbox-group label {
  margin-bottom: 0;
  font-weight: 400;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text-main);
  cursor: pointer;
  flex: 1;
}

#terms-link {
  color: var(--primary);
  text-decoration: underline;
  font-weight: 600;
  position: relative;
  z-index: 2;
}

#terms-link:hover {
  color: var(--primary-hover);
  text-decoration: none;
}

.btn-primary {
  width: 100%;
  padding: 1.2rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white);
  background: var(--primary);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Montserrat', sans-serif;
  box-shadow: 0 4px 6px rgba(3, 133, 153, 0.2);
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 15px rgba(3, 133, 153, 0.3);
}

.btn-primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.error-message {
  background: #fff5f5;
  color: var(--error);
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  border-left: 4px solid var(--error);
  font-weight: 600;
}

/* Success State Styles */
#success-container {
  text-align: center;
}

.success-icon {
  width: 80px;
  height: 80px;
  background: #f0fff4;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  color: #38a169;
  box-shadow: 0 4px 10px rgba(56, 161, 105, 0.2);
}

.success-icon svg {
  width: 40px;
  height: 40px;
}

#success-container h2 {
  font-family: 'Montserrat', sans-serif;
  font-size: 2.2rem;
  margin-bottom: 1rem;
}

#success-container p {
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 2rem;
}

.share-panel {
  background: #f8fafc;
  padding: 1.5rem;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  margin-top: 2rem;
}

.share-panel h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--primary);
  font-family: 'Montserrat', sans-serif;
}

.share-panel p {
  font-size: 0.95rem;
  margin-bottom: 1.2rem;
  color: var(--text-muted);
}

.share-link-wrapper {
  display: flex;
  gap: 0.5rem;
}

.share-link-wrapper input {
  flex: 1;
  padding: 0.8rem 1rem;
  border: 2px solid #cbd5e0;
  border-radius: 8px;
  background: var(--white);
  font-size: 0.95rem;
  color: var(--text-muted);
}

.share-link-wrapper input:focus {
  outline: none;
  border-color: #a0aec0;
}

.btn-secondary {
  padding: 0 1.5rem;
  background: var(--text-main);
  color: var(--white);
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Open Sans', sans-serif;
}

.btn-secondary:hover {
  background: #1a202c;
}

/* Footer Wrapper */
.footer-wrapper {
  width: 100%;
  padding-top: 2rem;
}

/* Modal Styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  background: var(--white);
  border-radius: 16px;
  width: 100%;
  max-width: 600px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  z-index: 1;
  animation: modalIn 0.3s ease-out;
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(20px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-content h2 {
  padding: 1.5rem 1.5rem 1rem;
  margin: 0;
  color: var(--primary);
  font-family: 'Montserrat', sans-serif;
  font-size: 1.5rem;
  border-bottom: 1px solid #e2e8f0;
}

.terms-text {
  padding: 1.5rem;
  overflow-y: auto;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.terms-text p {
  margin-bottom: 1rem;
}

.terms-text p:last-child {
  margin-bottom: 0;
}

.modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  background: transparent;
  border: none;
  font-size: 1.75rem;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s ease;
}

.modal-close:hover {
  color: var(--error);
}

@media (max-width: 600px) {
  .page-wrapper {
    padding: 1.5rem 1rem;
  }
  
  .card, .message-card {
    padding: 2rem 1.5rem;
  }
  
  h1 {
    font-size: 2rem;
  }
  
  .announcement-box {
    flex-direction: column;
    text-align: center;
    gap: 0.75rem;
  }
  
  .announcement-text {
    text-align: center;
  }
  
  .share-link-wrapper {
    flex-direction: column;
  }
  
  .btn-secondary {
    padding: 1rem;
    width: 100%;
  }

  .modal {
    padding: 1rem;
  }
  
  .modal-content {
    max-height: 90vh;
  }
}