:root {
  --frame-w: 460px;
  --frame-h: 820px;
  --frame-radius: 6px;
  --font-title: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial;
}

#hs-popup-root,
#hs-popup-root * {
  box-sizing: border-box;
  font-family: var(--font-title);
}

#hs-popup-root {
  color: var(--text-inverse);
}

.hs-popup {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  align-items: center;
  justify-content: center;
}

.hs-popup.active {
  display: flex;
}

.hs-viewport {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hs-frame {
  position: relative;
  width: min(var(--frame-w), calc(100vw - 160px));
  height: min(var(--frame-h), calc(100vh - 80px));
  background: var(--bg-dark, #000000);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: var(--shadow-strong);
  z-index: 2;
}

.hs-topfade {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.52), transparent);
  z-index: 6;
  pointer-events: none;
}

.hs-progress {
  position: absolute;
  top: 10px;
  left: 14px;
  right: 14px;
  display: flex;
  gap: 6px;
  z-index: 10;
}

.hs-bar {
  flex: 1;
  height: 3px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  overflow: hidden;
}

.hs-fill {
  width: 0;
  height: 100%;
  background: var(--text-inverse, #ffffff);
  transition: width linear;
}

.hs-header {
  position: absolute;
  top: 20px;
  left: 14px;
  right: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 20;
}

.hs-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.hs-flag {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.85);
  background: var(--bg-card, #ffffff);
  flex: 0 0 auto;
}

.hs-flag img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.hs-metaText {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.hs-country {
  color: var(--text-inverse, #ffffff);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hs-hint {
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
  line-height: 1.2;
}

.hs-close {
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 6px;
  transition: background 0.18s ease, opacity 0.18s ease;
  flex: 0 0 auto;
}

.hs-close:hover {
  background: rgba(255, 255, 255, 0.08);
}

.hs-close img {
  width: 22px;
  height: 22px;
  display: block;
  filter: brightness(0) invert(1);
}

.hs-slider {
  position: absolute;
  inset: 0;
}

.hs-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.hs-slide.active {
  opacity: 1;
}

.hs-video {
  position: absolute;
  inset: 0;
  background: #000000;
}

.hs-video iframe,
.hs-video img {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  object-fit: cover;
}

.hs-caption {
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 60px;
  z-index: 20;
}

.hs-title {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.18;
  color: var(--text-inverse, #ffffff);
}

.hs-desc {
  margin-top: 10px;
  font-size: 17px;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.86);
}

.hs-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  color: var(--text-inverse, #ffffff);
  background: rgba(0, 0, 0, 0.35);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  z-index: 3;
  user-select: none;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hs-nav:hover {
  background: rgba(0, 0, 0, 0.55);
  transform: translateY(-50%) scale(1.05);
}

.hs-nav-left {
  left: calc(50% - (var(--frame-w) / 2) - 70px);
}

.hs-nav-right {
  right: calc(50% - (var(--frame-w) / 2) - 70px);
}

.hs-tap {
  position: absolute;
  inset: 0;
  bottom: 120px;
  z-index: 19;
  display: grid;
  grid-template-columns: 32% 36% 32%;
}

@media (max-width: 900px) {
  .hs-frame {
    width: 100%;
    height: 100%;
    border-radius: 0;
  }

  .hs-nav {
    display: none;
  }

  .hs-header {
    top: 24px;
  }

  .hs-caption {
    left: 24px;
    right: 24px;
    bottom: 56px;
  }
}

@media (max-width: 600px) {
  .hs-progress {
    top: 10px;
    left: 10px;
    right: 10px;
  }

  .hs-header {
    top: 24px;
    left: 12px;
    right: 12px;
  }

  .hs-flag {
    width: 38px;
    height: 38px;
  }

  .hs-country {
    font-size: 16px;
  }

  .hs-hint {
    font-size: 13px;
  }

  .hs-caption {
    left: 20px;
    right: 20px;
    bottom: 44px;
  }

  .hs-title {
    font-size: 22px;
  }

  .hs-desc {
    font-size: 15px;
  }
}
