/* BASE & RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --color-primary: #002b66; /* Deep lottery blue */
  --color-accent: #ffcc00; /* Gold */
  --color-accent-hover: #e6b800;
  --color-bg-dark: #071527;
  --color-text: #334155;
  --color-text-light: #64748b;
  --color-error: #ef4444;
  --color-success: #10b981;
  --font-heading: 'Montserrat', sans-serif;
  --font-body: 'Inter', sans-serif;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

.hidden {
  display: none !important;
}

/* iOS Phone number auto-link fix */
a[href^="tel"] {
  color: #ffffff;
  text-decoration: none;
}

/* BACKGROUND */
.page-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-size: cover;
  background-position: center;
  z-index: -2;
}

.page-bg-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: linear-gradient(135deg, rgba(0, 43, 102, 0.85) 0%, rgba(7, 21, 39, 0.95) 100%);
  z-index: -1;
}

/* LAYOUT */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
}

/* HEADER */
.campaign-header {
  text-align: center;
  margin-bottom: 2.5rem;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.custom-logo {
  max-width: 220px;
  max-height: 140px;
  object-fit: contain;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.3));
}

.header-title {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
  margin: 0;
}

/* RULES LINK */
.rules-link-container {
  text-align: center;
  margin-bottom: 1.5rem;
  width: 100%;
}

.rules-link {
  color: #ffffff;
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 1rem;
  transition: color 0.2s ease;
}

.rules-link:hover {
  color: var(--color-accent);
}

/* FOOTER LOGO */
.footer-logo {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 1rem;
  width: 100%;
}

/* SITE DISCLAIMER */
.site-disclaimer {
  text-align: center;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 2rem;
  line-height: 1.5;
  max-width: 600px;
}

.site-disclaimer p {
  margin-bottom: 0.5rem;
}

.site-disclaimer p:last-child {
  margin-bottom: 0;
}

/* CARD */
.glass-card {
  width: 100%;
  max-width: 540px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 24px;
  padding: 2.5rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255,255,255,0.1) inset;
  margin-bottom: 2.5rem;
  position: relative;
  overflow: hidden;
}

/* STATE SECTIONS */
.state-section {
  display: flex;
  flex-direction: column;
  animation: fadeIn 0.4s ease-out forwards;
}

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

.state-title {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
  text-align: center;
}

.state-desc {
  text-align: center;
  color: var(--color-text-light);
  margin-bottom: 2rem;
}

.state-desc a {
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid var(--color-accent);
  transition: all 0.2s ease;
}

.state-desc a:hover {
  color: var(--color-accent-hover);
  border-bottom-color: var(--color-accent-hover);
}

/* COUNTDOWN */
.countdown-container {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 1rem;
}

.countdown-box {
  background: rgba(0, 43, 102, 0.05);
  border: 1px solid rgba(0, 43, 102, 0.1);
  border-radius: 12px;
  padding: 1rem;
  min-width: 80px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.countdown-box span {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--color-primary);
  line-height: 1;
  margin-bottom: 0.25rem;
}

.countdown-box small {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--color-text-light);
  letter-spacing: 0.05em;
}

/* LOADING STATE */
#state-loading {
  align-items: center;
  justify-content: center;
  padding: 3rem 0;
}

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

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

/* FORM STYLES */
.form-header {
  text-align: center;
  margin-bottom: 2rem;
}

.form-logo {
  max-width: 100%;
  height: auto;
  max-height: 140px;
  object-fit: contain;
  margin-bottom: 1.5rem;
}

.form-header h2 {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}

.form-header p {
  color: var(--color-text-light);
  font-size: 0.95rem;
}

.form-header .disclaimer {
  font-size: 0.75rem;
  margin-top: 0.75rem;
  font-style: italic;
  line-height: 1.4;
}

.form-group {
  margin-bottom: 1.25rem;
  width: 100%;
}

.form-row {
  display: flex;
  gap: 1rem;
}

.form-row .form-group {
  flex: 1;
}

label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--color-text);
}

input[type="text"],
input[type="email"],
input[type="tel"],
select {
  width: 100%;
  padding: 0.875rem 1rem;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--color-text);
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  transition: all 0.2s ease;
}

input:focus, select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(0, 43, 102, 0.1);
}

input::placeholder {
  color: #94a3b8;
}

select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  padding-right: 2.5rem;
  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='%23334155' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
}

select:invalid {
  color: #94a3b8;
}

select option {
  color: var(--color-text);
}

.checkbox-group {
  margin: 1.5rem 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.form-checkbox input[type="checkbox"] {
  margin-top: 0.25rem;
  width: 1.125rem;
  height: 1.125rem;
  accent-color: var(--color-primary);
  cursor: pointer;
  flex-shrink: 0;
}

.form-checkbox label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-light);
  margin: 0;
  cursor: pointer;
  line-height: 1.5;
}

.btn-primary {
  width: 100%;
  background: linear-gradient(135deg, var(--color-accent) 0%, #ffaa00 100%);
  color: var(--color-primary);
  border: none;
  padding: 1rem;
  border-radius: 12px;
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(255, 204, 0, 0.3);
}

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

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

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

.btn-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(0, 43, 102, 0.2);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* SUCCESS / BONUS STYLES */
.bonus-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 1.5rem;
  margin-top: 1.5rem;
  text-align: center;
}

.bonus-box h3 {
  font-family: var(--font-heading);
  color: var(--color-primary);
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
}

.bonus-box p {
  font-size: 0.9rem;
  color: var(--color-text-light);
  margin-bottom: 1.25rem;
}

.share-controls {
  display: flex;
  gap: 0.5rem;
}

.share-controls input {
  flex: 1;
  background: #fff;
  border: 1px solid #cbd5e1;
  padding: 0.75rem;
  border-radius: 8px;
  font-size: 0.875rem;
  color: var(--color-text);
}

.btn-secondary {
  background: var(--color-primary);
  color: #fff;
  border: none;
  padding: 0 1.25rem;
  border-radius: 8px;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}

.btn-secondary:hover {
  background: #001f4d;
}

.copy-feedback {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: var(--color-success);
  font-weight: 500;
}

/* ALERTS */
.alert {
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  font-weight: 500;
}

.alert-error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #f87171;
}

/* RESPONSIVE */
@media (max-width: 600px) {
  .form-row {
    flex-direction: column;
    gap: 0;
  }
  
  .glass-card {
    padding: 2rem 1.5rem;
    border-radius: 20px;
  }
  
  .header-title {
    font-size: 2rem;
  }
  
  .countdown-container {
    gap: 0.5rem;
  }
  
  .countdown-box {
    min-width: 60px;
    padding: 0.75rem 0.5rem;
  }
  
  .countdown-box span {
    font-size: 1.25rem;
  }
  
  .countdown-box small {
    font-size: 0.65rem;
  }
}
