:root {
  --wc-bg: #bcbcbc;
  --wc-card: #ebebebș --wc-card-solid: #ebebeb;
  --wc-line: rgba(255, 255, 255, 0.14);
  --wc-text: #0f0f0f;
  --wc-muted: #6f6f6f;
  --wc-accent: #dc0510;
  --wc-accent-2: #84030a;
  --wc-radius: 1.25rem;
}

body.is-loading {
  overflow: hidden;
}

.page-loader,
.map-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  transition:
    opacity 0.35s ease,
    visibility 0.35s ease;
}

.page-loader {
  position: fixed;
  inset: 0;
  z-index: 4000;
  background: rgba(15, 15, 15, 0.94);
}

.page-loader.is-hidden,
.map-loader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader {
  width: 4.8rem;
  height: 4.8rem;
  border-radius: 50%;
  display: inline-block;
  position: relative;
  border: 0.3rem solid;
  border-color: #fff #fff transparent transparent;
  box-sizing: border-box;
  animation: rotation 1s linear infinite;
}

.loader::after,
.loader::before {
  content: "";
  box-sizing: border-box;
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  margin: auto;
  border: 0.3rem solid;
  border-color: transparent transparent #dc0510 #dc0510;
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  animation: rotationBack 0.5s linear infinite;
  transform-origin: center center;
}

.loader::before {
  width: 3.2rem;
  height: 3.2rem;
  border-color: #fff #fff transparent transparent;
  animation: rotation 1.5s linear infinite;
}

@keyframes rotation {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes rotationBack {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(-360deg);
  }
}

@keyframes caret-pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.75;
  }

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

.wc-mobile-arrow {
  display: none;
  color: var(--wc-accent);
  font-size: 2rem;
  line-height: 1;
}

@keyframes wc-arrow-pulse {
  0%,
  100% {
    transform: translateY(0) scale(1);
    opacity: 0.8;
  }

  50% {
    transform: translateY(6px) scale(1.1);
    opacity: 1;
  }
}

@media (max-width: 768px) {
  .wc-mobile-arrow {
    display: block;
    margin-top: 1.25rem;
    text-align: center;
    animation: wc-arrow-pulse 1.4s ease-in-out infinite;
  }

  .wc-mobile-arrow--bottom {
    display: block;
    margin: 0 auto;
    text-align: center;
  }
}

body.is-loading {
  overflow: hidden;
}

body.wc-panel-open {
  overflow: hidden;
}

main {
  background:
    radial-gradient(
      circle at 20% 10%,
      rgba(220, 5, 16, 0.24),
      transparent 28rem
    ),
    radial-gradient(
      circle at 82% 34%,
      rgba(255, 209, 102, 0.12),
      transparent 24rem
    ),
    var(--wc-bg);
  color: var(--wc-text);
  min-height: 100vh;
}

.wc-hero {
  max-width: 76rem;
  margin: 0 auto;
  padding: 4.5rem 1.25rem 1.5rem;
}

.wc-hero__copy {
  max-width: 52rem;
}

.wc-cta {
  max-width: 10rem;
  margin: 2rem auto;
  text-align: center;
}

.wc-kicker {
  margin: 0 0 0.5rem;
  color: var(--wc-accent-2);
  font-size: 0.75rem;
  line-height: 1rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
}

.wc-hero h2 {
  margin: 0;
  color: var(--wc-text);
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1;
  letter-spacing: -0.07em;
}

.wc-hero p:not(.wc-kicker) {
  margin: 1.25rem 0 0;
  max-width: 42rem;
  color: var(--wc-muted);
  font-size: 1.05rem;
  line-height: 1.5rem;
}

.wc-app {
  width: min(94rem, calc(100% - 2.5rem));
  min-height: 55rem;
  margin: 0 auto 4rem;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(22rem, 0.75fr);
  gap: 1rem;
  align-items: stretch;
}

.wc-globe-shell,
.wc-panel {
  border: 1px solid var(--wc-line);
  border-radius: var(--wc-radius);
  background: rgba(255, 255, 255, 0.045);
  box-shadow: 0 1.5rem 5rem rgba(0, 0, 0, 0.34);
  overflow: hidden;
}

.wc-globe-shell {
  position: relative;
  min-height: 55rem;
}

.wc-globe-toolbar {
  position: absolute;
  z-index: 5;
  top: 1rem;
  left: 1rem;
  right: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  pointer-events: none;
}

.wc-globe-toolbar h3 {
  margin: 0;
  color: var(--wc-text);
  font-size: 1.25rem;
  line-height: 1.4rem;
}

.wc-reset-btn,
.wc-chip,
.wc-connection-card,
.wc-node-btn {
  font: inherit;
}

.wc-reset-btn {
  pointer-events: auto;
  border: 1px solid var(--wc-line);
  border-radius: 999px;
  padding: 0.55rem 0.9rem;
  color: var(--wc-text);
  background: rgba(255, 255, 255, 1);
  cursor: pointer;
}

.wc-reset-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

.wc-globe {
  width: 100%;
  height: 100%;
  min-height: 55rem;
}

.wc-globe canvas {
  cursor: grab;
}

.wc-globe-hint {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  z-index: 5;
  max-width: 25rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--wc-line);
  border-radius: 999px;
  color: var(--wc-muted);
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(0.75rem);
  font-size: 0.85rem;
  line-height: 1.15rem;
}

.wc-panel {
  background: var(--wc-card);
  backdrop-filter: blur(1rem);
  min-height: 55rem;
  display: flex;
  flex-direction: column;
}

.wc-panel__empty,
.wc-panel__content {
  padding: 1.25rem;
}

.wc-panel h3,
.wc-panel h4 {
  color: var(--wc-text);
  margin: 0;
}

.wc-panel p {
  color: var(--wc-muted);
  font-size: 0.95rem;
  line-height: 1.35rem;
}

.wc-country-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.wc-country-header__actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.wc-country-header h3 {
  font-size: 2rem;
  line-height: 2.1rem;
  letter-spacing: -0.04em;
}

.wc-count-pill {
  white-space: nowrap;
  border-radius: 999px;
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--wc-line);
  color: var(--wc-muted);
  font-size: 0.8rem;
}

.wc-panel-close {
  border: 1px solid var(--wc-line);
  border-radius: 999px;
  padding: 0.45rem 0.7rem;
  color: var(--wc-text);
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  font: inherit;
  display: none;
}

.wc-country-profile {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.wc-country-profile__section--trophies {
  min-width: 0;
}

.wc-country-profile__eyebrow {
  color: var(--wc-text);
  font-size: 0.72rem;
  line-height: 1;
  letter-spacing: 0.05rem;
  text-transform: uppercase;
  font-weight: 700;
}

.wc-country-profile__empty {
  margin: 0;
  color: var(--wc-text);
}

.wc-trophy-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.wc-trophy-pill {
  position: relative;
  width: 4.6rem;
  height: 4.6rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.wc-trophy-pill__count {
  position: absolute;
  right: 0.5rem;
  bottom: -0.1rem;
  min-width: 1.5rem;
  height: 1.5rem;
  padding: 0 0.25rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid
    color-mix(in srgb, var(--trophy-accent) 55%, rgba(0, 0, 0, 0.12));
  box-shadow: 0 0.2rem 0.6rem rgba(0, 0, 0, 0.14);
  color: var(--wc-text);
  font-size: 0.9rem;
  line-height: 1;
  font-weight: 800;
  z-index: 1;
}

.wc-trophy-pill__icon,
.wc-trophy-pill__image {
  width: 4.6rem;
  height: 4.6rem;
  flex-shrink: 0;
}

.wc-trophy-pill__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  line-height: 1;
}

.wc-trophy-pill__image {
  object-fit: contain;
  display: block;
}

.wc-country-stat-card {
  display: flex;
  align-items: end;
  gap: 1rem;
}

.wc-country-stat-card strong {
  color: var(--wc-text);
  font-size: 1.55rem;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.wc-market-value {
  display: inline-flex;
  align-items: baseline;
  gap: 0.08em;
}

.wc-market-value__currency {
  font-size: 1.6rem;
  line-height: 1;
}

.wc-market-value__number {
  font-size: 3rem;
  line-height: 1;
}

.wc-market-value__unit {
  font-size: 1.6rem;
  line-height: 1;
  text-transform: lowercase;
}

.wc-category-filter {
  margin: 1rem 0;
  display: grid;
  gap: 0.4rem;
}

.wc-category-filter__label {
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--wc-muted);
}

.wc-category-filter__select {
  width: 100%;
  border: 1px solid var(--wc-line);
  border-radius: 0.75rem;
  padding: 0.58rem 0.7rem;
  color: var(--wc-text);
  background: rgba(255, 255, 255, 0.08);
  font: inherit;
}

.wc-network-wrap {
  margin: 1rem 0;
  border: 1px solid var(--wc-line);
  border-radius: 1rem;
  background: rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

#wcNetworkSvg {
  width: 100%;

  display: none;
}

.wc-network-line {
  stroke: rgba(255, 255, 255, 0.22);
  stroke-width: 1;
}

.wc-network-node text {
  fill: var(--wc-text);
  font-size: 0.7rem;
  text-anchor: middle;
  pointer-events: none;
}

.wc-network-node circle {
  stroke: rgba(255, 255, 255, 0.45);
  stroke-width: 1;
  cursor: pointer;
}

.wc-network-node--country circle {
  fill: rgba(255, 255, 255, 0.16);
}

.wc-network-node--connection circle {
  fill: rgba(255, 45, 54, 0.72);
}

.wc-network-node--center circle {
  fill: rgba(251, 181, 0.6);
}

.wc-detail {
  border: 1px solid var(--wc-line);
  border-radius: 1rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.06);
  margin-bottom: 1rem;
  z-index: 200;
}

.wc-detail__category {
  color: var(--wc-accent-2);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
}

.wc-detail__nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.wc-detail__nav-count {
  font-size: 0.72rem;
  color: rgba(0, 0, 0, 0.45);
  min-width: 2.5rem;
  text-align: center;
}

.wc-detail__arrow {
  appearance: none;
  background: rgba(0, 0, 0, 0.07);
  border: none;
  border-radius: 50%;
  width: 1rem;
  height: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.9rem;
  color: #111;
  flex-shrink: 0;
  transition: background 0.15s;
}

.wc-detail__arrow:hover:not(:disabled) {
  background: rgba(0, 0, 0, 0.15);
}

.wc-detail__arrow:disabled {
  opacity: 0.28;
  cursor: default;
}

.wc-detail h4 {
  margin-top: 0.35rem;
  font-size: 1.1rem;
  line-height: 1.25rem;
}

.wc-detail p {
  margin-bottom: 0;
}

#connectionDetail {
  display: none;
}

.wc-globe-detail {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 3rem;
  z-index: 1000;
  width: min(24rem, calc(100% - 2rem));
  pointer-events: none;
}

.wc-globe-detail .wc-detail {
  margin-bottom: 0;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(1rem);
  box-shadow: 0 1rem 2.5rem rgba(0, 0, 0, 0.18);
  z-index: 200;
  pointer-events: auto;
}

.wc-list {
  display: grid;
  gap: 0.6rem;
  max-height: 40rem;
  overflow: auto;
  padding-right: 0.35rem;
}

.wc-connection-card {
  width: 100%;
  text-align: left;
  border: 3.6px solid var(--connection-color, var(--wc-line));
  border-radius: 0.9rem;
  padding: 0.85rem;
  color: var(--wc-text);
  /* background: rgba(255, 255, 255, 0.045); */
  background: #ebebeb;
}

.wc-connection-card strong {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.95rem;
  line-height: 1.2rem;
}

.wc-connection-card span {
  display: block;
  color: var(--wc-muted);
  font-size: 0.82rem;
  line-height: 1.1rem;
}

.wc-connection-card__meta {
  margin-top: 0.55rem;
}

.wc-connection-card__meta-text {
  margin-bottom: 0.4rem;
}

.wc-connection-card__flags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.wc-country-flag-btn {
  appearance: none;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 999px;
  width: 2rem;
  height: 2rem;
  padding: 0;
  overflow: hidden;
  background: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.wc-country-flag-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.wc-country-flag-btn span {
  display: inline;
  font-size: 0.55rem;
  color: #333;
  font-weight: 700;
  line-height: 1;
}

.wc-connection-card__kicker {
  display: inline-block;
  margin-bottom: 0.35rem;
  color: var(--connection-color, var(--wc-muted));
  font-size: 1rem;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}

.wc-connection-card p {
  margin-top: 0.45rem;
  margin-bottom: 0;
  color: #252525;
  font-size: 0.9rem;
  line-height: 1.3rem;
}

.wc-node-btn {
  color: inherit;
  border: 0;
  background: transparent;
  padding: 0;
}

.wc-network-node--connection {
  width: 2rem;
}

@media (max-width: 1100px) {
  .wc-cta {
    margin: 0.5rem 1.9rem;
  }

  .wc-country-profile {
    grid-template-columns: 1fr;
  }

  /* .wc-network-wrap {
    display: none;
  } */

  .wc-detail {
    margin-bottom: 0;
  }
}

@media (max-width: 900px) {
  .wc-hero {
    padding-top: 2.5rem;
  }

  .wc-app {
    width: 100%;
    min-height: 100vh;
    height: 100vh;
    margin-bottom: 0;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 0;
  }

  .wc-cta {
    margin: 0.5rem 1.25rem;
  }

  .wc-globe-shell {
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    min-height: 0;
    height: 100%;
    width: 95%;
    margin: 0 auto;
  }

  .wc-globe {
    min-height: 0;
    height: 100%;
  }

  .wc-panel {
    position: relative;
    z-index: 1;
    min-height: 0;
    max-height: none;
    height: 100%;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
    transform: none;
    transition: none;
  }

  .wc-panel::before {
    display: none;
  }

  .wc-panel__content {
    min-height: 0;
    height: 100%;
    overflow: auto;
    overscroll-behavior: auto;
    -webkit-overflow-scrolling: touch;
  }

  #connectionDetail {
    display: block;
    position: static;
    margin: 0 0 0.6rem;
  }

  #connectionDetail .wc-detail {
    margin-bottom: 0;
    opacity: 1;
    background: rgba(255, 255, 255, 0.6);
  }

  .wc-globe-detail {
    display: none;
  }

  .wc-globe-detail .wc-detail {
    padding: 0.8rem;
    border-radius: 0.85rem;
    opacity: 0.9;
  }

  .wc-globe-detail .wc-detail p {
    font-size: 0.82rem;
    line-height: 1.15rem;
  }

  .wc-panel-close {
    display: none;
  }

  #wcNetworkSvg {
    height: 11rem;
    display: none;
  }

  .wc-network-wrap {
    display: block;
  }

  #connectionList {
    display: grid;
    max-height: none;
    padding-right: 0;
  }

  .wc-country-header h3 {
    font-size: 1.3rem;
  }
}

.globe-country-label {
  transform: translate(-50%, -50%);
  padding: 0.18rem 0.38rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.58);
  color: #fff;
  font-size: 0.68rem;
  line-height: 1;
  white-space: nowrap;
  pointer-events: none;
  /* text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8); */
  /* border: 1px solid rgba(255, 255, 255, 0.18); */
}

/* .globe-country-label.is-selected {
  background: rgba(255, 209, 102, 0.95);
  color: #111;
  font-weight: 700;
} */

.img-bottom {
  width: 100%;
  height: auto;
  object-fit: contain;
  aspect-ratio: 16 / 9;
  pointer-events: none;
}
