/* DroneFlames Update Page — Strict Authentic Game Design System
   Matches play.ezz-ddos.xyz Launcher theme & launcher/ui/styles.css:
   matte olive-charcoal (#1f2119), 2px ink borders (#12140f), 9-slice game buttons, zero glow slop. */

@font-face {
  font-family: "RussoOne";
  src: url("/updates/download/assets/RussoOne-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Rubik";
  src: url("/updates/download/assets/Rubik-Variable.ttf") format("truetype");
  font-weight: 300 800;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg-base: #1f2119;
  --bg-panel: #26291f;
  --bg-bar: #2d3124;
  --olive-plate: #383b2b;
  --well-bg: #1b1d16;
  --well-alt: #24271d;

  --border-ink: #12140f;
  --border-olive: #686e50;
  --border-subtle: #3d4130;
  --rule-gold: #9a863e;

  --gold: #e8b038;
  --green-ok: #78bd44;

  --text-main: #eeebe2;
  --text-soft: #c5c4b8;
  --text-muted: #939584;

  --font-display: "RussoOne", "Segoe UI", sans-serif;
  --font-body: "Rubik", "Segoe UI", sans-serif;
}

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

[hidden] {
  display: none !important;
}

html {
  background: var(--bg-base);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.5;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  background: var(--bg-base);
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
}

.pixel {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

/* Authentic play.ezz-ddos.xyz Launcher Backdrop + Interactive Tactical Field */
.backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: var(--bg-base);
  overflow: hidden;
}

.banner-strip {
  position: absolute;
  inset: 0 0 auto 0;
  height: 290px;
  background-image: url("/updates/download/assets/bn_intercept_strip.png");
  background-size: 800% 100%;
  background-position: 0% 0;
  background-repeat: no-repeat;
  image-rendering: pixelated;
  opacity: 0.42;
}

@media (prefers-reduced-motion: no-preference) {
  .banner-strip {
    animation: df-banner-8 1.55s steps(8) infinite;
  }
}

@keyframes df-banner-8 {
  from { background-position: 0% 0; }
  to { background-position: 114.285714% 0; }
}

.banner-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgb(18 20 15 / 0.42) 0%,
    rgb(31 33 25 / 0.88) 210px,
    #1f2119 300px,
    #1f2119 100%
  );
}

.tactical-field {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.topbar,
.main-wrap,
.site-footer {
  position: relative;
  z-index: 1;
}

.container {
  width: min(1100px, calc(100% - 32px));
  margin-inline: auto;
}

:where(a:any-link, button, summary, video):focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* Matte Game Topbar */
.topbar {
  background: rgb(45 49 36 / 0.94);
  border-bottom: 2px solid var(--border-ink);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.06);
  position: sticky;
  top: 0;
  z-index: 20;
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 60px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--text-main);
}

.brand-logo {
  display: block;
  height: 32px;
  width: auto;
}

.brand-tag {
  font-size: 12.5px;
  color: var(--text-muted);
  border-left: 1px solid var(--border-subtle);
  padding-left: 12px;
}

.topbar-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.topbar-nav a {
  color: var(--text-soft);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  padding: 7px 12px;
  min-block-size: 36px;
  display: inline-flex;
  align-items: center;
  border-radius: 2px;
  border: 1px solid transparent;
  transition: background-color 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}

.topbar-nav a:hover {
  background: var(--olive-plate);
  border-color: var(--border-olive);
  color: var(--gold);
}

/* Authentic 9-Slice Game Buttons (wb_btn_*.png straight from DroneFlames) */
.df-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border-style: solid;
  border-width: 10px 12px 12px 12px;
  padding: 2px 16px 4px;
  background: transparent;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  image-rendering: pixelated;
  transition: filter 0.1s ease;
}

.df-btn:hover {
  filter: brightness(1.07);
}

.df-btn.green {
  border-image: url("/updates/download/assets/wb_btn_green.png") 16 18 20 18 fill stretch;
  color: #f5f9ec;
  text-shadow: 0 1px 0 #16300e;
}

.df-btn.green:active {
  border-image: url("/updates/download/assets/wb_btn_green_p.png") 16 18 20 18 fill stretch;
  transform: translateY(1px);
}

.df-btn.stone {
  border-image: url("/updates/download/assets/wb_btn_stone.png") 16 18 20 18 fill stretch;
  color: #f0ede4;
  text-shadow: 0 1px 0 #141610;
}

.df-btn.stone:active {
  border-image: url("/updates/download/assets/wb_btn_stone_p.png") 16 18 20 18 fill stretch;
  transform: translateY(1px);
}

.df-btn.sm {
  min-height: 32px;
  border-width: 7px 9px 9px 9px;
  padding: 0 10px 2px;
  font-size: 12px;
}

/* Main Workspace */
.main-wrap {
  padding: 36px 0 48px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* Matte Game Plate */
.plate {
  background: var(--bg-panel);
  border: 2px solid var(--border-ink);
  box-shadow: inset 0 1px 0 var(--border-olive);
  border-radius: 2px;
}

/* Hero Split */
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.18fr);
  gap: 32px;
  align-items: center;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.version-chip-row {
  display: flex;
  align-items: center;
}

.version-chip {
  display: inline-block;
  padding: 5px 11px;
  background: var(--well-alt);
  border: 1px solid var(--rule-gold);
  border-radius: 2px;
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.04em;
}

.hero-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.4vw, 2.75rem);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: 0.02em;
  color: var(--text-main);
}

.hero-lead {
  margin: 0;
  font-size: 15.5px;
  color: var(--text-soft);
  max-width: 40ch;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  margin-top: 6px;
  width: 100%;
}

.hero-cta {
  min-width: 268px;
  min-height: 54px;
  font-size: 17px;
  padding: 4px 28px 6px;
}

.direct-form {
  margin: 0;
}

/* Understated plain text link for standalone Setup fallback */
.plain-setup-link {
  background: none;
  border: 0;
  padding: 4px 0;
  min-block-size: 28px;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgb(147 149 132 / 0.45);
  cursor: pointer;
  transition: color 0.14s ease, text-decoration-color 0.14s ease;
}

.plain-setup-link:hover {
  color: var(--text-main);
  text-decoration-color: var(--gold);
}

/* Clean Game-Framed Video Panel (zero fake window chrome, zero glow) */
.hero-media {
  min-width: 0;
}

.video-panel {
  position: relative;
  background: var(--well-bg);
  border: 2px solid var(--border-ink);
  box-shadow: inset 0 1px 0 var(--border-olive), 0 14px 32px rgb(0 0 0 / 0.45);
  border-radius: 2px;
  overflow: hidden;
}

.video-panel video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--well-bg);
}

.video-controls {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px;
  background: rgb(27 29 22 / 0.88);
  border: 1px solid var(--border-ink);
  box-shadow: inset 0 1px 0 rgb(104 110 80 / 0.35);
  border-radius: 2px;
}

.vctl-btn {
  display: inline-grid;
  place-items: center;
  min-inline-size: 32px;
  min-block-size: 30px;
  padding: 0 7px;
  border: 1px solid var(--border-subtle);
  border-radius: 2px;
  background: var(--bg-bar);
  color: var(--text-main);
  cursor: pointer;
  transition: background-color 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}

.vctl-btn:hover {
  background: var(--olive-plate);
  border-color: var(--border-olive);
  color: var(--gold);
}

.vctl-btn[aria-pressed="true"] {
  background: var(--olive-plate);
  border-color: var(--rule-gold);
  color: var(--gold);
}

/* Non-Windows / Error Plates */
.nonwin-plate,
.error-plate {
  padding: 26px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  max-width: 680px;
}

.nonwin-plate h1,
.error-plate h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 28px;
}

.nonwin-size,
.nonwin-help,
.error-plate p {
  margin: 0;
  color: var(--text-soft);
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* 3 Disciplined Game Feature Plates */
.features-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.feature-plate {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.feature-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.feature-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 15.5px;
  letter-spacing: 0.03em;
  color: var(--gold);
}

.feature-plate p {
  margin: 0;
  font-size: 13.5px;
  color: var(--text-soft);
}

/* Changelog Plate */
.changelog-plate {
  overflow: hidden;
}

.plate-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 18px;
  background: var(--bg-bar);
  border-bottom: 2px solid var(--border-ink);
}

.plate-bar h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 16px;
  letter-spacing: 0.03em;
  color: var(--text-main);
}

.plate-meta {
  font-size: 12.5px;
  color: var(--text-muted);
}

.plate-well {
  padding: 18px;
  background: var(--well-bg);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.changelog-text {
  margin: 0;
  white-space: pre-wrap;
  font-size: 14.5px;
  line-height: 1.62;
  color: var(--text-main);
  overflow-wrap: anywhere;
}

.install-help {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
}

.checksum-box {
  border: 1px solid var(--border-subtle);
  background: var(--bg-panel);
  border-radius: 2px;
  padding: 9px 13px;
  font-size: 12.5px;
  color: var(--text-muted);
}

.checksum-box summary {
  cursor: pointer;
  color: var(--text-soft);
  font-weight: 500;
}

.checksum-line {
  margin: 10px 0 6px;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  color: var(--green-ok);
  overflow-wrap: anywhere;
}

.transcript-line {
  margin: 0;
  color: var(--text-muted);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 18px 0 26px;
  font-size: 13px;
  color: var(--text-muted);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.site-footer a {
  color: var(--gold);
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

/* Native Modal Dialog Theater */
.theater-dialog {
  width: min(1020px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  padding: 0;
  border: 2px solid var(--border-ink);
  border-radius: 2px;
  background: var(--bg-panel);
  color: var(--text-main);
  box-shadow: inset 0 1px 0 var(--border-olive), 0 24px 64px rgb(0 0 0 / 0.72);
  overflow: auto;
}

.theater-dialog:modal {
  overscroll-behavior: contain;
}

.theater-dialog::backdrop {
  background: rgb(14 16 12 / 0.84);
  overflow: hidden;
  overscroll-behavior: contain;
}

@media (prefers-reduced-motion: no-preference) {
  .theater-dialog {
    opacity: 0;
    transform: translateY(8px);
    transition:
      opacity 0.18s ease-out,
      transform 0.18s ease-out,
      display 0.18s,
      overlay 0.18s;
    transition-behavior: allow-discrete;
  }

  .theater-dialog[open] {
    opacity: 1;
    transform: translateY(0);
  }

  @starting-style {
    .theater-dialog[open] {
      opacity: 0;
      transform: translateY(8px);
    }
  }
}

.theater-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: var(--bg-bar);
  border-bottom: 2px solid var(--border-ink);
}

.theater-bar h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 16px;
  letter-spacing: 0.03em;
  color: var(--gold);
}

.theater-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.theater-video-wrap {
  background: #10120d;
}

.theater-video-wrap video {
  display: block;
  width: 100%;
  height: auto;
  max-height: 76vh;
  aspect-ratio: 16 / 9;
  background: #10120d;
}

/* Scroll-Driven Reveal (Compositor-Only, Progressive Enhancement) */
@media (prefers-reduced-motion: no-preference) {
  @supports ((animation-timeline: view()) and (animation-range: entry)) {
    @keyframes df-plate-in {
      from {
        opacity: 0;
        transform: translateY(20px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    .reveal-block {
      animation: df-plate-in auto ease-out both;
      animation-timeline: view();
      animation-range: entry 0% entry 55%;
    }
  }
}

.reveal-block.io-pending {
  opacity: 0;
  transform: translateY(18px);
}

.reveal-block.io-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}

/* Responsive */
@media (max-width: 920px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .features-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .brand-tag {
    display: none;
  }

  .hero-cta {
    width: 100%;
  }
}

/* Windows High Contrast / Forced Colors */
@media (forced-colors: active) {
  .backdrop {
    display: none;
  }

  .plate,
  .video-panel,
  .theater-dialog,
  .checksum-box {
    border: 2px solid CanvasText;
    box-shadow: none;
  }

  .df-btn,
  .vctl-btn {
    border-image: none;
    border: 2px solid ButtonText;
  }

  .version-chip {
    border: 1px solid Highlight;
  }
}
