/* ==========================================================
   layout.css — 공통 레이아웃 (GNB, 티커, 사이드바, 푸터)
   디자인 기획안 Part2 기반
   ========================================================== */

/* ── GNB (Global Navigation Bar) ───────────────────────── */
.gnb {
  position: sticky;
  top: 0;
  z-index: var(--z-gnb);
  height: var(--gnb-height);
  background: var(--bg-surface);
  min-width: var(--max-width);
}

.gnb::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg,
      var(--border-primary),
      rgba(240, 185, 11, 0.15),
      var(--border-primary));
}

.gnb-inner {
  display: flex;
  align-items: stretch;
  max-width: var(--max-width);
  min-width: var(--max-width);
  height: 100%;
  margin: 0 auto;
  border-left: 1px solid var(--border-primary);
  border-right: 1px solid var(--border-primary);
}

/* GNB 로고: 유튜브 사이드바 너비와 동일 */
.gnb-logo {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: var(--sidebar-youtube);
  min-width: var(--sidebar-youtube);
  padding: 0 16px;
  text-decoration: none;
  flex-shrink: 0;
  border-right: 1px solid var(--border-primary);
  transition: background var(--transition-fast);
}

.gnb-logo:hover {
  background: var(--bg-body);
}

.gnb-logo:hover .gnb-logo-sub {
  color: rgba(255, 255, 255, 0.45);
}

.gnb-logo-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  margin-right: 3px;
  transition: transform 0.3s ease;
}

.gnb-logo:hover .gnb-logo-icon {
  transform: rotate(180deg);
}

.gnb-logo-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.gnb-logo-main {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
  letter-spacing: 1px;
}

.gnb-logo-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 2.6px;
  line-height: 1;
  text-transform: uppercase;
  transition: color 0.2s ease;
}

/* GNB 메뉴: 각 100px, 세로 구분선 */
.gnb-nav {
  display: flex;
  align-items: stretch;
  height: 100%;
}

.gnb-nav-item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100px;
  height: 100%;
  font-size: 15px;
  font-weight: 300;
  letter-spacing: -0.5px;
  color: rgba(255, 255, 255, 0.45);
  border-right: 1px solid var(--border-secondary);
  transition: color 0.2s ease, background 0.2s ease;
  white-space: nowrap;
  position: relative;
}

/* 메뉴 호버: 하단 라인 슬라이드-인 */
.gnb-nav-item::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  right: 50%;
  height: 1px;
  background: var(--color-accent);
  transition: left 0.25s ease, right 0.25s ease;
  z-index: 1;
}

.gnb-nav-item:hover::after {
  left: 0;
  right: 0;
}

.gnb-nav-item:hover {
  color: rgba(255, 255, 255, 0.9);
  background: var(--bg-body);
}

/* 활성 메뉴: 글로우 효과 */
.gnb-nav-item.active {
  color: rgba(255, 255, 255, 0.95);
  font-weight: 400;
}

.gnb-nav-item.active::after {
  left: 0;
  right: 0;
  height: 1px;
  box-shadow: 0 0 8px rgba(255, 200, 67, 0.4);
}

/* GNB 중간 여백 */
.gnb-spacer {
  flex: 1;
}

/* GNB 우측 아이콘 */
.gnb-right {
  display: flex;
  align-items: stretch;
  border-left: 1px solid var(--border-secondary);
}

.gnb-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 100%;
  color: var(--text-tertiary);
  transition: color 0.2s ease, background 0.2s ease;
  border-right: 1px solid var(--border-secondary);
}

.gnb-icon-btn:hover {
  color: var(--text-primary);
  background: var(--bg-body);
}

.gnb-icon-btn:hover i {
  transform: scale(1.15);
}

.gnb-icon-btn i {
  transition: transform 0.2s ease;
}

/* GNB 실시간: 70x70 정사각형, 맨 우측 */
.gnb-realtime {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 80px;
  min-width: 80px;
  height: 100%;
  gap: 4px;
  border-left: 1px solid var(--border-secondary);
  flex-shrink: 0;
  transition: background 0.2s ease;
  cursor: default;
}

.gnb-realtime:hover {
  background: var(--bg-body);
}

.gnb-realtime .dot {
  width: 6px;
  height: 6px;
  background: var(--color-up);
  border-radius: 50%;
  animation: realtimePulse 2s ease-in-out infinite;
  box-shadow: 0 0 6px rgba(0, 200, 120, 0.5);
}

@keyframes realtimePulse {

  0%,
  100% {
    opacity: 1;
    box-shadow: 0 0 6px rgba(0, 200, 120, 0.5);
  }

  50% {
    opacity: 0.5;
    box-shadow: 0 0 12px rgba(0, 200, 120, 0.8);
  }
}

.gnb-realtime #gnb-update-time {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-tertiary);
  letter-spacing: -0.3px;
  transition: color 0.2s ease;
}

.gnb-realtime:hover #gnb-update-time {
  color: var(--text-secondary);
}
/* GNB 서버선택 버튼 — 모바일 전용 */
.gnb-server-select {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 100%;
  padding: 0 12px;
  border-left: 1px solid var(--border-secondary);
  cursor: pointer;
  transition: background var(--transition-fast);
  flex-shrink: 0;
  white-space: nowrap;
}
.gnb-server-select:hover {
  background: var(--bg-body);
}
.gnb-server-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}
.gnb-server-arrow {
  font-size: 12px;
  color: var(--text-tertiary);
  transition: transform 0.3s ease;
}
.gnb-server-select.active .gnb-server-arrow {
  transform: rotate(180deg);
}
/* PC에서 모바일 전용 아이콘 숨김 */
.gnb-server-select .gnb-btn-icon,
.gnb-server-select .gnb-btn-close { display: none; }

/* 햄버거 — 모바일 전용 */
.gnb-hamburger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 55px;
  height: 100%;
  cursor: pointer;
  border-left: 1px solid var(--border-secondary);
  transition: background var(--transition-fast);
  flex-shrink: 0;
}

.gnb-hamburger:hover {
  background: var(--bg-body);
}

/* 공통 아이콘 토글 (서버선택 + 햄버거) */
.gnb-btn-icon,
.gnb-btn-close {
  font-size: 20px;
  color: var(--text-primary);
  line-height: 1;
}
.gnb-btn-close { display: none; }

/* 활성 상태 → 아이콘 숨기고 X 표시 */
.gnb-server-select.active .gnb-btn-icon,
.gnb-hamburger.active .gnb-btn-icon { display: none; }
.gnb-server-select.active .gnb-btn-close,
.gnb-hamburger.active .gnb-btn-close { display: block; }

/* ── 모바일 드로어 ─────────────────────────────────────── */
.mobile-overlay {
  display: none;
  position: fixed;
  top: var(--gnb-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: var(--z-overlay);
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.mobile-overlay.open {
  display: block;
  opacity: 1;
}

.mobile-drawer {
  position: fixed;
  top: var(--gnb-height);
  right: -280px;
  width: 280px;
  bottom: 0;
  background: var(--bg-surface);
  z-index: calc(var(--z-overlay) + 1);
  transition: right var(--transition-normal);
  overflow-y: auto;
  border-left: 1px solid var(--border-primary);
}

.mobile-drawer.open {
  right: 0;
}

.mobile-drawer-header {
  display: none;
}

.mobile-drawer-nav {
  padding: 0;
}

.mobile-drawer-item {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 48px;
  padding: 0 16px;
  font-size: 14px;
  color: var(--text-secondary);
  transition: background var(--transition-fast), color var(--transition-fast);
}

.mobile-drawer-item:hover,
.mobile-drawer-item.active {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.mobile-drawer-item i {
  font-size: 20px;
  color: var(--text-tertiary);
  width: 24px;
  text-align: center;
}

.mobile-drawer-divider {
  height: 1px;
  background: var(--border-primary);
  margin: 8px 0;
}

.mobile-drawer-sns {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
}

.mobile-drawer-sns a {
  font-size: 20px;
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

.mobile-drawer-sns a:hover {
  color: var(--text-primary);
}

/* ── 프리미엄 지수 롤링 티커 ───────────────────────────── */
.premium-ticker {
  width: 100%;
  min-width: var(--max-width);
  height: var(--ticker-height);
  background: var(--bg-body);
  border-bottom: 1px solid var(--border-secondary);
  overflow: hidden;
  position: relative;
}

.premium-ticker::before,
.premium-ticker::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 40px;
  z-index: 2;
  pointer-events: none;
}

.premium-ticker::before {
  left: 0;
  background: linear-gradient(to right, var(--bg-body), transparent);
}

.premium-ticker::after {
  right: 0;
  background: linear-gradient(to left, var(--bg-body), transparent);
}

.premium-ticker-track {
  display: flex;
  align-items: center;
  height: 100%;
  animation: marquee 120s linear infinite;
  width: max-content;
}

.premium-ticker-track:hover {
  animation-play-state: paused;
}

.premium-ticker-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  white-space: nowrap;
  border-right: 1px solid var(--border-secondary);
  height: 100%;
  cursor: pointer;
  transition: background 0.15s ease;
}

.premium-ticker-item:hover {
  background: var(--bg-lv3);
}

.premium-ticker-item:last-child {
  border-right: none;
}

.ticker-server-name {
  font-size: 12px;
  color: var(--text-secondary);
}

.ticker-price {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
}

.ticker-change {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
}

.ticker-change.up {
  color: var(--color-up);
}

.ticker-change.down {
  color: var(--color-down);
}

@keyframes marquee {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.4;
  }
}

/* ── 3컬럼 메인 레이아웃 ───────────────────────────────── */
.main-layout {
  display: flex;
  max-width: var(--max-width);
  min-width: var(--max-width);
  margin: 0 auto;
  border-left: 1px solid var(--border-primary);
  border-right: 1px solid var(--border-primary);
}

/* ── 좌측 유튜브 사이드바 ──────────────────────────────── */
.sidebar-youtube {
  position: sticky;
  top: var(--gnb-height);
  height: calc(100vh - var(--gnb-height));
  width: var(--sidebar-youtube);
  min-width: var(--sidebar-youtube);
  flex-shrink: 0;
  background: var(--bg-surface);
  border-right: 1px solid var(--border-primary);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.yt-live-list {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

.sidebar-youtube-header {
  display: flex;
  align-items: center;
  gap: 6px;
  height: var(--header-height);
  padding: 0 12px;
  border-bottom: 1px solid var(--border-secondary);
  flex-shrink: 0;
}

.sidebar-youtube-header .yt-icon {
  color: #FF0000;
  font-size: 16px;
}

.sidebar-youtube-header .yt-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: -0.3px;
}

.yt-live-item {
  display: block;
  padding: 10px;
  margin: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.yt-live-item:hover {
  background: var(--bg-hover);
}

.yt-thumbnail {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background-size: cover;
  background-position: center;
  background-color: var(--bg-elevated);
  border-radius: 4px;
  margin-bottom: 8px;
  overflow: hidden;
  transition: transform var(--transition-normal);
}

.yt-live-item:hover .yt-thumbnail {
  transform: scale(1.03);
}

.yt-thumbnail::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 50%, rgba(0, 0, 0, 0.6));
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.yt-live-item:hover .yt-thumbnail::after {
  opacity: 1;
}

.yt-title {
  font-size: 12px;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.5;
  margin-bottom: 6px;
}

.yt-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-tertiary);
}

.yt-live-dot {
  width: 6px;
  height: 6px;
  background: #FF0000;
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
  flex-shrink: 0;
  box-shadow: 0 0 4px rgba(255, 0, 0, 0.5);
}

.sidebar-youtube-footer {
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-secondary);
  flex-shrink: 0;
}

.sidebar-youtube-footer a {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  height: 100%;
  transition: color var(--transition-fast);
}

.sidebar-youtube-footer a:hover {
  color: var(--text-primary);
}

/* ── 메인 콘텐츠 ───────────────────────────────────────── */
.main-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ── 우측 서버리스트 사이드바 ──────────────────────────── */
.sidebar-servers {
  position: sticky;
  top: var(--gnb-height);
  height: calc(100vh - var(--gnb-height));
  width: var(--sidebar-servers);
  min-width: var(--sidebar-servers);
  flex-shrink: 0;
  background: var(--bg-surface);
  border-left: 1px solid var(--border-primary);
  overflow-x: hidden;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

/* 서버 검색 */
.server-search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: var(--header-height);
  padding: 0 12px;
  border-bottom: 1px solid var(--border-secondary);
}

.server-search i {
  font-size: 14px;
  color: var(--text-muted);
}

.server-search input {
  flex: 1;
  background: transparent;
  border: none;
  font-size: 12px;
  color: var(--text-primary);
}

.server-search input::placeholder {
  color: var(--text-muted);
}

/* 서버 서브탭 (전체/관심) */
.server-tabs {
  display: flex;
  height: var(--header-height);
  border-bottom: 1px solid var(--border-secondary);
}

.server-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 12px;
  color: var(--text-tertiary);
  border-right: 1px solid var(--border-secondary);
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
  position: relative;
}

.server-tab::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 50%;
  right: 50%;
  height: 1px;
  background: var(--color-accent);
  transition: left 0.25s ease, right 0.25s ease;
  z-index: 1;
}

.server-tab:first-child {
  border-left: 1px solid var(--border-secondary);
}

.server-tab:hover {
  color: var(--text-secondary);
  background: var(--bg-hover);
}

.server-tab:hover::after {
  left: 0;
  right: 0;
}

.server-tab.active {
  color: var(--text-primary);
}

.server-tab.active::after {
  left: 0;
  right: 0;
}

.server-tab .star-icon {
  color: var(--color-accent);
}

/* 서버 테이블 헤더 */
.server-list-header {
  display: flex;
  align-items: center;
  height: 28px;
  padding: 0 12px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border-secondary);
  font-size: 11px;
  color: var(--text-muted);
}

.server-list-header .col-star {
  width: 24px;
  text-align: center;
}

.server-list-header .col-name {
  flex: 1;
}

.server-list-header .col-price {
  width: 70px;
  text-align: right;
}

.server-list-header .col-change {
  width: 60px;
  text-align: right;
}

.server-list-header .col-volume {
  width: 75px;
  text-align: right;
}

.col-sortable {
  cursor: pointer;
  user-select: none;
}

.col-sortable:hover {
  color: var(--text-secondary);
}

/* 서버 행 */
.server-list {
  flex: 1;
  overflow-y: auto;
}

.server-row {
  display: flex;
  align-items: center;
  height: 36px;
  padding: 0 12px;
  border-bottom: 1px solid var(--border-secondary);
  cursor: pointer;
  transition: background 0.2s ease;
  position: relative;
}

.server-row::before {
  content: '';
  position: absolute;
  left: 0;
  top: 20%;
  bottom: 20%;
  width: 2px;
  background: var(--color-accent);
  transform: scaleY(0);
  transition: transform 0.2s ease;
}

.server-row:hover {
  background: var(--bg-hover);
}

.server-row:hover::before {
  transform: scaleY(1);
}

.server-row.active {
  background: rgba(240, 185, 11, 0.04);
  border-left: 2px solid var(--color-accent);
  padding-left: 10px;
}

.server-row.active::before {
  display: none;
}

.server-row .col-star {
  width: 24px;
  text-align: center;
  font-size: 14px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.server-row .col-star.favorited {
  color: var(--color-accent);
}

.server-row .col-name {
  flex: 1;
  font-size: 12px;
  color: var(--text-primary);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.server-row .col-price {
  width: 70px;
  text-align: right;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  flex-shrink: 0;
}

.server-row .col-change {
  width: 60px;
  text-align: right;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  flex-shrink: 0;
}

.server-row .col-change .change-badge {
  display: inline-block;
  padding: 1px 4px;
  border-radius: 2px;
  font-size: 11px;
}

.server-row .col-change .change-badge.up {
  color: var(--color-up);
  background: var(--color-up-bg);
}

.server-row .col-change .change-badge.down {
  color: var(--color-down);
  background: var(--color-down-bg);
}

.server-row .col-volume {
  width: 75px;
  text-align: right;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
  flex-shrink: 0;
}

/* ── 푸터 ──────────────────────────────────────────────── */
.site-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-primary);
  border-left: 1px solid var(--border-primary);
  border-right: 1px solid var(--border-primary);
  max-width: var(--max-width);
  min-width: var(--max-width);
  margin: 0 auto;
}

/* 상단: 로고 + 링크 그리드 */
.footer-top {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid var(--border-secondary);
}

/* 좌측 브랜드 */
.footer-brand {
  width: 280px;
  min-width: 280px;
  padding: 32px 24px;
  border-right: 1px solid var(--border-secondary);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-logo-icon {
  width: 28px;
  height: 28px;
  transition: transform 0.3s ease;
}

.footer-brand:hover .footer-logo-icon {
  transform: rotate(180deg);
}

.footer-logo-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.footer-brand-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
  letter-spacing: -0.3px;
}

.footer-brand-en {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.3);
  letter-spacing: 2.6px;
  line-height: 1;
}

.footer-desc {
  font-size: 12px;
  line-height: 1.7;
  color: var(--text-muted);
  letter-spacing: -0.2px;
}

/* 우측 링크 그리드 */
.footer-links {
  flex: 1;
  display: flex;
}

.footer-link-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 24px 20px;
  border-right: 1px solid var(--border-secondary);
}

.footer-link-group:last-child {
  border-right: none;
}

.footer-link-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-secondary);
  font-family: var(--font-en);
}

.footer-link-group a {
  font-size: 13px;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.45);
  padding: 5px 0;
  transition: color 0.2s ease, padding-left 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
  letter-spacing: -0.3px;
}

.footer-link-group a:hover {
  color: rgba(255, 255, 255, 0.9);
  padding-left: 6px;
}

.footer-link-group a i {
  font-size: 14px;
  opacity: 0.6;
  transition: opacity 0.2s ease;
}

.footer-link-group a:hover i {
  opacity: 1;
}

/* 하단 바: 카피라이트 + 이메일 */
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
}

.footer-bottom-left {
  display: flex;
  align-items: center;
}

.footer-bottom-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.footer-email {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--text-tertiary);
  transition: color 0.2s ease;
  text-transform: uppercase;
}

.footer-email:hover {
  color: var(--color-accent);
}

.footer-copyright {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: -0.2px;
  text-transform: uppercase;
}

/* ── 모달 공통 ─────────────────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: calc(var(--z-gnb) + 100);
  align-items: center;
  justify-content: center;
}

.modal-overlay.open {
  display: flex;
}

.modal-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-primary);
  width: 480px;
  max-width: 90vw;
  max-height: 90vh;
  overflow-y: auto;
  padding: 36px;
}

.modal-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.modal-close {
  margin-left: auto;
  font-size: 20px;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s ease, transform 0.2s ease;
}

.modal-close:hover {
  color: var(--text-primary);
  transform: rotate(90deg);
}

/* ── 토스트 알림 ───────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-primary);
  font-size: 13px;
  color: var(--text-primary);
  animation: toastIn 300ms ease forwards;
  min-width: 240px;
}

.toast.hide {
  animation: toastOut 300ms ease forwards;
}

.toast-icon.success {
  color: var(--color-up);
}

.toast-icon.error {
  color: var(--color-down);
}

.toast-icon.info {
  color: var(--color-accent);
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(20px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes toastOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }

  to {
    opacity: 0;
    transform: translateX(20px);
  }
}

/* ── 공통 탭 바 ────────────────────────────────────────── */
/* tab-bar/tab-item → section-header/section-tab 으로 이동됨 (exchange.css) */

/* ── 반응형: 600px 미만만 모바일 ────────────────────────── */

@media (max-width: 600px) {
  /* GNB */
  .gnb-nav { display: none; }
  .gnb-hamburger { display: flex; }
  #btn-shortcuts { display: none; }

  /* GNB 양쪽 border 제거 */
  .gnb-inner {
    border-left: none;
    border-right: none;
  }

  /* ── 모바일 GNB 재배치: 서버명 | 로고 | 햄버거 ── */
  /* 서버 선택 → 좌측 아이콘 버튼 (햄버거와 대칭) */
  .gnb-server-select {
    order: -1;
    width: 55px;
    padding: 0;
    border-right: 1px solid var(--border-secondary);
    border-left: none;
    justify-content: center;
  }
  .gnb-server-select .gnb-btn-icon {
    display: block;
  }
  .gnb-server-name { display: none; }
  .gnb-server-arrow { display: none; }

  /* 로고 → 중앙 (flex:1로 남은 공간 차지) */
  .gnb-logo {
    order: 0;
    width: auto;
    min-width: auto;
    padding: 0;
    border-right: none;
    flex: 1;
    justify-content: center;
  }
  .gnb-logo-icon { width: 20px; height: 20px; }
  .gnb-logo-sub { display: none; }
  .gnb-logo-main { font-size: 13px; }

  /* 실시간 표시 숨김 */
  .gnb-realtime { display: none; }

  /* gnb-right, spacer 숨김 */
  .gnb-right { display: none; }
  .gnb-spacer { display: none; }

  /* 프리미엄 티커 축소 */
  .premium-ticker { height: 24px; min-width: 0; max-width: 100vw; overflow: hidden; }
  .ticker-server-name,
  .ticker-price,
  .ticker-change { font-size: 10px; }
  .premium-ticker-item { padding: 0 8px; gap: 4px; }

  /* 메인 레이아웃 */
  .sidebar-youtube { display: none; }
  .gnb,
  .gnb-inner,
  .main-layout {
    min-width: 0;
  }
  .main-layout {
    flex-direction: column;
  }
  .main-content {
    width: 100%;
    overflow: visible;
  }

  /* 서버리스트 → 왼쪽 슬라이드 드로어 */
  .sidebar-servers {
    position: fixed;
    top: var(--gnb-height);
    left: -85vw;
    width: 85vw;
    max-width: 320px;
    height: calc(100vh - var(--gnb-height));
    height: calc(100dvh - var(--gnb-height));
    z-index: calc(var(--z-overlay) + 2);
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-right: 1px solid var(--border-primary);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.3);
  }
  .sidebar-servers.open { left: -1px; }

  /* GNB 서버선택 버튼 표시 */
  .gnb-server-select { display: flex; }

  /* 푸터 */
  .footer-top { flex-direction: column; }
  .footer-brand {
    width: 100%;
    min-width: 0;
    border-right: none;
    border-bottom: 1px solid var(--border-secondary);
    padding: 16px;
  }
  .footer-links { flex-wrap: wrap; }
  .footer-link-group {
    flex: 1 1 45%;
    min-width: 140px;
    border-bottom: 1px solid var(--border-secondary);
    padding: 12px 16px;
  }
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 12px 16px;
  }
  .footer-copyright { font-size: 10px; }
  .site-footer { border-left: none; border-right: none; min-width: 0; }

  /* 모달 전폭 */
  .modal-box { max-width: 95vw; padding: 20px; }

  /* 토스트 중앙 */
  .toast-container { right: 8px; left: 8px; bottom: 16px; }
  .toast { min-width: auto; width: 100%; }

}

/* ── 서버 드로어 오버레이 ── */
.server-drawer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: calc(var(--z-overlay) + 1);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.server-drawer-overlay.open {
  display: block;
  opacity: 1;
}

