/* Base Styles & CSS Variables */
:root {
  --color-primary: #D4AF37; /* Premium Gold */
  --color-primary-light: #FFDF00;
  --color-primary-dark: #AA8222;
  --color-dark: #0a0a0d;
  --color-bg-panel: rgba(20, 16, 20, 0.85);
  --color-text-main: #f0f0f5;
  --color-text-muted: #a0a0b0;
  --color-error: #ff4b4b;
  
  --font-heading: 'Playfair Display', serif;
  --font-body: 'Montserrat', sans-serif;
  
  --border-radius-sm: 8px;
  --border-radius-md: 16px;
  --border-radius-lg: 24px;
}

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

body {
  font-family: var(--font-body);
  color: var(--color-text-main);
  background-color: var(--color-dark);
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* Background Image Overlay */
.page-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('https://offertabs.s3.amazonaws.com/offer/q3mtj9/site/media/6a42adafcb8989.80136621.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  z-index: -2;
}

.page-background::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, rgba(10, 10, 13, 0.4) 0%, rgba(10, 10, 13, 0.9) 100%);
  z-index: -1;
}

/* Layout */
.page-wrapper {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 40px 20px;
}

.content-container {
  width: 100%;
  max-width: 650px;
  background: var(--color-bg-panel);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-top: 1px solid rgba(212, 175, 55, 0.4);
  border-radius: var(--border-radius-lg);
  padding: 48px 40px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7),
              0 0 40px rgba(212, 175, 55, 0.05);
  display: flex;
  flex-direction: column;
}

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

.eyebrow {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 12px;
  background: rgba(212, 175, 55, 0.1);
  padding: 6px 16px;
  border-radius: 999px;
  border: 1px solid rgba(212, 175, 55, 0.2);
}

.title {
  font-family: var(--font-heading);
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 16px;
  color: #fff;
  background: linear-gradient(135deg, #fff 0%, #e0e0e0 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.subtitle {
  font-size: 1.05rem;
  color: var(--color-text-muted);
  max-width: 500px;
  margin: 0 auto;
}

/* Alerts */
.alert {
  padding: 16px 20px;
  border-radius: var(--border-radius-md);
  margin-bottom: 24px;
  font-weight: 500;
  text-align: center;
}

.alert-info {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.alert-error {
  background: rgba(255, 75, 75, 0.1);
  border: 1px solid rgba(255, 75, 75, 0.3);
  color: #ffbaba;
}

/* Form Styles */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-group {
  margin-bottom: 24px;
}

label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: #e0e0e0;
}

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

input[type="text"]:focus,
input[type="email"]:focus,
input[type="date"]:focus,
select:focus {
  outline: none;
  border-color: var(--color-primary);
  background-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
}

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

/* Date Input Indicator */
input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(1);
  opacity: 0.7;
  cursor: pointer;
}

input[type="date"]::-webkit-calendar-picker-indicator:hover {
  opacity: 1;
}

/* Checkbox Styles */
.checkbox-group {
  margin-bottom: 24px;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  font-size: 0.9rem;
  color: #e0e0e0;
  font-weight: 500;
}

.checkbox-label input[type="checkbox"] {
  margin-top: 4px;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  accent-color: var(--color-primary);
  cursor: pointer;
}

.checkbox-text {
  line-height: 1.4;
}

/* Styled Select (kept for consistency if added back later) */
select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  padding-right: 40px;
  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='%23D4AF37' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  cursor: pointer;
}

select option {
  background-color: var(--color-dark);
  color: #fff;
}

/* Buttons */
.btn-primary {
  width: 100%;
  padding: 16px;
  font-size: 1.1rem;
  font-weight: 700;
  font-family: var(--font-body);
  color: #1a1500;
  background: linear-gradient(135deg, var(--color-primary-light) 0%, var(--color-primary-dark) 100%);
  border: none;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 8px;
  margin-bottom: 16px;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
  display: flex;
  justify-content: center;
  align-items: center;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(212, 175, 55, 0.4);
  background: linear-gradient(135deg, #FFF180 0%, var(--color-primary) 100%);
}

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

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

/* Rules Section */
.rules-container {
  margin-top: 32px;
  padding: 24px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--border-radius-sm);
  font-size: 0.75rem;
  color: var(--color-text-muted);
  max-height: 250px;
  overflow-y: auto;
  line-height: 1.6;
}

.rules-container h4 {
  color: #fff;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  text-align: center;
  margin-bottom: 16px;
  line-height: 1.3;
}

.rules-container p {
  margin-bottom: 12px;
}

.rules-container p:last-child {
  margin-bottom: 0;
}

.rules-container strong {
  color: #e0e0e0;
  font-weight: 600;
}

/* Scrollbar for rules container */
.rules-container::-webkit-scrollbar {
  width: 6px;
}

.rules-container::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

.rules-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

.rules-container::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Countdown */
.countdown-wrapper {
  margin-bottom: 32px;
  text-align: center;
}

.countdown-label {
  font-size: 0.9rem;
  color: var(--color-primary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

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

.time-block {
  display: flex;
  flex-direction: column;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--border-radius-sm);
  padding: 12px 16px;
  min-width: 70px;
}

.time-value {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 700;
  color: #fff;
  line-height: 1;
  margin-bottom: 4px;
}

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

/* Success State & Bonus Entries */
.success-state {
  text-align: center;
  padding: 20px 0;
  animation: fadeIn 0.6s ease;
}

.success-icon {
  font-size: 4rem;
  margin-bottom: 16px;
  filter: drop-shadow(0 0 20px rgba(212, 175, 55, 0.4));
}

.success-title {
  font-family: var(--font-heading);
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 16px;
}

.success-text {
  font-size: 1.1rem;
  color: #e0e0e0;
  margin-bottom: 32px;
}

.share-card {
  background: rgba(0, 0, 0, 0.3);
  border: 1px dashed rgba(212, 175, 55, 0.4);
  border-radius: var(--border-radius-md);
  padding: 32px 24px;
  margin-top: 24px;
}

.share-title {
  font-size: 1.25rem;
  color: var(--color-primary-light);
  margin-bottom: 8px;
}

.share-desc {
  font-size: 0.95rem;
  margin-bottom: 20px;
  color: var(--color-text-muted);
}

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

#share-url {
  flex-grow: 1;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  border-color: rgba(212, 175, 55, 0.3);
}

.btn-secondary {
  padding: 0 20px;
  background: transparent;
  color: var(--color-primary);
  border: 1px solid var(--color-primary);
  border-radius: var(--border-radius-sm);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-secondary:hover {
  background: rgba(212, 175, 55, 0.1);
}

.copy-msg {
  color: #4caf50;
  font-size: 0.85rem;
  margin-top: 12px;
  font-weight: 500;
}

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

#wbx-powered-by-slot {
  margin-top: auto; /* push to bottom of the flex container */
  padding-top: 32px;
  text-align: center;
  width: 100%;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Media Queries */
@media (max-width: 600px) {
  .content-container {
    padding: 32px 20px;
  }
  
  .title {
    font-size: 2.25rem;
  }
  
  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
  
  .countdown-timer {
    gap: 8px;
  }
  
  .time-block {
    min-width: 60px;
    padding: 10px 12px;
  }
  
  .time-value {
    font-size: 1.4rem;
  }
  
  .share-input-group {
    flex-direction: column;
  }
  
  .btn-secondary {
    padding: 14px;
  }
}
