* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC",
    "Microsoft YaHei", sans-serif;
  background: #000;
  color: #111;
  overflow: hidden;
}

.language-switcher {
  position: fixed;
  top: max(12px, env(safe-area-inset-top));
  right: max(12px, env(safe-area-inset-right));
  z-index: 60;
  display: flex;
  gap: 6px;
  padding: 5px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.36);
  backdrop-filter: blur(12px);
}

.lang-btn {
  border: 0;
  border-radius: 999px;
  padding: 7px 10px;
  background: transparent;
  color: rgba(255, 255, 255, 0.76);
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, transform 0.1s ease;
}

.lang-btn:active {
  transform: scale(0.96);
}

.lang-btn.is-active {
  background: #fff;
  color: #ff2d55;
}

.page-loader {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 32%, rgba(255, 59, 127, 0.42), transparent 30%),
    linear-gradient(145deg, #130610 0%, #050508 48%, #12030a 100%);
  color: #fff;
  transition: opacity 0.45s ease, visibility 0.45s ease;
}

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

.loader-card {
  width: min(78vw, 320px);
  text-align: center;
  animation: loaderFloat 1.8s ease-in-out infinite;
}

.loader-orbit {
  position: relative;
  width: 82px;
  height: 82px;
  margin: 0 auto 18px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  animation: loaderSpin 1.2s linear infinite;
}

.loader-orbit::before {
  content: "";
  position: absolute;
  inset: 13px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff3b7f, #ff2d55);
  box-shadow: 0 0 28px rgba(255, 45, 85, 0.65);
}

.loader-orbit span {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.75);
}

.loader-orbit span:nth-child(1) {
  top: -5px;
  left: 50%;
  transform: translateX(-50%);
}

.loader-orbit span:nth-child(2) {
  right: 4px;
  bottom: 12px;
}

.loader-orbit span:nth-child(3) {
  left: 4px;
  bottom: 12px;
}

.loader-title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.2px;
}

.loader-text {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
}

@keyframes loaderSpin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes loaderFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

/* Background slider */
.bg-slider {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}

.bg-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1s ease;
  background-color: #0b0b0f;
}

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

/* Overlay and dialog */
.overlay-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
}

.dialog {
  width: 100%;
  max-width: 380px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
  padding: 18px 16px 14px;
  animation: pop 0.22s ease-out;
}

@keyframes pop {
  from {
    transform: translateY(6px) scale(0.98);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.dialog-title {
  text-align: center;
  font-size: 17px;
  font-weight: 700;
  color: #ff2d55;
  margin-bottom: 10px;
}

.dialog-text {
  font-size: 14px;
  line-height: 1.55;
  text-align: center;
  color: #444;
  margin-bottom: 14px;
}

.dialog-text b {
  color: #ff2d55;
}

.btn-row {
  display: flex;
  gap: 10px;
  margin-top: 6px;
}

.btn {
  flex: 1;
  border: none;
  border-radius: 999px;
  padding: 11px 0;
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.15s ease, opacity 0.2s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: linear-gradient(135deg, #ff3b7f, #ff2d55);
  color: #fff;
  box-shadow: 0 8px 20px rgba(255, 45, 85, 0.45);
}

.btn-secondary {
  background: #f5f5f7;
  color: #333;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.08);
}

.card-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 355px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-right: 2px;
}

.single-card-carousel {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.girl-card {
  width: 100%;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
  cursor: pointer;
  touch-action: none;
  user-select: none;
  border: 2px solid rgba(255, 45, 85, 0.0);
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.girl-card:hover {
  border-color: rgba(255, 45, 85, 0.35);
  transform: translateY(-1px);
}

.girl-card-media {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #f0f0f0;
}

.girl-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.empty-card-media {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eee;
  color: #999;
  font-size: 12px;
}

.girl-card-label {
  text-align: center;
  padding: 8px 0 7px;
  font-size: 14px;
  color: #ff2d55;
  font-weight: 750;
}

.carousel-hint {
  text-align: center;
  color: #ff2d55;
  font-size: 13px;
  font-weight: 700;
}

.carousel-status {
  text-align: center;
  color: rgba(0, 0, 0, 0.42);
  font-size: 12px;
}

/* Progress bar */
.progress-wrapper {
  margin-top: 6px;
}

.progress-label {
  font-size: 14px;
  margin-bottom: 7px;
  text-align: center;
  color: #ff2d55;
  font-weight: 800;
}

.progress-bar {
  position: relative;
  width: 100%;
  height: 9px;
  border-radius: 999px;
  background: #f1f1f6;
  overflow: hidden;
}

.progress-inner {
  position: absolute;
  inset: 0;
  width: 0%;
  background: linear-gradient(135deg, #ff3b7f, #ff2d55);
  border-radius: inherit;
  transition: width 0.25s linear;
}

.progress-percent {
  margin-top: 6px;
  text-align: right;
  font-size: 12px;
  color: #666;
}

.small-note {
  font-size: 12px;
  color: rgba(0, 0, 0, 0.45);
  text-align: center;
  margin-top: 6px;
}

.fullscreen-iframe {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 20;
  width: 100%;
  height: 100%;
  border: 0;
  background: #000;
}

@media (max-width: 380px) {
  .language-switcher {
    top: max(8px, env(safe-area-inset-top));
    right: max(8px, env(safe-area-inset-right));
  }

  .lang-btn {
    padding: 6px 8px;
    font-size: 11px;
  }

  .dialog {
    padding: 14px 14px 10px;
    border-radius: 12px;
    max-width: 340px;
  }
}

