body {
  background:
    radial-gradient(1200px 700px at 60% 10%, rgba(203, 179, 122, .10), transparent 55%),
    radial-gradient(900px 600px at 20% 85%, rgba(255, 255, 255, .06), transparent 55%),
    linear-gradient(180deg, #070707 0%, #050505 55%, #040404 100%);
  color: #e6e6e8;
  overflow: hidden;
  animation: pageLoadFadeIn 0.6s ease-out;
}

/* Normalize number fonts - use default sans-serif instead of monospace */
.font-mono {
  font-family: "Manrope", sans-serif !important;
  font-variant-numeric: tabular-nums;
}

@keyframes pageLoadFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

body:before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.18'/%3E%3C/svg%3E");
  opacity: .08;
  mix-blend-mode: overlay;
}

#globeViz {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: #0a0a0a;
}

::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #d4af37;
}

@keyframes slideUpFade {
  from {
    opacity: 0;
    transform: translateY(15px);
  }

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

.animate-slide-up {
  animation: slideUpFade .6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.animate-fade-in {
  animation: fadeIn .8s ease-out forwards;
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.animate-scale-in {
  animation: scaleIn .6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Hover Card */
#hover-card {
  position: fixed;
  display: none;
  visibility: hidden;
  opacity: 0;
  z-index: 9999;
  background: rgba(17, 17, 17, .95);
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, .08);
  box-shadow: 0 28px 85px rgba(0, 0, 0, .78);
  pointer-events: auto;
  right: 40px;
  top: 80px;
  max-height: calc(100vh - 160px);
  max-width: 460px;
  width: 460px;
  overflow-y: auto;
  transition: border-color 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
}

#hover-card.hover-left {
  right: auto;
  left: 40px;
}

#hover-card.show {
  display: block;
  visibility: visible;
  opacity: 1;
}


#hover-card.pinned {
  border: 1px solid rgba(203, 179, 122, .55);
  box-shadow:
    0 28px 90px rgba(0, 0, 0, .78),
    0 0 0 1px rgba(203, 179, 122, .12);
}

.pin-indicator {
  position: absolute;
  top: 12px;
  right: 12px;
  color: #d4af37;
  font-size: 10px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

#hover-card.pinned .pin-indicator {
  opacity: 1;
}

/* Compare Mode - wider hover card */
#hover-card.compare-mode {
  width: 560px;
  max-width: 560px;
  border: 1px solid rgba(123, 163, 203, .45);
  box-shadow:
    0 28px 90px rgba(0, 0, 0, .78),
    0 0 0 1px rgba(123, 163, 203, .12);
}

#hover-card.compare-mode .pin-indicator {
  background: rgba(123, 163, 203, .2);
  color: #7ba3cb;
}

/* Second Hover Card (Compare) - positioned on left */
#hover-card-compare {
  position: fixed;
  display: none;
  visibility: hidden;
  opacity: 0;
  z-index: 9998;
  background: rgba(17, 17, 17, .95);
  padding: 28px;
  border: 1px solid rgba(123, 163, 203, .45);
  box-shadow: 0 28px 85px rgba(0, 0, 0, .78),
    0 0 0 1px rgba(123, 163, 203, .12);
  pointer-events: auto;
  left: 40px;
  top: 80px;
  max-height: calc(100vh - 160px);
  max-width: 460px;
  width: 460px;
  overflow-y: auto;
  transition: border-color 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
}

#hover-card-compare.show {
  display: block;
  visibility: visible;
  opacity: 1;
}

.compare-indicator {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(123, 163, 203, .2);
  color: #7ba3cb;
  font-size: 10px;
  padding: 4px 8px;
  border-radius: 4px;
  letter-spacing: 0.1em;
}

.rr-glass {
  background: rgba(18, 18, 19, .52);
  border: 1px solid rgba(255, 255, 255, .07);
  backdrop-filter: blur(18px) saturate(130%);
  box-shadow:
    0 18px 55px rgba(0, 0, 0, .55),
    inset 0 1px 0 rgba(255, 255, 255, .06);
}

.rr-link {
  position: relative;
}

.rr-link:after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  height: 1px;
  width: 0;
  background: rgba(212, 175, 55, .9);
  transition: width .35s ease;
}

.rr-link:hover:after {
  width: 100%;
}

#toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 99999;
  display: none;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .75);
  border: 1px solid rgba(255, 255, 255, .12);
  font-size: 12px;
  color: #ddd;
  backdrop-filter: blur(10px);
}

/* Sidebar Menu */
#sidebar-menu {
  position: fixed;
  top: 0;
  left: -380px;
  width: 380px;
  height: 100vh;
  background: rgba(10, 10, 10, .98);
  border-right: 1px solid rgba(255, 255, 255, .1);
  backdrop-filter: blur(20px);
  z-index: 100;
  overflow-y: auto;
  transition: left .4s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 20px 0 40px 0;
}

#sidebar-menu.open {
  left: 0;
}

#sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .6);
  z-index: 99;
  opacity: 0;
  pointer-events: none;
  transition: opacity .4s ease;
}

#sidebar-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.country-item {
  border-bottom: 1px solid rgba(255, 255, 255, .04);
  transition: all .3s ease;
}

.country-item:hover {
  background: rgba(212, 175, 55, .08);
  border-left: 3px solid #d4af37;
}

.alpha-section {
  margin-bottom: 4px;
}

.alpha-letter {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 12px 18px 12px 24px;
  background: #0a0a0a;
  border-bottom: 1px solid rgba(212, 175, 55, .3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.alpha-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.alpha-letter-char {
  color: #d4af37;
  font-family: "Cinzel", serif;
  font-size: 18px;
  letter-spacing: .35em;
}

.alpha-count {
  font-size: 10px;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: #666;
}

.alpha-toggle {
  width: 34px;
  height: 28px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(212, 175, 55, .10);
  border: 1px solid rgba(212, 175, 55, .22);
  color: #d4af37;
  transition: transform .35s cubic-bezier(0.16, 1, 0.3, 1),
    background .35s ease, border-color .35s ease,
    opacity .35s ease;
}

.alpha-toggle:hover {
  background: rgba(212, 175, 55, .16);
  border-color: rgba(212, 175, 55, .35);
}

.alpha-toggle {
  transform: rotate(0deg);
}

.alpha-section[data-collapsed="true"] .alpha-toggle {
  transform: rotate(180deg);
}

.alpha-body {
  overflow: hidden;
  max-height: 2000px;
  transition: max-height .45s cubic-bezier(0.16, 1, 0.3, 1);
}

.alpha-section[data-collapsed="true"] .alpha-body {
  max-height: 0;
}

.alpha-divider {
  height: 1px;
  background: rgba(255, 255, 255, .04);
  margin: 6px 0;
}

/* ===== 모드 선택 랜딩 페이지 ===== */
#landing-page {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse 80% 50% at 50% 20%, rgba(203, 179, 122, .08), transparent),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(123, 163, 203, .06), transparent),
    radial-gradient(ellipse 50% 30% at 20% 70%, rgba(123, 203, 138, .05), transparent),
    linear-gradient(180deg, #050505 0%, #070707 50%, #0a0a0a 100%);
  opacity: 1;
  transform: scale(1);
  transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: auto;
}

#landing-page.hidden {
  display: none;
  opacity: 0;
  transform: scale(1.05);
  pointer-events: none;
}

#landing-page.fade-out {
  opacity: 0;
  transform: scale(0.96);
  pointer-events: none;
}

/* Staggered fade-out for cards */
#landing-page.fade-out .mode-card {
  opacity: 0;
  transform: translateY(20px) scale(0.95);
}

#landing-page.fade-out .landing-title {
  opacity: 0;
  transform: translateY(-20px);
}

#landing-page.fade-out .landing-subtitle {
  opacity: 0;
}

.landing-title {
  font-family: "Cinzel", serif;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  letter-spacing: 0.35em;
  color: #fff;
  text-shadow: 0 0 60px rgba(203, 179, 122, .3);
  margin-bottom: 0.5rem;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.landing-subtitle {
  font-family: "Manrope", sans-serif;
  font-size: clamp(0.7rem, 1.5vw, 0.9rem);
  letter-spacing: 0.5em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .35);
  margin-bottom: 4rem;
  transition: opacity 0.35s ease;
}

.mode-cards {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  justify-content: center;
  padding: 0 1rem;
}

.mode-card {
  position: relative;
  width: 280px;
  padding: 2.5rem 2rem;
  background: rgba(15, 15, 16, .6);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 1.5rem;
  backdrop-filter: blur(20px);
  cursor: pointer;
  transition: all .5s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.35s ease,
    transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

/* Staggered delay for each card during mode transition */
.mode-card:nth-child(1) {
  transition-delay: 0s;
}

.mode-card:nth-child(2) {
  transition-delay: 0.05s;
}

.mode-card:nth-child(3) {
  transition-delay: 0.1s;
}

.mode-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 1.5rem;
  padding: 1px;
  background: linear-gradient(135deg, transparent 40%, var(--accent) 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity .5s ease;
}

.mode-card:hover::before {
  opacity: 1;
}

.mode-card:hover {
  transform: translateY(-8px);
  border-color: var(--accent);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, .6),
    0 0 40px color-mix(in srgb, var(--accent) 20%, transparent);
}

.mode-card.investor {
  --accent: #cbb37a;
}

.mode-card.scholar {
  --accent: #7ba3cb;
}

.mode-card.traveler {
  --accent: #7bcb8a;
}

.mode-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  opacity: 0.8;
  transition: all .5s cubic-bezier(0.16, 1, 0.3, 1);
}

.mode-card:hover .mode-icon {
  opacity: 1;
  transform: scale(1.05);
}

.mode-icon svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, .3));
}

.mode-title {
  font-family: "Cinzel", serif;
  font-size: 1.1rem;
  letter-spacing: 0.25em;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.mode-desc {
  font-size: 0.8rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, .5);
  margin-bottom: 1.5rem;
}

.mode-status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .3);
  padding: 0.5rem 1rem;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 999px;
}

.mode-status .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {

  0%,
  100% {
    opacity: 0.4;
    transform: scale(1);
  }

  50% {
    opacity: 1;
    transform: scale(1.2);
  }
}

@keyframes pin-pulse {
  0% {
    transform: scale(1) translateY(0);
    opacity: 1;
  }

  50% {
    transform: scale(1.2) translateY(-3px);
    opacity: 0.8;
    filter: drop-shadow(0 0 8px rgba(203, 179, 122, 0.8));
  }

  100% {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

.landing-footer {
  position: absolute;
  bottom: 2rem;
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .2);
}

/* 선택된 모드 표시 */
#current-mode-badge {
  position: fixed;
  top: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  display: none;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 1.2rem;
  background: rgba(10, 10, 10, .85);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 999px;
  backdrop-filter: blur(15px);
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .6);
  cursor: pointer;
  transition: all .3s ease;
}

#current-mode-badge:hover {
  border-color: rgba(255, 255, 255, .25);
  color: rgba(255, 255, 255, .9);
}

#current-mode-badge .mode-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

#current-mode-badge.investor .mode-dot {
  background: #cbb37a;
}

#current-mode-badge.scholar .mode-dot {
  background: #7ba3cb;
}

#current-mode-badge.traveler .mode-dot {
  background: #7bcb8a;
}

#current-mode-badge .badge-chevron {
  transition: transform .3s ease;
}

#current-mode-badge.dropdown-open .badge-chevron {
  transform: rotate(180deg);
}

/* ===== Mode Dropdown ===== */
.mode-dropdown {
  position: fixed;
  top: calc(1.5rem + 42px);
  left: 50%;
  transform: translateX(-50%) translateY(0);
  z-index: 50;
  min-width: 160px;
  padding: 6px;
  background: rgba(10, 10, 10, .92);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 14px;
  backdrop-filter: blur(20px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, .5);
  opacity: 1;
  visibility: visible;
  transform-origin: top center;
  transition: opacity .3s cubic-bezier(0.16, 1, 0.3, 1),
    transform .3s cubic-bezier(0.16, 1, 0.3, 1),
    visibility .3s;
  pointer-events: auto;
}

.mode-dropdown.hidden {
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(-8px);
  pointer-events: none;
}

.mode-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .6);
  text-decoration: none;
  cursor: pointer;
  transition: all .2s ease;
}

.mode-dropdown-item:hover {
  background: rgba(255, 255, 255, .06);
  color: rgba(255, 255, 255, .95);
}

.mode-dropdown-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.mode-dropdown-dot.investor {
  background: #cbb37a;
}

.mode-dropdown-dot.scholar {
  background: #7ba3cb;
}

.mode-dropdown-dot.traveler {
  background: #7bcb8a;
}

.mode-dropdown-dot.main {
  background: #7ba3cb;
}

/* ===========================
     국가 상세 오버레이 - Premium Design (BMW/Rolls-Royce Style)
     - 기존 디자인 영향 0: 전부 #country-detail 스코프
  ============================ */
#country-detail {
  position: fixed;
  inset: 0;
  z-index: 300;
  overflow-y: auto;
  background: linear-gradient(180deg, #0a0a0a 0%, #050505 100%);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s ease, visibility 0.4s;
}

#country-detail.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

#country-detail:before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 80% 40% at 50% 0%, rgba(203, 179, 122, .03), transparent);
}


#country-detail .panel {
  background: linear-gradient(180deg, rgba(15, 15, 16, .98) 0%, rgba(12, 12, 13, .95) 100%);
  border: 1px solid rgba(255, 255, 255, .06);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .03),
    0 20px 50px rgba(0, 0, 0, .4);
  border-radius: 4px;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  width: 100%;
  box-sizing: border-box;
}

#country-detail .panel:hover {
  border-color: rgba(203, 179, 122, .2);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .03),
    0 25px 60px rgba(0, 0, 0, .5),
    0 0 30px rgba(203, 179, 122, .05);
  transform: translateY(-2px);
}

#country-detail .panel-header {
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, .04);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: default;
  /* Only collapse-icon is clickable */
  transition: background 0.3s ease;
}

#country-detail .panel-header:hover {
  background: rgba(255, 255, 255, .02);
}

#country-detail .panel-title {
  font-family: "Cinzel", serif;
  font-size: 12px;
  letter-spacing: .4em;
  text-transform: uppercase;
  color: rgba(203, 179, 122, .9);
  font-weight: 400;
}

#country-detail .panel-content {
  padding: 24px;
}

#country-detail .collapse-icon {
  width: 16px;
  height: 16px;
  transition: transform .4s ease;
  color: rgba(203, 179, 122, .5);
}

#country-detail .panel.collapsed .collapse-icon {
  transform: rotate(-90deg);
  /* Points left when collapsed */
}

#country-detail .panel.collapsed .panel-content {
  display: none;
}

#country-detail .stat-card {
  background: linear-gradient(135deg, rgba(0, 0, 0, .4) 0%, rgba(0, 0, 0, .25) 100%);
  padding: 20px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, .05);
  transition: all 0.3s ease;
}

#country-detail .stat-card:hover {
  border-color: rgba(203, 179, 122, .15);
  background: linear-gradient(135deg, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, .3) 100%);
}


#country-detail .news-item {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, .03);
  cursor: pointer;
  transition: all .3s ease;
  border-radius: 0;
  margin-bottom: 0;
}

#country-detail .news-item:hover {
  background: rgba(255, 255, 255, .02);
}

#country-detail .news-item:last-child {
  border-bottom: none;
}

#country-detail .badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 0;
  font-family: "Cinzel", serif;
  font-size: 9px;
  letter-spacing: .2em;
  text-transform: uppercase;
  font-weight: 400;
  border: 1px solid currentColor;
  background: transparent;
}

#country-detail .badge-tech {
  color: rgba(123, 163, 203, .8);
}

#country-detail .badge-earnings {
  color: rgba(123, 203, 138, .8);
}

#country-detail .badge-politics {
  color: rgba(155, 89, 182, .8);
}

#country-detail .badge-market {
  color: rgba(203, 179, 122, .8);
}


#country-detail .stock-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, .03);
  font-size: 13px;
  transition: all .2s ease;
  border-radius: 6px;
}

#country-detail .stock-row:hover {
  background: rgba(255, 255, 255, .02);
}

#country-detail .positive {
  color: #7bcb8a;
}

#country-detail .negative {
  color: #e74c3c;
}

#country-detail .back-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  background: transparent;
  border: 1px solid rgba(203, 179, 122, .25);
  border-radius: 0;
  color: rgba(203, 179, 122, .9);
  cursor: pointer;
  transition: all .4s ease;
  font-family: "Cinzel", serif;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .25em;
  font-weight: 400;
}

#country-detail .back-btn:hover {
  background: rgba(203, 179, 122, .08);
  border-color: rgba(203, 179, 122, .5);
}


#country-detail .gauge {
  position: relative;
  height: 80px;
  background: linear-gradient(to right,
      rgba(231, 76, 60, .4),
      rgba(243, 156, 18, .4),
      rgba(123, 203, 138, .4),
      rgba(39, 174, 96, .4));
  border-radius: 40px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .1);
}

#country-detail .gauge-indicator {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #cbb37a, #d4af37);
  border-radius: 50%;
  border: 3px solid rgba(0, 0, 0, .5);
  box-shadow: 0 0 20px rgba(203, 179, 122, .6);
  transition: left .5s cubic-bezier(0.16, 1, 0.3, 1);
}

#country-detail .animate-in {
  animation: slideUpFade .6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

#country-detail .chart-container {
  width: 100%;
  height: 240px;
  background: rgba(10, 10, 10, .4);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, .05);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

#country-detail .chart-container::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(0deg, transparent, transparent 20px, rgba(203, 179, 122, .02) 20px, rgba(203, 179, 122, .02) 21px),
    repeating-linear-gradient(90deg, transparent, transparent 40px, rgba(203, 179, 122, .02) 40px, rgba(203, 179, 122, .02) 41px);
}

#country-detail .mode-badge {
  background: rgba(203, 179, 122, .15);
  border: 1px solid rgba(203, 179, 122, .4);
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #cbb37a;
  font-weight: 500;
}

#country-detail .chart-tab {
  padding: 10px 18px;
  border-radius: 0;
  font-family: "Cinzel", serif;
  font-size: 10px;
  letter-spacing: .2em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all .3s ease;
  background: transparent;
  color: rgba(255, 255, 255, .4);
  border: none;
  border-bottom: 2px solid transparent;
}

#country-detail .chart-tab:hover {
  color: rgba(255, 255, 255, .7);
}

#country-detail .chart-tab.active {
  color: rgba(203, 179, 122, .9);
  border-bottom-color: rgba(203, 179, 122, .6);
}


#country-detail .chart-canvas {
  width: 100%;
  height: 200px;
}

#country-detail .heatmap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 2px;
}

#country-detail .heatmap-cell {
  padding: 18px 14px;
  border-radius: 0;
  cursor: pointer;
  transition: all .3s ease;
  position: relative;
  overflow: hidden;
}

#country-detail .heatmap-cell::before {
  display: none;
}

#country-detail .heatmap-cell:hover {
  transform: none;
  filter: brightness(1.15);
}

#country-detail .heatmap-positive {
  background: rgba(123, 203, 138, .12);
  border: 1px solid rgba(123, 203, 138, .15);
}

#country-detail .heatmap-negative {
  background: rgba(231, 76, 60, .12);
  border: 1px solid rgba(231, 76, 60, .15);
}

#country-detail .heatmap-neutral {
  background: rgba(138, 138, 143, .08);
  border: 1px solid rgba(138, 138, 143, .1);
}


/* ===== Detail Category Bar / Premium Underline Style ===== */
#country-detail .detail-catbar {
  position: sticky;
  top: 140px;
  z-index: 60;
}

#country-detail .detail-catbtn {
  padding: 12px 20px;
  border-radius: 0;
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: rgba(255, 255, 255, .4);
  font-family: "Cinzel", serif;
  font-size: 11px;
  letter-spacing: .3em;
  text-transform: uppercase;
  transition: all .3s ease;
}

#country-detail .detail-catbtn:hover {
  color: rgba(255, 255, 255, .7);
  border-bottom-color: rgba(203, 179, 122, .3);
}

#country-detail .detail-catbtn.active {
  color: rgba(203, 179, 122, .9);
  border-bottom-color: rgba(203, 179, 122, .8);
}


/* ===== Header buttons ===== */
#country-detail .detail-icon-btn {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .10);
  background: rgba(10, 10, 10, .35);
  transition: all .25s ease;
}

#country-detail .detail-icon-btn:hover {
  border-color: rgba(203, 179, 122, .45);
  background: rgba(203, 179, 122, .08);
  box-shadow: 0 12px 40px rgba(0, 0, 0, .45);
}

#country-detail .detail-star {
  font-size: 16px;
  color: rgba(255, 255, 255, .5);
  transform: translateY(-1px);
}

#country-detail .detail-icon-btn.active .detail-star {
  color: #cbb37a;
  text-shadow: 0 0 18px rgba(203, 179, 122, .35);
}

#country-detail .detail-chip-btn {
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(203, 179, 122, .25);
  background: rgba(18, 18, 19, .52);
  color: #cbb37a;
  font-size: 10px;
  letter-spacing: .25em;
  text-transform: uppercase;
  transition: all .25s ease;
}

#country-detail .detail-chip-btn:hover {
  border-color: rgba(203, 179, 122, .55);
  background: rgba(203, 179, 122, .10);
  box-shadow: 0 0 22px rgba(203, 179, 122, .15);
}

/* ===== Alert pill ===== */
#country-detail .detail-alert-pill {
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 10px;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, .35);
  background: rgba(239, 68, 68, .10);
}

/* ===== small pill (Risk-on/off, toggles) ===== */
#country-detail .detail-pill {
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(10, 10, 10, .35);
  color: rgba(255, 255, 255, .55);
  font-size: 10px;
  letter-spacing: .22em;
  text-transform: uppercase;
  transition: all .25s ease;
}

#country-detail .detail-pill:hover {
  border-color: rgba(203, 179, 122, .35);
  color: rgba(255, 255, 255, .85);
}

#country-detail .detail-pill.detail-pill-active {
  border-color: rgba(203, 179, 122, .55);
  color: #cbb37a;
  background: rgba(203, 179, 122, .12);
}

/* ===== Risk dot ===== */
#country-detail .detail-risk-dot {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, #cbb37a, #d4af37);
  border: 3px solid rgba(0, 0, 0, .55);
  box-shadow: 0 0 22px rgba(203, 179, 122, .55);
  transition: left .55s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ===== Rates cards ===== */
#country-detail .mini-card {
  padding: 14px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, .07);
  background: rgba(10, 10, 10, .35);
}

#country-detail .mini-k {
  font-size: 10px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: #8a8a8f;
}

#country-detail .mini-v {
  margin-top: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 18px;
  color: #fff;
}

#country-detail .mini-sub {
  margin-top: 4px;
  font-size: 10px;
  color: #666;
  letter-spacing: .08em;
}

/* ===== Curve ===== */
#country-detail .detail-curve-bar {
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .06);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .06);
}

#country-detail .detail-curve-fill {
  height: 100%;
  background: linear-gradient(90deg, rgba(231, 76, 60, .65), rgba(243, 156, 18, .65), rgba(123, 203, 138, .70));
  transition: width .55s cubic-bezier(0.16, 1, 0.3, 1);
}

#country-detail .detail-curve-legend {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 9px;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .28);
}

/* ===== News chips ===== */
#country-detail .news-chip {
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(10, 10, 10, .30);
  color: rgba(255, 255, 255, .55);
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  transition: all .25s ease;
}

#country-detail .news-chip:hover {
  border-color: rgba(203, 179, 122, .35);
  color: rgba(255, 255, 255, .85);
}

#country-detail .news-chip.active {
  border-color: rgba(203, 179, 122, .55);
  color: #cbb37a;
  background: rgba(203, 179, 122, .12);
}

/* ===== Provenance tooltip ===== */
#country-detail .prov {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .10);
  background: rgba(10, 10, 10, .30);
  color: rgba(255, 255, 255, .45);
  font-size: 11px;
  transition: all .2s ease;
}

#country-detail .prov:hover {
  border-color: rgba(203, 179, 122, .40);
  color: #cbb37a;
  background: rgba(203, 179, 122, .08);
}

#country-detail .detail-prov-tip {
  position: fixed;
  z-index: 99999;
  max-width: 360px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(7, 7, 7, .90);
  border: 1px solid rgba(203, 179, 122, .20);
  color: rgba(255, 255, 255, .78);
  font-size: 11px;
  line-height: 1.55;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .75);
  backdrop-filter: blur(14px);
}

/* ===== Export preview ===== */
#country-detail .detail-export-preview {
  background: rgba(10, 10, 10, .35);
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 14px;
  padding: 12px;
  font-size: 11px;
  color: rgba(255, 255, 255, .70);
  white-space: pre-wrap;
}

/* ===== Theme Toggle Button ===== */
#country-detail .theme-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: rgba(18, 18, 19, .6);
  border: 1px solid rgba(203, 179, 122, .2);
  color: #cbb37a;
  cursor: pointer;
  transition: all .3s ease;
}

#country-detail .theme-toggle-btn:hover {
  background: rgba(203, 179, 122, .1);
  border-color: rgba(203, 179, 122, .5);
  box-shadow: 0 0 20px rgba(203, 179, 122, .2);
}

#country-detail .theme-toggle-btn .theme-icon-light {
  display: none;
}

#country-detail .theme-toggle-btn .theme-icon-dark {
  display: block;
}

/* ===== LIGHT MODE ===== */
#country-detail.light-mode {
  background:
    radial-gradient(1200px 700px at 60% 10%, rgba(203, 179, 122, .05), transparent 55%),
    radial-gradient(900px 600px at 20% 85%, rgba(100, 100, 120, .03), transparent 55%),
    linear-gradient(180deg, #ffffff 0%, #fafafa 55%, #f5f5f5 100%);
}

#country-detail.light-mode::before {
  opacity: .02;
}

/* Theme toggle in light mode */
#country-detail.light-mode .theme-toggle-btn {
  background: rgba(255, 255, 255, .95);
  border-color: rgba(203, 179, 122, .3);
  color: #b8a060;
}

#country-detail.light-mode .theme-toggle-btn:hover {
  background: rgba(203, 179, 122, .15);
  border-color: rgba(203, 179, 122, .6);
}

#country-detail.light-mode .theme-toggle-btn .theme-icon-light {
  display: block;
}

#country-detail.light-mode .theme-toggle-btn .theme-icon-dark {
  display: none;
}

/* Header bar in light mode */
#country-detail.light-mode>.fixed {
  background: linear-gradient(180deg, rgba(255, 255, 255, .95) 0%, transparent 100%) !important;
}

/* Panel styles in light mode */
#country-detail.light-mode .panel {
  background: rgba(255, 255, 255, .75);
  border-color: rgba(0, 0, 0, .08);
  box-shadow: 0 8px 32px rgba(0, 0, 0, .08), inset 0 1px 0 rgba(255, 255, 255, .9);
}

#country-detail.light-mode .panel:hover {
  border-color: rgba(203, 179, 122, .35);
}

#country-detail.light-mode .panel-header {
  border-bottom-color: rgba(0, 0, 0, .06);
}

#country-detail.light-mode .panel-header:hover {
  background: rgba(203, 179, 122, .08);
}

#country-detail.light-mode .panel-title {
  color: #8b7a45;
}

/* Text colors in light mode */
#country-detail.light-mode,
#country-detail.light-mode .text-white {
  color: #1a1a1a;
}

#country-detail.light-mode .text-gray-200,
#country-detail.light-mode .text-gray-300 {
  color: #333 !important;
}

#country-detail.light-mode .text-gray-400,
#country-detail.light-mode .text-gray-500 {
  color: #666 !important;
}

#country-detail.light-mode .text-gray-600,
#country-detail.light-mode .text-gray-700 {
  color: #888 !important;
}

#country-detail.light-mode .text-rr-text-muted {
  color: #777 !important;
}

#country-detail.light-mode .text-rr-gold {
  color: #9a8540 !important;
}

/* Country name in header */
#country-detail.light-mode #detail-country-name {
  color: #1a1a1a;
}

/* Stat cards in light mode */
#country-detail.light-mode .stat-card {
  background: rgba(0, 0, 0, .03);
  border-color: rgba(0, 0, 0, .06);
}

/* Mini cards in light mode */
#country-detail.light-mode .mini-card {
  background: rgba(0, 0, 0, .03);
  border-color: rgba(0, 0, 0, .06);
}

#country-detail.light-mode .mini-v {
  color: #1a1a1a;
}

/* Glass elements in light mode */
#country-detail.light-mode .rr-glass {
  background: rgba(255, 255, 255, .6);
  border-color: rgba(0, 0, 0, .08);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .06);
}

/* Chart container in light mode */
#country-detail.light-mode .chart-container {
  background: rgba(0, 0, 0, .02);
  border-color: rgba(0, 0, 0, .06);
}

#country-detail.light-mode .chart-container::before {
  background:
    repeating-linear-gradient(0deg, transparent, transparent 20px, rgba(0, 0, 0, .03) 20px, rgba(0, 0, 0, .03) 21px),
    repeating-linear-gradient(90deg, transparent, transparent 40px, rgba(0, 0, 0, .03) 40px, rgba(0, 0, 0, .03) 41px);
}

/* Buttons and pills in light mode */
#country-detail.light-mode .detail-catbtn {
  background: rgba(0, 0, 0, .04);
  border-color: rgba(0, 0, 0, .1);
  color: #555;
}

#country-detail.light-mode .detail-catbtn:hover {
  border-color: rgba(203, 179, 122, .5);
  color: #1a1a1a;
  background: rgba(203, 179, 122, .1);
}

#country-detail.light-mode .detail-catbtn.active {
  border-color: rgba(155, 133, 64, .6);
  color: #8b7a45;
  background: rgba(203, 179, 122, .15);
}

#country-detail.light-mode .detail-pill {
  background: rgba(0, 0, 0, .04);
  border-color: rgba(0, 0, 0, .1);
  color: #555;
}

#country-detail.light-mode .detail-pill:hover {
  border-color: rgba(203, 179, 122, .5);
  color: #1a1a1a;
}

#country-detail.light-mode .detail-pill.detail-pill-active {
  border-color: rgba(155, 133, 64, .6);
  color: #8b7a45;
  background: rgba(203, 179, 122, .15);
}

#country-detail.light-mode .detail-chip-btn {
  background: rgba(255, 255, 255, .8);
  border-color: rgba(155, 133, 64, .4);
  color: #8b7a45;
}

#country-detail.light-mode .detail-chip-btn:hover {
  border-color: rgba(155, 133, 64, .7);
  background: rgba(203, 179, 122, .15);
}

#country-detail.light-mode .detail-icon-btn {
  background: rgba(255, 255, 255, .8);
  border-color: rgba(0, 0, 0, .1);
}

#country-detail.light-mode .detail-icon-btn:hover {
  border-color: rgba(155, 133, 64, .5);
  background: rgba(203, 179, 122, .1);
}

#country-detail.light-mode .detail-star {
  color: #999;
}

#country-detail.light-mode .detail-icon-btn.active .detail-star {
  color: #b8a060;
}

/* Mode badge in light mode */
#country-detail.light-mode .mode-badge {
  background: rgba(203, 179, 122, .12);
  border-color: rgba(155, 133, 64, .4);
  color: #8b7a45;
}

/* News items in light mode */
#country-detail.light-mode .news-item {
  border-bottom-color: rgba(0, 0, 0, .06);
}

#country-detail.light-mode .news-item:hover {
  background: rgba(203, 179, 122, .08);
  border-color: rgba(203, 179, 122, .2);
}

#country-detail.light-mode .news-chip {
  background: rgba(0, 0, 0, .04);
  border-color: rgba(0, 0, 0, .1);
  color: #555;
}

#country-detail.light-mode .news-chip:hover {
  border-color: rgba(203, 179, 122, .5);
  color: #1a1a1a;
}

#country-detail.light-mode .news-chip.active {
  border-color: rgba(155, 133, 64, .6);
  color: #8b7a45;
  background: rgba(203, 179, 122, .15);
}

/* Stock rows in light mode */
#country-detail.light-mode .stock-row {
  border-bottom-color: rgba(0, 0, 0, .06);
}

#country-detail.light-mode .stock-row:hover {
  background: rgba(0, 0, 0, .02);
}

/* Chart tabs in light mode */
#country-detail.light-mode .chart-tab {
  background: rgba(0, 0, 0, .04);
  color: #666;
}

#country-detail.light-mode .chart-tab:hover {
  background: rgba(203, 179, 122, .1);
  color: #8b7a45;
}

#country-detail.light-mode .chart-tab.active {
  background: rgba(203, 179, 122, .18);
  color: #8b7a45;
  border-color: rgba(155, 133, 64, .5);
}

/* Heatmap cells in light mode */
#country-detail.light-mode .heatmap-positive {
  background: linear-gradient(135deg, rgba(34, 197, 94, .12), rgba(34, 197, 94, .22));
  border-color: rgba(34, 197, 94, .35);
}

#country-detail.light-mode .heatmap-negative {
  background: linear-gradient(135deg, rgba(239, 68, 68, .12), rgba(239, 68, 68, .22));
  border-color: rgba(239, 68, 68, .35);
}

#country-detail.light-mode .heatmap-neutral {
  background: linear-gradient(135deg, rgba(100, 100, 100, .1), rgba(100, 100, 100, .18));
  border-color: rgba(100, 100, 100, .25);
}

/* Export preview in light mode */
#country-detail.light-mode .detail-export-preview {
  background: rgba(0, 0, 0, .03);
  border-color: rgba(0, 0, 0, .08);
  color: #333;
}

/* Prov tooltip in light mode */
#country-detail.light-mode .prov {
  background: rgba(0, 0, 0, .04);
  border-color: rgba(0, 0, 0, .1);
  color: #666;
}

#country-detail.light-mode .prov:hover {
  border-color: rgba(155, 133, 64, .5);
  color: #8b7a45;
  background: rgba(203, 179, 122, .1);
}

#country-detail.light-mode .detail-prov-tip {
  background: rgba(255, 255, 255, .95);
  border-color: rgba(155, 133, 64, .25);
  color: #333;
  box-shadow: 0 16px 48px rgba(0, 0, 0, .15);
}

/* Scrollbar in light mode */
#country-detail.light-mode::-webkit-scrollbar-track {
  background: #f0efe9;
}

#country-detail.light-mode::-webkit-scrollbar-thumb {
  background: #ccc;
}

#country-detail.light-mode::-webkit-scrollbar-thumb:hover {
  background: #b8a060;
}

/* Category bar in light mode */
#country-detail.light-mode .detail-catbar {
  background: rgba(255, 255, 255, .7);
  border-color: rgba(0, 0, 0, .08);
}

/* ========== TRADINGVIEW WIDGET FIX ========== */
/* Market Overview Panel - 높이 고정 */
#country-detail .panel[style*="height: 90vh"] {
  height: 90vh !important;
  display: flex !important;
  flex-direction: column !important;
}

/* Panel Content - flex container */
#country-detail .panel[style*="height: 90vh"] .panel-content {
  flex: 1 !important;
  display: flex !important;
  flex-direction: column !important;
  min-height: 0 !important;
  padding: 0 !important;
  /* 패딩 제거해서 위젯이 꽉 차게 */
}

/* TradingView 컨테이너 - flex로 남은 공간 모두 차지 */
.tradingview-widget-container {
  flex: 1 !important;
  min-height: 0 !important;
  width: 100% !important;
  position: relative !important;
  overflow: hidden !important;
}

.tradingview-widget-container__widget {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
}

/* 위젯 내부 iframe도 100% 차지 */
.tradingview-widget-container iframe {
  width: 100% !important;
  height: 100% !important;
  border: none !important;
  display: block !important;
}

/* Chart Tabs - 상단 고정 */
#detail-chart-tabs {
  flex-shrink: 0 !important;
  padding: 12px 16px !important;
  background: transparent !important;
  border-bottom: none !important;
}

/* Portfolio Submenu Styling */
.portfolio-submenu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out, opacity 0.2s ease;
  opacity: 0;
}

.portfolio-submenu:not(.hidden) {
  max-height: 400px;
  opacity: 1;
}

#portfolio-chevron {
  transition: transform 0.3s ease;
}

#portfolio-chevron.rotate-180 {
  transform: rotate(180deg);
}

.portfolio-country-item {
  border-left: 2px solid transparent;
  transition: all 0.2s ease;
}

.portfolio-country-item:hover {
  border-left-color: var(--rr-gold, #cbb37a);
}


/* ===== Modal Overlay ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .7);
  backdrop-filter: blur(8px);
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.show {
  display: flex;
  opacity: 1;
  visibility: visible;
}

.modal {
  background: rgba(17, 17, 17, .95);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 16px;
  box-shadow: 0 32px 100px rgba(0, 0, 0, .8);
  max-height: 90vh;
  overflow-y: auto;
}

/* ===== Paper Trading Modal ===== */
.pt-tab {
  padding: 10px 20px;
  color: rgba(255, 255, 255, 0.4);
  font-family: 'Cinzel', serif;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border-bottom: 2px solid transparent;
  transition: all 0.3s ease;
}

.pt-tab:hover {
  color: rgba(255, 255, 255, 0.7);
}

.pt-tab.active {
  color: #cbb37a;
  border-bottom-color: #cbb37a;
}

.pt-content {
  animation: fadeIn 0.3s ease;
}

.pt-type-btn {
  flex: 1;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-size: 11px;
  letter-spacing: 0.2em;
  font-weight: 600;
  transition: all 0.2s ease;
  background: rgba(255, 255, 255, 0.03);
}

.pt-type-btn:hover {
  background: rgba(255, 255, 255, 0.05);
}

/* Custom Scrollbar for lists */
.custom-scrollbar::-webkit-scrollbar {
  width: 4px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}


/* ===== Pro Trading Interface ===== */
.pt-pct-btn {
  padding: 6px 0;
  font-size: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.6);
  border-radius: 4px;
  flex: 1;
  transition: all 0.2s;
}

.pt-pct-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border-color: rgba(203, 179, 122, 0.5);
}

/* Order Book */
.pt-ob-row {
  display: flex;
  height: 26px;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  cursor: pointer;
  position: relative;
  font-size: 11px;
}

.pt-ob-row:hover {
  background: rgba(255, 255, 255, 0.08) !important;
}

.pt-ob-price {
  flex: 1;
  text-align: center;
  font-weight: 700;
  z-index: 2;
  position: relative;
}

.pt-ob-vol-bar {
  position: absolute;
  top: 1px;
  bottom: 1px;
  width: 0%;
  opacity: 0.15;
  z-index: 1;
  transition: width 0.3s ease;
}

.pt-ob-ask {
  background: rgba(59, 130, 246, 0.02);
}

.pt-ob-ask .pt-ob-price {
  color: #60a5fa;
}

.pt-ob-ask .pt-ob-vol-bar {
  background: #3b82f6;
  right: 0;
}

.pt-ob-bid {
  background: rgba(239, 68, 68, 0.02);
}

.pt-ob-bid .pt-ob-price {
  color: #f87171;
}

.pt-ob-bid .pt-ob-vol-bar {
  background: #ef4444;
  left: 0;
}

/* Left aligned volume for bids? Or all right? HTS varies. Let's do right for Ask, Left for Bid to separate visually */

/* Current Price Highlight */
.pt-ob-curr {
  border: 1px solid rgba(203, 179, 122, 0.4) !important;
  background: rgba(203, 179, 122, 0.05) !important;
}

.pt-ob-curr .pt-ob-price {
  color: #cbb37a !important;
}

/* ========== Chart Period Selector ========== */
.chart-period-btn {
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 500;
  color: #666;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.05em;
}

.chart-period-btn:hover {
  color: #999;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
}

.chart-period-btn.chart-period-active {
  color: #cbb37a;
  background: rgba(203, 179, 122, 0.1);
  border-color: rgba(203, 179, 122, 0.3);
}

/* ========== Company Search Results ========== */
.company-search-item {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: all 0.15s ease;
}

.company-search-item:last-child {
  border-bottom: none;
}

.company-search-item:hover {
  background: rgba(203, 179, 122, 0.08);
}

.company-search-item .ticker {
  font-weight: 600;
  font-size: 12px;
  color: #cbb37a;
  margin-right: 8px;
}

.company-search-item .name {
  font-size: 11px;
  color: #888;
}

.company-search-item .exchange {
  font-size: 9px;
  color: #555;
  margin-left: auto;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ========== Selected Company Info ========== */
.selected-company-card {
  text-align: center;
}

.selected-company-card .ticker-symbol {
  font-size: 24px;
  font-weight: 700;
  color: #cbb37a;
  letter-spacing: 0.05em;
}

.selected-company-card .company-name {
  font-size: 11px;
  color: #888;
  margin-top: 4px;
}

.selected-company-card .price-main {
  font-size: 28px;
  font-weight: 600;
  color: #fff;
  margin-top: 12px;
  font-family: 'Manrope', sans-serif;
}

.selected-company-card .price-change {
  font-size: 13px;
  margin-top: 4px;
}

.selected-company-card .price-change.positive {
  color: #22c55e;
}

.selected-company-card .price-change.negative {
  color: #ef4444;
}

.selected-company-card .company-meta {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 16px;
  text-align: left;
}

.selected-company-card .meta-item {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  padding: 8px 10px;
}

.selected-company-card .meta-label {
  font-size: 9px;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.selected-company-card .meta-value {
  font-size: 11px;
  color: #ccc;
  margin-top: 2px;
  font-weight: 500;
}

/* ========== Popular Company Item ========== */
.popular-company-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.popular-company-item:hover {
  background: rgba(203, 179, 122, 0.08);
  border-color: rgba(203, 179, 122, 0.2);
}

.popular-company-item .ticker {
  font-weight: 600;
  font-size: 11px;
  color: #cbb37a;
}

.popular-company-item .name {
  font-size: 10px;
  color: #666;
  margin-left: 8px;
}

.popular-company-item .change {
  font-size: 10px;
  font-weight: 500;
}

.popular-company-item .change.positive {
  color: #22c55e;
}

.popular-company-item .change.negative {
  color: #ef4444;
}

/* Force Category Bar Fixed Position */
.detail-catbar {
  position: fixed !important;
  top: 10rem !important;
  /* 160px, below header */
  left: 2rem !important;
  right: 2rem !important;
  z-index: 40 !important;
}