/* ==========================================================================
   STB Style Guide Design System - Dark/Light Theme & Glassmorphism
   규칙: 성능을 위해 CSS 파일 내 @import 사용 금지 (HTML link 태그 활용)
   ========================================================================== */

:root, [data-theme="dark"] {
  --font-title: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;

  /* Dark Theme (Default) */
  --bg-app: #090d16;
  --bg-card: rgba(17, 24, 39, 0.75);
  --bg-card-hover: rgba(26, 35, 54, 0.85);
  --bg-input: rgba(15, 23, 42, 0.8);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(99, 102, 241, 0.5);

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --text-inverse: #090d16;

  --primary: #6366f1;
  --primary-hover: #818cf8;
  --primary-glow: rgba(99, 102, 241, 0.25);
  --accent: #0ea5e9;

  /* 등락 컬러 (한국 주식/금융 기준: 상승 레드, 하락 블루) */
  --rising: #f43f5e;
  --rising-bg: rgba(244, 63, 94, 0.12);
  --rising-border: rgba(244, 63, 94, 0.3);
  
  --falling: #38bdf8;
  --falling-bg: rgba(56, 189, 248, 0.12);
  --falling-border: rgba(56, 189, 248, 0.3);

  --steady: #94a3b8;
  --steady-bg: rgba(148, 163, 184, 0.1);

  --shadow-sm: 0 2px 8px -1px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 16px -6px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 20px 40px -10px rgba(0, 0, 0, 0.5);

  --table-header-bg: rgba(15, 23, 42, 0.95);
  --table-row-hover: rgba(255, 255, 255, 0.03);
  --glass-blur: blur(14px);
}

[data-theme="light"] {
  --bg-app: #f4f6fa;
  --bg-card: rgba(255, 255, 255, 0.88);
  --bg-card-hover: rgba(255, 255, 255, 0.98);
  --bg-input: #ffffff;
  --border-color: rgba(226, 232, 240, 0.85);
  --border-focus: rgba(79, 70, 229, 0.5);

  --text-main: #1e293b;
  --text-muted: #64748b;
  --text-dim: #94a3b8;
  --text-inverse: #ffffff;

  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-glow: rgba(79, 70, 229, 0.15);
  --accent: #0284c7;

  --rising: #e11d48;
  --rising-bg: rgba(225, 29, 72, 0.08);
  --rising-border: rgba(225, 29, 72, 0.25);
  
  --falling: #0284c7;
  --falling-bg: rgba(2, 132, 199, 0.08);
  --falling-border: rgba(2, 132, 199, 0.25);

  --shadow-sm: 0 2px 8px -1px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 10px 25px -5px rgba(79, 70, 229, 0.06), 0 8px 16px -6px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 20px 40px -10px rgba(79, 70, 229, 0.1);

  --table-header-bg: #f8fafc;
  --table-row-hover: #f1f5f9;
  --glass-blur: blur(12px);
}

[data-theme="light"] .fluctuation-badge.freeze {
  color: #64748b;
  background: rgba(100, 116, 139, 0.08);
  border: 1px solid rgba(100, 116, 139, 0.2);
}

[data-theme="light"] .fluctuation-badge.periodic {
  color: #64748b;
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

/* ==========================================================================
   Base & Reset
   ========================================================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-app);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

/* ==========================================================================
   Ambient Mesh Background (모바일 최적화 분기)
   ========================================================================== */
.bg-gradient-mesh {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  contain: strict;
}

.bg-gradient-mesh::before,
.bg-gradient-mesh::after {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  opacity: 0.15;
  filter: blur(120px);
  will-change: transform;
}

.bg-gradient-mesh::before {
  top: -150px;
  left: 10%;
  background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
}

.bg-gradient-mesh::after {
  top: 40%;
  right: 5%;
  background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
}

@media (max-width: 768px) {
  .bg-gradient-mesh::before,
  .bg-gradient-mesh::after {
    filter: blur(60px);
    opacity: 0.1;
  }
}

/* ==========================================================================
   Layout Container
   ========================================================================== */
.app-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
}

/* ==========================================================================
   Header
   ========================================================================== */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  margin-bottom: 2rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.brand-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 4px 14px var(--primary-glow);
}

.brand-title {
  font-family: var(--font-title);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.brand-sub {
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  background: rgba(99, 102, 241, 0.15);
  color: var(--primary-hover);
  font-weight: 700;
  letter-spacing: 0.05em;
}

.brand-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

/* 헤더 중앙 오늘 날짜 네비게이터 */
.header-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.date-navigator {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(15, 23, 42, 0.5);
  padding: 0.25rem 0.4rem;
  border-radius: 35px;
  border: 1px solid var(--border-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.date-nav-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.date-nav-btn:hover:not(:disabled) {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 0 8px var(--primary-glow);
}

.date-nav-btn:disabled {
  opacity: 0.25;
  cursor: not-allowed;
}

.today-date-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.85rem;
  background: transparent;
  border: none;
  font-family: var(--font-title);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.01em;
  cursor: pointer;
}

.today-date-badge svg {
  color: var(--primary-hover);
}

/* 차트 기간 필터 바 */
.chart-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  flex-wrap: wrap;
  gap: 0.75rem;
}

.filter-inputs {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.filter-group label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
}

.filter-group input[type="date"] {
  padding: 0.35rem 0.6rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-input);
  color: var(--text-main);
  font-size: 0.82rem;
  font-family: var(--font-mono);
  outline: none;
}

.filter-tilde {
  color: var(--text-dim);
  font-weight: 700;
}

.chart-data-count {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.78rem;
}

/* 실시간 기준일자 시간 표시 */
.cycle-time-group {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.15;
}

.cycle-date {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.cycle-time {
  font-size: 0.7rem;
  color: var(--accent);
  font-family: var(--font-mono);
  font-weight: 600;
}

.status-badge {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.8rem;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-color);
  border-radius: 30px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

/* 버튼 스타일 */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition-fast);
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
}
.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 4px 12px var(--primary-glow);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-color);
  color: var(--text-main);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}

.btn-icon {
  width: 38px;
  height: 38px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  cursor: pointer;
}
.btn-icon:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* ==========================================================================
   Cards Section (핵심 지표 요약 카드)
   ========================================================================== */
.cards-section {
  margin-bottom: 2.5rem;
}

.cards-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.section-title {
  font-family: var(--font-title);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
}

.section-tag {
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  background: rgba(99, 102, 241, 0.12);
  color: var(--primary);
  font-weight: 600;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.card {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-3px);
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: var(--shadow-md);
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.card-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
}

.card-source-tag {
  font-size: 0.68rem;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  font-weight: 600;
  text-transform: uppercase;
}
.source-realtime {
  background: rgba(14, 165, 233, 0.15);
  color: var(--accent);
  border: 1px solid rgba(14, 165, 233, 0.3);
}
.source-ecos {
  background: rgba(99, 102, 241, 0.15);
  color: var(--primary-hover);
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.card-value {
  font-family: var(--font-mono);
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

.card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
}

.fluctuation-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  font-weight: 700;
  font-family: var(--font-mono);
}

.fluctuation-badge.rising,
.fluctuation-badge.hike {
  color: var(--rising);
  background: var(--rising-bg);
  border: 1px solid var(--rising-border);
}

.fluctuation-badge.falling,
.fluctuation-badge.cut {
  color: var(--falling);
  background: var(--falling-bg);
  border: 1px solid var(--falling-border);
}

.fluctuation-badge.steady {
  color: var(--steady);
  background: var(--steady-bg);
}

.fluctuation-badge.freeze {
  color: #94a3b8;
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.fluctuation-badge.periodic {
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  font-weight: 500;
}

.card-cycle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  color: var(--text-dim);
}

.cycle-badge {
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
}

.cycle-badge.today {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.cycle-badge.prev-day {
  background: rgba(148, 163, 184, 0.15);
  color: var(--text-muted);
  border: 1px solid rgba(148, 163, 184, 0.3);
}

/* 스켈레톤 로딩 */
.skeleton {
  min-height: 120px;
  background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.03) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ==========================================================================
   Table & Tabs Section
   ========================================================================== */
.table-section {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.section-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.tab-group {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(0, 0, 0, 0.2);
  padding: 0.3rem;
  border-radius: var(--radius-md);
  overflow-x: auto;
}

.tab-btn {
  padding: 0.45rem 0.9rem;
  border: none;
  background: transparent;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.tab-btn:hover {
  color: var(--text-main);
}

.tab-btn.active {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 2px 8px var(--primary-glow);
}

.search-box input {
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-input);
  color: var(--text-main);
  font-size: 0.85rem;
  outline: none;
  min-width: 240px;
}
.search-box input:focus {
  border-color: var(--border-focus);
}

/* 데이터 테이블 */
.table-container {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.data-table th,
.data-table td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.data-table th {
  background: var(--table-header-bg);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.data-table tbody tr {
  transition: background var(--transition-fast);
}
.data-table tbody tr:hover {
  background: var(--table-row-hover);
}

.text-right { text-align: right !important; }
.text-center { text-align: center !important; }

.indicator-name-cell {
  font-weight: 600;
  color: var(--text-main);
}

.unit-cell {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-left: 0.3rem;
}

.val-cell {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.95rem;
}

/* ==========================================================================
   API Guide View
   ========================================================================== */
.api-guide-container {
  padding: 0.5rem 0;
}

.guide-header {
  margin-bottom: 1.5rem;
}
.guide-header h3 {
  font-family: var(--font-title);
  font-size: 1.15rem;
  margin-bottom: 0.4rem;
}
.guide-header p {
  color: var(--text-muted);
  font-size: 0.88rem;
}

.guide-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.25rem;
}

.guide-card {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}
.guide-card h4 {
  font-size: 0.92rem;
  margin-bottom: 0.75rem;
  color: var(--primary-hover);
}
.guide-card pre {
  background: #060911;
  padding: 0.85rem;
  border-radius: var(--radius-sm);
  overflow-x: auto;
}
.guide-card code {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: #e2e8f0;
  line-height: 1.45;
}

/* ==========================================================================
   Modal
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-content {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 780px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: modalIn 0.2s ease-out;
}

.modal-content.modal-sm {
  max-width: 480px;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.modal-title {
  font-family: var(--font-title);
  font-size: 1.15rem;
  font-weight: 700;
}
.modal-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.btn-close {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
}
.btn-close:hover { color: var(--text-main); }

.modal-body {
  padding: 1.5rem;
}

.chart-wrapper {
  position: relative;
  height: 340px;
  width: 100%;
}

.modal-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  line-height: 1.5;
}
.modal-desc a {
  color: var(--accent);
  text-decoration: underline;
}

.form-group {
  margin-bottom: 1.25rem;
}
.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}
.key-current {
  padding: 0.5rem 0.8rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
}
.form-group input {
  width: 100%;
  padding: 0.6rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-input);
  color: var(--text-main);
  font-size: 0.9rem;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  margin-top: 1.5rem;
}

/* ==========================================================================
   Visitor Counter (타입 B: Minimal Inline Badge - 규격 준수)
   ========================================================================== */
.counter-b-wrapper {
  display: flex;
}

.counter-b {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(14, 165, 233, 0.12));
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 30px;
  padding: 0.45rem 1.25rem;
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 2px 10px -1px rgba(0, 0, 0, 0.2);
  font-size: 0.85rem;
}

.counter-b-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.counter-b-item.today {
  border-right: 1px solid rgba(255, 255, 255, 0.15);
  padding-right: 1rem;
}

.counter-b-icon {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.counter-b-item.today .counter-b-icon {
  background-color: #6366f1;
  box-shadow: 0 0 8px #6366f1;
}

.counter-b-item.total .counter-b-icon {
  background-color: #0ea5e9;
  box-shadow: 0 0 8px #0ea5e9;
}

.counter-b-item strong {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--text-main);
}

/* Footer */
.footer {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* Spin animation */
.spinning {
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* 도움말 모달 스타일 (STB 글래스모피즘 테마) */
.modal-md {
  max-width: 680px;
  width: 92%;
}

.help-modal-body {
  max-height: 72vh;
  overflow-y: auto;
  padding-right: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.help-modal-body::-webkit-scrollbar {
  width: 6px;
}
.help-modal-body::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

.help-section {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.15rem;
  transition: all var(--transition-fast);
}

.help-section-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.6rem;
}

.help-section-header h4 {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-main);
}

.help-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 0.8rem;
}

.help-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  font-size: 0.83rem;
  line-height: 1.55;
  color: var(--text-main);
}

.help-list li {
  position: relative;
  padding-left: 1.1rem;
}

.help-list li::before {
  content: "•";
  position: absolute;
  left: 0.2rem;
  color: var(--primary);
  font-weight: bold;
}

.help-list strong {
  color: var(--text-main);
}

.help-tip-box {
  background: rgba(99, 102, 241, 0.06);
  border-color: rgba(99, 102, 241, 0.25);
}

.help-tip-box h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #818cf8;
  margin-bottom: 0.7rem;
}

