:root {
  /* Modern Dark Theme Variables */
  --bg-dark: #0f172a;
  --bg-gradient: radial-gradient(circle at 50% 0%, #312e81 0%, #0f172a 60%);
  --card-bg: rgba(30, 41, 59, 0.4);
  /* Glass dark */
  --card-border: rgba(148, 163, 184, 0.1);
  --card-border-hover: rgba(139, 92, 246, 0.5);

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-highlight: #e2e8f0;

  --accent-primary: #8b5cf6;
  /* Violet */
  --accent-secondary: #ec4899;
  /* Pink */
  --accent-glow: rgba(139, 92, 246, 0.4);

  --font-family: 'Inter', 'Noto Sans KR', sans-serif;

  --glass-header: rgba(15, 23, 42, 0.7);
  --blur-amount: 16px;
}

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

body {
  background: linear-gradient(-45deg, #0f172a, #1e1b4b, #312e81, #0f172a);
  background-size: 400% 400%;
  animation: gradientBG 20s ease infinite;
  color: var(--text-primary);
  font-family: var(--font-family);
  overflow-x: hidden;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  user-select: none;
  -webkit-user-select: none;
  position: relative;
}

@keyframes gradientBG {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

/* Floating Nebula Effect */
body::before {
  content: '';
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background:
    radial-gradient(circle at 20% 30%, rgba(139, 92, 246, 0.15), transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(236, 72, 153, 0.15), transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(56, 189, 248, 0.1), transparent 50%);
  filter: blur(80px);
  animation: nebulaFlow 30s infinite alternate;
  z-index: -2;
  pointer-events: none;
}

@keyframes nebulaFlow {
  0% {
    transform: rotate(0deg) scale(1);
  }

  100% {
    transform: rotate(10deg) scale(1.1);
  }
}

/* Twinkling Stars */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    radial-gradient(2px 2px at 20px 30px, #ffffff, rgba(0, 0, 0, 0)),
    radial-gradient(2px 2px at 40px 70px, #ffffff, rgba(0, 0, 0, 0)),
    radial-gradient(2px 2px at 50px 160px, #ffffff, rgba(0, 0, 0, 0)),
    radial-gradient(2px 2px at 90px 40px, #ffffff, rgba(0, 0, 0, 0)),
    radial-gradient(2px 2px at 130px 80px, #ffffff, rgba(0, 0, 0, 0));
  background-size: 200px 200px;
  opacity: 0.3;
  z-index: -1;
  pointer-events: none;
  animation: twinkle 5s infinite linear;
}

@keyframes twinkle {
  0% {
    opacity: 0.3;
    transform: translateY(0);
  }

  50% {
    opacity: 0.5;
  }

  100% {
    opacity: 0.3;
    transform: translateY(-20px);
  }
}

#app {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Top Navigation */
.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(15, 23, 42, 0.6);
  /* More transparent */
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding: 0 2rem;
  height: 60px;
}

.nav-content {
  max-width: 1400px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  font-weight: 800;
  font-size: 1.2rem;
  background: linear-gradient(90deg, #fff, #94a3b8);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  cursor: pointer;
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-links>a,
.dropdown-trigger,
.nav-item {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s;
  cursor: pointer;
  position: relative;
}

.nav-links>a:hover,
.dropdown-trigger:hover,
.nav-links a.active {
  color: white;
}

/* Dropdown */
.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  right: -50px;
  /* Align slightly right so it doesn't go offscreen */
  width: 260px;
  background: rgba(30, 41, 59, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 0.5rem;
  display: none;
  /* Hidden by default */
  flex-direction: column;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  margin-top: 1rem;
}

/* Show dropdown on hover */
.dropdown:hover .dropdown-menu {
  display: flex;
  animation: fadeIn 0.2s ease;
}

.dropdown-menu::before {
  /* Little arrow */
  content: '';
  position: absolute;
  top: -6px;
  right: 80px;
  width: 12px;
  height: 12px;
  background: rgba(30, 41, 59, 0.95);
  transform: rotate(45deg);
  border-top: 1px solid var(--card-border);
  border-left: 1px solid var(--card-border);
}

.dropdown-menu a {
  padding: 0.8rem 1rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  border-radius: 8px;
  transition: all 0.2s;
}

.dropdown-menu a:hover {
  background: rgba(139, 92, 246, 0.1);
  color: white;
}

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

  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: none;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal-content {
  background: #1a1a1a;
  border: 1px solid var(--card-border);
  padding: 1.5rem 2rem;
  border-radius: 20px;
  width: 90%;
  max-width: 750px;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  text-align: left;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.active {
  display: flex;
  opacity: 1;
}

.modal-overlay.active .modal-content {
  transform: scale(1);
}

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

.close-modal:hover {
  color: white;
}

.modal-content h2 {
  margin-bottom: 1rem;
  color: #4ecdc4;
  font-size: 1.8rem;
}

.contact-desc {
  color: var(--text-secondary);
  margin-bottom: 2rem;
  line-height: 1.6;
  font-size: 0.95rem;
}

.contact-form-container {
  display: flex;
  gap: 3rem;
}

.form-section {
  flex: 2;
}

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

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

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

.form-group label {
  display: block;
  color: white;
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  background: #2a2a2a;
  border: 1px solid #3a3a3a;
  border-radius: 8px;
  padding: 0.9rem 1rem;
  color: white;
  font-size: 0.9rem;
  box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #4ecdc4;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #666;
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
  line-height: 1.5;
}

.send-btn {
  background: transparent;
  border: 1px solid #666;
  color: white;
  padding: 0.9rem 2rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.send-btn:hover {
  background: #4ecdc4;
  border-color: #4ecdc4;
  color: #1a1a1a;
}

.contact-info-section {
  flex: 1;
  padding-left: 2rem;
  border-left: 1px solid #333;
}

.contact-info-section h4 {
  color: white;
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.contact-email-link {
  color: #4ecdc4;
  text-decoration: none;
  font-size: 0.9rem;
}

.contact-email-link:hover {
  text-decoration: underline;
}

/* Legacy styles for backward compatibility */
.contact-email {
  display: inline-block;
  padding: 1rem 2rem;
  background: rgba(139, 92, 246, 0.1);
  color: var(--accent-primary);
  text-decoration: none;
  border-radius: 100px;
  border: 1px solid rgba(139, 92, 246, 0.3);
  font-weight: 600;
  margin-bottom: 1.5rem;
  transition: all 0.2s;
}

.contact-email:hover {
  background: var(--accent-primary);
  color: white;
}

.modal-note {
  font-size: 0.8rem;
  opacity: 0.6;
}

/* Responsive for contact form modal */
@media (max-width: 768px) {
  .contact-form-container {
    flex-direction: column;
    gap: 2rem;
  }

  .form-row {
    flex-direction: column;
    gap: 0;
  }

  .contact-info-section {
    padding-left: 0;
    padding-top: 2rem;
    border-left: none;
    border-top: 1px solid #333;
  }
}


/* Header Adjustments */
.glass-header {
  position: relative;
  /* Not sticky anymore, nav is sticky */
  margin-top: 60px;
  /* Space for nav */
  background: transparent;
  backdrop-filter: none;
  border-bottom: none;
  padding: 3rem 2rem 1rem;
  width: 100%;
}

.scrolled .glass-header {
  /* Disable old scroll effect */
  padding: 4rem 2rem 2rem;
  background: transparent;
}

.brand-container {
  text-align: center;
  position: relative;
  /* Ensure it doesn't overlap controls */
  margin-bottom: 2rem;
}

.glass-header h1 {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, #fff 0%, #cbd5e1 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 30px rgba(139, 92, 246, 0.3);
}

.glass-header p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  font-weight: 400;
  letter-spacing: 0.02em;
}

/* Controls - Centered and Wide */
.controls-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: center;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
}

/* Fix Input Alignment */
.search-row {
  width: 100%;
  display: flex;
  justify-content: center;
}

.search-wrapper {
  position: relative;
  width: 100%;
  max-width: 500px;
  /* Constrain width */
}

#search-input {
  width: 100%;
  padding: 1.2rem 1.5rem 1.2rem 3.5rem;
  background: rgba(255, 255, 255, 0.05);
  /* very light white */
  border: 1px solid var(--card-border);
  border-radius: 100px;
  color: white;
  font-size: 1.1rem;
  font-family: inherit;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
  text-align: left;
  /* Ensure text starts left */
}

#search-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

#search-input:focus {
  outline: none;
  border-color: var(--accent-primary);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.2);
}

.search-icon {
  position: absolute;
  left: 1.2rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  pointer-events: none;
  transition: color 0.3s;
}

#search-input:focus+.search-icon {
  color: var(--accent-primary);
}

.total-badge {
  margin-top: 1rem;
  display: inline-block;
}

.filters-section {
  width: 100%;
  display: flex;
  justify-content: center;
  flex-direction: column;
  gap: 1.5rem;
  align-items: center;
}

.filter-group {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: center;
}

.category-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  justify-content: center;
}

.filter-chip {
  padding: 0.6rem 1.5rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--card-border);
  border-radius: 100px;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.3s ease;
  backdrop-filter: blur(4px);
}

.filter-chip:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.3);
}

.filter-chip.active {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  border-color: transparent;
  color: white;
  font-weight: 600;
  box-shadow: 0 4px 15px var(--accent-glow);
}

/* Grid Layout */
main {
  flex: 1;
  padding: 2rem;
}

.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 2.5rem;
  padding-bottom: 4rem;
}

/* Modern Glass Card */
.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.card:hover {
  transform: translateY(-10px) scale(1.02);
  border-color: var(--card-border-hover);
  box-shadow: 0 20px 40px -5px rgba(0, 0, 0, 0.3),
    0 0 20px -5px var(--accent-glow);
}

.card-image-container {
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  position: relative;
}

.card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
}

.card:hover .card-image {
  transform: scale(1.1);
}

/* Overlay gradient on image */
.card-image-container::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 60%;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.9), transparent);
  opacity: 0.8;
}

.complexity-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  padding: 0.3rem 0.8rem;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  z-index: 2;
}

.card-content {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.card-meta {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.3rem;
  /* Reduced spacing */
  flex-wrap: wrap;
  align-items: center;
}

.card-subcategory {
  margin-bottom: 0.8rem;
}

.card-subcategory .model-badge {
  display: inline-block;
  font-size: 0.75rem;
  padding: 0.3rem 0.7rem;
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 8px;
  color: #a78bfa;
  font-weight: 500;
}

.card-category {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
}

.model-badge {
  font-size: 0.7rem;
  padding: 0.2rem 0.8rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 100px;
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.card-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.8rem;
  line-height: 1.3;
  color: var(--text-primary);
  transition: color 0.3s;
}

.card:hover .card-title {
  color: #fff;
}

.card-description {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
  display: -webkit-box;
  line-clamp: 3;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: auto;
}

/* Loader - Neon Spinner */
.loading-trigger {
  display: flex;
  justify-content: center;
  padding: 3rem;
  width: 100%;
}

.loader {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(139, 92, 246, 0.1);
  border-radius: 50%;
  border-top-color: var(--accent-primary);
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.2);
  animation: spin 1s linear infinite;
}

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

/* Responsive */
@media (max-width: 900px) {
  .glass-header h1 {
    font-size: 2.2rem;
  }

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

@media (max-width: 600px) {
  html {
    font-size: 12px;
    /* Smaller base font */
  }

  #app {
    padding: 0;
  }

  .glass-header {
    padding: 2rem 1rem 1rem;
    margin-top: 50px;
  }

  .glass-header h1 {
    font-size: 1.5rem;
    /* Smaller title - reduced from 1.8rem */
  }

  .glass-header p {
    font-size: 0.85rem;
    /* Smaller subtitle */
  }

  /* Smaller category filter chips */
  .filter-chip {
    padding: 0.5rem 1rem;
    /* Reduced padding */
    font-size: 0.8rem;
    /* Smaller text */
  }

  .nav-links {
    gap: 1rem;
    /* Smaller gap in nav */
  }

  .nav-links>a,
  .dropdown-trigger,
  .nav-item {
    font-size: 0.85rem;
    /* Smaller nav text */
  }

  .grid-container {
    padding: 1rem;
    grid-template-columns: repeat(2, 1fr);
    /* Force 2 columns */
    gap: 0.8rem;
  }

  .card-content {
    padding: 0.8rem;
  }

  .card-title {
    font-size: 0.9rem;
    /* Smaller card title - reduced from 1rem */
    margin-bottom: 0.3rem;
  }

  .card-description {
    font-size: 0.75rem;
    /* Smaller description */
    -webkit-line-clamp: 2;
    /* Show less text */
    line-clamp: 2;
  }

  .card-category {
    font-size: 0.65rem;
    /* Smaller category badge */
  }

  .card-meta {
    margin-bottom: 0.5rem;
  }

  .controls-container {
    gap: 1rem;
  }

  #search-input {
    font-size: 0.95rem;
    /* Smaller search input */
    padding: 1rem 1.2rem 1rem 3rem;
  }
}


.total-badge {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--accent-primary);
  background: rgba(139, 92, 246, 0.1);
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  border: 1px solid rgba(139, 92, 246, 0.2);
  display: inline-block;
}

/* Footer */
.site-footer {
  margin-top: auto;
  padding: 3rem 2rem;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(15, 23, 42, 0.3);
}

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

input {
  /* Inputs should be selectable */
  user-select: text !important;
  -webkit-user-select: text !important;
}

/* Game Interface Styles (Preserving key mechanics but styling) */
.game-container {
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  border-radius: 20px;
  padding: 2rem;
  max-width: 800px;
  margin: 2rem auto;
  border: 1px solid var(--card-border);
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
}

.question-text {
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
  text-align: center;
  margin-bottom: 2rem;
}

.option-btn {
  width: 100%;
  padding: 1.2rem;
  margin-bottom: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--card-border);
  color: var(--text-primary);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 1.1rem;
  text-align: left;
}

.option-btn:hover {
  background: rgba(139, 92, 246, 0.2);
  border-color: var(--accent-primary);
  transform: translateX(5px);
}


/* --- Game Interface Styles (Migrated & Modernized) --- */

.screen {
  display: none;
  animation: fadeIn 0.5s ease;
  width: 100%;
}

.screen.active {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.screen.active h1 {
  color: #ffffff;
  font-size: 1.8rem;
  margin-bottom: 1rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  line-height: 1.3;
}

.screen.active p {
  color: #e2e8f0;
  font-size: 1.05rem;
  line-height: 1.6;
  margin-bottom: 2rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  font-weight: 400;
  max-width: 90%;
}

/* Intro Screen */
.intro-thumb {
  width: 100%;
  border-radius: 20px;
  margin-bottom: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  border: 1px solid var(--card-border);
}

/* Progress Bar */
.progress-bar-container {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  margin-bottom: 2rem;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
  width: 0%;
  transition: width 0.3s ease;
  box-shadow: 0 0 10px var(--accent-glow);
}

/* Question & Options */
.options-grid {
  display: grid;
  width: 100%;
}

.option-btn {
  width: 100%;
  padding: 1.2rem;
  background: rgba(30, 41, 59, 0.6);
  /* Clear dark background */
  border: 1px solid var(--card-border);
  color: white !important;
  /* Force white text */
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 1.1rem;
  text-align: left;
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
}

.option-btn:hover {
  background: rgba(139, 92, 246, 0.2);
  border-color: var(--accent-primary);
  transform: translateX(5px);
  box-shadow: 0 0 15px rgba(139, 92, 246, 0.15);
}

.option-btn span {
  margin-right: 10px;
}

.question-text {
  font-size: 1.6rem;
  font-weight: 700;
  color: white;
  text-align: center;
  margin-bottom: 2rem;
  line-height: 1.4;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* Result Screen */
.result-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  width: 100%;
  margin-bottom: 2rem;
}

.result-image {
  width: 100%;
  display: block;
  aspect-ratio: 16/9;
  /* Maintain aspect ratio */
  object-fit: cover;
}

.result-content {
  padding: 2rem;
  text-align: left;
}

.result-title {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 10px;
  color: white;
  background: linear-gradient(90deg, #fff, #e2e8f0);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.result-subtitle {
  font-size: 1.1rem;
  color: var(--accent-secondary);
  margin-bottom: 1rem;
  font-weight: 600;
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

#result-desc {
  color: var(--text-highlight);
  line-height: 1.7;
  margin-bottom: 20px;
  font-size: 1.05rem;
}

/* Action Buttons */
.btn-primary,
.btn-secondary {
  padding: 1rem 2rem;
  border-radius: 100px;
  font-weight: 600;
  font-size: 1.1rem;
  cursor: pointer;
  width: 100%;
  margin-bottom: 1rem;
  border: none;
  transition: all 0.2s;
  font-family: var(--font-family);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: white;
  box-shadow: 0 4px 15px var(--accent-glow);
}

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

.btn-primary:hover {
  box-shadow: 0 8px 25px var(--accent-glow);
  transform: translateY(-2px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 1px solid var(--card-border);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}


/* Game Interface Tags */
.tag-pill {
  background: rgba(255, 255, 255, 0.1);
  padding: 0.3rem 0.8rem;
  border-radius: 100px;
  font-size: 0.8rem;
  margin-right: 0.5rem;
  color: var(--text-secondary);
  border: 1px solid var(--card-border);
  display: inline-block;
  margin-bottom: 0.5rem;
}

.result-tag-pill {
  background: rgba(236, 72, 153, 0.15);
  /* Pink tint */
  color: #fce7f3;
  padding: 0.4rem 1rem;
  border-radius: 100px;
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid rgba(236, 72, 153, 0.3);
  display: inline-block;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
}

/* Image Modal */
.image-modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(8px);
  animation: fadeIn 0.3s;
}

.modal-content {
  margin: auto;
  display: block;
  width: auto;
  max-width: 90%;
  max-height: 90vh;
  position: relative;
  /* top: 50%; */
  transform: translateY(-50%);
  text-align: center;
}

/* Specific fix for Result Image Modal to center it vertically */
#image-modal .modal-content {
  top: 50%;
  transform: translateY(-50%) !important;
  margin: 0 auto;
}

.modal-content img {
  width: auto;
  max-width: 100%;
  max-height: 85vh;
  border-radius: 16px;
  box-shadow: 0 0 50px rgba(139, 92, 246, 0.3);
  object-fit: contain;
}

.close-modal {
  position: absolute;
  top: -40px;
  right: 0;
  color: #fff;
  font-size: 35px;
  font-weight: bold;
  cursor: pointer;
  z-index: 10001;
  transition: transform 0.2s;
  background: rgba(0, 0, 0, 0.5);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-modal:hover {
  transform: scale(1.1);
  color: var(--accent-primary);
  background: rgba(255, 255, 255, 0.1);
}