@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable-dynamic-subset.min.css');
@font-face {
  font-family: 'GmarketSans';
  src: url('https://fastly.jsdelivr.net/gh/projectnoonnu/noonfonts_2001@1.1/GmarketSansBold.woff') format('woff');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Background — paper tone + grid */
  --bg-base: #FFF8E7;
  --bg-grid: #1A1A1A;

  /* Core colors — 5 high-saturation single colors */
  --c-yolk:    #FFD93D;
  --c-tomato:  #FF5E5B;
  --c-mint:    #00C2A8;
  --c-sky:     #4E9CFF;
  --c-grape:   #B47AFF;

  /* Ink & paper */
  --ink:       #1A1A1A;
  --ink-soft:  #4A4A4A;
  --paper:     #FFFFFF;

  /* Borders — chunky */
  --border-w:    3px;
  --border-w-lg: 4px;

  /* Hard shadows */
  --shadow-sm: 4px 4px 0 0 var(--ink);
  --shadow-md: 6px 6px 0 0 var(--ink);
  --shadow-lg: 8px 8px 0 0 var(--ink);

  /* Tight rounds */
  --r-sm: 4px;
  --r-md: 6px;
  --r-lg: 8px;

  /* ==== Backwards-compatible aliases (older selectors still rely on these) ==== */
  --card-bg: var(--paper);
  --text-primary: var(--ink);
  --text-secondary: var(--ink-soft);
  --text-light: #777777;
  --shadow: var(--shadow-sm);
  --shadow-hover: var(--shadow-md);
  --radius: var(--r-md);
  --radius-sm: var(--r-sm);
  --cat-psychology: var(--c-grape);
  --cat-psychology-bg: #F1E6FF;
  --cat-quiz: var(--c-sky);
  --cat-quiz-bg: #DCEAFE;
  --cat-fun: var(--c-tomato);
  --cat-fun-bg: #FFE2E2;
  --cat-ability: var(--c-mint);
  --cat-ability-bg: #D2F5EE;
  --accent: var(--ink);
  --accent-hover: #000000;
  --bg-gradient-1: var(--bg-base);
  --bg-gradient-2: var(--bg-base);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Pretendard Variable', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-base);
  background-image:
    linear-gradient(rgba(26, 26, 26, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(26, 26, 26, 0.06) 1px, transparent 1px);
  background-size: 40px 40px;
  color: var(--ink);
  min-height: 100vh;
  line-height: 1.6;
}

/* Header — neobrutalist solid + thick bottom border */
.header {
  background: var(--c-yolk);
  border-bottom: var(--border-w-lg) solid var(--ink);
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--ink);
}

.logo-icon {
  font-size: 28px;
  display: inline-block;
  transform: rotate(-8deg);
}

.logo-text {
  font-size: 24px;
  font-weight: 900;
  color: var(--ink);
  letter-spacing: -0.5px;
}

.nav-links {
  display: flex;
  gap: 20px;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  padding: 4px 8px;
  transition: background 0.15s;
}

.nav-links a:hover {
  background: var(--ink);
  color: var(--c-yolk);
}

/* Hamburger Button */
.hamburger {
  display: none;
  background: var(--paper);
  border: var(--border-w) solid var(--ink);
  border-radius: var(--r-sm);
  font-size: 22px;
  cursor: pointer;
  padding: 4px 10px;
  color: var(--ink);
  line-height: 1;
  font-weight: 900;
  box-shadow: 2px 2px 0 0 var(--ink);
}

/* Hero — left aligned magazine style */
.hero {
  text-align: left;
  padding: 60px 20px 40px;
  max-width: 1200px;
  margin: 0 auto;
}

.hero h1 {
  font-family: 'GmarketSans', 'Pretendard Variable', sans-serif;
  font-size: clamp(36px, 7vw, 72px);
  font-weight: 700;
  margin-bottom: 16px;
  line-height: 1.1;
  color: var(--ink);
  letter-spacing: -1px;
}

.hero h1 .hl {
  background-image: linear-gradient(var(--c-yolk), var(--c-yolk));
  background-repeat: no-repeat;
  background-size: 100% 0.28em;
  background-position: 0 100%;
  padding: 0 4px 0.05em;
}

.hero p {
  font-size: 18px;
  color: var(--ink);
  font-weight: 600;
  max-width: 600px;
}

/* Category Filter */
.category-filter {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 0 20px 30px;
  flex-wrap: wrap;
  max-width: 800px;
  margin: 0 auto;
}

.filter-btn {
  padding: 10px 20px;
  border: var(--border-w) solid var(--ink);
  border-radius: var(--r-md);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.1s;
  font-family: inherit;
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.filter-btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-md);
}

.filter-btn.active {
  color: var(--paper);
  background: var(--ink);
}

.filter-btn[data-category="psychology"].active { background: var(--c-sky); color: var(--paper); }
.filter-btn[data-category="fun"].active { background: var(--c-tomato); color: var(--paper); }

/* Quiz Grid */
.quiz-grid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px 60px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 20px;
}

/* Quiz Card — neobrutalist */
.quiz-card {
  background: var(--paper);
  border: var(--border-w) solid var(--ink);
  border-radius: var(--r-md);
  padding: 28px 24px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  text-decoration: none;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  position: relative;
}

.quiz-card[data-category="psychology"] { background: #F1E6FF; }
.quiz-card[data-category="quiz"] { background: #DCEAFE; }
.quiz-card[data-category="fun"] { background: #FFE2E2; }
.quiz-card[data-category="ability"] { background: #D2F5EE; }

.quiz-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-md);
}
.quiz-card:active {
  transform: translate(2px, 2px);
  box-shadow: 0 0 0 0 var(--ink);
}

.quiz-card-emoji {
  font-size: 42px;
  margin-bottom: 14px;
  display: inline-block;
  transform: rotate(-4deg);
}

.quiz-card-title {
  font-size: 19px;
  font-weight: 900;
  margin-bottom: 8px;
  color: var(--ink);
  letter-spacing: -0.3px;
}

.quiz-card-desc {
  font-size: 13px;
  color: var(--ink-soft);
  margin-bottom: 16px;
  flex-grow: 1;
  font-weight: 500;
}

.quiz-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.quiz-card-tag {
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border: 2px solid var(--ink);
  border-radius: var(--r-sm);
  background: var(--paper);
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.quiz-card-count {
  font-size: 12px;
  color: var(--text-light);
}

/* Quiz Page */
.quiz-container {
  max-width: 680px;
  margin: 0 auto;
  padding: 30px 20px 60px;
}

.quiz-header {
  text-align: center;
  margin-bottom: 30px;
}

.quiz-header-emoji {
  font-size: 56px;
  margin-bottom: 12px;
}

.quiz-header h1 {
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 8px;
}

.quiz-header p {
  color: var(--text-secondary);
  font-size: 14px;
}

/* Start Screen — neobrutalist */
.quiz-start {
  background: var(--paper);
  border: var(--border-w) solid var(--ink);
  border-radius: var(--r-md);
  padding: 40px 30px;
  text-align: center;
  box-shadow: var(--shadow-md);
}

.quiz-start-info {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin: 20px 0 30px;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 700;
}

.quiz-start-info span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-start {
  padding: 14px 36px;
  border: var(--border-w) solid var(--ink);
  border-radius: var(--r-md);
  font-size: 17px;
  font-weight: 900;
  color: var(--ink);
  background: var(--c-yolk);
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
  font-family: inherit;
  box-shadow: var(--shadow-sm);
  letter-spacing: -0.3px;
}

.btn-start:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-md);
}
.btn-start:active {
  transform: translate(2px, 2px);
  box-shadow: 0 0 0 0 var(--ink);
}

/* Progress Bar — chunky */
.progress-wrap {
  margin-bottom: 24px;
}

.progress-text {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--ink);
  margin-bottom: 8px;
  font-weight: 700;
}

.progress-bar {
  height: 14px;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: var(--r-sm);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--c-yolk);
  transition: width 0.4s ease;
}

/* Question Card — neobrutalist */
.question-card {
  background: var(--paper);
  border: var(--border-w) solid var(--ink);
  border-radius: var(--r-md);
  padding: 36px 30px;
  box-shadow: var(--shadow-sm);
}

.question-number {
  font-size: 12px;
  color: var(--ink);
  font-weight: 900;
  margin-bottom: 10px;
  background: var(--c-yolk);
  display: inline-block;
  padding: 3px 10px;
  border: 2px solid var(--ink);
  border-radius: var(--r-sm);
  letter-spacing: 0.5px;
}

.question-text {
  font-size: 21px;
  font-weight: 900;
  margin-bottom: 28px;
  line-height: 1.5;
  color: var(--ink);
  letter-spacing: -0.3px;
}

.options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.option-btn {
  padding: 16px 20px;
  border: var(--border-w) solid var(--ink);
  border-radius: var(--r-md);
  background: var(--paper);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.1s, background 0.1s;
  text-align: left;
  font-family: inherit;
  line-height: 1.4;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.option-btn:hover {
  background: var(--c-yolk);
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-md);
}

.option-btn.selected {
  background: var(--c-yolk);
  color: var(--ink);
  font-weight: 900;
}

.option-btn.correct {
  background: var(--c-mint);
  color: var(--ink);
}

.option-btn.wrong {
  background: var(--c-tomato);
  color: var(--ink);
}

/* Result — neobrutalist */
.result-card {
  background: var(--paper);
  border: var(--border-w-lg) solid var(--ink);
  border-radius: var(--r-md);
  padding: 40px 30px;
  text-align: center;
  box-shadow: var(--shadow-lg);
  animation: fadeIn 0.4s ease;
}

.result-emoji {
  font-size: 64px;
  margin-bottom: 16px;
  display: inline-block;
  transform: rotate(-6deg);
}

.result-title {
  font-family: 'GmarketSans', 'Pretendard Variable', sans-serif;
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--ink);
  letter-spacing: -0.5px;
  display: inline;
  background: linear-gradient(180deg, transparent 55%, var(--c-yolk) 55%);
  padding: 0 6px;
}

.result-subtitle {
  font-size: 16px;
  color: var(--ink-soft);
  margin-bottom: 24px;
  margin-top: 12px;
  font-weight: 700;
}

.result-desc {
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink);
  margin-bottom: 30px;
  text-align: left;
  background: var(--bg-base);
  border-left: 4px solid var(--c-sky);
  padding: 20px 20px 20px 24px;
  border-radius: 0 var(--r-md) var(--r-md) 0;
  font-weight: 600;
  position: relative;
}

.result-desc::before {
  content: '\275D';
  position: absolute;
  top: -16px;
  left: 6px;
  font-size: 40px;
  color: var(--c-sky);
  opacity: 0.3;
  line-height: 1;
}

.result-score {
  font-size: 56px;
  font-weight: 900;
  color: var(--ink);
  margin-bottom: 8px;
  letter-spacing: -1px;
  background: var(--c-yolk);
  display: inline-block;
  padding: 8px 24px;
  border: 3px solid var(--ink);
  border-radius: var(--r-md);
}

.result-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-save-image,
.btn-retry,
.btn-home {
  padding: 12px 22px;
  border: var(--border-w) solid var(--ink);
  border-radius: var(--r-md);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.1s;
  font-family: inherit;
  text-decoration: none;
  display: inline-block;
  box-shadow: var(--shadow-sm);
  color: var(--ink);
}

.btn-save-image { background: var(--c-mint); }
.btn-retry { background: var(--c-sky); }
.btn-home { background: var(--paper); }

.btn-save-image:hover,
.btn-retry:hover,
.btn-home:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-md);
}

.btn-save-image:active,
.btn-retry:active,
.btn-home:active {
  transform: translate(2px, 2px);
  box-shadow: 0 0 0 0 var(--ink);
}

/* Realtime test styles */
.realtime-area {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 40px 30px;
  text-align: center;
  box-shadow: var(--shadow);
  min-height: 350px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  user-select: none;
}

.realtime-area .big-text {
  font-size: 60px;
  font-weight: 800;
}

.realtime-area .instruction {
  font-size: 18px;
  color: var(--text-secondary);
  margin-top: 16px;
}

.realtime-area.waiting {
  background: #fef3c7;
  cursor: pointer;
}

.realtime-area.ready {
  background: #fee2e2;
  cursor: pointer;
}

.realtime-area.go {
  background: var(--cat-ability-bg);
  cursor: pointer;
}

.realtime-area.done {
  background: var(--card-bg);
}

.memory-grid {
  display: grid;
  gap: 10px;
  margin: 20px auto;
}

.memory-cell {
  width: 70px;
  height: 70px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  cursor: pointer;
  background: var(--accent);
  transition: all 0.3s;
}

.memory-cell.revealed {
  background: #fff;
  border: 2px solid #e5e7eb;
}

.memory-cell.matched {
  background: var(--cat-ability-bg);
  border: 2px solid var(--cat-ability);
}

.typing-input {
  width: 100%;
  padding: 16px 20px;
  border: 2px solid #e5e7eb;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}

.typing-input:focus {
  border-color: var(--accent);
}

.typing-display {
  font-size: 20px;
  line-height: 2;
  text-align: left;
  background: #f9fafb;
  padding: 20px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  letter-spacing: 1px;
}

.typing-display .correct-char { color: var(--cat-ability); }
.typing-display .wrong-char { color: #ef4444; background: #fef2f2; }
.typing-display .pending-char { color: var(--text-light); }

.color-grid {
  display: grid;
  gap: 8px;
  margin: 20px auto;
}

.color-cell {
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: transform 0.2s;
  aspect-ratio: 1;
}

.color-cell:hover {
  transform: scale(1.05);
}

/* Footer — neobrutalist dark */
.footer {
  background: var(--ink);
  padding: 40px 20px;
  text-align: center;
  border-top: var(--border-w-lg) solid var(--ink);
  margin-top: 60px;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 12px;
}

.footer-links a {
  color: var(--paper);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}

.footer-links a:hover {
  color: var(--c-yolk);
}

.footer-copy {
  font-size: 12px;
  color: #777;
  font-weight: 500;
}

/* Static pages */
.page-container {
  max-width: 780px;
  margin: 0 auto;
  padding: 40px 20px 60px;
}

.page-card {
  background: var(--paper);
  border: var(--border-w) solid var(--ink);
  border-radius: var(--r-md);
  padding: 40px 36px;
  box-shadow: var(--shadow-md);
}

.page-card h1 {
  font-size: 32px;
  font-weight: 900;
  margin-bottom: 24px;
  color: var(--ink);
  letter-spacing: -0.5px;
}

.page-card h2 {
  font-size: 20px;
  font-weight: 700;
  margin: 24px 0 12px;
}

.page-card p {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.page-card ul {
  padding-left: 20px;
  margin-bottom: 12px;
}

.page-card li {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-secondary);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 20px;
}

.contact-form input,
.contact-form textarea {
  padding: 14px 18px;
  border: var(--border-w) solid var(--ink);
  border-radius: var(--r-md);
  font-size: 15px;
  font-family: inherit;
  outline: none;
  background: var(--paper);
  font-weight: 600;
}

.contact-form input:focus,
.contact-form textarea:focus {
  background: var(--c-yolk);
}

.contact-form textarea {
  min-height: 150px;
  resize: vertical;
}

.btn-submit {
  padding: 14px 28px;
  border: var(--border-w) solid var(--ink);
  border-radius: var(--r-md);
  font-size: 15px;
  font-weight: 900;
  color: var(--ink);
  background: var(--c-yolk);
  cursor: pointer;
  font-family: inherit;
  align-self: flex-start;
  transition: transform 0.1s, box-shadow 0.1s;
  box-shadow: var(--shadow-sm);
}

.btn-submit:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-md);
}

/* Toast — neobrutalist */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(120px);
  background: var(--ink);
  color: var(--c-yolk);
  padding: 14px 28px;
  border: var(--border-w) solid var(--ink);
  border-radius: var(--r-md);
  font-size: 14px;
  font-weight: 800;
  z-index: 1000;
  transition: transform 0.3s ease;
  box-shadow: var(--shadow-md);
}

.toast.show {
  transform: translateX(-50%) translateY(0);
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes bounceIn {
  0% { opacity: 0; transform: scale(0.3); }
  50% { opacity: 1; transform: scale(1.08); }
  70% { transform: scale(0.95); }
  100% { transform: scale(1); }
}

@keyframes popIn {
  0% { transform: scale(0); }
  70% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes confetti {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(-80px) rotate(360deg); opacity: 0; }
}

@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes ripple {
  to { transform: scale(4); opacity: 0; }
}

/* Card stagger animation */
.quiz-card {
  animation: slideUp 0.4s ease backwards;
}

.quiz-card:nth-child(1) { animation-delay: 0.02s; }
.quiz-card:nth-child(2) { animation-delay: 0.04s; }
.quiz-card:nth-child(3) { animation-delay: 0.06s; }
.quiz-card:nth-child(4) { animation-delay: 0.08s; }
.quiz-card:nth-child(5) { animation-delay: 0.10s; }
.quiz-card:nth-child(6) { animation-delay: 0.12s; }
.quiz-card:nth-child(7) { animation-delay: 0.14s; }
.quiz-card:nth-child(8) { animation-delay: 0.16s; }
.quiz-card:nth-child(9) { animation-delay: 0.18s; }
.quiz-card:nth-child(10) { animation-delay: 0.20s; }
.quiz-card:nth-child(n+11) { animation-delay: 0.22s; }

/* Card click ripple */
.quiz-card {
  position: relative;
  overflow: hidden;
}

.quiz-card:active {
  transform: translateY(-2px) scale(0.98);
}

.quiz-card:active::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  background: rgba(124, 58, 237, 0.15);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: ripple 0.6s ease-out;
}

/* Emoji bounce on card hover */
.quiz-card:hover .quiz-card-emoji {
  animation: float 1s ease infinite;
}

/* Option button effects */
.option-btn {
  position: relative;
  overflow: hidden;
}

.option-btn:active {
  transform: scale(0.97);
}

.option-btn.selected {
  animation: popIn 0.3s ease;
}

.option-btn.correct {
  animation: popIn 0.3s ease;
}

.option-btn.wrong {
  animation: shake 0.4s ease;
}

/* Start button pulse */
.btn-start {
  animation: pulse 2s ease infinite;
}

.btn-start:active {
  transform: scale(0.95);
  animation: none;
}

/* Filter button click */
.filter-btn:active {
  transform: scale(0.95);
}

/* Result page animations */
.result-card {
  animation: slideUp 0.5s ease;
}

.result-emoji {
  animation: bounceIn 0.6s ease 0.1s backwards;
}

.result-score {
  animation: scaleIn 0.5s ease 0.3s backwards;
}

.result-title {
  animation: fadeIn 0.5s ease 0.4s backwards;
}

.result-desc {
  animation: fadeIn 0.5s ease 0.5s backwards;
}

.result-actions {
  animation: fadeIn 0.5s ease 0.6s backwards;
}

.btn-retry:active,
.btn-home:active {
  transform: scale(0.95);
}

/* Kakao AdFit slot (responsive) */
.ad-slot {
  margin: 32px auto;
  display: flex;
  justify-content: center;
  min-height: 90px;
}
.ad-slot-pc { display: block; }
.ad-slot-mo { display: none; }
@media (max-width: 768px) {
  .ad-slot { min-height: 100px; }
  .ad-slot-pc { display: none; }
  .ad-slot-mo { display: block; }
}

/* Progress bar glow */
.progress-fill {
  position: relative;
  background: linear-gradient(90deg, var(--accent), var(--cat-fun));
  box-shadow: 0 0 8px rgba(124, 58, 237, 0.3);
}

/* Question card slide */
.question-card {
  animation: slideInLeft 0.35s ease;
}

/* Realtime area transitions */
.realtime-area {
  transition: background-color 0.3s ease;
}

.realtime-area.go {
  animation: pulse 0.3s ease;
}

/* Color cell hover pop */
.color-cell {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.color-cell:hover {
  transform: scale(1.08);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.color-cell:active {
  transform: scale(0.95);
}

/* Quiz header emoji float */
.quiz-header-emoji {
  animation: float 3s ease infinite;
}

/* Hero text shimmer */
.hero h1 {
  background: linear-gradient(90deg, var(--text-primary) 40%, var(--accent) 50%, var(--text-primary) 60%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 4s linear infinite;
}

/* Toast slide up */
.toast {
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Confetti particles on result */
.confetti-particle {
  position: fixed;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  pointer-events: none;
  z-index: 999;
  animation: confetti 1.5s ease forwards;
}

/* Submit button */
.btn-submit:active {
  transform: scale(0.95);
}

/* Hero Progress */
.hero-progress { margin-top: 20px; max-width: 300px; margin-left: auto; margin-right: auto; }
.hero-progress-text { font-size: 14px; color: var(--text-secondary); margin-bottom: 8px; }
.hero-progress-text strong { color: var(--accent); }
.hero-progress-bar { height: 6px; background: rgba(0,0,0,0.08); border-radius: 50px; overflow: hidden; }
.hero-progress-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--cat-fun)); border-radius: 50px; transition: width 0.6s ease; }

/* Speed Test Cells */
.speed-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  border-radius: 10px;
}

.speed-correct {
  background: var(--accent);
  color: #fff;
}

.speed-wrong {
  background: #e5e7eb;
  color: #666;
}

/* Skeleton Loading */
.skeleton {
  background: linear-gradient(90deg, #e5e7eb 25%, #f3f4f6 50%, #e5e7eb 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}

.skeleton-emoji {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  margin: 0 auto 12px;
}

.skeleton-title {
  width: 200px;
  height: 26px;
  margin: 0 auto 8px;
}

.skeleton-text {
  width: 280px;
  height: 14px;
  margin: 0 auto;
}

.skeleton-btn {
  width: 160px;
  height: 48px;
  border-radius: 50px;
  margin: 30px auto 0;
}

/* Recommend Section */
.recommend-section {
  margin-top: 30px;
  text-align: center;
}

.recommend-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.recommend-cards {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.recommend-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 20px;
  background: var(--card-bg);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.2s;
  min-width: 120px;
}

.recommend-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.recommend-emoji { font-size: 32px; }
.recommend-name { font-size: 13px; font-weight: 600; }

/* Explanation Box */
.explanation {
  margin-top: 12px;
  padding: 12px 16px;
  background: #fffbeb;
  border-left: 3px solid #eab308;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  animation: fadeIn 0.3s ease;
}

/* Combo Badge */
.combo-badge {
  display: inline-block;
  padding: 4px 12px;
  background: linear-gradient(135deg, #ef4444, #f97316);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  border-radius: 50px;
  margin-bottom: 12px;
  animation: bounceIn 0.4s ease;
}

/* Quiz Card Completed */
.quiz-card.completed {
  position: relative;
}

.quiz-card.completed::after {
  content: '\2713';
  position: absolute;
  top: 12px;
  right: 12px;
  width: 24px;
  height: 24px;
  background: var(--cat-ability);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
}

/* Hub Grid */
.hub-grid {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px 40px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.hub-card {
  background: var(--paper);
  border: var(--border-w-lg) solid var(--ink);
  border-radius: var(--r-md);
  padding: 32px 24px;
  box-shadow: var(--shadow-md);
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  position: relative;
  text-align: left;
  display: flex;
  flex-direction: column;
}

/* Fixed color mapping per page */
.hc-yolk { background: var(--c-yolk) !important; }
.hc-tomato { background: var(--c-tomato) !important; }
.hc-mint { background: var(--c-mint) !important; }
.hc-sky { background: var(--c-sky) !important; }
.hc-grape { background: var(--c-grape) !important; }

/* Card numbering */
.hub-card-num {
  font-family: 'D2Coding', 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 900;
  color: var(--ink);
  opacity: 0.4;
  display: block;
  margin-bottom: 8px;
  letter-spacing: 1px;
}

/* Asymmetric magazine grid */
.hub-grid {
  grid-template-columns: 2fr 1fr 1fr;
}
.hub-wide {
  grid-column: span 2;
}

.hub-card:hover {
  transform: translate(-3px, -3px);
  box-shadow: var(--shadow-lg);
}
.hub-card:active {
  transform: translate(3px, 3px);
  box-shadow: 0 0 0 0 var(--ink);
}

.hub-card-emoji {
  font-size: 48px;
  margin-bottom: 14px;
  display: inline-block;
  transform: rotate(-6deg);
}

.hub-card-title {
  font-size: 22px;
  font-weight: 900;
  margin-bottom: 10px;
  color: var(--ink);
  letter-spacing: -0.5px;
}

.hub-card-desc {
  font-size: 14px;
  color: var(--ink);
  line-height: 1.5;
  font-weight: 600;
  flex-grow: 1;
}

.hub-card-badge {
  display: inline-block;
  margin-top: 16px;
  padding: 4px 12px;
  background: var(--paper);
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
  border: 2px solid var(--ink);
  border-radius: var(--r-sm);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  align-self: flex-start;
}

/* Disable old gradient bars (replaced by solid bg cycling) */
.hub-card::before { display: none; }

/* "더 놀거리" Section */
.hub-more {
  max-width: 900px;
  margin: 0 auto;
  padding: 10px 20px 40px;
}

.hub-more h2 {
  font-family: 'GmarketSans', 'Pretendard Variable', sans-serif;
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--ink);
  text-align: left;
}

.hl-mint {
  background: linear-gradient(180deg, transparent 55%, var(--c-mint) 55%);
  padding: 0 4px;
}

.hub-more-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.hub-more-card {
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: var(--r-md);
  padding: 20px 16px;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.15s, box-shadow 0.15s;
  display: block;
}

.hub-more-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-md);
}
.hub-more-card:active {
  transform: translate(2px, 2px);
  box-shadow: 0 0 0 0 var(--ink);
}

.hub-more-title {
  font-size: 15px;
  font-weight: 900;
  margin-bottom: 4px;
  color: var(--ink);
}

.hub-more-desc {
  font-size: 12px;
  color: var(--ink-soft);
  font-weight: 600;
}

/* Category sub-section inside hub-more */
.hub-cat {
  margin-bottom: 24px;
}
.hub-cat-title {
  font-family: 'GmarketSans', 'Pretendard Variable', sans-serif;
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.hub-cat-title .hct-emoji {
  font-size: 20px;
}

/* Hub Popular Section */
.hub-popular {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px 60px;
}

.hub-popular h2 {
  font-family: 'GmarketSans', 'Pretendard Variable', sans-serif;
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 20px;
  text-align: left;
  color: var(--ink);
}

.hub-popular-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
}

.hub-popular-cards .quiz-card {
  padding: 20px 16px;
}

.hub-popular-cards .quiz-card-emoji {
  font-size: 32px;
  margin-bottom: 10px;
}

.hub-popular-cards .quiz-card-title {
  font-size: 14px;
}

.hub-popular-cards .quiz-card-desc {
  font-size: 12px;
}

/* Hidden */
.hidden {
  display: none !important;
}

/* ============ Y2K Kitsch Details ============ */
/* Sticker on first hub card */
.hub-grid > .hub-card:first-child::after {
  content: 'NEW';
  position: absolute;
  top: -14px;
  right: -14px;
  background: var(--c-tomato);
  color: var(--paper);
  font-size: 12px;
  font-weight: 900;
  padding: 8px 14px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  transform: rotate(12deg);
  box-shadow: 2px 2px 0 0 var(--ink);
  letter-spacing: 0.5px;
  z-index: 2;
}

/* Hot sticker on third card */
.hub-grid > .hub-card:nth-child(3)::after {
  content: 'HOT';
  position: absolute;
  top: -12px;
  right: -12px;
  background: var(--c-yolk);
  color: var(--ink);
  font-size: 11px;
  font-weight: 900;
  padding: 6px 12px;
  border: 2px solid var(--ink);
  border-radius: var(--r-sm);
  transform: rotate(-8deg);
  box-shadow: 2px 2px 0 0 var(--ink);
  z-index: 2;
}

/* Responsive */
@media (max-width: 768px) {
  .hero h1 { font-size: clamp(32px, 9vw, 44px); }
  .hero p { font-size: 15px; }
  .hero { padding: 36px 20px 24px; }
  .quiz-grid { grid-template-columns: 1fr; }
  .hub-grid { grid-template-columns: 1fr; }
  .hub-wide { grid-column: span 1; }
  .hub-more-grid { grid-template-columns: repeat(2, 1fr); }
  .filter-btn { padding: 8px 14px; font-size: 13px; }
  .hamburger { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--c-yolk);
    flex-direction: column;
    padding: 12px 20px 16px;
    border-top: var(--border-w) solid var(--ink);
    border-bottom: var(--border-w) solid var(--ink);
    gap: 0;
  }
  .nav-links.open {
    display: flex;
  }
  .nav-links li {
    list-style: none;
  }
  .nav-links a {
    display: block;
    padding: 12px 0;
    font-size: 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  }
  .nav-links li:last-child a {
    border-bottom: none;
  }
  .question-text { font-size: 17px; }
  .quiz-header h1 { font-size: 22px; }
  .result-title { font-size: 22px; }
  .result-score { font-size: 36px; }
  .page-card { padding: 28px 20px; }
  .memory-cell { width: 55px; height: 55px; font-size: 22px; }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .quiz-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Dark Mode — disabled for neobrutalist redesign (light only) */
@media (prefers-color-scheme: dark) and (max-width: 0px) {
  :root {
    --bg-gradient-1: #1a1025;
    --bg-gradient-2: #0d1b2a;
    --card-bg: #1e1e2e;
    --text-primary: #e0e0e0;
    --text-secondary: #a0a0a0;
    --text-light: #666666;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 8px 25px rgba(0, 0, 0, 0.5);
  }

  .header { background: rgba(30, 30, 46, 0.9); border-bottom-color: rgba(255,255,255,0.06); }
  .footer { background: rgba(30, 30, 46, 0.6); border-top-color: rgba(255,255,255,0.06); }
  .option-btn { background: #2a2a3e; border-color: #3a3a4e; color: #e0e0e0; }
  .option-btn:hover { background: #332e4a; border-color: var(--accent); }
  .filter-btn { background: rgba(30, 30, 46, 0.7); }
  .result-desc { background: #2a2a3e; }
  .typing-input { background: #2a2a3e; border-color: #3a3a4e; color: #e0e0e0; }
  .typing-display { background: #2a2a3e; }
  .page-card { background: var(--card-bg); }
  .contact-form input, .contact-form textarea { background: #2a2a3e; border-color: #3a3a4e; color: #e0e0e0; }
  .quiz-card::after { background: rgba(124, 58, 237, 0.1); }

  /* Dark mode - skeleton loading */
  .skeleton {
    background: linear-gradient(90deg, #2a2a3e 25%, #3a3a4e 50%, #2a2a3e 75%);
    background-size: 200% 100%;
  }

  /* Dark mode - explanation box */
  .explanation {
    background: #2a2a1e;
    border-left-color: #b8960a;
    color: #c0c0c0;
  }

  /* Dark mode - mobile nav dropdown */
  .nav-links {
    background: rgba(30, 30, 46, 0.97);
  }

  /* Dark mode - progress bar background */
  .progress-bar {
    background: #3a3a4e;
  }

  /* Dark mode - button overrides */
  .btn-retry { background: #2a2a3e; border-color: var(--accent); }
  .btn-home { background: #2a2a3e; border-color: #3a3a4e; color: var(--text-secondary); }
  .btn-save-image { background: #2a2a3e; }

  /* Dark mode - memory cell */
  .memory-cell.revealed { background: #2a2a3e; border-color: #3a3a4e; }

  /* Dark mode - speed test cells */
  .speed-wrong { background: #3a3a4e; color: #a0a0a0; }
}
