/**
 * @fileoverview 전역 CSS 변수(Design Tokens), 기본 레이아웃(#janggi-app), 토스트 알림 스타일.
 */

:root {
  /* Primary Colors */
  --color-primary: #3b82f6;
  --color-primary-dark: #2563eb;
  --color-primary-light: #60a5fa;
  
  /* Background */
  --color-bg-dark: #0f172a;
  --color-bg-panel: rgba(15, 23, 42, 0.78);
  --color-bg-input: rgba(255, 255, 255, 0.08);
  --color-bg-hover: rgba(255, 255, 255, 0.13);
  
  /* Text */
  --color-text-primary: #f8fafc;
  --color-text-secondary: #94a3b8;
  --color-text-muted: #64748b;
  
  /* Team Colors */
  --color-han-red: #ef4444;
  --color-han-red-dark: #dc2626;
  --color-cho-blue: #3b82f6;
  --color-cho-blue-dark: #2563eb;
  
  /* Borders */
  --color-border: rgba(255, 255, 255, 0.1);
  --color-border-light: rgba(255, 255, 255, 0.15);
  
  /* Accent */
  --color-accent-green: #22c55e;
  --color-accent-amber: #f59e0b;
  --color-accent-rose: #f43f5e;
  
  /* Spacing & Sizing */
  --panel-width: 450px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  
  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Shadows */
  --shadow-panel: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  --shadow-glow-blue: 0 0 12px 3px rgba(59, 130, 246, 0.5);
  --shadow-glow-green: 0 0 0 3px rgba(34, 197, 94, 0.5);
}

input,
button {
  font-size: 1.1em;
  text-align: center;
}

body {
  margin: 0; /* 판·서랍 폭 계산이 화면 폭(100vw)과 맞도록 */
  perspective: 1200px;
  overflow: hidden;
}

#janggi-app {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100vw;
  height: 100vh;
  box-sizing: border-box;
  overflow: hidden;
  position: relative;
  transition: padding-right 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 설정 패널·기보보기 패널이 열렸을 때의 판 폭은 settings.css·variation.css가 맡는다 */

/* 선형 아이콘 (WebApp Common GUI: 24px 격자, 선 1.75px, 둥근 끝, 면 없음). 버튼 안 20px, 글자 옆 14px */
.ico {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
  vertical-align: middle;
}

.ico.sm {
  width: 14px;
  height: 14px;
}

/* SPA 전역 헤더 카운터 및 :before 강제 번호 매기기 무력화 (샌드박싱) */
#janggi-app h1::before,
#janggi-app h2::before,
#janggi-app h3::before {
  content: none !important;
  display: none !important;
}
#janggi-app h1,
#janggi-app h2,
#janggi-app h3 {
  counter-increment: none !important;
  counter-reset: none !important;
}

/* Toast Notification */
.janggi-toast {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 8px;
  color: #f8fafc;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: bold;
  z-index: 99999;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
  pointer-events: none;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(8px);
}

.janggi-toast.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}
