:root {
  /* Brand Colors */
  --primary: #CC0000;      /* KETV Red */
  --primary-dark: #990000;
  --secondary: #1a2a42;    /* Deep Navy */
  --accent: #FFC107;       /* Gold/Yellow */
  
  /* UI Colors */
  --bg-dark: #0f172a;
  --text-main: #334155;
  --text-muted: #64748b;
  --white: #ffffff;
  --error: #ef4444;
  --error-bg: #fef2f2;
  --success: #10b981;
  
  /* Style variables */
  --radius-lg: 16px;
  --radius-md: 8px;
  --radius-sm: 4px;
  --shadow-lg: 0 20px 40px -10px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --font-heading: 'Montserrat', sans-serif;
  --font-body: 'Open Sans', sans-serif;
}

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

body {
  font-family: var(--font-body);
  color: var(--text-main);
  background-color: var(--bg-dark);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.6;
}

/* Background Setup */
.site-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background-image: url('https://offertabs.s3.amazonaws.com/offer/mbbsi8/site/media/6a8c6c5ec6cf04.09354872.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.site-background::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.85) 0%, rgba(26, 42, 66, 0.75) 100%);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* Main Layout */
.site-container {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* Header */
.header {
  text-align: center;
  margin-bottom: 2.5rem;
  animation: slideDown 0.6s ease-out;
}

.brand-badge {
  display: inline-block;
  background: var(--primary);
  color: var(--white);
  padding: 0.5rem 1.25rem;
  border-radius: 99px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
  box-shadow: 0 4px 12px rgba(204, 0, 0, 0.3);
}

.campaign-title {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 900;
  color: var(--white);
  line-height: 1.1;
  margin-bottom: 0.75rem;
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.campaign-subtitle {
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.85);
}

/* Cards (Glassmorphism) */
.card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-lg);
  margin-bottom: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  animation: fadeIn 0.5s ease-out;
}

.card h2 {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  color: var(--secondary);
  margin-bottom: 0.5rem;
}

.instruction {
  color: var(--text-muted);
  margin-bottom: 2rem;
  font-size: 1.05rem;
}

.step-indicator {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--primary);
  letter-spacing: 1px;
  margin-bottom: 1rem;
}

/* Poll Grid */
.poll-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.poll-choice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: var(--white);
  border: 2px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 1.25rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.poll-choice:hover {
  border-color: #cbd5e1;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.poll-choice:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.choice-content {
  flex: 1;
}

.choice-name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--secondary);
  display: block;
}

.choice-img-container {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-right: 1rem;
  flex-shrink: 0;
  background: #f1f5f9;
}

.choice-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.choice-radio {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid #cbd5e1;
  position: relative;
  flex-shrink: 0;
  margin-left: 1rem;
  transition: all 0.2s;
}

/* Selected State for Poll Choice */
.poll-choice.selected {
  border-color: var(--primary);
  background: #fffafa;
}

.poll-choice.selected .choice-radio {
  border-color: var(--primary);
}

.poll-choice.selected .choice-radio::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 12px;
  height: 12px;
  background: var(--primary);
  border-radius: 50%;
  animation: scaleIn 0.2s ease-out forwards;
}

/* Form Styles */
.selection-summary {
  background: #f8fafc;
  border-left: 4px solid var(--primary);
  padding: 1.25rem;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.summary-label {
  font-size: 0.875rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  display: block;
  margin-bottom: 0.25rem;
}

.summary-value {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  color: var(--secondary);
  margin: 0;
}

.form-group {
  margin-bottom: 1.5rem;
}

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

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

input[type="text"]:focus,
input[type="email"]:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(204, 0, 0, 0.15);
}

/* Buttons */
.btn-primary {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 1.5rem;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 1rem;
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(204, 0, 0, 0.3);
}

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

.btn-secondary {
  padding: 0.75rem 1.25rem;
  background: #e2e8f0;
  color: var(--secondary);
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background: #cbd5e1;
}

.btn-text {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: transparent;
  transition: all 0.2s;
}

.btn-text:hover {
  color: var(--primary);
  text-decoration-color: var(--primary);
}

/* Messages */
.error-box {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  background: var(--error-bg);
  border-left: 4px solid var(--error);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  color: var(--error);
  margin-bottom: 1.5rem;
  font-weight: 600;
  font-size: 0.95rem;
}

.status-text {
  text-align: center;
  color: var(--secondary);
}

/* Results State */
.success-icon {
  color: var(--success);
  text-align: center;
  margin-bottom: 1rem;
  animation: scaleIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.success-title {
  text-align: center;
  color: var(--success) !important;
}

.success-text {
  text-align: center;
  font-size: 1.1rem;
  margin-bottom: 2.5rem;
}

.results-wrapper h3 {
  font-family: var(--font-heading);
  color: var(--secondary);
  margin-bottom: 1.5rem;
  font-size: 1.25rem;
  border-bottom: 2px solid #f1f5f9;
  padding-bottom: 0.75rem;
}

.result-item {
  margin-bottom: 1.25rem;
}

.result-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--secondary);
  font-size: 0.95rem;
}

.result-track {
  height: 10px;
  background: #f1f5f9;
  border-radius: 99px;
  overflow: hidden;
}

.result-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #ff4d4d);
  border-radius: 99px;
  width: 0%;
  transition: width 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Highlight top choice */
.result-item:first-child .result-fill {
  background: linear-gradient(90deg, var(--accent), #ff9800);
}
.result-item:first-child .result-header {
  font-size: 1.05rem;
}

/* Share Panel */
.share-panel {
  margin-top: 3rem;
  padding: 1.5rem;
  background: #f8fafc;
  border-radius: var(--radius-md);
  border: 1px dashed #cbd5e1;
}

.share-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.share-header h3 {
  margin: 0;
  font-family: var(--font-heading);
  color: var(--secondary);
}

.bonus-badge {
  background: var(--success);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 99px;
  font-size: 0.85rem;
  font-weight: 700;
}

.share-panel p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

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

.share-controls input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-md);
  background: white;
  color: var(--text-muted);
  font-family: monospace;
}

.copy-feedback {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--success);
  font-weight: 600;
  text-align: right;
}

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

/* Powered By Slot */
#wbx-powered-by-slot {
  margin-top: auto;
  padding-top: 2rem;
  display: flex;
  justify-content: center;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.5); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* Responsive */
@media (max-width: 600px) {
  .site-container {
    padding: 1.5rem 1rem;
  }
  
  .campaign-title {
    font-size: 2.25rem;
  }
  
  .card {
    padding: 1.5rem;
  }
  
  .share-controls {
    flex-direction: column;
  }
}
