/* CSS Variables & Theme */
:root {
  --bg-dark: #0a0f1c;
  --bg-card: #141b2d;
  --bg-card-hover: #1a2338;
  --accent-gold: #f0c14b;
  --accent-coral: #ff6b6b;
  --accent-teal: #4ecdc4;
  --accent-purple: #a855f7;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --border-color: #1e293b;
  --shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 40px rgba(240, 193, 75, 0.15);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg-dark);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  background-image: 
    radial-gradient(ellipse at 20% 20%, rgba(168, 85, 247, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(78, 205, 196, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(240, 193, 75, 0.03) 0%, transparent 70%);
  background-attachment: fixed;
}

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

/* Navigation */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: rgba(20, 27, 45, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  transition: var(--transition);
}

.nav-brand:hover {
  transform: scale(1.02);
}

.globe-icon {
  font-size: 1.75rem;
  animation: spin-slow 20s linear infinite;
}

@keyframes spin-slow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.brand-text {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent-gold), var(--accent-coral));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  gap: 0.5rem;
}

.nav-link {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
}

.nav-link:hover {
  color: var(--text-primary);
  background: var(--bg-card);
}

.nav-link.active {
  color: var(--accent-gold);
  background: rgba(240, 193, 75, 0.1);
}

.mobile-menu-btn {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
}

.mobile-menu {
  display: none;
  flex-direction: column;
  position: fixed;
  top: 70px;
  left: 0;
  right: 0;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem;
  z-index: 99;
}

.mobile-menu.active {
  display: flex;
}

/* Main Content */
.main-content {
  flex: 1;
  padding: 2rem;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

.section {
  display: none;
  animation: fadeIn 0.4s ease-out;
}

.section.active {
  display: block;
}

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

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

/* Hero Section */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  padding: 4rem 0;
}

.hero-content {
  animation: slideInLeft 0.6s ease-out;
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-30px); }
  to { opacity: 1; transform: translateX(0); }
}

.hero-title {
  font-family: var(--font-display);
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-gold) 50%, var(--accent-coral) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  max-width: 500px;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  border-radius: var(--radius-lg);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-gold), #e6a832);
  color: var(--bg-dark);
  box-shadow: 0 4px 20px rgba(240, 193, 75, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(240, 193, 75, 0.4);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-gold);
}

.btn-large {
  padding: 1.25rem 3rem;
  font-size: 1.1rem;
}

.hero-visual {
  animation: slideInRight 0.6s ease-out;
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}

.flag-carousel {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.flag-carousel img {
  width: 100%;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  transition: var(--transition);
}

.flag-carousel img:hover {
  transform: scale(1.05);
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 4rem;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 2rem;
  cursor: pointer;
  transition: var(--transition);
}

.feature-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-gold);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}

.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.feature-card h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Flag of the Day */
.fotd-container {
  display: flex;
  justify-content: center;
}

.fotd-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 3rem;
  max-width: 600px;
  text-align: center;
  box-shadow: var(--shadow-lg);
  animation: scaleIn 0.5s ease-out;
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.fotd-flag-wrapper {
  background: linear-gradient(135deg, rgba(240, 193, 75, 0.1), rgba(78, 205, 196, 0.1));
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 2rem;
}

.fotd-flag {
  max-width: 100%;
  max-height: 300px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
}

.fotd-country {
  font-family: var(--font-display);
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.fotd-details {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.fotd-badge {
  background: rgba(240, 193, 75, 0.15);
  color: var(--accent-gold);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
}

.fotd-date {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Quiz Styles */
.quiz-setup {
  display: flex;
  justify-content: center;
}

.setup-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 3rem;
  max-width: 600px;
  text-align: center;
}

.setup-card h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin-bottom: 2rem;
  color: var(--text-primary);
}

.quiz-options {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.quiz-option {
  background: var(--bg-dark);
  border: 2px solid var(--border-color);
  color: var(--text-primary);
  padding: 1rem 1.5rem;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.quiz-option:hover {
  border-color: var(--accent-gold);
}

.quiz-option.selected {
  background: rgba(240, 193, 75, 0.15);
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

.custom-count {
  margin-bottom: 2rem;
}

.custom-count label {
  display: block;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.custom-count input {
  background: var(--bg-dark);
  border: 2px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  font-size: 1rem;
  width: 120px;
  text-align: center;
}

.custom-count input:focus {
  outline: none;
  border-color: var(--accent-gold);
}

.quiz-game {
  max-width: 700px;
  margin: 0 auto;
}

.quiz-progress {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.progress-bar {
  flex: 1;
  height: 8px;
  background: var(--bg-card);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-gold), var(--accent-coral));
  border-radius: 4px;
  transition: width 0.3s ease;
}

.progress-text {
  color: var(--text-secondary);
  font-weight: 500;
  min-width: 80px;
  text-align: right;
}

.quiz-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  text-align: center;
}

.quiz-flag-wrapper {
  background: linear-gradient(135deg, rgba(240, 193, 75, 0.1), rgba(78, 205, 196, 0.1));
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 2rem;
  display: inline-block;
}

.quiz-flag {
  max-width: 300px;
  max-height: 200px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
}

.quiz-question {
  font-family: var(--font-display);
  font-size: 1.35rem;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.quiz-answers {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.quiz-answer {
  background: var(--bg-dark);
  border: 2px solid var(--border-color);
  color: var(--text-primary);
  padding: 1rem;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
}

.quiz-answer:hover:not(:disabled) {
  border-color: var(--accent-gold);
  background: var(--bg-card-hover);
}

.quiz-answer.correct {
  background: rgba(78, 205, 196, 0.2);
  border-color: var(--accent-teal);
  color: var(--accent-teal);
}

.quiz-answer.incorrect {
  background: rgba(255, 107, 107, 0.2);
  border-color: var(--accent-coral);
  color: var(--accent-coral);
}

.quiz-answer:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

.quiz-score {
  text-align: center;
  margin-top: 1.5rem;
  color: var(--text-secondary);
  font-size: 1.1rem;
  font-weight: 500;
}

.quiz-results {
  display: flex;
  justify-content: center;
}

.results-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 3rem;
  max-width: 500px;
  text-align: center;
  animation: scaleIn 0.5s ease-out;
}

.results-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.results-title {
  font-family: var(--font-display);
  font-size: 2rem;
  margin-bottom: 2rem;
  color: var(--text-primary);
}

.results-score {
  margin-bottom: 1rem;
}

.score-number {
  font-family: var(--font-display);
  font-size: 5rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent-gold), var(--accent-coral));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.score-total {
  font-size: 2rem;
  color: var(--text-secondary);
}

.results-percentage {
  color: var(--text-secondary);
  font-size: 1.25rem;
  margin-bottom: 2rem;
}

.results-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Slideshow Styles */
.slideshow-container {
  max-width: 800px;
  margin: 0 auto;
}

.slideshow-controls-top {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
}

.slideshow-controls-top select {
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 1rem;
  cursor: pointer;
}

.slideshow-controls-top select:focus {
  outline: none;
  border-color: var(--accent-gold);
}

.slideshow-main {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.slideshow-nav {
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  color: var(--text-primary);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}

.slideshow-nav:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

.slideshow-content {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 3rem;
  text-align: center;
}

.slideshow-flag-wrapper {
  background: linear-gradient(135deg, rgba(240, 193, 75, 0.1), rgba(78, 205, 196, 0.1));
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 2rem;
  display: inline-block;
}

.slideshow-flag {
  max-width: 100%;
  max-height: 280px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
}

.slideshow-country {
  font-family: var(--font-display);
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.slideshow-badge {
  background: rgba(240, 193, 75, 0.15);
  color: var(--accent-gold);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
}

.slideshow-controls-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
}

.slideshow-counter {
  color: var(--text-secondary);
  font-size: 1.1rem;
  font-weight: 500;
}

.slideshow-dots {
  display: flex;
  gap: 0.25rem;
  max-width: 100%;
  overflow-x: auto;
  padding: 0.5rem;
}

.slideshow-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border-color);
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}

.slideshow-dot.active {
  background: var(--accent-gold);
  transform: scale(1.3);
}

/* Browse Styles */
.browse-filters {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.browse-filters select {
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 1rem;
  cursor: pointer;
}

.browse-filters select:focus {
  outline: none;
  border-color: var(--accent-gold);
}

.flags-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.flag-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
}

.flag-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-gold);
  transform: translateY(-4px);
}

.flag-card img {
  width: 100%;
  max-height: 120px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
}

.flag-card h4 {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.flag-card span {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.page-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  cursor: pointer;
  transition: var(--transition);
  min-width: 45px;
}

.page-btn:hover:not(:disabled) {
  background: var(--bg-card-hover);
  border-color: var(--accent-gold);
}

.page-btn.active {
  background: var(--accent-gold);
  border-color: var(--accent-gold);
  color: var(--bg-dark);
}

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

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 15, 28, 0.9);
  backdrop-filter: blur(10px);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 3rem;
  max-width: 500px;
  width: 100%;
  text-align: center;
  position: relative;
  animation: scaleIn 0.3s ease-out;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 2rem;
  cursor: pointer;
  transition: var(--transition);
  line-height: 1;
}

.modal-close:hover {
  color: var(--accent-coral);
}

.modal-flag {
  max-width: 100%;
  max-height: 250px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  margin-bottom: 1.5rem;
}

.modal-country {
  font-family: var(--font-display);
  font-size: 1.75rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.modal-details {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.modal-badge {
  background: rgba(240, 193, 75, 0.15);
  color: var(--accent-gold);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
}

/* Footer */
.footer {
  text-align: center;
  padding: 2rem;
  border-top: 1px solid var(--border-color);
  background: rgba(20, 27, 45, 0.5);
}

.footer p {
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.footer-small {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer a {
  color: var(--accent-gold);
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

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

/* ============================================
   US STATE FLAGS STYLES
   ============================================ */

/* US States Header */
.us-states-header h2 {
  background: linear-gradient(135deg, #bf0a30 0%, var(--text-primary) 35%, #002868 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* States Section Tab Navigation */
.states-tabs {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.states-tab {
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  color: var(--text-secondary);
  padding: 0.875rem 1.5rem;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.states-tab:hover {
  border-color: #bf0a30;
  color: var(--text-primary);
}

.states-tab.active {
  background: linear-gradient(135deg, rgba(191, 10, 48, 0.15), rgba(0, 40, 104, 0.15));
  border-color: #bf0a30;
  color: #bf0a30;
}

/* States Tab Content */
.states-tab-content {
  display: none;
  animation: fadeIn 0.4s ease-out;
}

.states-tab-content.active {
  display: block;
}

/* State Flag Cards */
.state-flag-card {
  position: relative;
}

.state-flag-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #bf0a30, #002868);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  opacity: 0;
  transition: var(--transition);
}

.state-flag-card:hover::before {
  opacity: 1;
}

/* Feature Card for US States */
.feature-card-states {
  background: linear-gradient(135deg, var(--bg-card), rgba(191, 10, 48, 0.05));
  border-color: rgba(191, 10, 48, 0.2);
}

.feature-card-states:hover {
  border-color: #bf0a30;
  box-shadow: 0 0 40px rgba(191, 10, 48, 0.15);
}

/* Nav Link for US States */
.nav-link-states {
  position: relative;
}

.nav-link-states.active {
  color: #bf0a30;
  background: rgba(191, 10, 48, 0.1);
}

/* State Quiz Specific Styles */
#states-quiz .quiz-option.selected {
  background: rgba(191, 10, 48, 0.15);
  border-color: #bf0a30;
  color: #bf0a30;
}

#states-quiz .quiz-option:hover {
  border-color: #bf0a30;
}

#states-quiz .progress-fill {
  background: linear-gradient(90deg, #bf0a30, #002868);
}

/* State Slideshow Badge */
#states-slideshow .slideshow-badge,
#states-fotd .fotd-badge {
  background: rgba(191, 10, 48, 0.15);
  color: #bf0a30;
}

/* State of the Day Card */
#states-fotd .fotd-card {
  border-color: rgba(191, 10, 48, 0.2);
}

#states-fotd .fotd-flag-wrapper {
  background: linear-gradient(135deg, rgba(191, 10, 48, 0.1), rgba(0, 40, 104, 0.1));
}

/* State Modal */
#stateModal .modal-badge {
  background: rgba(191, 10, 48, 0.15);
  color: #bf0a30;
}

/* Responsive */
@media (max-width: 1024px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }

  .hero-subtitle {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-buttons {
    justify-content: center;
  }

  .flag-carousel {
    max-width: 400px;
    margin: 0 auto;
  }
}

@media (max-width: 768px) {
  .navbar {
    padding: 1rem;
  }

  .nav-links {
    display: none;
  }

  .mobile-menu-btn {
    display: block;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .hero-subtitle {
    font-size: 1.1rem;
  }

  .main-content {
    padding: 1rem;
  }

  .section-header h2 {
    font-size: 2rem;
  }

  .quiz-answers {
    grid-template-columns: 1fr;
  }

  .slideshow-nav {
    width: 45px;
    height: 45px;
    font-size: 1.2rem;
  }

  .slideshow-content {
    padding: 1.5rem;
  }

  .flags-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
  }

  .flag-card {
    padding: 1rem;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2rem;
  }

  .btn {
    padding: 0.875rem 1.5rem;
    font-size: 0.95rem;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .fotd-card,
  .setup-card,
  .results-card {
    padding: 1.5rem;
  }

  .quiz-option {
    padding: 0.75rem 1rem;
  }

  .states-tabs {
    gap: 0.35rem;
  }

  .states-tab {
    padding: 0.65rem 1rem;
    font-size: 0.85rem;
  }
}

