:root {
  --primary-color: #f97316; /* Energetic Orange */
  --primary-hover: #ea580c;
  --secondary-color: #0d9488; /* Vibrant Teal */
  --bg-dark: #0f172a;
  --text-main: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.7);
  --glass-bg: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.15);
  --error-color: #ef4444;
  
  --font-heading: 'Poppins', sans-serif;
  --font-body: 'Inter', sans-serif;
}

* {
  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;
  background-color: var(--bg-dark);
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* AI Generated Background with overlay */
.background-layer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("https://offertabs.s3.amazonaws.com/offer/3arnh5/site/media/6a037d4d7159a1.02497627.jpg");
  background-size: cover;
  background-position: center;
  z-index: -2;
}

.background-layer::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.9) 0%, rgba(13, 148, 136, 0.7) 100%);
  z-index: -1;
}

.page-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.header {
  padding: 32px 0;
}

.brand-name {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -0.5px;
  color: var(--text-main);
}

/* Main Layout */
.main-content {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 40px 0 80px 0;
}

.layout-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

/* Info Section */
.badge {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(249, 115, 22, 0.2);
  border: 1px solid rgba(249, 115, 22, 0.4);
  color: #ffedd5;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 24px;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 24px;
  background: linear-gradient(to right, #fff, #cbd5e1);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-subtitle {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 90%;
  margin-bottom: 32px;
}

/* Prize Image */
.prize-image-container {
  margin-bottom: 32px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  box-shadow: 0 10px 30px -10px rgba(0,0,0,0.5);
  max-width: 400px;
}

.prize-image {
  width: 100%;
  height: auto;
  display: block;
}

/* Countdown */
.countdown-wrapper {
  background: rgba(0, 0, 0, 0.2);
  padding: 24px;
  border-radius: 16px;
  border: 1px solid var(--glass-border);
  display: inline-block;
}

.countdown-label {
  display: block;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.countdown-timer {
  display: flex;
  gap: 16px;
}

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

.time-block span {
  display: block;
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary-color);
  line-height: 1;
}

.time-block small {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Action Section / Glass Card */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 48px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  position: relative;
  min-height: 400px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.state-view {
  width: 100%;
}

.card-title {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.card-desc {
  color: var(--text-muted);
  margin-bottom: 32px;
}

/* Forms */
.form-group {
  margin-bottom: 24px;
  text-align: left;
}

label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 8px;
  color: #e2e8f0;
}

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

input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.2);
}

input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

/* Checkboxes */
.checkbox-group {
  margin-bottom: 16px;
}

.checkbox-group.last-checkbox {
  margin-bottom: 24px;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.875rem;
  font-weight: 400;
  color: #e2e8f0;
  cursor: pointer;
  margin-bottom: 0;
  line-height: 1.4;
}

.checkbox-label input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  min-width: 20px;
  border: 1px solid var(--glass-border);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.2);
  display: inline-block;
  position: relative;
  cursor: pointer;
  transition: all 0.2s ease;
  margin: 0;
  margin-top: 1px;
}

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

.checkbox-label 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-label a {
  color: inherit;
  text-decoration: underline;
  transition: color 0.2s ease;
}

.checkbox-label a:hover {
  color: var(--primary-color);
}

.btn-primary {
  width: 100%;
  padding: 16px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 12px;
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px -10px var(--primary-color);
}

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

.alert-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 24px;
  font-size: 0.875rem;
}

/* Success View */
.success-icon {
  width: 80px;
  height: 80px;
  background: rgba(13, 148, 136, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  color: #2dd4bf;
}

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

/* Share Panel */
.share-panel {
  margin-top: 32px;
  padding-top: 32px;
  border-top: 1px solid var(--glass-border);
}

.share-badge {
  display: inline-block;
  background: var(--secondary-color);
  color: white;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.share-input-group {
  display: flex;
  gap: 8px;
  margin: 16px 0;
}

.share-input-group input {
  flex: 1;
  background: rgba(255, 255, 255, 0.1);
}

.btn-secondary {
  padding: 0 20px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--glass-border);
  color: white;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
}

.social-shares {
  display: flex;
  gap: 12px;
}

.btn-social {
  flex: 1;
  padding: 12px;
  border: none;
  border-radius: 12px;
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-fb { background: #1877f2; }
.btn-fb:hover { background: #166fe5; }
.btn-tw { background: #000000; border: 1px solid #333; }
.btn-tw:hover { background: #222; }

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

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

.spinner-large {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  border-top-color: var(--primary-color);
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

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

/* Footer */
.footer {
  padding: 40px 0;
  text-align: center;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.btn-text-link {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.875rem;
  cursor: pointer;
  text-decoration: underline;
}

.btn-text-link:hover {
  color: white;
}

.copyright {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.5);
}

#wbx-powered-by-slot {
  width: 100%;
  display: flex;
  justify-content: center;
}

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

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

.modal-card {
  position: relative;
  background: #1e293b;
  width: 100%;
  max-width: 600px;
  max-height: 80vh;
  border-radius: 16px;
  border: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h2 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
}

.close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}

.close-btn:hover {
  color: white;
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
}

#rules-text {
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: #cbd5e1;
  white-space: pre-wrap;
  word-wrap: break-word;
}

/* Responsive */
@media (max-width: 900px) {
  .layout-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .hero-title {
    font-size: 2.5rem;
  }
  
  .glass-card {
    padding: 32px 24px;
  }
}
