:root {
  --primary-color: #4B286D; /* Insomnia Dark Purple */
  --primary-hover: #3a1e54;
  --accent-color: #E2A838;  /* Cookie gold/warm */
  --text-main: #1A1A1A;
  --text-muted: #666666;
  --bg-card: #FFFFFF;
  --bg-input: #F7F7F9;
  --border-color: #E0E0E0;
  --error-color: #D32F2F;
  --success-color: #2E7D32;
  
  --font-heading: 'Montserrat', sans-serif;
  --font-body: 'Open Sans', sans-serif;
  
  --radius-card: 20px;
  --radius-input: 8px;
  --radius-btn: 999px; /* Pill shape */
  
  --shadow-lg: 0 20px 40px rgba(0,0,0,0.25);
  --shadow-sm: 0 4px 6px rgba(0,0,0,0.05);
}

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

body {
  font-family: var(--font-body);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

/* Background & Overlays */
.page-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: -2;
}

.background-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(75, 40, 109, 0.8) 0%, rgba(20, 10, 30, 0.9) 100%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: -1;
}

/* Layout */
.main-container {
  width: 100%;
  max-width: 680px;
  margin: auto;
  padding: 40px 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  justify-content: center;
}

.card {
  background: var(--bg-card);
  border-radius: var(--radius-card);
  padding: 48px;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

/* Header */
.header {
  text-align: center;
  margin-bottom: 32px;
}

.campaign-title {
  font-family: var(--font-heading);
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--primary-color);
  line-height: 1.2;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.campaign-subheader {
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: 90%;
  margin: 0 auto;
}

/* Forms & Inputs */
.form-group {
  margin-bottom: 24px;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 0.9rem;
  color: var(--text-main);
}

input[type="text"],
input[type="email"],
select {
  width: 100%;
  padding: 14px 16px;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text-main);
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-input);
  transition: all 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(75, 40, 109, 0.15);
  background-color: #fff;
}

/* Custom Select */
.select-wrapper {
  position: relative;
}

select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 40px;
  cursor: pointer;
}

.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='%234B286D' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  pointer-events: none;
}

/* Custom Checkboxes */
.checkbox-group {
  display: flex;
  align-items: flex-start;
  margin-bottom: 20px;
  gap: 12px;
}

.checkbox-group input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  min-width: 20px;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-color);
  border-radius: 4px;
  background-color: var(--bg-input);
  cursor: pointer;
  position: relative;
  margin-top: 2px;
  transition: all 0.2s ease;
}

.checkbox-group input[type="checkbox"]:checked {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.checkbox-group input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.checkbox-group input[type="checkbox"]:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(75, 40, 109, 0.15);
}

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

.checkbox-group a {
  color: var(--primary-color);
  font-weight: 600;
  text-decoration: none;
}

.checkbox-group a:hover {
  text-decoration: underline;
}

/* Button */
.btn-primary {
  width: 100%;
  padding: 16px 24px;
  background: var(--primary-color);
  color: #fff;
  border: none;
  border-radius: var(--radius-btn);
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 16px;
  position: relative;
  overflow: hidden;
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(75, 40, 109, 0.3);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Form Footer */
.form-footer {
  margin-top: 24px;
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.5;
  border-top: 1px solid var(--border-color);
  padding-top: 20px;
}

.form-footer p {
  margin-bottom: 8px;
}

.form-footer a {
  color: var(--text-muted);
  text-decoration: underline;
}

.form-footer a:hover {
  color: var(--primary-color);
}

/* Alerts / Errors */
.alert {
  padding: 14px 16px;
  border-radius: var(--radius-input);
  margin-bottom: 24px;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
}

.alert-error {
  background-color: rgba(211, 47, 47, 0.1);
  color: var(--error-color);
  border: 1px solid rgba(211, 47, 47, 0.2);
}

/* Success View */
.text-center {
  text-align: center;
}

.success-icon {
  width: 80px;
  height: 80px;
  background: rgba(46, 125, 50, 0.1);
  color: var(--success-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
}

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

#success-view h2 {
  font-family: var(--font-heading);
  color: var(--primary-color);
  font-size: 2rem;
  margin-bottom: 12px;
}

.success-subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
}

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

#wbx-powered-by-slot {
  margin-top: 24px;
}

/* Responsive */
@media (max-width: 600px) {
  .card {
    padding: 32px 24px;
  }
  
  .campaign-title {
    font-size: 1.75rem;
  }
}
