/* =====================================================================
   site.css — chỉ dùng cho TRANG CHỦ GIỚI THIỆU (/)
   Nạp kèm tlbb.css. Khu người chơi và khu quản trị không tải file này.

   Ảnh nền lấy từ wick/img/opt/*.webp — bản đã nén từ key-art của game
   (bg23 2,1MB -> hero.webp 116KB, bghome 420KB -> mist.webp 36KB…)
   ===================================================================== */

/* ---------------------------------------------------------------
   1. Thanh điều hướng
   --------------------------------------------------------------- */
.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 80;
  padding: .55rem 0;
  border-bottom: 1px solid transparent;
  transition: background .35s var(--ease), border-color .35s var(--ease), padding .35s var(--ease);
}
.site-nav.is-stuck {
  padding: .3rem 0;
  background: rgba(5, 8, 15, .9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: var(--line);
}
.site-nav-inner { display: flex; align-items: center; gap: 1rem; }
.site-nav .brand span { text-shadow: 0 2px 12px rgba(0,0,0,.6); }

.site-menu { display: flex; gap: .25rem; margin-left: auto; }
.site-menu a {
  position: relative;
  padding: .5rem .8rem;
  color: #e9eef8; font-size: .93rem; font-weight: 600;
  text-shadow: 0 1px 8px rgba(0,0,0,.65);
  transition: color .2s var(--ease);
}
.site-menu a::after {
  content: "";
  position: absolute; left: .8rem; right: .8rem; bottom: .3rem;
  height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--gold-400), var(--gold-600));
  transform: scaleX(0); transform-origin: left;
  transition: transform .28s var(--ease);
}
.site-menu a:hover { color: var(--gold-300); }
.site-menu a:hover::after { transform: scaleX(1); }

.site-nav-cta { display: flex; align-items: center; gap: .5rem; }
.site-nav .burger { display: none; }

/* ---------------------------------------------------------------
   2. Hero — ảnh key-art toàn màn hình
   --------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: min(94vh, 900px);
  display: grid; place-items: center;
  padding: calc(var(--topbar-h) + 2rem) 0 5rem;
  overflow: hidden;
  isolation: isolate;
}

/* Lớp ảnh: cao hơn khung 20% để còn chỗ trôi khi cuộn (parallax) */
.hero-bg {
  position: absolute; inset: -12% 0 -12% 0;
  z-index: -3;
  background-size: cover;
  background-position: center 42%;
  background-repeat: no-repeat;
  will-change: transform;
  animation: ken-burns 26s var(--ease) infinite alternate;
}

@keyframes ken-burns {
  from { transform: scale(1);    }
  to   { transform: scale(1.09); }
}

/* Phủ tối để chữ vàng nổi trên nền ảnh sáng */
.hero-veil {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(58% 52% at 50% 42%, rgba(5,8,15,.34), transparent 72%),
    linear-gradient(180deg, rgba(5,8,15,.86) 0%, rgba(5,8,15,.3) 26%, rgba(5,8,15,.55) 62%, var(--ink-900) 99%);
}

/* Mây trôi ngang qua hero */
.hero-clouds { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.cloud {
  position: absolute;
  opacity: .3;
  filter: brightness(1.4);
  will-change: transform;
}
.cloud-a { top: 14%; width: 340px; animation: drift-x 48s linear infinite; }
.cloud-b { top: 42%; width: 440px; animation: drift-x 66s linear infinite; animation-delay: -22s; opacity: .22; }
.cloud-c { top: 68%; width: 280px; animation: drift-x 38s linear infinite; animation-delay: -12s; opacity: .18; }
@keyframes drift-x {
  from { transform: translateX(-40vw); }
  to   { transform: translateX(115vw); }
}

/* Cánh hoa đào rơi — vẽ bằng CSS, không tốn thêm ảnh nào */
.petals { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.petals i {
  position: absolute;
  top: -6%;
  left: calc(var(--i) * 5.6%);
  width: 10px; height: 10px;
  background: linear-gradient(135deg, #ffd7e6, #ff9ec4);
  border-radius: 100% 0 100% 0;
  opacity: 0;
  animation: petal-fall calc(11s + var(--i) * 0.9s) linear infinite;
  animation-delay: calc(var(--i) * -1.3s);
}
@keyframes petal-fall {
  0%   { transform: translate3d(0, -10vh, 0) rotate(0deg);       opacity: 0; }
  8%   {                                                         opacity: .85; }
  50%  { transform: translate3d(6vw, 45vh, 0) rotate(240deg);    opacity: .7; }
  90%  {                                                         opacity: .35; }
  100% { transform: translate3d(-4vw, 105vh, 0) rotate(560deg);  opacity: 0; }
}

.hero-inner { position: relative; text-align: center; max-width: 860px; }

.hero-tag {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .38rem .95rem;
  border-radius: 999px;
  border: 1px solid rgba(224,172,77,.42);
  background: rgba(5,8,15,.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: var(--gold-300);
  font-size: .87rem; font-weight: 600;
}
.dot-live {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--jade);
  box-shadow: 0 0 0 0 rgba(67,217,163,.6);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  70%  { box-shadow: 0 0 0 9px rgba(67,217,163,0); }
  100% { box-shadow: 0 0 0 0 rgba(67,217,163,0); }
}

.hero-title {
  margin: 1rem 0 .5rem;
  font-size: clamp(2.6rem, 9vw, 5.4rem);
  line-height: 1;
  letter-spacing: -.03em;
  filter: drop-shadow(0 4px 26px rgba(224,172,77,.45)) drop-shadow(0 2px 4px rgba(0,0,0,.7));
}
.hero-sub {
  font-size: clamp(1.05rem, 2.4vw, 1.45rem);
  font-weight: 600; color: #f2f6ff;
  text-shadow: 0 2px 14px rgba(0,0,0,.8);
  margin-bottom: .7rem;
}
.hero-intro {
  max-width: 60ch; margin-inline: auto;
  color: #cdd8ea;
  text-shadow: 0 1px 10px rgba(0,0,0,.75);
}

.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; justify-content: center; margin-top: 1.7rem; }

/* Nút chính có vầng sáng nhịp thở */
.btn-hero { box-shadow: 0 0 0 0 rgba(224,172,77,.5); animation: btn-glow 2.8s var(--ease) infinite; }
@keyframes btn-glow {
  50%  { box-shadow: 0 0 34px 4px rgba(224,172,77,.42); }
  100% { box-shadow: 0 0 0 0 rgba(224,172,77,0); }
}

.hero-note { margin-top: 1.1rem; color: #cdd8ea; font-size: .93rem; text-shadow: 0 1px 8px rgba(0,0,0,.7); }
.hero-note .ico { color: var(--gold-400); }

/* Mũi tên gợi ý cuộn xuống */
.scroll-hint {
  position: absolute; bottom: 1.6rem; left: 50%;
  width: 26px; height: 42px;
  margin-left: -13px;
  border: 2px solid rgba(255,255,255,.42);
  border-radius: 14px;
}
.scroll-hint span {
  position: absolute; left: 50%; top: 8px;
  width: 4px; height: 8px; margin-left: -2px;
  border-radius: 2px;
  background: var(--gold-400);
  animation: scroll-dot 1.9s var(--ease) infinite;
}
@keyframes scroll-dot {
  0%   { transform: translateY(0);    opacity: 0; }
  35%  {                              opacity: 1; }
  100% { transform: translateY(16px); opacity: 0; }
}

/* ---------------------------------------------------------------
   3. Khối nội dung
   --------------------------------------------------------------- */
.band { position: relative; padding: clamp(2.6rem, 6vw, 4.4rem) 0; isolation: isolate; overflow: hidden; }
.band-tight { padding-block: clamp(1.8rem, 4vw, 2.8rem); }

/* Nền ảnh mờ cho từng khối */
.band-bg {
  position: absolute; inset: -15% 0;
  z-index: -2;
  background-size: cover; background-position: center;
  opacity: .16;
  will-change: transform;
}
.band-bg::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, var(--ink-900), transparent 22%, transparent 78%, var(--ink-900));
}
.band-bg-dark { opacity: .42; }
.band-dark { background: rgba(3, 6, 12, .5); }

.sec-head { margin-bottom: 2rem; text-align: center; }
.sec-kicker {
  display: inline-block; margin-bottom: .4rem;
  font-size: .78rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .16em;
  color: var(--gold-500);
}
.sec-head h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); }

/* ---------------------------------------------------------------
   4. Ô số liệu có icon game
   --------------------------------------------------------------- */
.stat-art { padding-top: 1.5rem; }
.stat-icon {
  position: absolute; right: .9rem; top: .9rem;
  width: 52px; height: 52px;
  opacity: .55;
  filter: drop-shadow(0 3px 10px rgba(0,0,0,.5));
  transition: transform .35s var(--ease), opacity .35s var(--ease);
}
.stat-art:hover .stat-icon { transform: scale(1.15) rotate(-7deg); opacity: .95; }

/* ---------------------------------------------------------------
   5. Thẻ tính năng
   --------------------------------------------------------------- */
.feature {
  position: relative;
  padding: 1.6rem 1.35rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(165deg, rgba(19,28,48,.86), rgba(8,13,24,.92));
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  overflow: hidden;
  transform-style: preserve-3d;
  transition: box-shadow .3s var(--ease), border-color .3s var(--ease), transform .25s var(--ease);
}
.feature:hover { border-color: var(--line-strong); box-shadow: var(--shadow), var(--shadow-gold); }
.feature::after {
  content: "";
  position: absolute; right: -50px; top: -50px;
  width: 160px; height: 160px; border-radius: 50%;
  background: radial-gradient(circle, rgba(224,172,77,.15), transparent 70%);
  transition: transform .45s var(--ease);
}
.feature:hover::after { transform: scale(1.4); }

.feature-art {
  width: 72px; height: 72px;
  margin-bottom: .9rem;
  filter: drop-shadow(0 6px 16px rgba(0,0,0,.55));
  transition: transform .35s var(--ease);
}
.feature:hover .feature-art { transform: scale(1.12) rotate(-5deg); }
.feature h3 { font-size: 1.06rem; }

/* ---------------------------------------------------------------
   6. Thư viện ảnh — băng trượt vô tận
   --------------------------------------------------------------- */
.gallery {
  overflow: hidden;
  padding-block: .5rem;
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.gallery-track {
  display: flex; gap: 1rem;
  width: max-content;
  animation: slide-track 46s linear infinite;
}
.gallery:hover .gallery-track { animation-play-state: paused; }
@keyframes slide-track {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.shot {
  position: relative;
  flex: 0 0 auto;
  width: clamp(240px, 30vw, 420px);
  margin: 0;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: transform .35s var(--ease), border-color .35s var(--ease);
}
.shot:hover { transform: translateY(-6px) scale(1.02); border-color: var(--line-strong); }
.shot img {
  width: 100%; aspect-ratio: 16 / 9; object-fit: cover;
  transition: transform .6s var(--ease);
}
.shot:hover img { transform: scale(1.08); }
.shot figcaption {
  position: absolute; inset: auto 0 0 0;
  padding: 1.6rem .85rem .6rem;
  font-size: .88rem; font-weight: 600;
  color: #f0f4ff;
  background: linear-gradient(transparent, rgba(3,6,12,.9));
}

/* ---------------------------------------------------------------
   7. Bảng xếp hạng
   --------------------------------------------------------------- */
.rank-list { list-style: none; margin: 0; padding: 0; }
.rank-row {
  display: flex; align-items: center; gap: .7rem;
  padding: .6rem .75rem;
  border-radius: var(--radius-sm);
  transition: background .2s var(--ease), transform .2s var(--ease);
}
.rank-row + .rank-row { border-top: 1px solid var(--line); }
.rank-row:hover { background: rgba(224,172,77,.07); transform: translateX(4px); }

.rank-no {
  display: grid; place-items: center;
  width: 28px; height: 28px; flex: 0 0 auto;
  border-radius: 9px;
  font-size: .82rem; font-weight: 800;
  background: rgba(255,255,255,.06);
  color: var(--text-dim);
}
.rank-1 { background: linear-gradient(135deg, #ffd870, #c9922a); color: #2a1c02; box-shadow: 0 0 14px rgba(224,172,77,.45); }
.rank-2 { background: linear-gradient(135deg, #e2e8f2, #93a1b5); color: #1b2230; }
.rank-3 { background: linear-gradient(135deg, #e0a678, #a56435); color: #2b1608; }

.rank-val { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--gold-300); white-space: nowrap; }
.rank-val small { color: var(--text-dim); font-weight: 500; }

/* ---------------------------------------------------------------
   8. Dải tỷ lệ nạp
   --------------------------------------------------------------- */
.rate-panel {
  display: flex; align-items: center; gap: 1.4rem; flex-wrap: wrap;
  padding: clamp(1.2rem, 3vw, 1.9rem);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line-strong);
  background:
    radial-gradient(60% 130% at 8% 0%, rgba(224,172,77,.2), transparent 62%),
    linear-gradient(150deg, rgba(26,37,64,.9), rgba(5,8,15,.94));
  box-shadow: var(--shadow);
}
.rate-art {
  width: 96px; height: 96px; flex: 0 0 auto;
  filter: drop-shadow(0 8px 20px rgba(224,172,77,.4));
  animation: float 4.5s var(--ease) infinite alternate;
}
.rate-line {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: .5rem;
  margin: .3rem 0 .4rem;
  font-size: clamp(1.4rem, 4vw, 2rem); font-weight: 800;
}
.rate-line .arrow { color: var(--text-dim); font-weight: 400; }
.rate-line small  { font-size: .8rem; color: var(--text-soft); font-weight: 600; }

/* ---------------------------------------------------------------
   9. Các bước bắt đầu
   --------------------------------------------------------------- */
.steps { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.step {
  padding: 1.3rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(255,255,255,.03);
  transition: border-color .3s var(--ease), transform .3s var(--ease), box-shadow .3s var(--ease);
}
.step:hover { border-color: var(--line-strong); transform: translateY(-5px); box-shadow: var(--shadow-gold); }

.step-head { position: relative; display: inline-block; margin-bottom: .8rem; }
.step-head img { width: 46px; height: 46px; filter: drop-shadow(0 4px 12px rgba(0,0,0,.5)); }
.step-no {
  position: absolute; right: -10px; bottom: -6px;
  display: grid; place-items: center;
  width: 24px; height: 24px;
  border-radius: 50%;
  font-size: .78rem; font-weight: 800;
  background: linear-gradient(135deg, var(--gold-400), var(--gold-600));
  color: #241803;
  border: 2px solid var(--ink-900);
}
.step h3 { font-size: 1rem; margin-bottom: .35rem; }

/* ---------------------------------------------------------------
   10. Tin tức
   --------------------------------------------------------------- */
.news-row { display: flex; align-items: center; gap: .6rem; padding: .55rem 0; }
.news-row + .news-row { border-top: 1px solid var(--line); }
.news-dot { width: 6px; height: 6px; flex: 0 0 auto; border-radius: 50%; background: var(--gold-500); }

/* ---------------------------------------------------------------
   11. Hỏi đáp
   --------------------------------------------------------------- */
.faq { max-width: 820px; margin-inline: auto; display: grid; gap: .6rem; }
.faq-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.03);
  overflow: hidden;
  transition: border-color .25s var(--ease);
}
.faq-item[open] { border-color: var(--line-strong); }
.faq-item summary {
  display: flex; align-items: center; gap: .75rem;
  padding: .95rem 1.1rem;
  cursor: pointer; font-weight: 600;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--gold-300); }

.faq-mark { position: relative; margin-left: auto; width: 16px; height: 16px; flex: 0 0 auto; }
.faq-mark::before, .faq-mark::after {
  content: "";
  position: absolute; inset: 50% 0 auto 0;
  height: 2px; border-radius: 2px;
  background: var(--gold-400);
  transition: transform .25s var(--ease);
}
.faq-mark::after { transform: rotate(90deg); }
.faq-item[open] .faq-mark::after { transform: rotate(0); }
.faq-item p { padding: 0 1.1rem 1.05rem; margin: 0; }

/* ---------------------------------------------------------------
   12. Kêu gọi cuối trang
   --------------------------------------------------------------- */
.cta {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 1.3rem;
  padding: clamp(1.5rem, 4vw, 2.6rem);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line-strong);
  background:
    radial-gradient(70% 130% at 12% 0%, rgba(224,172,77,.22), transparent 62%),
    linear-gradient(150deg, rgba(26,37,64,.92), rgba(5,8,15,.95));
  box-shadow: var(--shadow);
}

/* ---------------------------------------------------------------
   13. Màn hình nhỏ
   --------------------------------------------------------------- */
@media (max-width: 900px) {
  .site-nav .burger { display: inline-flex; }
  .site-menu {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; gap: 0;
    padding: .5rem;
    background: rgba(9, 14, 26, .97);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-block: 1px solid var(--line);
    box-shadow: var(--shadow);
    display: none;
  }
  .site-menu.is-open { display: flex; }
  .site-menu a { padding: .75rem .9rem; }
  .site-menu a::after { display: none; }

  .hero { min-height: 84vh; }
  .hero-bg { background-position: center 34%; }
  .cloud-b, .cloud-c { display: none; }
  .rate-panel { justify-content: center; text-align: center; }
  .rate-panel .btn { width: 100%; }
}

@media (max-width: 560px) {
  .site-nav-cta .btn { padding: .4rem .7rem; font-size: .85rem; }
  .brand span { display: none; }
  .cta { flex-direction: column; align-items: stretch; }
  .cta .row-flex .btn { flex: 1; }
  .petals i:nth-child(n+10) { display: none; }
  .scroll-hint { display: none; }
}

/* ---------------------------------------------------------------
   14. Tôn trọng tuỳ chọn giảm chuyển động
   --------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .hero-bg { animation: none; }
  .cloud, .petals, .gallery-track, .btn-hero, .scroll-hint span, .rate-art { animation: none !important; }
  .petals { display: none; }
  .gallery-track { transform: none; }
}
