:root {
  --primary: #d4af37;       /* Allagash Gold */
  --primary-hover: #f0c950;
  --secondary: #0a1f33;     /* Deep Navy */
  --bg-color: #f4f6f8;
  --text-dark: #1f2937;
  --text-light: #6b7280;
  --white: #ffffff;
  --error: #ef4444;
  --border-radius: 16px;
  --card-shadow: 0 20px 40px rgba(10, 31, 51, 0.15);
}

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

body {
  font-family: 'Montserrat', sans-serif;
  color: var(--text-dark);
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  display: flex;
  flex-direction: column;
  background-color: var(--secondary);
}

.hidden {
  display: none !important;
}

/* Background Setup */
.site-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('https://offertabs.s3.amazonaws.com/offer/qpvjr4/site/media/6a6a07c773ba85.28449670.jpg');
  background-size: cover;
  background-position: center bottom;
  z-index: 0;
}
.site-bg::after {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: linear-gradient(135deg, rgba(10,31,51,0.95) 0%, rgba(10,31,51,0.6) 100%);
}

.page-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 60px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Hero Section */
.hero {
  text-align: center;
  color: var(--white);
  margin-bottom: 40px;
}
.brand-tag {
  display: inline-block;
  background-color: rgba(212, 175, 55, 0.2);
  border: 1px solid var(--primary);
  color: var(--primary);
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 24px;
}
.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: 3rem;
  line-height: 1.1;
  font-weight: 800;
  margin-bottom: 20px;
  text-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.hero h1 span {
  color: var(--primary);
}
.hero p {
  font-size: 1.125rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto;
}

/* Cards */
.card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-radius: var(--border-radius);
  padding: 40px;
  box-shadow: var(--card-shadow);
  border: 1px solid rgba(255,255,255,0.4);
  margin-bottom: 30px;
}

/* Form Styles */
form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.form-row {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.form-group {
  display: flex;
  flex-direction: column;
  width: 100%;
}
.form-group.half {
  flex: 1;
  min-width: calc(50% - 10px);
}
.form-group.quarter {
  flex: 1;
  min-width: calc(25% - 15px);
}
label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--secondary);
  margin-bottom: 8px;
}
label .hint {
  font-weight: 400;
  font-size: 0.8rem;
  color: var(--text-light);
  display: block;
  margin-top: 4px;
}

input[type="text"],
input[type="email"],
input[type="date"],
select {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  background-color: var(--white);
  transition: all 0.2s;
  color: var(--text-dark);
}
input:focus, select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
}
::placeholder {
  color: #9ca3af;
}

/* Checkbox Group */
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background-color: var(--white);
  padding: 16px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
}
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-dark);
  cursor: pointer;
  margin: 0;
}
.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  cursor: pointer;
}
.field-error {
  color: var(--error);
  font-size: 0.85rem;
  margin-top: 6px;
}

/* Custom Select */
.select-wrapper {
  position: relative;
}
select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  padding-right: 40px;
}
.select-wrapper::after {
  content: '';
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 8px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%234b5563' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  pointer-events: none;
}

.form-divider {
  height: 1px;
  background: #e5e7eb;
  margin: 10px 0;
}
.fieldset-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--secondary);
  margin-bottom: -5px;
}

/* Error Message */
.error-message {
  background-color: #fef2f2;
  border-left: 4px solid var(--error);
  color: #991b1b;
  padding: 12px 16px;
  border-radius: 4px;
  font-size: 0.9rem;
}

/* Buttons */
.primary-btn {
  background-color: var(--primary);
  color: var(--secondary);
  border: none;
  padding: 16px 24px;
  border-radius: 8px;
  font-size: 1.125rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
  margin-top: 10px;
}
.primary-btn:hover:not(:disabled) {
  background-color: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.4);
}
.primary-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* Thank You Section */
#thank-you-section {
  text-align: center;
}
.success-icon {
  color: #10b981;
  margin-bottom: 20px;
}
#thank-you-section h2 {
  font-family: 'Playfair Display', serif;
  font-size: 2.25rem;
  color: var(--secondary);
  margin-bottom: 16px;
}
#thank-you-section p {
  color: var(--text-light);
  font-size: 1.1rem;
  max-width: 500px;
  margin: 0 auto 30px auto;
}

/* Share Panel */
.share-panel {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 30px;
  margin-top: 20px;
}
.share-panel h3 {
  font-size: 1.25rem;
  color: var(--secondary);
  margin-bottom: 10px;
}
.share-panel p {
  font-size: 0.95rem !important;
  margin-bottom: 20px !important;
}
.share-row {
  display: flex;
  gap: 10px;
}
.share-row input {
  flex: 1;
  background-color: var(--white);
}
.secondary-btn {
  background-color: var(--secondary);
  color: var(--white);
  border: none;
  padding: 0 20px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s;
  white-space: nowrap;
}
.secondary-btn:hover {
  background-color: #1a365d;
}

/* Legal Disclaimer */
.legal-disclaimer {
  text-align: center;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 10px;
  margin-bottom: 10px;
}

.legal-disclaimer a {
  color: inherit;
  text-decoration: underline;
  transition: color 0.2s;
  margin-left: 10px;
}

.legal-disclaimer a:hover {
  color: var(--white);
}

/* Modal Styles for Official Rules */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(10, 31, 51, 0.8);
  backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  background: var(--white);
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  border-radius: var(--border-radius);
  padding: 40px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  overflow-y: auto;
  z-index: 10000;
}

.close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  font-size: 2rem;
  line-height: 1;
  color: var(--text-light);
  cursor: pointer;
  transition: color 0.2s;
}

.close-btn:hover {
  color: var(--secondary);
}

.rules-text {
  color: var(--text-dark);
  font-size: 0.9rem;
  text-align: left;
}

.rules-text h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  margin-bottom: 20px;
  text-align: center;
  color: var(--secondary);
}

.rules-text h3 {
  font-size: 1.1rem;
  margin-top: 20px;
  margin-bottom: 10px;
  color: var(--secondary);
}

.rules-text p {
  margin-bottom: 15px;
}

.rules-text ul {
  margin-bottom: 15px;
  padding-left: 20px;
}

.rules-text li {
  margin-bottom: 10px;
}

.rules-text a {
  color: var(--primary);
  text-decoration: underline;
}

/* Powered By Slot Location */
#wbx-powered-by-slot {
  margin-top: 20px;
  display: flex;
  justify-content: center;
}

/* Mobile Adjustments */
@media (max-width: 600px) {
  .card {
    padding: 30px 20px;
  }
  .form-group.half, .form-group.quarter {
    min-width: 100%;
  }
  .hero h1 {
    font-size: 2.25rem;
  }
  .share-row {
    flex-direction: column;
  }
  .secondary-btn {
    padding: 14px;
  }
  .modal-content {
    padding: 30px 20px;
  }
}
