:root {
  --deep-teal: #0e7490;
  --deep-teal-dark: #083344;
  --signal-cyan: #06b6d4;
  --signal-cyan-light: #67e8f9;
  --soft-white: #f8fafc;
  --success-green: #16a34a;
  --text-main: #0f172a;
  --text-muted: #475569;
  --bg-dark: #0f172a;
}

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

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--soft-white);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

.hidden {
  display: none !important;
}

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

/* Background elements */
.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 65vh;
  background: var(--bg-dark);
  z-index: 0;
  overflow: hidden;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.35;
  mix-blend-mode: luminosity;
  filter: blur(2px) contrast(1.2);
}

.hero-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(180deg, rgba(14, 116, 144, 0.4) 0%, rgba(8, 51, 68, 0.9) 100%);
}

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

.main-header {
  text-align: center;
  margin-bottom: 40px;
}

h1 {
  font-family: 'Geist', sans-serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

h1 span {
  display: block;
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  color: var(--signal-cyan-light);
  margin-top: 12px;
}

/* Glassmorphism Panels */
.glass-panel {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 20px 40px rgba(8, 51, 68, 0.15), 0 1px 3px rgba(0,0,0,0.05);
  border-radius: 24px;
  padding: 40px;
  margin-bottom: 30px;
}

.glass-panel-light {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 20px;
  padding: 30px;
  margin-bottom: 30px;
}

/* Form Styles */
.panel-title {
  font-family: 'Geist', sans-serif;
  font-size: 1.75rem;
  margin-bottom: 8px;
  color: var(--deep-teal-dark);
}

.panel-desc {
  color: var(--text-muted);
  margin-bottom: 24px;
  line-height: 1.5;
}

.form-group {
  margin-bottom: 20px;
  text-align: left;
}

label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--deep-teal-dark);
}

input[type="text"],
input[type="email"] {
  width: 100%;
  padding: 14px 16px;
  font-size: 1rem;
  font-family: inherit;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.8);
  transition: all 0.2s ease;
  color: var(--text-main);
}

input:focus {
  outline: none;
  border-color: var(--signal-cyan);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.2);
}

.error-msg {
  color: #ef4444;
  font-size: 0.875rem;
  margin-bottom: 16px;
  padding: 10px;
  background: #fef2f2;
  border-radius: 8px;
  border: 1px solid #fecaca;
  text-align: left;
}

/* Buttons */
.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 16px;
  font-size: 1.125rem;
  font-weight: 600;
  font-family: inherit;
  color: #fff;
  background: linear-gradient(135deg, var(--deep-teal) 0%, var(--signal-cyan) 100%);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);
  text-decoration: none;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(6, 182, 212, 0.4);
}

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

.btn-secondary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--deep-teal-dark);
  background: var(--soft-white);
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary:hover {
  background: #f1f5f9;
  border-color: var(--signal-cyan);
}

.btn-secondary.success {
  background: var(--success-green);
  color: white;
  border-color: var(--success-green);
}

/* Spinner */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s linear infinite;
  margin-left: 10px;
}

@keyframes spin { 100% { transform: rotate(360deg); } }

/* Result State */
.coupon-card {
  text-align: center;
  background: linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.85) 100%);
}

.coupon-header {
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 24px;
}

.code-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  padding: 24px;
  background: rgba(14, 116, 144, 0.05);
  border: 1px dashed rgba(14, 116, 144, 0.3);
  border-radius: 16px;
}

.mono-text {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(2rem, 6vw, 3rem);
  font-weight: 700;
  letter-spacing: 4px;
  color: var(--deep-teal);
  word-break: break-all;
}

.expires-text {
  font-size: 0.85rem;
  color: #ef4444;
  font-weight: 600;
}

/* Offer Details */
.offer-details h3 {
  font-size: 1.125rem;
  color: var(--deep-teal-dark);
  margin-bottom: 16px;
  text-align: left;
}

.features-list {
  list-style: none;
  margin-bottom: 24px;
  text-align: left;
}

.features-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 1rem;
  color: var(--text-main);
  font-weight: 500;
}

.btn-redeem {
  margin-top: 10px;
}

/* Trust Pills */
.trust-pills {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(255,255,255,0.8);
  border: 1px solid rgba(255,255,255,0.4);
  backdrop-filter: blur(8px);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--deep-teal-dark);
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

#wbx-powered-by-slot {
  margin-top: auto;
  padding-top: 40px;
  width: 100%;
}

@media (max-width: 600px) {
  .glass-panel {
    padding: 24px;
  }
  .code-wrapper {
    flex-direction: column;
    gap: 12px;
    padding: 16px;
  }
}