@charset "utf-8";

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100lvh;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: #1d1d48;
  background: #fff;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: manipulation;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  border: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

.page {
  min-height: 100lvh;
  background: #fff;
}

.page-inner {
  width: 100%;
  max-width: 580px;
  margin: 0 auto;
  min-height: 100lvh;
  display: flex;
  flex-direction: column;
  background: #f8cbd5;
}

@media (min-width: 640px) {
  .page {
    padding-top: 2.5rem;
  }

  .page-inner {
    min-height: calc(100lvh - 2.5rem);
    border-radius: 24px 24px 0 0;
    overflow: hidden;
    box-shadow: 0 24px 32px rgba(0, 0, 0, 0.15);
  }
}

.hero {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  max-height: 420px;
  overflow: hidden;
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  background: #f8cbd5;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.15) 0%, rgba(0, 0, 0, 0.45) 100%);
}

.hero-text {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1.5rem 1.25rem 1.75rem;
  text-align: center;
  color: #fff;
}

.hero-text h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.5rem, 5vw, 2rem);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.hero-text h2 {
  margin: 0;
  font-size: clamp(0.95rem, 3.2vw, 1.1rem);
  font-weight: 500;
  line-height: 1.5;
  opacity: 0.95;
}

.content {
  flex: 1;
  padding: 1rem 1rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.section-title {
  margin: 0;
  text-align: center;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.5;
}

.glass-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 56px;
  padding: 0.95rem 3.5rem 0.95rem 1.1rem;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0.04) 42%, rgba(255, 255, 255, 0) 100%),
    rgba(255, 255, 255, 0.12);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    0 0 8px rgba(0, 0, 0, 0.04);
  color: #fff;
  font: inherit;
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  animation: btn-breathe 2.8s ease-in-out infinite;
}

.glass-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 38%,
    rgba(255, 255, 255, 0.16) 50%,
    transparent 62%
  );
  background-size: 220% 100%;
  animation: btn-sweep 3.2s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

.glass-btn__label {
  position: relative;
  z-index: 1;
  padding-right: 0.25rem;
}

.glass-btn__arrow {
  position: absolute;
  right: 2.1rem;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: btn-arrow-nudge 1.6s ease-in-out infinite;
}

.glass-btn__dots {
  position: absolute;
  right: 0.85rem;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 3px;
  opacity: 0.75;
}

.glass-btn__dots span {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
}

.glass-btn.is-paused,
.glass-btn.is-paused::before,
.glass-btn.is-paused .glass-btn__shimmer,
.glass-btn.is-paused .glass-btn__arrow {
  animation-play-state: paused;
}

.glass-btn__shimmer {
  position: absolute;
  bottom: 7px;
  left: 0;
  z-index: 1;
  width: 38%;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.15) 20%,
    rgba(255, 255, 255, 0.95) 50%,
    rgba(255, 255, 255, 0.15) 80%,
    transparent 100%
  );
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.65);
  pointer-events: none;
  transform: translate3d(-120%, 0, 0);
  will-change: transform;
  animation: btn-shimmer 2.4s ease-in-out infinite;
}

.glass-btn:hover {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    0 4px 16px rgba(219, 39, 119, 0.18);
}

.glass-btn:active {
  transform: scale(0.98);
  animation: none;
}

@keyframes btn-breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.015); }
}

@keyframes btn-sweep {
  0% { background-position: 120% 0; }
  100% { background-position: -120% 0; }
}

@keyframes btn-shimmer {
  0% { transform: translate3d(-120%, 0, 0); opacity: 0; }
  12% { opacity: 1; }
  100% { transform: translate3d(320%, 0, 0); opacity: 0; }
}

@keyframes btn-arrow-nudge {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(-4px); }
}

@media (max-width: 380px) {
  .glass-btn {
    font-size: 0.88rem;
    padding-right: 3.2rem;
  }

  .glass-btn__arrow {
    right: 1.85rem;
  }

  .glass-btn__arrow svg {
    width: 24px;
    height: 24px;
  }
}

.card {
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 100%), rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.02);
  overflow: hidden;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.card-link {
  display: block;
  color: #fff;
}

.card-header {
  padding: 1rem 1.25rem 0.75rem;
  font-weight: 600;
  text-align: center;
}

.gallery-meta {
  padding: 0 1.25rem 0.75rem;
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.85);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  padding: 0 0.5rem 0.75rem;
}

.gallery-grid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
}

.gallery-scroll {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0 0.75rem 0.75rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  contain: layout style;
}

.gallery-scroll--games {
  justify-content: space-between;
  gap: 0.65rem;
  overflow-x: visible;
  scroll-snap-type: none;
}

.game-item {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  text-decoration: none;
  color: #fff;
}

.game-item img {
  width: 140px;
  height: 140px;
  border-radius: 18px;
  object-fit: cover;
  object-position: center top;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  transform: translateZ(0);
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

.game-item:active img {
  transform: scale(0.97);
}

.game-item__name {
  width: 100%;
  font-size: 0.72rem;
  font-weight: 500;
  text-align: center;
  line-height: 1.35;
  opacity: 0.95;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.gallery-card {
  flex: 0 0 42%;
  max-width: 180px;
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  overflow: hidden;
  scroll-snap-align: start;
  background: #fff;
}

.gallery-quad {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  width: 100%;
  height: 100%;
}

.gallery-quad-photo {
  background-size: 200% 200%;
  background-repeat: no-repeat;
  transform: translateZ(0);
}

.gallery-quad-photo.q-tl { background-position: 0% 0%; }
.gallery-quad-photo.q-tr { background-position: 100% 0%; }
.gallery-quad-photo.q-bl { background-position: 0% 100%; }

.gallery-quad-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.15rem;
  padding: 0.45rem 0.35rem;
  background: #f5f5f5;
  color: #c0392b;
  font-size: 0.62rem;
  line-height: 1.35;
  text-align: center;
}

.gallery-quad-info strong {
  font-size: 0.72rem;
  color: #e74c3c;
}

.gallery-quad-info--compact {
  font-size: 0.55rem;
  gap: 0.1rem;
}

.gallery-quad-info--compact strong {
  font-size: 0.6rem;
}

.gallery-quad-info--emoji {
  font-size: 0.65rem;
}

.gallery-tags {
  font-size: 0.58rem;
  opacity: 0.9;
}

.gallery-promo {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 0.6rem;
  text-align: center;
  background: linear-gradient(160deg, #2d1b4e 0%, #5b2d82 45%, #8e44ad 100%);
  color: #fff;
}

.promo-badge {
  font-size: 0.55rem;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  margin-bottom: 0.5rem;
}

.promo-title {
  margin: 0 0 0.5rem;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.35;
  color: #ffd700;
}

.promo-sub {
  margin: 0;
  font-size: 0.58rem;
  opacity: 0.85;
}

.promo-name {
  margin: 0.15rem 0 0.5rem;
  font-size: 0.9rem;
  font-weight: 700;
}

.promo-list {
  margin: 0 0 0.5rem;
  padding: 0;
  list-style: none;
  font-size: 0.55rem;
  line-height: 1.5;
  opacity: 0.92;
}

.promo-list li::before {
  content: "✓ ";
  color: #ffd700;
}

.promo-cta {
  font-size: 0.6rem;
  font-weight: 600;
  color: #ffd700;
}

.info-card {
  padding: 1rem 1.25rem;
  color: #fff;
}

.info-card p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.65;
}

.info-card .more-text {
  display: none;
  margin-top: 0.75rem;
}

.info-card.expanded .more-text {
  display: block;
}

.more-btn {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.35rem 0.75rem;
  border: none;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.1);
  color: #fff;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}

.more-btn:hover {
  background: rgba(0, 0, 0, 0.15);
}

.rules {
  padding: 0.25rem 0;
}

.rules h3 {
  margin: 0 0 0.75rem;
  text-align: center;
  font-size: 1rem;
  font-weight: 700;
}

.rules ol {
  margin: 0;
  padding-left: 1.25rem;
  color: #fff;
}

.rules li {
  margin-bottom: 0.65rem;
  font-size: 0.92rem;
  line-height: 1.55;
}

.disclaimer {
  margin: 0.5rem 0 0;
  padding: 0 0.5rem;
  text-align: center;
  font-size: 0.82rem;
  line-height: 1.55;
  color: rgba(29, 29, 72, 0.75);
}

.footer {
  padding: 1rem;
  text-align: center;
  font-size: 0.75rem;
  color: rgba(29, 29, 72, 0.55);
}

.footer a {
  text-decoration: underline;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 639px) {
  html {
    scroll-behavior: auto;
  }

  .page-inner {
    contain: layout style;
  }

  .glass-btn,
  .card {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .glass-btn {
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.28) 0%, rgba(255, 255, 255, 0.08) 100%),
      rgba(255, 255, 255, 0.18);
    animation: none;
  }

  .glass-btn::before {
    display: none;
  }

  .card {
    background: rgba(255, 255, 255, 0.16);
  }

  .content > .card,
  .content > .disclaimer {
    content-visibility: auto;
    contain-intrinsic-size: auto 200px;
  }

  .gallery-card {
    content-visibility: auto;
    contain-intrinsic-size: auto 240px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .glass-btn,
  .glass-btn::before,
  .glass-btn__shimmer,
  .glass-btn__arrow {
    animation: none;
  }

  .hero-video {
    display: none;
  }

  .hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: url("../imgs/linktree/hero.jpg") top center / cover no-repeat;
  }
}
