/* =========================================================================
   ĐI BIỂN ONLINE — LANDING PAGE, TRẠM GIẢ LẬP 3D & KHU MINI-GAME BÃI BIỂN
   Kế thừa ngôn ngữ thiết kế "3D Toy Chibi / Candy Gloss" từ beach.css & admin.html
   ========================================================================= */

html.landing-page,
body.landing-page {
  height: auto !important;
  min-height: 100vh;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  scroll-behavior: smooth;
  background:
    radial-gradient(1200px 680px at 10% -5%, rgba(92, 182, 255, 0.35), transparent 62%),
    radial-gradient(1000px 620px at 95% 5%, rgba(255, 154, 213, 0.26), transparent 60%),
    radial-gradient(900px 600px at 50% 45%, rgba(57, 208, 255, 0.16), transparent 65%),
    linear-gradient(180deg, #0b2454 0%, #071633 45%, #061229 100%);
  background-attachment: fixed;
  color: #f4f8ff;
  font-family: var(--body-font);
}

/* ---------------------------------------------------------------- HEADER NỔI */
.lp-nav {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(7, 21, 50, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 3px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 12px 30px -12px rgba(0, 0, 0, 0.7);
}

.lp-nav-inner {
  max-width: 1420px;
  margin: 0 auto;
  padding: 10px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.lp-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #ffffff;
}

.lp-brand-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  border: 3px solid #ffffff;
  background: linear-gradient(180deg, #5cb6ff 0%, #2563eb 100%);
  box-shadow: var(--gloss), var(--drop);
  display: grid;
  place-items: center;
  font-size: 26px;
  flex: none;
}

.lp-brand-text strong {
  display: block;
  font-family: var(--title-font);
  font-size: 25px;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: 0.3px;
  text-shadow: 0 3px 0 rgba(10, 40, 120, 0.55);
}

.lp-brand-text span {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: #9fd8ff;
}

.lp-links {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.lp-links a {
  color: #e5f2ff;
  text-decoration: none;
  font-weight: 800;
  font-size: 14px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 2px solid transparent;
  transition: all 0.16s ease;
}

.lp-links a:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.35);
  color: #ffe27a;
}

.lp-nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.lp-wallet-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 15px;
  border-radius: 999px;
  border: 2.5px solid #ffffff;
  background: linear-gradient(180deg, #3b82f6 0%, #1d4ed8 100%);
  box-shadow: var(--gloss), var(--drop);
  font-family: var(--title-font);
  font-size: 17px;
  font-weight: 800;
}

.lp-wallet-pill b {
  color: #ffe27a;
  font-size: 19px;
}

/* ---------------------------------------------------------------- CANDY BUTTONS */
.candy-btn {
  --c1: #5cb6ff;
  --c2: #2563eb;
  border: 3px solid #ffffff;
  border-radius: 999px;
  padding: 9px 18px;
  font-family: var(--title-font);
  font-weight: 800;
  font-size: 16px;
  line-height: 1.15;
  color: #ffffff;
  background: linear-gradient(180deg, var(--c1) 0%, var(--c2) 100%);
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.48), inset 0 -5px 0 rgba(0, 0, 0, 0.22), 0 10px 20px -8px rgba(0, 0, 0, 0.55);
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.32);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  text-decoration: none;
  transition: transform 0.1s ease, filter 0.15s ease;
  user-select: none;
}

.candy-btn:hover {
  filter: brightness(1.08) saturate(1.08);
  transform: translateY(-1px);
}

.candy-btn:active {
  transform: translateY(2px) scale(0.98);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.35), inset 0 -2px 0 rgba(0, 0, 0, 0.2);
}

.candy-btn.orange { --c1: #ffcf5a; --c2: #ea580c; }
.candy-btn.pink   { --c1: #ff9ad5; --c2: #db2777; }
.candy-btn.red    { --c1: #ff7b7b; --c2: #e11d48; }
.candy-btn.green  { --c1: #4ade80; --c2: #15803d; }
.candy-btn.purple { --c1: #c084fc; --c2: #6d28d9; }
.candy-btn.aqua   { --c1: #5ef2ff; --c2: #0284c7; }
.candy-btn.dark   { --c1: #334e85; --c2: #192b52; border-color: rgba(255, 255, 255, 0.45); }
.candy-btn.sm     { padding: 6px 13px; font-size: 14px; border-width: 2px; }
.candy-btn.lg     { padding: 13px 26px; font-size: 20px; border-width: 3.5px; }

/* ---------------------------------------------------------------- CONTAINER & SECTIONS */
.lp-container {
  max-width: 1420px;
  margin: 0 auto;
  padding: 0 22px;
}

.lp-section {
  padding: 36px 0;
}

.lp-section-head {
  text-align: center;
  max-width: 820px;
  margin: 0 auto 28px;
}

.lp-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 16px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.65);
  background: linear-gradient(90deg, rgba(92, 182, 255, 0.35), rgba(255, 154, 213, 0.35));
  font-family: var(--title-font);
  font-weight: 800;
  font-size: 15px;
  color: #fff3b0;
  margin-bottom: 10px;
}

.lp-section-head h2 {
  margin: 0 0 8px;
  font-family: var(--title-font);
  font-weight: 800;
  font-size: clamp(28px, 3.6vw, 42px);
  line-height: 1.1;
  color: #ffffff;
  text-shadow: 0 4px 0 rgba(10, 40, 120, 0.6);
}

.lp-section-head p {
  margin: 0;
  font-size: 16px;
  color: #c6dcff;
  line-height: 1.5;
}

/* ---------------------------------------------------------------- HERO BANNER */
.lp-hero {
  padding: 32px 0 20px;
}

.lp-hero-card {
  position: relative;
  border-radius: 36px;
  border: 4px solid #ffffff;
  background:
    radial-gradient(700px 320px at 85% 20%, rgba(255, 226, 122, 0.32), transparent 65%),
    linear-gradient(135deg, #2563eb 0%, #0284c7 48%, #7c3aed 100%);
  box-shadow: var(--gloss), 0 24px 50px -16px rgba(0, 0, 0, 0.7);
  padding: 32px 36px;
  display: grid;
  grid-template-columns: 1.25fr 0.95fr;
  gap: 28px;
  align-items: center;
  overflow: hidden;
}

.lp-hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.lp-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 999px;
  border: 2px solid #ffffff;
  background: rgba(11, 37, 89, 0.55);
  font-weight: 800;
  font-size: 13.5px;
  color: #fff3b0;
}

.lp-badge.free {
  background: linear-gradient(90deg, #16a34a, #059669);
  color: #ffffff;
}

.lp-hero h1 {
  margin: 0 0 12px;
  font-family: var(--title-font);
  font-weight: 800;
  font-size: clamp(32px, 4vw, 50px);
  line-height: 1.06;
  text-shadow: 0 4px 0 rgba(10, 30, 90, 0.55);
}

.lp-hero h1 span {
  color: #ffe27a;
}

.lp-hero-desc {
  margin: 0 0 20px;
  font-size: 17px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.94);
}

.lp-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.lp-hero-highlights {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.lp-mini-feat {
  border-radius: 22px;
  border: 3px solid rgba(255, 255, 255, 0.85);
  background: rgba(9, 28, 68, 0.48);
  backdrop-filter: blur(8px);
  padding: 14px 16px;
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.25);
}

.lp-mini-feat strong {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--title-font);
  font-size: 19px;
  color: #ffe27a;
  margin-bottom: 4px;
}

.lp-mini-feat span {
  font-size: 13.5px;
  color: #e2f1ff;
  line-height: 1.4;
  display: block;
}

/* ---------------------------------------------------------------- KHU A: TRẠM GIẢ LẬP 3D */
.sandbox-grid {
  display: grid;
  grid-template-columns: 470px 1fr;
  gap: 24px;
  align-items: start;
}

.sandbox-stage-card {
  border-radius: 34px;
  border: 4px solid #ffffff;
  background: linear-gradient(180deg, #1d4ed8 0%, #0f296b 100%);
  box-shadow: var(--gloss), 0 22px 48px -14px rgba(0, 0, 0, 0.75);
  padding: 14px;
  position: sticky;
  top: 78px;
}

.sandbox-stage-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.toolbar-group {
  display: inline-flex;
  background: rgba(8, 22, 54, 0.65);
  border-radius: 999px;
  padding: 3px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  gap: 3px;
}

.toolbar-pill {
  border: 0;
  background: transparent;
  color: #d6e8ff;
  font: 800 12.5px var(--body-font);
  padding: 5px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.toolbar-pill.active {
  background: linear-gradient(180deg, #ffcf5a 0%, #ff8a1f 100%);
  color: #0b2559;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.7);
}

/* Ghi đè .stage-viewport từ beach.css để nằm gọn trong thẻ giả lập */
.stage-viewport.sandbox-viewport {
  position: relative !important;
  inset: auto !important;
  width: 100%;
  aspect-ratio: 9 / 16;
  border-radius: 24px;
  overflow: hidden;
  border: 3px solid rgba(255, 255, 255, 0.85);
  background: #3c9df0;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}

.stage-viewport.sandbox-viewport .stage {
  box-shadow: none;
}

.sandbox-stage-foot {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 13px;
  color: #cfe4ff;
}

/* Cột phải: Bảng điều khiển giả lập */
.sandbox-controls {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.candy-card {
  border-radius: 30px;
  border: 3.5px solid rgba(255, 255, 255, 0.9);
  background: linear-gradient(180deg, #19397a 0%, #102554 100%);
  box-shadow: var(--gloss), 0 18px 36px -14px rgba(0, 0, 0, 0.7);
  padding: 20px 22px;
}

.candy-card.pink-theme {
  background: linear-gradient(180deg, #58287f 0%, #2d1654 100%);
}

.candy-card.teal-theme {
  background: linear-gradient(180deg, #0f5c78 0%, #0b3552 100%);
}

.card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.card-title-row h3 {
  margin: 0;
  font-family: var(--title-font);
  font-weight: 800;
  font-size: 24px;
  color: #fff3b0;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-tag {
  padding: 4px 12px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.65);
  background: rgba(255, 255, 255, 0.14);
  font-weight: 800;
  font-size: 12.5px;
  color: #ffffff;
}

/* Hồ sơ nhân vật giả lập */
.profile-editor {
  display: grid;
  grid-template-columns: 1.2fr auto auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 16px;
}

.field-box label {
  display: block;
  font-size: 13px;
  font-weight: 800;
  color: #b7d4ff;
  margin-bottom: 5px;
}

.candy-input {
  width: 100%;
  height: 44px;
  border-radius: 14px;
  border: 2.5px solid rgba(255, 255, 255, 0.55);
  background: rgba(7, 19, 46, 0.8);
  color: #ffffff;
  padding: 0 14px;
  font: 700 15px var(--body-font);
}

.candy-input:focus {
  outline: none;
  border-color: #ffe27a;
  box-shadow: 0 0 0 3px rgba(255, 226, 122, 0.3);
}

.gender-switch {
  display: flex;
  gap: 8px;
}

.gender-btn {
  height: 44px;
  padding: 0 16px;
  border-radius: 14px;
  border: 2.5px solid rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font: 800 15px var(--body-font);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.gender-btn.active.male {
  background: linear-gradient(180deg, #38bdf8 0%, #2563eb 100%);
  border-color: #ffffff;
  box-shadow: var(--gloss);
}

.gender-btn.active.female {
  background: linear-gradient(180deg, #ff8fab 0%, #db2777 100%);
  border-color: #ffffff;
  box-shadow: var(--gloss);
}

/* Chọn nhanh 7 cấp đồ bơi */
.level-selector-label {
  font-size: 13.5px;
  font-weight: 800;
  color: #cfe4ff;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.level-pills-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}

.lv-select-btn {
  border-radius: 16px;
  border: 2.5px solid rgba(255, 255, 255, 0.4);
  background: rgba(8, 22, 54, 0.65);
  color: #ffffff;
  padding: 8px 6px;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s ease;
}

.lv-select-btn:hover {
  transform: translateY(-2px);
  border-color: #ffffff;
}

.lv-select-btn.active {
  background: linear-gradient(180deg, #ffcf5a 0%, #f59e0b 100%);
  color: #0b2559;
  border-color: #ffffff;
  box-shadow: var(--gloss), 0 8px 16px -6px rgba(245, 158, 11, 0.7);
}

.lv-select-btn .lv-num {
  display: block;
  font-family: var(--title-font);
  font-weight: 800;
  font-size: 15px;
  line-height: 1.1;
  margin-bottom: 3px;
}

.lv-select-btn .lv-preview-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.lv-select-btn .outfit-showcase {
  max-width: none;
  height: 34px;
  padding: 0 6px;
}

.lv-select-btn .outfit-svg {
  width: 48px;
  height: 30px;
}

/* Lưới nút hành động */
.action-buttons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 10px;
}

.action-tile {
  border-radius: 20px;
  border: 3px solid #ffffff;
  padding: 11px 13px;
  background: linear-gradient(180deg, var(--c1, #4f9bff) 0%, var(--c2, #1d4ed8) 100%);
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.45), inset 0 -5px 0 rgba(0, 0, 0, 0.22), 0 8px 16px -6px rgba(0, 0, 0, 0.5);
  color: #ffffff;
  cursor: pointer;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: transform 0.1s ease, filter 0.15s ease;
}

.action-tile:hover {
  filter: brightness(1.09);
  transform: translateY(-2px);
}

.action-tile:active {
  transform: translateY(1px) scale(0.98);
}

.action-tile .act-icon {
  font-size: 28px;
  line-height: 1;
  flex: none;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.3));
}

.action-tile .act-info strong {
  display: block;
  font-family: var(--title-font);
  font-size: 17px;
  line-height: 1.1;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.3);
}

.action-tile .act-info small {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
  margin-top: 2px;
}

.action-tile.aqua   { --c1: #38bdf8; --c2: #0284c7; }
.action-tile.blue   { --c1: #60a5fa; --c2: #2563eb; }
.action-tile.orange { --c1: #fbbf24; --c2: #d97706; }
.action-tile.green  { --c1: #34d399; --c2: #059669; }
.action-tile.pink   { --c1: #f472b6; --c2: #db2777; }
.action-tile.purple { --c1: #c084fc; --c2: #7c3aed; }
.action-tile.red    { --c1: #fb7185; --c2: #e11d48; }
.action-tile.gold   { --c1: #fde047; --c2: #ca8a04; }

/* Khung nhập lời nhắn thả chai & chat lệnh */
.sim-chat-row {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.sim-chat-row .candy-input {
  flex: 1;
  min-width: 200px;
}

.quick-cmd-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.cmd-chip {
  border-radius: 999px;
  border: 1.5px solid rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.1);
  color: #fff3b0;
  font: 700 12.5px var(--body-font);
  padding: 4px 11px;
  cursor: pointer;
  transition: all 0.14s ease;
}

.cmd-chip:hover {
  background: rgba(255, 255, 255, 0.24);
  transform: translateY(-1px);
}

/* ---------------------------------------------------------------- KHU B: TỔ HỢP 4 MINI-GAME BÃI BIỂN */
.arcade-layout {
  display: grid;
  grid-template-columns: 1.35fr 0.85fr;
  gap: 22px;
  align-items: start;
}

.minigame-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.mg-tab-btn {
  border-radius: 22px;
  border: 3px solid rgba(255, 255, 255, 0.5);
  background: rgba(11, 29, 69, 0.75);
  color: #d8e9ff;
  padding: 12px 10px;
  cursor: pointer;
  text-align: center;
  transition: all 0.16s ease;
  font-family: var(--title-font);
}

.mg-tab-btn:hover {
  border-color: #ffffff;
  transform: translateY(-2px);
}

.mg-tab-btn.active {
  border-color: #ffffff;
  background: linear-gradient(180deg, #ffcf5a 0%, #f97316 100%);
  color: #0b2559;
  box-shadow: var(--gloss), 0 12px 24px -8px rgba(249, 115, 22, 0.7);
}

.mg-tab-btn .mg-icon {
  font-size: 28px;
  display: block;
  margin-bottom: 2px;
}

.mg-tab-btn strong {
  font-size: 16px;
  display: block;
  line-height: 1.15;
}

.mg-tab-btn small {
  font-family: var(--body-font);
  font-size: 11.5px;
  font-weight: 700;
  opacity: 0.85;
}

.mg-stage-box {
  position: relative;
  border-radius: 26px;
  border: 4px solid #ffffff;
  background: #0a224e;
  overflow: hidden;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6);
}

.mg-canvas-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: linear-gradient(180deg, #38bdf8 0%, #0284c7 60%, #f6d398 100%);
}

.mg-canvas-wrap canvas {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: manipulation;
}

.mg-hud-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 18px;
  background: rgba(7, 20, 48, 0.94);
  border-top: 2px solid rgba(255, 255, 255, 0.2);
}

.mg-stats {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
  font-family: var(--title-font);
  font-size: 18px;
}

.mg-stats span b {
  color: #ffe27a;
}

/* Sổ tay Thủy Cung 15 loài */
.aquarium-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
  margin-top: 12px;
}

.fish-slot {
  border-radius: 16px;
  border: 2px solid rgba(255, 255, 255, 0.22);
  background: rgba(7, 19, 46, 0.65);
  padding: 9px 8px;
  text-align: center;
  transition: all 0.2s ease;
  position: relative;
}

.fish-slot.unlocked {
  border-color: var(--rarity-col, #7fd3ff);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(15, 42, 96, 0.85));
  box-shadow: 0 0 16px -4px var(--rarity-col, #7fd3ff);
}

.fish-slot .f-emoji {
  font-size: 30px;
  line-height: 1.1;
  display: block;
  filter: grayscale(1) opacity(0.35);
  transition: transform 0.2s ease, filter 0.2s ease;
}

.fish-slot.unlocked .f-emoji {
  filter: none;
}

.fish-slot:hover.unlocked .f-emoji {
  transform: scale(1.15);
}

.fish-slot .f-name {
  display: block;
  font-size: 11.5px;
  font-weight: 800;
  margin-top: 4px;
  color: #d6e8ff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fish-slot .f-rarity {
  display: inline-block;
  font-size: 10px;
  font-weight: 900;
  padding: 1px 6px;
  border-radius: 999px;
  margin-top: 3px;
  background: var(--rarity-col, #7fd3ff);
  color: #0b1c33;
}

.fish-slot .f-count {
  position: absolute;
  top: 5px;
  right: 6px;
  font-size: 10.5px;
  font-weight: 900;
  color: #ffe27a;
}

/* ---------------------------------------------------------------- KHU C: PHÒNG TRƯNG BÀY 3D 7 CẤP ĐỒ BƠI */
.wardrobe-layout {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 24px;
  align-items: center;
}

.wardrobe-stage-wrap {
  position: relative;
  border-radius: 32px;
  border: 4px solid #ffffff;
  background: radial-gradient(circle at 50% 35%, #4f9bff 0%, #173679 75%);
  box-shadow: var(--gloss), 0 22px 44px -14px rgba(0, 0, 0, 0.7);
  overflow: hidden;
  aspect-ratio: 16 / 11;
}

#wardrobe3dCanvas {
  width: 100%;
  height: 100%;
  display: block;
}

.wardrobe-stage-overlay {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  pointer-events: none;
}

.wardrobe-stage-overlay > * {
  pointer-events: auto;
}

.wardrobe-tier-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tier-row-card {
  display: grid;
  grid-template-columns: 44px 1fr 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 18px;
  border: 2.5px solid rgba(255, 255, 255, 0.25);
  background: rgba(12, 32, 74, 0.7);
  cursor: pointer;
  transition: all 0.15s ease;
}

.tier-row-card:hover {
  border-color: rgba(255, 255, 255, 0.75);
  background: rgba(25, 58, 125, 0.85);
}

.tier-row-card.active {
  border-color: #ffffff;
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.85), rgba(139, 92, 246, 0.85));
  box-shadow: var(--gloss);
}

/* ---------------------------------------------------------------- KHU D: BẢNG LỆNH & THƯ VIỆN ẢNH */
.cmd-guide-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.cmd-guide-card {
  border-radius: 24px;
  border: 3px solid rgba(255, 255, 255, 0.78);
  background: linear-gradient(180deg, #173573 0%, #0e224d 100%);
  padding: 16px 18px;
  box-shadow: var(--gloss), 0 12px 24px -10px rgba(0, 0, 0, 0.65);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
}

.cmd-guide-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.cmd-code {
  font-family: var(--title-font);
  font-weight: 800;
  font-size: 20px;
  color: #ffe27a;
  background: rgba(0, 0, 0, 0.32);
  padding: 3px 12px;
  border-radius: 10px;
  border: 1.5px solid rgba(255, 226, 122, 0.5);
}

.cmd-reward {
  font-weight: 800;
  font-size: 13px;
  color: #7fe7ff;
}

.cmd-desc {
  margin: 6px 0 0;
  font-size: 14px;
  color: #d9e9ff;
  line-height: 1.45;
}

/* Gallery (6 thẻ 9:16 xếp 1 hàng 6 cột cân đối trên Desktop, 3 cột trên Tablet, 2 cột trên Mobile) */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
}

.gallery-item {
  margin: 0;
  border-radius: 22px;
  border: 3.5px solid #ffffff;
  overflow: hidden;
  background: #091d42;
  box-shadow: 0 14px 28px -10px rgba(0, 0, 0, 0.7);
  transition: transform 0.2s ease;
  display: flex;
  flex-direction: column;
}

.gallery-item:hover {
  transform: translateY(-4px);
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  object-position: top center;
  display: block;
  background: #0d2554;
}

.gallery-item figcaption {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 10px;
  font-family: var(--title-font);
  font-weight: 800;
  font-size: 14.5px;
  line-height: 1.25;
  text-align: center;
  color: #fff3b0;
  background: linear-gradient(180deg, #1b3b82, #0f2352);
}

/* Footer CTA */
.lp-footer {
  margin-top: 30px;
  padding: 36px 0 48px;
  border-top: 3px solid rgba(255, 255, 255, 0.18);
  background: rgba(4, 12, 30, 0.85);
  text-align: center;
}

/* Toast thông báo nổi */
.lp-toast {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 90;
  padding: 12px 20px;
  border-radius: 999px;
  border: 3px solid #ffffff;
  background: linear-gradient(180deg, #34d399 0%, #059669 100%);
  box-shadow: var(--gloss), 0 14px 28px rgba(0, 0, 0, 0.55);
  font-family: var(--title-font);
  font-weight: 800;
  font-size: 17px;
  color: #ffffff;
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: all 0.25s ease;
}

.lp-toast.show {
  opacity: 1;
  transform: translateY(0);
}

.sandbox-grid,
.sandbox-controls,
.arcade-layout,
.wardrobe-layout,
.candy-card {
  min-width: 0;
  max-width: 100%;
}

/* ---------------------------------------------------------------- RESPONSIVE (TABLET & MOBILE) */
@media (max-width: 1180px) {
  .lp-hero-card {
    grid-template-columns: minmax(0, 1fr);
    padding: 24px;
  }
  .sandbox-grid {
    grid-template-columns: 400px minmax(0, 1fr);
  }
  .arcade-layout,
  .wardrobe-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .cmd-guide-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .gallery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 920px) {
  .sandbox-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }
  .sandbox-stage-card {
    position: static;
    max-width: 420px;
    margin: 0 auto;
    width: 100%;
  }
  .profile-editor {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .level-pills-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .minigame-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .lp-links {
    order: 3;
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding-top: 6px;
  }
  .lp-links::-webkit-scrollbar {
    display: none;
  }
  .lp-links a {
    white-space: nowrap;
    flex-shrink: 0;
    font-size: 13px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.08);
  }
}

/* Tối ưu chuyên sâu cho Điện thoại (Mobile 320px -> 640px) */
@media (max-width: 640px) {
  .lp-container {
    padding: 0 12px;
  }
  .lp-section {
    padding: 22px 0;
  }
  .lp-section-head {
    margin-bottom: 16px;
  }
  .lp-eyebrow {
    font-size: 12.5px;
    padding: 4px 12px;
  }
  .lp-section-head h2 {
    font-size: 24px;
  }
  .lp-section-head p {
    font-size: 14px;
  }

  /* Header gọn gàng trên mobile */
  .lp-nav-inner {
    padding: 8px 12px;
    gap: 8px;
  }
  .lp-brand {
    gap: 8px;
  }
  .lp-brand-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    font-size: 20px;
    border-width: 2px;
  }
  .lp-brand-text strong {
    font-size: 18px;
  }
  .lp-brand-text span {
    display: none;
  }
  .lp-nav-right {
    gap: 6px;
  }
  .lp-wallet-pill {
    padding: 4px 10px;
    font-size: 13.5px;
    gap: 5px;
    border-width: 2px;
  }
  .lp-wallet-pill span:first-child {
    font-size: 0;
  }
  .lp-wallet-pill span:first-child::before {
    content: '🐚';
    font-size: 14px;
  }
  .lp-wallet-pill b {
    font-size: 15px;
  }
  #btnLiveTikTok {
    padding: 5px 10px;
    font-size: 12.5px;
  }

  /* Hero Card gọn, dễ đọc trên điện thoại */
  .lp-hero {
    padding: 14px 0 10px;
  }
  .lp-hero-card {
    padding: 18px 16px;
    border-radius: 24px;
    border-width: 3px;
    gap: 16px;
  }
  .lp-hero-badges {
    gap: 6px;
    margin-bottom: 8px;
  }
  .lp-badge {
    font-size: 11.5px;
    padding: 3px 10px;
  }
  .lp-hero h1 {
    font-size: 26px;
    line-height: 1.12;
  }
  .lp-hero-desc {
    font-size: 14px;
    margin-bottom: 14px;
  }
  .lp-hero-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .lp-hero-actions .candy-btn.lg {
    grid-column: span 2;
    padding: 11px 16px;
    font-size: 16px;
    width: 100%;
  }
  .lp-hero-actions .candy-btn.sm {
    grid-column: span 2;
    width: 100%;
  }
  .lp-hero-highlights {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .lp-mini-feat {
    padding: 10px 12px;
    border-radius: 16px;
    border-width: 2px;
  }
  .lp-mini-feat strong {
    font-size: 14.5px;
  }
  .lp-mini-feat span {
    font-size: 12px;
    line-height: 1.3;
  }

  /* Trạm Giả Lập 3D: thu gọn sân khấu để vừa thấy nhân vật vừa bấm nút bên dưới */
  .sandbox-stage-card {
    padding: 10px;
    border-radius: 24px;
    border-width: 3px;
    max-width: 350px;
  }
  .sandbox-stage-toolbar {
    justify-content: center;
    gap: 4px;
    margin-bottom: 8px;
  }
  .toolbar-pill {
    font-size: 11.5px;
    padding: 4px 8px;
  }
  .sandbox-stage-foot {
    font-size: 12px;
    justify-content: center;
    text-align: center;
  }

  /* Các thẻ điều khiển bên dưới sân khấu */
  .candy-card {
    padding: 14px 12px;
    border-radius: 22px;
    border-width: 2.5px;
    overflow: hidden;
  }
  .card-title-row {
    margin-bottom: 10px;
  }
  .card-title-row h3 {
    font-size: 20px;
  }
  .profile-editor {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }
  .gender-switch {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .gender-btn {
    justify-content: center;
    padding: 0 10px;
    font-size: 14px;
  }

  /* Thanh 7 cấp đồ bơi: lưới 4 cột dễ chạm */
  .level-pills-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
  }
  .lv-select-btn {
    padding: 6px 4px;
    border-radius: 12px;
  }
  .lv-select-btn .outfit-svg {
    width: 40px;
    height: 25px;
  }

  /* Lưới nút hành động: luôn 2 cột đều nhau trên điện thoại */
  .action-buttons-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .action-tile {
    padding: 9px 10px;
    border-radius: 16px;
    border-width: 2.5px;
    gap: 8px;
    min-width: 0;
  }
  .action-tile .act-icon {
    font-size: 24px;
  }
  .action-tile .act-info strong {
    font-size: 14.5px;
  }
  .action-tile .act-info small {
    font-size: 11px;
  }

  /* Hàng nhập lệnh & thả chai */
  .sim-chat-row {
    gap: 8px;
  }
  .sim-chat-row .candy-input {
    min-width: 0;
    flex: 1 1 100%;
    height: 40px;
    font-size: 14px;
  }
  .sim-chat-row .candy-btn {
    flex: 1;
    padding: 8px 12px;
  }
  .quick-cmd-chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
  }
  .quick-cmd-chips::-webkit-scrollbar {
    display: none;
  }
  .cmd-chip {
    white-space: nowrap;
    flex-shrink: 0;
  }

  /* Khu Mini-Game Bãi Biển trên Mobile */
  .minigame-tabs {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 12px;
  }
  .mg-tab-btn {
    padding: 8px 8px;
    border-radius: 16px;
    border-width: 2.5px;
  }
  .mg-tab-btn .mg-icon {
    font-size: 22px;
  }
  .mg-tab-btn strong {
    font-size: 14px;
  }
  .mg-tab-btn small {
    display: none;
  }
  .mg-stage-box {
    border-radius: 18px;
    border-width: 3px;
  }
  .mg-canvas-wrap {
    aspect-ratio: 4 / 3;
  }
  .mg-hud-bar {
    padding: 10px 12px;
    gap: 8px;
  }
  .mg-stats {
    font-size: 14px;
    gap: 10px;
    width: 100%;
    justify-content: space-between;
  }
  .mg-hud-bar > div:last-child {
    width: 100%;
    display: grid !important;
    grid-template-columns: 1fr auto;
  }
  .aquarium-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }

  /* Phòng Trưng Bày 3D trên Mobile */
  .wardrobe-stage-wrap {
    aspect-ratio: 4 / 3.4;
    border-radius: 22px;
    border-width: 3px;
  }
  .wardrobe-stage-overlay {
    left: 8px;
    right: 8px;
    bottom: 8px;
    justify-content: center;
    gap: 6px;
  }
  .wardrobe-stage-overlay #btnWearSelectedTier {
    width: 100%;
    padding: 7px 12px;
    font-size: 13.5px;
  }
  .tier-row-card {
    grid-template-columns: 36px 1fr 1fr auto;
    gap: 6px;
    padding: 8px 10px;
    border-radius: 14px;
  }
  .tier-row-card .outfit-showcase {
    height: 32px;
    padding: 0 6px;
  }
  .tier-row-card .outfit-svg {
    width: 44px;
    height: 28px;
  }

  /* Bảng lệnh & Thư viện ảnh 2 cột trên điện thoại */
  .cmd-guide-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .gallery-item {
    border-radius: 16px;
    border-width: 2.5px;
  }
  .gallery-item figcaption {
    font-size: 12.5px;
    padding: 7px 8px;
  }

  /* Chừa khoảng trống đáy Footer để không bị 2 nút ghim che */
  .lp-footer {
    padding: 28px 0 92px;
  }
  .lp-toast {
    left: 14px;
    right: 14px;
    bottom: 74px;
    text-align: center;
    font-size: 14.5px;
    padding: 10px 14px;
  }
}

/* ---------------------------------------------------------------- NÚT GHIM GÓC MÀN HÌNH (giao diện TikTok → Zalo) */
.pin-cta {
  position: fixed;
  right: 18px;
  bottom: 20px;
  z-index: 96;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 20px 11px 14px;
  border-radius: 999px;
  border: 3px solid #ffffff;
  background: #010101;
  color: #ffffff;
  font-family: var(--title-font);
  font-weight: 800;
  font-size: 17px;
  line-height: 1.1;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: -3px 0 0 #25f4ee, 3px 0 0 #fe2c55, 0 14px 28px rgba(0, 0, 0, 0.55);
  animation: pin-cta-pulse 2.2s ease-in-out infinite;
  transition: transform 0.12s ease, filter 0.15s ease;
}

.pin-cta:hover {
  filter: brightness(1.15);
  transform: translateY(-2px);
}

.pin-cta:active {
  transform: translateY(1px) scale(0.97);
}

.pin-cta .tt-icon {
  width: 26px;
  height: 26px;
  flex: none;
  filter: drop-shadow(-1.5px -1.5px 0 #25f4ee) drop-shadow(1.5px 1.5px 0 #fe2c55);
}

@keyframes pin-cta-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@media (max-width: 720px) {
  .pin-cta {
    right: 12px;
    bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    padding: 9px 14px 9px 11px;
    font-size: 14px;
    border-width: 2.5px;
  }
  .pin-cta .tt-icon {
    width: 20px;
    height: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pin-cta { animation: none; }
}
