:root {
  --bg: #080706;
  --ink: #f7efe3;
  --muted: #b9aa98;
  --soft: #ead9c3;
  --gold: #d9a441;
  --ember: #e4612f;
  --blood: #8b1f37;
  --violet: #7d5cc6;
  --green: #93c572;
  --panel: rgba(14, 12, 11, .86);
  --line: rgba(247, 239, 227, .15);
  --line-strong: rgba(217, 164, 65, .36);
  --shadow: 0 26px 80px rgba(0, 0, 0, .52);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Kanit", system-ui, sans-serif;
  background:
    linear-gradient(90deg, rgba(8, 7, 6, .94), rgba(8, 7, 6, .72), rgba(8, 7, 6, .96)),
    linear-gradient(to bottom, rgba(3, 3, 3, .18), rgba(3, 3, 3, .95)),
    url("../img/hi1.jpg") center top / cover fixed no-repeat,
    #080706;
  overflow-x: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

body::before {
  background:
    linear-gradient(115deg, transparent 0 42%, rgba(217, 164, 65, .07) 43%, transparent 44% 100%),
    linear-gradient(115deg, transparent 0 52%, rgba(125, 92, 198, .06) 53%, transparent 54% 100%),
    linear-gradient(rgba(247, 239, 227, .025) 1px, transparent 1px);
  background-size: 260px 260px, 420px 420px, 64px 64px;
  opacity: .7;
  animation: plateFlow 34s linear infinite;
}

body::after {
  background:
    radial-gradient(circle at 16% 18%, rgba(139, 31, 55, .28), transparent 28%),
    radial-gradient(circle at 84% 8%, rgba(217, 164, 65, .16), transparent 24%),
    radial-gradient(circle at 72% 86%, rgba(125, 92, 198, .16), transparent 30%),
    linear-gradient(to bottom, transparent 35%, rgba(0, 0, 0, .56));
}

@keyframes plateFlow {
  from { background-position: 0 0, 120px 80px, 0 0; }
  to { background-position: 360px 220px, -260px 300px, 0 0; }
}

a { color: inherit; }
img, video { max-width: 100%; }
.shell { width: min(1220px, calc(100% - 32px)); margin: 0 auto; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px clamp(16px, 4vw, 46px);
  border-bottom: 1px solid var(--line);
  background: rgba(5, 5, 5, .82);
  backdrop-filter: blur(16px);
}

.brand {
  min-width: max-content;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  text-decoration: none;
  font-family: "Syncopate", sans-serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0;
}

.brand img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  filter: drop-shadow(0 12px 26px rgba(0, 0, 0, .6));
}

.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.nav a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 13px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
  transition: transform 180ms ease, background 180ms ease, color 180ms ease, border-color 180ms ease;
}

.nav a:hover,
.nav a.active {
  color: #17100a;
  background: linear-gradient(135deg, var(--soft), var(--gold));
  border-color: rgba(255, 255, 255, .08);
  transform: translateY(-1px);
}

.hero {
  min-height: 690px;
  display: grid;
  grid-template-columns: minmax(260px, 390px) minmax(0, 1fr);
  gap: 34px;
  align-items: center;
  padding: 44px 0 30px;
}

.hero-copy { max-width: 760px; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  color: var(--gold);
  font-family: "Syncopate", sans-serif;
  font-size: 12px;
  font-weight: 700;
}

.eyebrow::before {
  content: "";
  width: 36px;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), var(--ember), var(--violet));
}

.hero h1,
.page-hero h1,
.form-card h1 {
  margin: 0;
  font-family: "Syncopate", sans-serif;
  font-size: clamp(42px, 7vw, 88px);
  line-height: .97;
  letter-spacing: 0;
}

.hero p,
.page-hero p,
.form-card p {
  max-width: 680px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.75;
}

.hero-logo {
  position: relative;
  min-height: 360px;
  display: grid;
  place-items: center;
}

.hero-logo::before {
  content: "";
  position: absolute;
  width: min(340px, 76vw);
  aspect-ratio: 1;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(247, 239, 227, .08), rgba(139, 31, 55, .18));
  box-shadow: 0 0 90px rgba(139, 31, 55, .22);
  transform: rotate(45deg);
}

.hero-logo img {
  position: relative;
  width: min(310px, 72vw);
  max-height: 310px;
  object-fit: contain;
  animation: logoBreath 7s ease-in-out infinite;
  filter: drop-shadow(0 28px 58px rgba(0, 0, 0, .58));
}

@keyframes logoBreath {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.045); }
}

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn,
.btn-soft,
button.btn {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 11px 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #17100a;
  background: linear-gradient(135deg, var(--soft), var(--gold));
  text-decoration: none;
  font: 900 14px/1.2 "Kanit", system-ui, sans-serif;
  cursor: pointer;
  box-shadow: 0 18px 42px rgba(0, 0, 0, .28);
  transition: transform 180ms ease, filter 180ms ease, border-color 180ms ease;
}

.btn:hover,
.btn-soft:hover { transform: translateY(-1px); filter: brightness(1.05); }

.btn.alt,
.btn-soft {
  color: var(--ink);
  background: rgba(247, 239, 227, .08);
  border-color: var(--line);
  box-shadow: none;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.hero-badges span,
.download-specs span {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  border: 1px solid rgba(247, 239, 227, .14);
  border-radius: 8px;
  background: rgba(247, 239, 227, .065);
  color: var(--soft);
  font-size: 13px;
  font-weight: 800;
}

.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.hero-stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin: 0;
}

.stat-card,
.panel,
.video-card,
.news-card,
.rank-card,
.download-card,
.guide-card,
.guide-menu,
.guide-content,
.form-card,
.cta-panel,
.quick-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, var(--panel), rgba(8, 7, 6, .74));
  box-shadow: var(--shadow);
}

.stat-card::before,
.panel::before,
.video-card::before,
.news-card::before,
.rank-card::before,
.download-card::before,
.guide-card::before,
.guide-menu::before,
.guide-content::before,
.form-card::before,
.cta-panel::before,
.quick-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background:
    linear-gradient(90deg, rgba(217, 164, 65, .62), rgba(228, 97, 47, .36), rgba(125, 92, 198, .32)) top left / 100% 2px no-repeat,
    linear-gradient(180deg, rgba(217, 164, 65, .22), transparent 42%) top left / 2px 100% no-repeat;
}

.stat-card { padding: 18px; }
.stat-card span { color: var(--muted); font-size: 13px; }
.stat-card strong {
  display: block;
  margin-top: 5px;
  color: var(--soft);
  font-family: "Syncopate", sans-serif;
  font-size: 22px;
}

.hero-stats .stat-card {
  min-height: 96px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, .18), rgba(247, 239, 227, .035)),
    linear-gradient(180deg, rgba(14, 12, 11, .9), rgba(8, 7, 6, .78));
}

.hero-stats .stat-card strong {
  font-size: 24px;
  line-height: 1.1;
}

.status-online { color: var(--green) !important; }
.status-offline { color: var(--ember) !important; }

.section-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin: 38px 0 16px;
}

.section-title h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 40px);
  line-height: 1.15;
}
.section-title p { margin: 0; color: var(--muted); }

.quick-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.quick-card {
  min-height: 120px;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 18px;
  text-decoration: none;
  transition: transform 180ms ease, border-color 180ms ease;
}

.quick-card:hover { transform: translateY(-2px); border-color: var(--line-strong); }
.quick-card i,
.download-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #17100a;
  background: linear-gradient(135deg, var(--soft), var(--gold));
  font-size: 21px;
}
.quick-card strong { display: block; font-size: 18px; }
.quick-card span { color: var(--muted); font-size: 13px; }

.feature-grid {
  display: grid;
  grid-template-columns: minmax(220px, 250px) minmax(0, 1fr) minmax(250px, .48fr);
  gap: 20px;
  align-items: stretch;
}

.video-card { padding: 12px; }
.title-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  border-radius: 8px;
  background: #030303;
  object-fit: cover;
}

.panel { padding: 22px; }
.panel h3,
.rank-card h3 {
  margin: 0 0 16px;
  color: var(--gold);
  font-family: "Syncopate", sans-serif;
  font-size: 14px;
}

.spec-list { display: grid; gap: 9px; }
.spec-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(247, 239, 227, .08);
}
.spec-row span { color: var(--muted); }
.spec-row b { color: var(--ink); font-size: 17px; }

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.news-card { text-decoration: none; }
.news-card img {
  width: 100%;
  height: 210px;
  object-fit: cover;
  display: block;
  filter: saturate(.9) contrast(1.04);
  transition: transform 280ms ease;
}
.news-card:hover img { transform: scale(1.035); }
.news-body { padding: 16px; }
.news-body h3 { margin: 0 0 11px; font-size: 17px; line-height: 1.4; }
.news-meta { color: var(--muted); font-size: 12px; }

.home-break-image {
  display: flex;
  justify-content: center;
  margin: 42px auto 28px;
  padding: 0 12px;
}
.home-break-image img {
  width: min(860px, 100%);
  max-height: 360px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 24px 62px rgba(0, 0, 0, .58));
}

.rank-grid {
  display: grid;
  grid-template-columns: minmax(0, 780px);
  justify-content: center;
  gap: 18px;
}
.rank-card { padding: 18px; }
.rank-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 92px;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}
.rank-row > * {
  min-height: 38px;
  display: flex;
  align-items: center;
  border: 1px solid rgba(247, 239, 227, .14);
  border-radius: 8px;
  background: rgba(247, 239, 227, .055);
}
.rank-row strong { justify-content: center; color: var(--gold); }
.rank-row span {
  min-width: 0;
  padding: 0 12px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.rank-row em { justify-content: flex-end; padding: 0 10px; font-style: normal; font-weight: 900; }
.rank-row.first strong,
.rank-row.first em {
  color: #17100a;
  background: linear-gradient(135deg, var(--soft), var(--gold));
}
.rank-empty { color: var(--muted); }

.cta-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  margin: 34px 0 10px;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(139, 31, 55, .32), rgba(217, 164, 65, .12)),
    rgba(14, 12, 11, .86);
}
.cta-panel h2 { margin: 0 0 8px; font-size: clamp(24px, 4vw, 34px); }
.cta-panel p { margin: 0; color: var(--muted); line-height: 1.65; }

.page-hero {
  padding: 58px 0 26px;
  text-align: center;
}
.page-hero .eyebrow { justify-content: center; }
.page-hero .actions { justify-content: center; }

.download-grid,
.guide-grid,
.download-grid-new {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 30px;
}
.download-card,
.guide-card {
  padding: 22px;
  background: linear-gradient(180deg, rgba(18, 15, 13, .88), rgba(8, 7, 6, .72));
}
.download-card h3,
.guide-card h3 { margin: 0 0 10px; font-size: 20px; }
.download-card p,
.guide-card p { color: var(--muted); line-height: 1.7; }
.download-mirror {
  min-height: 246px;
  display: flex;
  flex-direction: column;
}
.download-mirror .btn { margin-top: auto; }
.download-icon { margin-bottom: 16px; }
.mega-card {
  background:
    linear-gradient(180deg, rgba(139, 31, 55, .26), rgba(8, 7, 6, .72)),
    rgba(247, 239, 227, .06);
}
.download-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0 0;
}
.support-tools { margin: 28px 0 70px; }
.support-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.support-choice {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  min-height: 132px;
}
.support-choice .download-icon { margin: 0; }
.support-choice h3,
.support-choice p { grid-column: 2; }
.support-choice h3 { margin: 0; }
.support-choice p { margin: 4px 0 0; }
.support-choice .btn {
  grid-column: 3;
  grid-row: 1 / span 2;
  white-space: nowrap;
}

.guide-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  margin-bottom: 70px;
}
.guide-menu {
  position: sticky;
  top: 82px;
  display: grid;
  gap: 8px;
  padding: 14px;
}
.guide-tab {
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(247, 239, 227, .13);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(247, 239, 227, .055);
  font: 800 14px/1.2 "Kanit", system-ui, sans-serif;
  text-align: left;
  cursor: pointer;
}
.guide-tab span {
  min-width: 34px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #17100a;
  background: linear-gradient(135deg, var(--soft), var(--gold));
  font-family: "Syncopate", sans-serif;
  font-size: 10px;
}
.guide-tab:hover,
.guide-tab.active {
  border-color: var(--line-strong);
  background: linear-gradient(135deg, rgba(139, 31, 55, .34), rgba(217, 164, 65, .12));
}
.guide-content { min-height: 560px; padding: 18px; }
.guide-panel { display: none; }
.guide-panel.active { display: block; }
.guide-panel img {
  width: 100%;
  max-height: 520px;
  object-fit: contain;
  display: block;
  border: 1px solid rgba(247, 239, 227, .16);
  border-radius: 8px;
  background: rgba(0, 0, 0, .22);
}
.guide-text {
  margin-top: 16px;
  padding: 18px;
  border: 1px solid rgba(247, 239, 227, .12);
  border-radius: 8px;
  background: rgba(247, 239, 227, .055);
}
.guide-text h2 { margin: 0 0 10px; font-size: 24px; }
.guide-text p { margin: 0; color: var(--muted); line-height: 1.8; }

.center-wrap {
  width: min(620px, calc(100% - 32px));
  min-height: calc(100vh - 74px);
  display: grid;
  place-items: center;
  margin: 0 auto;
  padding: 44px 0;
}
.form-card {
  width: 100%;
  padding: clamp(22px, 4vw, 34px);
}
.form-card.wide { width: min(760px, 100%); }
.form-card h1 { font-size: clamp(38px, 7vw, 64px); }
.form-card form { display: grid; gap: 12px; margin-top: 22px; }
.form-card input {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(247, 239, 227, .14);
  border-radius: 8px;
  padding: 0 14px;
  color: var(--ink);
  background: rgba(247, 239, 227, .075);
  font: 600 15px/1.2 "Kanit", system-ui, sans-serif;
  outline: none;
}
.form-card input:focus {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 3px rgba(217, 164, 65, .13);
}
.captcha-area {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 12px;
}
.captcha-display {
  min-height: 48px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #17100a;
  background: linear-gradient(135deg, var(--soft), var(--gold));
  font-family: "Syncopate", sans-serif;
  font-weight: 700;
  cursor: pointer;
}
.msg {
  margin: 18px 0 0;
  padding: 12px 14px;
  border: 1px solid rgba(247, 239, 227, .15);
  border-radius: 8px;
  background: rgba(247, 239, 227, .075);
}
.msg.error { color: #ffd1c2; border-color: rgba(228, 97, 47, .42); }
.msg.success { color: #d7ffc8; border-color: rgba(147, 197, 114, .42); }

.footer {
  margin-top: 70px;
  padding: 34px 16px;
  text-align: center;
  color: var(--muted);
  border-top: 1px solid var(--line);
  background: rgba(0, 0, 0, .26);
}

@media (max-width: 980px) {
  .hero,
  .guide-layout { grid-template-columns: 1fr; }
  .hero {
    min-height: 0;
    text-align: center;
  }
  .hero p { margin-left: auto; margin-right: auto; }
  .hero-logo { order: -1; min-height: 240px; }
  .hero-logo::before { width: min(250px, 72vw); }
  .hero-logo img { width: min(240px, 66vw); }
  .actions,
  .hero-badges { justify-content: center; }
  .feature-grid {
    grid-template-columns: minmax(190px, 240px) minmax(0, 1fr);
    align-items: stretch;
  }
  .feature-grid .panel {
    grid-column: 1 / -1;
  }
  .stat-strip,
  .news-grid,
  .download-grid,
  .download-grid-new,
  .quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .guide-menu { position: static; }
  .support-choice-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  body { background-attachment: scroll; }
  .topbar { align-items: flex-start; flex-direction: column; }
  .brand { font-size: 12px; }
  .nav { width: 100%; justify-content: flex-start; }
  .nav a { flex: 1 1 30%; padding: 8px 9px; font-size: 12px; }
  .stat-strip,
  .news-grid,
  .download-grid,
  .download-grid-new,
  .quick-grid { grid-template-columns: 1fr; }
  .hero {
    width: min(100% - 20px, 680px);
    min-height: 0;
    padding-left: 0;
    padding-top: 28px;
    gap: 14px;
  }
  .hero-stats {
    width: 100%;
    grid-template-columns: 1fr;
  }
  .hero-stats .stat-card {
    min-height: 78px;
    padding: 12px;
  }
  .hero-stats .stat-card span { font-size: 12px; }
  .hero-stats .stat-card strong { font-size: 18px; }
  .hero-logo { min-height: 170px; }
  .hero-logo::before { width: min(170px, 38vw); }
  .hero-logo img { width: min(170px, 38vw); }
  .feature-grid { grid-template-columns: 1fr; }
  .hero h1,
  .page-hero h1 { font-size: 40px; }
  .section-title { align-items: flex-start; flex-direction: column; }
  .rank-row { grid-template-columns: 42px minmax(0, 1fr) 76px; }
  .cta-panel { grid-template-columns: 1fr; }
  .cta-panel .btn { width: 100%; }
  .support-choice { grid-template-columns: 54px minmax(0, 1fr); }
  .support-choice .btn {
    grid-column: 1 / -1;
    grid-row: auto;
    width: 100%;
  }
  .captcha-area { grid-template-columns: 1fr; }
}
