/* ===========================
   English Adventure — components.css
   공통 UI 컴포넌트
   =========================== */

/* 버튼 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--gap-sm);
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius-full);
  font-size: var(--font-size);
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.1s;
  user-select: none;
}

.btn:active { transform: scale(0.96); }

.btn-primary {
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 4px 0 #2e6db4;
}
.btn-primary:active { box-shadow: 0 2px 0 #2e6db4; transform: translateY(2px); }

.btn-secondary {
  background: var(--color-secondary);
  color: #fff;
  box-shadow: 0 4px 0 #c07d10;
}

.btn-success {
  background: var(--color-success);
  color: #fff;
  box-shadow: 0 4px 0 #357a38;
}

.btn-ghost {
  background: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}

.btn-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  padding: 0;
  font-size: 22px;
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
  border: none;
}

/* 카드 */
.card {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: var(--gap-lg);
  box-shadow: var(--shadow-sm);
}

.card-word {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--gap-md);
  padding: var(--gap-xl);
  cursor: pointer;
  transition: transform 0.2s;
}
.card-word:hover { transform: translateY(-4px); }

.card-word img {
  width: 120px;
  height: 120px;
  object-fit: contain;
}

.card-word .word-en {
  font-size: var(--font-size-xl);
  font-weight: 900;
  color: var(--color-primary);
}

.card-word .word-ko {
  font-size: var(--font-size-sm);
  color: var(--color-text-light);
}

/* 진행 바 */
.progress-bar {
  width: 100%;
  height: 12px;
  background: #e0e0e0;
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
}

/* 배지 */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
  font-weight: 700;
  background: var(--color-primary);
  color: #fff;
}

.badge-xp      { background: #9B59B6; }
.badge-streak  { background: var(--color-accent); }
.badge-level   { background: var(--color-secondary); color: #333; }

/* 내비게이션 바 (하단) */
.nav-bar {
  position: fixed;
  bottom: 0;
  left: 0; right: 0;
  height: 64px;
  background: var(--color-surface);
  display: flex;
  align-items: center;
  justify-content: space-around;
  box-shadow: 0 -2px 12px rgba(0,0,0,0.08);
  z-index: 100;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 11px;
  color: var(--color-text-light);
  cursor: pointer;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  transition: color 0.2s;
  text-decoration: none;
}

.nav-item .icon { font-size: 24px; }
.nav-item.active { color: var(--color-primary); }

/* 모달 오버레이 */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: var(--gap-md);
}

.modal {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--gap-xl);
  max-width: 420px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-md);
}

/* 헤더 */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--gap-md) var(--gap-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 50;
}

.page-header h2 { font-size: var(--font-size-lg); }
