/* ==========================================================================
   Mega888 Guide — DOWNLOAD PAGE landing-system alignment
   --------------------------------------------------------------------------
   Loaded after style.css and landing.css. The page uses the existing inner-page
   structure, but these overrides bring it visually into the same dark,
   rounded, gradient-hairline language as the landing page.
   ========================================================================== */

.lp-download {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

/* --- Breadcrumb ---------------------------------------------------------- */
.lp-download .crumbs {
  position: relative;
  z-index: 1;
  padding-top: 22px;
}

.lp-download .crumbs ol {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 12px;
  width: max-content;
  max-width: 100%;
  gap: 5px;
}

.lp-download .crumbs li {
  font-size: 0.76rem;
  font-weight: 700;
}

.lp-download .crumbs a {
  color: var(--muted);
}

.lp-download .crumbs [aria-current="page"] {
  color: var(--gold);
}

/* --- Hero ---------------------------------------------------------------- */
.lp-dl-hero {
  position: relative;
  padding: 64px 0 36px;
}

.lp-dl-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(390px, 0.94fr);
  gap: 48px;
  align-items: center;
}

.lp-dl-copy {
  text-align: left;
}

.lp-dl-copy .lp-chips {
  justify-content: flex-start;
  margin-bottom: 24px;
}

.lp-dl-copy .lp-h1 {
  margin: 0 0 20px;
  max-width: 14ch;
  text-align: left;
}

.lp-dl-copy .lp-lede {
  margin: 0 0 28px;
  max-width: 580px;
  text-align: left;
}

.lp-dl-copy .lp-ctas {
  justify-content: flex-start;
  margin-bottom: 20px;
}

.lp-dl-copy .lp-note {
  text-align: left;
  max-width: 560px;
}

.lp-dl-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 650;
}

.lp-dl-meta span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.lp-dl-meta svg {
  width: 15px;
  height: 15px;
  color: var(--gold);
}

/* --- Hero visual ---------------------------------------------------------- */
.lp-dl-visual {
  position: relative;
  min-height: 480px;
  display: grid;
  place-items: center;
  transform-style: preserve-3d;
  transition: transform 0.16s ease-out;
}

.lp-dl-panel {
  position: relative;
  z-index: 2;
  width: min(100%, 430px);
  padding: 22px;
  border-radius: 34px;
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.025)),
    rgba(13, 18, 33, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    0 42px 90px -42px rgba(0, 0, 0, 0.95),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transform: rotateY(-5deg) rotateX(2deg);
  transition: transform 0.22s ease;
}

.lp-dl-panel-top {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 2px 2px 20px;
}

.lp-dl-panel-title {
  flex: 1 1 auto;
  min-width: 0;
}

.lp-dl-panel-title .lp-appname {
  margin: 0;
  font-size: 1.16rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.lp-dl-panel-title .lp-appsub {
  margin: 0;
  font-size: 0.74rem;
  color: var(--muted);
}

.lp-dl-file {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.lp-dl-file-ico {
  width: 42px;
  height: 42px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: var(--gold);
  background: rgba(246, 198, 83, 0.14);
  border: 1px solid rgba(246, 198, 83, 0.24);
}

.lp-dl-file-ico svg {
  width: 21px;
  height: 21px;
}

.lp-dl-file strong {
  display: block;
  font-size: 0.86rem;
  color: var(--text);
}

.lp-dl-file small {
  display: block;
  margin-top: 2px;
  font-size: 0.7rem;
  color: var(--muted);
}

.lp-dl-points {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.lp-dl-points span {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  border-radius: 13px;
  font-size: 0.78rem;
  font-weight: 720;
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.lp-dl-points svg {
  width: 16px;
  height: 16px;
  color: #6ee7a0;
  flex: none;
}

/* --- Landing-style sections ------------------------------------------------ */
.lp-download .section-sm {
  padding: 46px 0;
}

.lp-download .section-head {
  max-width: 720px;
  margin-inline: auto;
  margin-bottom: 30px;
  padding: 0;
  border: 0;
  text-align: center;
}

.lp-download .section-head h2 {
  margin-bottom: 10px;
}

.lp-download .section-head p {
  color: var(--muted);
  margin-bottom: 0;
}

.lp-download .icon-badge {
  width: 46px;
  height: 46px;
  margin: 0 auto 15px;
  border-radius: 15px;
  background: linear-gradient(135deg, rgba(246, 198, 83, 0.2), rgba(246, 198, 83, 0.06));
  border: 1px solid rgba(246, 198, 83, 0.24);
  color: var(--gold);
}

.lp-download .icon-badge svg {
  width: 23px;
  height: 23px;
}

.lp-download .card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.105);
  border-left: 0;
  border-radius: 24px;
  padding: 28px 26px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.012)),
    var(--surface);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.lp-download .card::before,
.lp-download .card::after {
  display: none;
}

.lp-download .card:hover {
  transform: translateY(-4px);
  border-color: rgba(246, 198, 83, 0.34);
  box-shadow: 0 26px 58px -30px rgba(0, 0, 0, 0.95);
}

.lp-download .card .icon-badge {
  margin: 0 0 15px;
}

.lp-download .card h3 {
  font-size: 1.12rem;
  letter-spacing: -0.01em;
}

.lp-download .card p {
  color: var(--text-soft);
  font-size: 0.92rem;
}

.lp-download .toc {
  border-radius: 22px;
  border-color: rgba(255, 255, 255, 0.105);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.012)),
    var(--surface);
  box-shadow: 0 24px 55px -34px rgba(0, 0, 0, 0.85);
}

.lp-download .toc h2 {
  color: var(--gold);
}

.lp-download .toc a {
  color: var(--text-soft);
}

.lp-download .toc a:hover {
  color: var(--gold);
  text-decoration: none;
}

.lp-download .table-wrap {
  border-radius: 22px;
  overflow: hidden;
  border-color: rgba(255, 255, 255, 0.105);
  box-shadow: 0 24px 55px -34px rgba(0, 0, 0, 0.85);
}

.lp-download .table-wrap table {
  background: var(--surface);
}

.lp-download .table-wrap th,
.lp-download .table-wrap td {
  border-color: rgba(255, 255, 255, 0.08);
}

.lp-download .steps {
  gap: 12px;
}

.lp-download .steps > li {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-left: 0;
  border-radius: 22px;
  padding: 25px 26px 25px 96px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.01)),
    var(--surface);
  box-shadow: none;
}

.lp-download .steps > li::before {
  left: 24px;
  top: 12px;
  font-size: 2.8rem;
  color: rgba(246, 198, 83, 0.28);
}

.lp-download .steps > li:hover {
  transform: translateY(-3px);
  border-color: rgba(246, 198, 83, 0.3);
  box-shadow: 0 24px 52px -32px rgba(0, 0, 0, 0.95);
}

.lp-download .callout {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-left: 0;
  border-radius: 20px;
  padding: 20px 24px;
}

.lp-download .callout-warn {
  border-color: rgba(227, 58, 82, 0.28);
}

.lp-download .callout-info {
  border-color: rgba(77, 141, 246, 0.26);
}

.lp-download .faq {
  gap: 10px;
}

.lp-download .faq details {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-left: 0;
  border-radius: 18px;
  background: var(--surface);
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.lp-download .faq details:hover {
  transform: translateY(-2px);
  border-color: rgba(246, 198, 83, 0.28);
  background: var(--surface);
}

.lp-download .faq details[open] {
  border-color: rgba(246, 198, 83, 0.3);
  background:
    linear-gradient(145deg, rgba(246, 198, 83, 0.06), transparent 55%),
    var(--surface);
}

.lp-download .faq summary {
  border-radius: 18px;
}

.lp-download .cta-band {
  border-radius: 28px;
  margin: 20px auto 0;
  max-width: calc(var(--maxw) - 40px);
  border: 1px solid rgba(246, 198, 83, 0.22);
  background:
    radial-gradient(120% 140% at 50% -20%, rgba(246, 198, 83, 0.17), transparent 62%),
    var(--surface);
  padding: 48px 28px;
}

.lp-download .rg-notice {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.035);
}

/* --- Buttons ---------------------------------------------------------------- */
.lp-download .btn {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.lp-download .btn::after {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: -1;
  background: linear-gradient(110deg, transparent 32%, rgba(255, 255, 255, 0.48) 50%, transparent 68%);
  transform: translateX(-160%);
  transition: transform 0.65s ease;
}

.lp-download .btn:hover::after {
  transform: translateX(160%);
}

/* --- Reveal and spotlight ---------------------------------------------------- */
.js .lp-download [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.72s cubic-bezier(0.22, 0.8, 0.26, 1),
    transform 0.72s cubic-bezier(0.22, 0.8, 0.26, 1);
}

.js .lp-download [data-reveal="left"] { transform: translateX(-30px); }
.js .lp-download [data-reveal="right"] { transform: translateX(30px); }
.js .lp-download [data-reveal="up"] { transform: translateY(28px); }

.js .lp-download [data-reveal].is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.lp-download .lp-dl-visual[data-reveal].is-visible {
  transition: transform 0.16s ease-out;
}

[data-spotlight] {
  position: relative;
  overflow: hidden;
}

[data-spotlight]::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  background: radial-gradient(340px circle at var(--mx, 50%) var(--my, 50%), rgba(246, 198, 83, 0.12), transparent 42%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

[data-spotlight]:hover::before {
  opacity: 1;
}

[data-spotlight] > * {
  position: relative;
  z-index: 1;
}

/* --- Responsive --------------------------------------------------------------- */
@media (max-width: 980px) {
  .lp-dl-hero-grid {
    grid-template-columns: 1fr;
    gap: 42px;
  }

  .lp-dl-copy {
    max-width: 720px;
    margin-inline: auto;
  }

  .lp-dl-visual {
    min-height: 470px;
  }

  .lp-dl-panel {
    width: min(100%, 450px);
  }
}

@media (max-width: 820px) {
  .lp-dl-hero {
    padding-top: 42px;
  }

  .lp-dl-copy {
    text-align: center;
  }

  .lp-dl-copy .lp-chips,
  .lp-dl-copy .lp-ctas,
  .lp-dl-meta {
    justify-content: center;
  }

  .lp-dl-copy .lp-h1,
  .lp-dl-copy .lp-lede,
  .lp-dl-copy .lp-note {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
  }

  .lp-dl-visual {
    min-height: 440px;
  }
}

@media (max-width: 620px) {
  .lp-dl-hero-grid {
    gap: 28px;
  }

  .lp-dl-panel {
    padding: 17px;
    border-radius: 28px;
  }

  .lp-dl-visual {
    min-height: 410px;
  }

  .lp-download .section-sm {
    padding: 34px 0;
  }

  .lp-download .steps > li {
    padding: 22px 20px 22px 78px;
  }

  .lp-download .steps > li::before {
    left: 18px;
    font-size: 2.4rem;
  }

  .lp-download .cta-band {
    max-width: calc(100% - 28px);
    padding: 36px 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .js .lp-download [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .lp-download .lp-ambient span,
  .lp-download .lp-orbit,
  .lp-download .lp-float,
  .lp-download .lp-live-dot,
  .lp-download .lp-live-dot::after {
    animation: none !important;
  }
}

@media print {
  .lp-download .lp-ambient,
  .lp-download .lp-dl-visual,
  .lp-download .lp-float,
  .lp-download .lp-progress {
    display: none !important;
  }

  .lp-dl-hero-grid {
    display: block;
  }
}
