/* =========================================================================
   Teebik Games — 站点样式
   断点：md = 768px，sm = 640px（与原 Tailwind 配置一致）
   ========================================================================= */

/* ---------- 字体（自托管，不依赖 Google Fonts） ---------- */

@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url('../fonts/outfit-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url('../fonts/outfit-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- 设计变量 ---------- */

:root {
  --blue: #5bc0eb;
  --blue-accent: #38bdf8;
  --cyan: #22d3ee;
  --dark: #0b1120;

  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;

  --panel-bg: rgba(11, 17, 32, 0.6);
  --panel-border: rgba(255, 255, 255, 0.1);

  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);

  --font-sans: 'Outfit', ui-sans-serif, system-ui, -apple-system, 'Segoe UI',
    Roboto, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei',
    'Noto Sans CJK SC', sans-serif;
}

/* ---------- 基础 ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background-color: #000;
  color: #fff;
  font-family: var(--font-sans);
  overflow: hidden; /* 页面不滚动 */
  touch-action: none; /* 禁止移动端下拉刷新 */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: var(--blue);
  color: #000;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

a {
  text-decoration: none;
  color: inherit;
}

/* 隐藏滚动条但保留滚动能力 */
.hide-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.hide-scrollbar::-webkit-scrollbar {
  display: none;
}

/* ---------- 入场动画 ---------- */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  opacity: 0;
  animation: fadeInUp 0.8s var(--ease-out-expo) forwards;
}

.delay-100 {
  animation-delay: 100ms;
}
.delay-200 {
  animation-delay: 200ms;
}
.delay-300 {
  animation-delay: 300ms;
}
.delay-500 {
  animation-delay: 500ms;
}

@media (prefers-reduced-motion: reduce) {
  .fade-in-up {
    animation: none;
    opacity: 1;
  }
}

/* ---------- 布局骨架 ---------- */

.app {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

.scene-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: #000;
}

.scene-layer canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* ---------- 顶部导航 ---------- */

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  pointer-events: none;
}

.topbar__brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  pointer-events: auto;
  transition: transform 0.3s;
}

.topbar__brand:hover {
  transform: scale(1.05);
}

.logo {
  height: 1.5rem;
  width: auto;
  filter: drop-shadow(0 0 15px rgba(91, 192, 235, 0.5));
}

.topbar__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  pointer-events: auto;
}

/* 语言切换 */

.lang {
  position: relative;
}

.lang__trigger {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  font-size: 0.75rem;
  line-height: 1rem;
  font-weight: 500;
  color: var(--slate-400);
  transition: color 0.15s, background-color 0.15s;
}

.lang__trigger:hover {
  color: #fff;
  background: rgba(0, 0, 0, 0.4);
}

.lang__icon {
  display: inline-flex;
}

.lang__menu {
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 0.5rem;
  width: 8rem;
  max-height: 60vh;
  overflow-y: auto;
  padding: 0.5rem 0;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(0.5rem);
  transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
}

/* 桌面用 hover 打开；触屏用 JS 加 .is-open（hover 在触屏上不可靠） */
@media (hover: hover) {
  .lang:hover .lang__menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
}

.lang__menu.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang__option {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.5rem 1rem;
  font-size: 0.75rem;
  line-height: 1rem;
  color: var(--slate-300);
  transition: background-color 0.15s;
}

.lang__option:hover {
  background: rgba(255, 255, 255, 0.1);
}

.lang__option.is-active {
  color: var(--blue);
  font-weight: 700;
}

/* 支持链接 */

.topbar__support {
  display: none;
  font-size: 0.75rem;
  line-height: 1rem;
  font-weight: 500;
  letter-spacing: 0.025em;
  color: var(--slate-400);
  transition: color 0.15s;
}

.topbar__support:hover {
  color: #fff;
  text-decoration: underline;
  text-decoration-color: rgba(91, 192, 235, 0.5);
  text-underline-offset: 4px;
}

/* 主 CTA */

.cta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  background-image: linear-gradient(to right, var(--blue), var(--cyan));
  color: #000;
  font-weight: 700;
  font-size: 0.75rem;
  line-height: 1rem;
  letter-spacing: 0.025em;
  box-shadow: 0 0 20px rgba(91, 192, 235, 0.4);
  transition: box-shadow 0.3s, transform 0.3s;
}

.cta:hover {
  box-shadow: 0 0 30px rgba(91, 192, 235, 0.6);
  transform: scale(1.05);
}

.cta__arrow {
  display: none;
  transition: transform 0.15s;
}

.cta:hover .cta__arrow {
  transform: translateX(0.25rem);
}

/* ---------- 主内容 ---------- */

.content {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  pointer-events: none;
}

.content__column {
  position: relative;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  pointer-events: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.content__column::-webkit-scrollbar {
  display: none;
}

.content__inner {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 6rem 1rem 15rem; /* 上留出导航、下留出控制条 */
}

.content__spacer {
  display: none;
}

/* 文案卡片 */

.card {
  width: 100%;
  pointer-events: auto;
  padding: 1.5rem;
  border-radius: 1.5rem;
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.card__row--subtitle {
  margin-bottom: 0.75rem;
}

.pill {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  color: var(--blue);
  font-size: 0.625rem;
  line-height: 1rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.card__title {
  margin: 0 0 1rem;
  font-size: 2.25rem;
  line-height: 1.25;
  font-weight: 800;
  background-image: linear-gradient(to bottom right, #fff, #fff 50%, var(--slate-400));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 25px 25px rgba(0, 0, 0, 0.15));
}

.card__row--text {
  position: relative;
  overflow: hidden;
}

.card__rule {
  display: none;
}

.card__text {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.625;
  font-weight: 300;
  color: var(--slate-200);
  text-shadow: 0 4px 3px rgba(0, 0, 0, 0.07);
}

/* 商店徽标 */

.card__row--stores {
  margin-top: 2rem;
}

.stores {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.stores__link {
  display: inline-block;
  outline: none;
}

.stores__badge {
  height: 3rem;
  width: auto;
  filter: drop-shadow(0 10px 8px rgba(0, 0, 0, 0.04))
    drop-shadow(0 4px 3px rgba(0, 0, 0, 0.1));
  transition: transform 0.3s;
}

.stores__link:hover .stores__badge {
  transform: scale(1.05);
}

/* ---------- 备案 / 防沉迷提示（仅简体中文） ---------- */

.legal {
  color: var(--slate-500);
}

.legal p {
  margin: 0;
}

.legal--desktop {
  display: none;
  position: absolute;
  bottom: 7rem;
  left: 2rem;
  z-index: 50;
  max-width: 36rem;
  font-size: 0.625rem;
  line-height: 1.4;
}

.legal--desktop p:first-child {
  margin-bottom: 0.25rem;
}

.legal--mobile {
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  width: 100%;
  padding-bottom: 0.25rem;
  text-align: center;
  font-size: 0.5625rem;
  line-height: 1.4;
  opacity: 0.7;
}

.legal--mobile[hidden] {
  display: none;
}

.legal__health {
  font-size: 0.4375rem;
  line-height: 1.25;
  transform: scale(0.9);
}

/* ---------- 底部控制条 ---------- */

.controls {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  pointer-events: none;
  background-image: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.9),
    rgba(0, 0, 0, 0.5) 50%,
    transparent
  );
}

/* 形态选择 */

.shapes {
  display: flex;
  gap: 0.5rem;
  justify-content: space-between;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  padding: 0.5rem;
  border-radius: 1rem;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  pointer-events: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.shapes::-webkit-scrollbar {
  display: none;
}

.shape {
  position: relative;
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: center;
  gap: 0.375rem;
  min-width: 60px;
  padding: 0.5rem 0.75rem;
  border-radius: 0.75rem;
  border: 1px solid transparent;
  color: var(--slate-400);
  transition: color 0.3s, background-color 0.3s, transform 0.3s,
    border-color 0.3s, box-shadow 0.3s;
}

.shape:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.1);
  transform: scale(1.1);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}

.shape.is-active {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

.shape__icon {
  display: inline-flex;
  transition: color 0.3s, transform 0.3s;
}

.shape:hover .shape__icon,
.shape.is-active .shape__icon {
  color: var(--blue);
  transform: scale(1.1);
}

.shape__label {
  font-size: 0.5625rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* 配色选择 */

.colors {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem;
  border-radius: 9999px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  pointer-events: auto;
}

.color {
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  opacity: 0.8;
  outline: 2px solid transparent;
  outline-offset: 0;
  transition: transform 0.3s, opacity 0.3s, outline-color 0.3s, box-shadow 0.3s;
}

.color:hover {
  opacity: 1;
  transform: scale(1.1);
  outline-color: rgba(255, 255, 255, 0.5);
}

.color.is-active {
  opacity: 1;
  transform: scale(1.1);
  outline-color: #fff;
}

.colors__divider {
  width: 1px;
  height: 2rem;
  margin: 0 0.25rem;
  background: rgba(255, 255, 255, 0.1);
}

.colors__custom {
  position: relative;
  display: block;
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  overflow: hidden;
  cursor: pointer;
  outline: 2px solid rgba(255, 255, 255, 0.1);
  transition: transform 0.15s, outline-color 0.3s;
}

.colors__custom:hover {
  transform: scale(1.1);
  outline-color: rgba(255, 255, 255, 0.5);
}

.colors__custom input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  opacity: 0;
  cursor: pointer;
}

.colors__custom-face {
  display: block;
  width: 100%;
  height: 100%;
  background-image: linear-gradient(to top right, #3b82f6, #a855f7, #ef4444);
}

/* =========================================================================
   sm 断点 (>= 640px)
   ========================================================================= */

@media (min-width: 640px) {
  .stores {
    flex-direction: row;
  }
}

/* =========================================================================
   md 断点 (>= 768px)
   ========================================================================= */

@media (min-width: 768px) {
  .topbar {
    padding: 2rem;
  }

  .topbar__actions {
    gap: 1.5rem;
  }

  .topbar__support {
    display: block;
    font-size: 0.875rem;
    line-height: 1.25rem;
  }

  .logo {
    height: 2rem;
  }

  .lang__trigger {
    font-size: 0.875rem;
    line-height: 1.25rem;
  }

  .cta {
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    line-height: 1.25rem;
  }

  .cta__arrow {
    display: inline-flex;
  }

  .content {
    flex-direction: row;
  }

  .content__column {
    width: 50%;
    pointer-events: none;
  }

  .content__inner {
    justify-content: center;
    padding: 4rem;
  }

  .content__spacer {
    display: block;
    position: relative;
    width: 50%;
    height: 100%;
  }

  .card {
    max-width: 32rem;
    padding: 0;
    background: transparent;
    border: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .card__row--subtitle {
    margin-bottom: 1rem;
  }

  .pill {
    font-size: 0.75rem;
  }

  .card__title {
    margin-bottom: 1.5rem;
    font-size: 4.5rem;
  }

  .card__rule {
    display: block;
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0.25rem;
    border-radius: 9999px;
    opacity: 0.5;
    background-image: linear-gradient(
      to bottom,
      rgba(91, 192, 235, 0),
      rgba(91, 192, 235, 0.5),
      rgba(91, 192, 235, 0)
    );
  }

  .card__text {
    padding-left: 1.5rem;
    font-size: 1.25rem;
  }

  .card__row--stores {
    margin-top: 2.5rem;
  }

  .stores__badge {
    height: 3.5rem;
  }

  .legal--desktop {
    display: block;
  }

  .legal--desktop[hidden] {
    display: none;
  }

  .legal--mobile {
    display: none;
  }

  .controls {
    flex-direction: row;
    padding: 2rem;
    background-image: none;
  }

  .shapes {
    width: auto;
    max-width: none;
    justify-content: flex-start;
  }

  .shape {
    min-width: 80px;
    padding: 0.75rem 1.25rem;
  }

  .shape__label {
    font-size: 0.625rem;
  }
}
