/* ==========================================================================
   Retro Pixel Arcade Design System: DungGeunMo + LINE Seed + Tactile Pixel UI
   ========================================================================== */

/* 1. Legendary Open-Source Korean/English Pixel Font: 둥근모 (DungGeunMo) */
@font-face {
  font-family: 'DungGeunMo';
  src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_six@1.2/DungGeunMo.woff') format('woff');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* 2. Designer Open-Source Font: LINE Seed Sans KR (Multi-Language Harmony) */
@font-face {
  font-family: 'LINESeed';
  src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_11-01@1.0/LINESeedKR-Rg.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'LINESeed';
  src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_11-01@1.0/LINESeedKR-Bd.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --font-pixel: 'DungGeunMo', monospace;
  --font-body: 'LINESeed', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
  font-family: var(--font-body);
  word-break: keep-all; /* 단어 중간 줄바꿈 원천 차단 */
  background-color: #f5f3ef;
  color: #18181b;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.font-pixel {
  font-family: var(--font-pixel);
  letter-spacing: 0.5px;
}

/* Integer-sized SVG pixels keep small controls and navigation icons crisp. */
.pixel-icon {
  display: inline-flex !important;
  width: 16px !important;
  height: 16px !important;
  max-width: 16px !important;
  max-height: 16px !important;
  flex-shrink: 0 !important;
  line-height: 1 !important;
  vertical-align: middle !important;
}

.pixel-icon svg {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  shape-rendering: crispEdges !important;
}

.pixel-icon-nav {
  width: 20px !important;
  height: 20px !important;
  max-width: 20px !important;
  max-height: 20px !important;
}

.pixel-icon-nav svg {
  width: 20px !important;
  height: 20px !important;
  max-width: 20px !important;
  max-height: 20px !important;
}

.pixel-icon-large {
  display: flex !important;
  width: 48px !important;
  height: 48px !important;
  max-width: 48px !important;
  max-height: 48px !important;
}

/* 3. Chunky Pixel Borders & Solid Shadows */
.border-3 {
  border-width: 3px;
}

.shadow-pixel {
  box-shadow: 4px 4px 0px #18181b;
}

.shadow-pixel-sm {
  box-shadow: 2px 2px 0px #18181b;
}

.shadow-pixel-lg {
  box-shadow: 6px 6px 0px #18181b;
}

/* 4. Tactile Arcade Button (Satisfying mechanical press) */
.arcade-btn {
  transition: transform 0.06s ease, box-shadow 0.06s ease, background-color 0.1s ease;
}

.arcade-btn:active {
  transform: translate(3px, 3px);
  box-shadow: 1px 1px 0px #18181b !important;
}

.hand-card {
  transition: transform 0.1s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.1s ease;
}

.hand-card:hover {
  transform: translateY(-4px);
  box-shadow: 4px 8px 0px #18181b;
}

.hand-card:active {
  transform: translate(2px, 2px) scale(0.95);
  box-shadow: 2px 2px 0px #18181b;
}

/* 5. Keyframe Animations */
@keyframes pop-in {
  0% { transform: scale(0.6); opacity: 0; }
  70% { transform: scale(1.1); opacity: 1; }
  100% { transform: scale(1); }
}

@keyframes shake-anim {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

@keyframes score-float {
  0% { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(-24px); opacity: 0; }
}

@keyframes pulse-draw {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.animate-pop {
  animation: pop-in 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.animate-shake {
  animation: shake-anim 0.35s ease-in-out;
}

.animate-pulse-draw {
  animation: pulse-draw 0.6s infinite ease-in-out;
}

.score-popup {
  position: absolute;
  animation: score-float 0.8s ease-out forwards;
  pointer-events: none;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
  background: #18181b;
  border-radius: 2px;
}

/* 6. Retro Arcade Dropdown & Pixel Scrollbar */
#lang-dropdown-menu {
  transform-origin: top left;
}

.pixel-scroll::-webkit-scrollbar {
  width: 8px;
}
.pixel-scroll::-webkit-scrollbar-track {
  background: #fef08a;
  border-left: 2px solid #18181b;
}
.pixel-scroll::-webkit-scrollbar-thumb {
  background: #18181b;
  border-radius: 0px;
}
.pixel-scroll::-webkit-scrollbar-thumb:hover {
  background: #3f3f46;
}

.lang-option {
  user-select: none;
  border-bottom: 1px dashed #e4e4e7;
}

.lang-option:last-child {
  border-bottom: none;
}

.lang-option.is-active {
  background-color: #fef08a;
  font-weight: bold;
  border-left: 4px solid #18181b;
}

