:root {
  /* Strict 4-Color Hex Palette — Default White Theme */
  --c-teal: #02b89f;
  --c-gold: #f5b947;
  --c-white: #ffffff;
  --c-dark: #000300;

  /* Derived Light Mode System Tokens */
  --bg-app: #f8fafc;
  --bg-card: #ffffff;
  --text-primary: #000300;
  --text-muted: #52606d;
  --border-card: rgba(2, 184, 159, 0.25);
  
  --c-teal-bg: rgba(2, 184, 159, 0.08);
  --c-gold-bg: rgba(245, 185, 71, 0.12);
  --btn-option-bg: #ffffff;
  --btn-option-border: #e2e8f0;
  --shadow-card: 0 10px 40px -10px rgba(0, 3, 0, 0.08);

  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
}

:root[data-theme="dark"] {
  /* Strict 4-Color Hex Palette — Dark Mode Overrides */
  --bg-app: #000300;
  --bg-card: rgba(0, 3, 0, 0.85);
  --text-primary: #ffffff;
  --text-muted: #94a3b8;
  --border-card: rgba(2, 184, 159, 0.35);

  --c-teal-bg: rgba(2, 184, 159, 0.18);
  --c-gold-bg: rgba(245, 185, 71, 0.2);
  --btn-option-bg: rgba(0, 3, 0, 0.6);
  --btn-option-border: rgba(2, 184, 159, 0.3);
  --shadow-card: 0 10px 40px -10px rgba(2, 184, 159, 0.15);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
  background-color: var(--bg-app);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Kiosk Layout Container (iPad Native Dimensions) */
.app-shell {
  width: 100vw;
  max-width: 1024px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-app);
  position: relative;
}

/* Header */
.kiosk-header {
  height: 72px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-card);
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  z-index: 10;
}

.brand-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #ffffff;
  padding: 6px 14px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(2, 184, 159, 0.2);
}

:root[data-theme="dark"] .brand-badge {
  background: #ffffff;
  border-color: rgba(2, 184, 159, 0.5);
}

.oa-logo-img {
  height: 36px;
  width: auto;
  object-fit: contain;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.source-tag {
  padding: 6px 14px;
  border-radius: 20px;
  background: var(--c-teal-bg);
  color: var(--c-teal);
  font-weight: 700;
  font-size: 0.8rem;
  border: 1px solid var(--c-teal);
  display: flex;
  align-items: center;
  gap: 6px;
}

.icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--btn-option-border);
  background: var(--btn-option-bg);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.icon-btn:active {
  transform: scale(0.92);
}

/* Main Content Area */
main {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 24px;
}

/* Glass Kiosk Card */
.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  box-shadow: var(--shadow-card);
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  transition: background 0.3s ease, border-color 0.3s ease;
}

/* Welcome Title Image & Container Styling */
.welcome-title-wrapper {
  width: 100%;
  max-width: 520px;
  margin: 0 auto 24px;
  background: transparent;
  border-radius: var(--radius-lg);
  padding: 0;
  box-shadow: none;
  border: none;
  transition: all 0.3s ease;
}

:root[data-theme="dark"] .welcome-title-wrapper {
  background: transparent;
  border: none;
  box-shadow: none;
}

.welcome-title-img {
  width: 100%;
  height: auto;
  max-height: 440px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  border: none;
  outline: none;
  filter: drop-shadow(0 6px 20px rgba(0, 3, 0, 0.08));
}

:root[data-theme="dark"] .welcome-title-img {
  filter: drop-shadow(0 6px 24px rgba(2, 184, 159, 0.3));
}

/* Title Styling */
.title-xl {
  font-family: 'Outfit', sans-serif;
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.25;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.subtitle-md {
  font-size: 1.15rem;
  color: var(--c-teal);
  font-weight: 600;
  margin-bottom: 24px;
  line-height: 1.4;
}

.text-body {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 28px;
}

/* Large Kiosk Primary Button */
.btn-kiosk-primary {
  width: 100%;
  min-height: 64px;
  border-radius: var(--radius-md);
  background: var(--c-teal);
  color: #ffffff;
  border: none;
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  box-shadow: 0 8px 24px -4px rgba(2, 184, 159, 0.4);
  transition: all 0.15s ease;
}

.btn-kiosk-primary:hover {
  background: #02a38c;
}

.btn-kiosk-primary:active {
  transform: scale(0.98);
}

.btn-kiosk-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Option Buttons (Trivia & Visitor Type) */
.option-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 24px;
}

.btn-option {
  width: 100%;
  min-height: 64px;
  padding: 16px 20px;
  border-radius: var(--radius-md);
  background: var(--btn-option-bg);
  border: 2px solid var(--btn-option-border);
  color: var(--text-primary);
  font-size: 1.05rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all 0.15s ease;
}

.btn-option:active {
  transform: scale(0.99);
}

.btn-option.selected {
  border-color: var(--c-teal);
  background: var(--c-teal-bg);
}

.btn-option.correct {
  border-color: var(--c-teal) !important;
  background: var(--c-teal-bg) !important;
  color: var(--c-teal) !important;
}

.btn-option.incorrect {
  border-color: var(--c-gold) !important;
  background: var(--c-gold-bg) !important;
  color: var(--c-gold) !important;
}

.option-letter {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(2, 184, 159, 0.12);
  color: var(--c-teal);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.95rem;
  flex-shrink: 0;
}

/* Progress Indicator */
.progress-container {
  margin-bottom: 24px;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--c-teal);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.progress-track {
  height: 10px;
  width: 100%;
  background: var(--btn-option-border);
  border-radius: 10px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--c-teal);
  border-radius: 10px;
  transition: width 0.3s ease;
}

/* Explanation Card */
.explanation-card {
  margin-top: 16px;
  padding: 18px 20px;
  border-radius: var(--radius-md);
  background: var(--c-teal-bg);
  border: 1px solid var(--c-teal);
  animation: fadeIn 0.3s ease;
}

.explanation-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--c-teal);
  margin-bottom: 6px;
}

.explanation-body {
  font-size: 0.95rem;
  color: var(--text-primary);
  line-height: 1.5;
}

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

.form-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.form-label .required {
  color: var(--c-gold);
}

.form-input, .form-select {
  width: 100%;
  height: 52px;
  padding: 0 16px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--btn-option-border);
  background: var(--btn-option-bg);
  color: var(--text-primary);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s ease;
}

.form-input:focus, .form-select:focus {
  border-color: var(--c-teal);
}

.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
  cursor: pointer;
  text-align: left;
}

.checkbox-custom {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 2px solid var(--btn-option-border);
  background: var(--btn-option-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--c-teal);
  font-weight: 800;
  font-size: 0.9rem;
}

.checkbox-group.checked .checkbox-custom {
  border-color: var(--c-teal);
  background: var(--c-teal-bg);
}

.checkbox-label {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Unique Claim Code Box */
.claim-box {
  background: var(--c-teal-bg);
  border: 2px dashed var(--c-teal);
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
  margin: 24px 0;
}

.claim-code {
  font-family: 'Outfit', monospace;
  font-size: 2.4rem;
  font-weight: 900;
  letter-spacing: 4px;
  color: var(--c-teal);
  margin: 10px 0;
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 3, 0, 0.7);
  backdrop-filter: blur(6px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 32px;
  width: 100%;
  max-width: 480px;
  text-align: center;
  position: relative;
  color: var(--text-primary);
}

.close-modal {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
}

.qr-container {
  background: #ffffff;
  padding: 16px;
  border-radius: var(--radius-md);
  display: inline-block;
  margin: 16px 0;
}

/* Auto Reset Pill */
.reset-timer-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 20px;
  background: var(--c-gold-bg);
  color: var(--c-gold);
  font-size: 0.85rem;
  font-weight: 700;
  margin-top: 16px;
}

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