:root {
  --bg-deep: #0f1712;
  --bg-night: #1d2b1f;
  --panel: #243a2c;
  --panel-2: #2f4a39;
  --ink: #f2f7e9;
  --muted: #d1dfc6;
  --accent: #7ce0a8;
  --accent-2: #e8d17a;
  --line: #5f7f61;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  min-height: 100vh;
  color: var(--ink);
  background: var(--bg-deep);
  font-family: "VT323", "Courier New", monospace;
  letter-spacing: 0.2px;
}

a { color: inherit; }

.site-shell {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background:
    linear-gradient(rgba(16, 23, 18, 0.62), rgba(16, 23, 18, 0.78)),
    url("../images/background.png") center / cover no-repeat fixed;
}

.site-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.1;
  background-image:
    linear-gradient(transparent 50%, rgba(8, 12, 9, 0.5) 50%),
    radial-gradient(circle at 20% 20%, rgba(165, 230, 165, 0.13), transparent 30%),
    radial-gradient(circle at 80% 80%, rgba(120, 170, 120, 0.12), transparent 28%);
  background-size: 100% 4px, 100% 100%, 100% 100%;
}

.cloud-layer {
  pointer-events: none;
  position: absolute;
  inset: 0;
  opacity: 0.08;
  background: url("../images/tile.png") repeat;
  background-size: 220px 220px;
  image-rendering: pixelated;
  animation: drift 140s linear infinite;
}

@keyframes drift {
  from { background-position: 0 0, 0 0; }
  to { background-position: 400px 120px, 1600px 240px; }
}

.wrap {
  position: relative;
  z-index: 2;
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
}

.pixel-frame {
  border: 3px solid #0a110d;
  box-shadow:
    0 0 0 3px #3f6648,
    0 0 0 6px #122117,
    0 10px 0 rgba(5, 10, 7, 0.6);
  border-radius: 4px;
}

.topbar {
  margin-top: 1rem;
  background:
    linear-gradient(rgba(34, 56, 42, 0.9), rgba(26, 42, 32, 0.95)),
    url("../images/image5.png") center / cover no-repeat;
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
}

.brand img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  image-rendering: pixelated;
}

.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-title { font-family: "Press Start 2P", monospace; font-size: 0.72rem; }
.brand-sub { margin-top: 0.4rem; font-size: 1.05rem; color: var(--accent); }

.nav-links { display: flex; gap: 0.55rem; flex-wrap: wrap; }

.nav-links a {
  text-decoration: none;
  font-family: "Press Start 2P", monospace;
  font-size: 0.62rem;
  padding: 0.5rem 0.65rem;
  background:
    linear-gradient(180deg, rgba(75, 95, 65, 0.96), rgba(46, 62, 42, 0.96)),
    url("../images/image6.png") center / cover no-repeat;
  border: 2px solid #132014;
  box-shadow: inset 0 -2px 0 rgba(6, 10, 7, 0.65);
  border-radius: 2px;
  transition: transform 120ms ease, filter 120ms ease;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  transform: translateY(-1px);
  filter: brightness(1.08);
  color: #fff5cf;
}

.hero {
  margin-top: 1.1rem;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1rem;
}

.panel {
  background:
    linear-gradient(rgba(35, 58, 44, 0.92), rgba(28, 45, 35, 0.96));
  padding: 1rem;
}

.panel,
.kit,
.download-card,
.sprite-card,
.screenshot {
  position: relative;
  transition: box-shadow 180ms ease, transform 180ms ease, filter 180ms ease;
}

.panel:hover,
.kit:hover,
.download-card:hover,
.sprite-card:hover,
.screenshot:hover {
  transform: translateY(-1px);
  box-shadow:
    0 0 0 2px rgba(124, 224, 168, 0.35),
    0 0 16px rgba(124, 224, 168, 0.35),
    0 0 32px rgba(232, 209, 122, 0.16);
  filter: brightness(1.03);
}

.panel-hero {
  background:
    linear-gradient(rgba(20, 34, 26, 0.84), rgba(18, 30, 23, 0.9)),
    url("../images/image4.png") center / cover no-repeat;
}

.panel-download-shell {
  background:
    linear-gradient(rgba(18, 30, 22, 0.86), rgba(16, 27, 20, 0.92)),
    url("../images/background3.png") center / cover no-repeat;
}

.panel-about-intro {
  background:
    linear-gradient(rgba(21, 34, 25, 0.85), rgba(18, 30, 22, 0.9)),
    url("../images/image6.png") center / cover no-repeat;
}

.panel-about-feature {
  background:
    linear-gradient(rgba(19, 31, 23, 0.84), rgba(16, 26, 20, 0.9)),
    url("../images/image1.png") center / cover no-repeat;
}

.panel-contact-form {
  background:
    linear-gradient(rgba(21, 34, 26, 0.86), rgba(17, 28, 21, 0.92)),
    url("../images/background1.png") center / cover no-repeat;
}

.panel-contact-side {
  background:
    linear-gradient(rgba(22, 35, 27, 0.84), rgba(18, 29, 22, 0.9)),
    url("../images/image8.png") center / cover no-repeat;
}

.panel-account-delete {
  background:
    linear-gradient(rgba(38, 28, 21, 0.88), rgba(28, 20, 16, 0.92)),
    url("../images/background2.png") center / cover no-repeat;
}

.badge-row { display: flex; gap: 0.45rem; flex-wrap: wrap; margin-bottom: 0.75rem; }

.badge {
  font-family: "Press Start 2P", monospace;
  font-size: 0.52rem;
  padding: 0.35rem 0.45rem;
  border: 2px solid #1a2b1e;
  background: #3e6146;
  color: #edf8e8;
}

h1, h2, h3 {
  margin: 0;
  font-family: "Press Start 2P", monospace;
  line-height: 1.45;
}

h1 { font-size: clamp(0.95rem, 2vw, 1.3rem); }
h2 { font-size: clamp(0.8rem, 1.5vw, 1.03rem); }
h3 { font-size: 0.76rem; }

p, li, label, input, textarea { font-size: 1.1rem; }
.lead { margin: 0.8rem 0 0; color: var(--muted); }

.cta-row { margin-top: 1rem; display: flex; gap: 0.6rem; flex-wrap: wrap; }

.btn {
  text-decoration: none;
  font-family: "Press Start 2P", monospace;
  font-size: 0.6rem;
  padding: 0.64rem 0.72rem;
  border: 2px solid #152117;
  border-radius: 2px;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.35);
  transition: transform 120ms ease, filter 120ms ease;
}

.btn:hover { transform: translateY(-1px); filter: brightness(1.06); }
.btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
  filter: none;
}
.btn-primary { background: #63c593; color: #06130b; }
.btn-warn { background: #e0c169; color: #2b2205; }
.btn-ghost { background: #4f6f57; color: #edf7ee; }

.hero-media { display: grid; gap: 0.8rem; }

.screenshot {
  background:
    linear-gradient(rgba(12, 21, 16, 0.85), rgba(12, 21, 16, 0.88)),
    url("../images/image3.png") center / cover no-repeat;
  padding: 0.5rem;
}

.screenshot img {
  width: 100%;
  display: block;
  image-rendering: pixelated;
  border: 2px solid #0a101b;
}

.sprite-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
}

.sprite-card {
  text-align: center;
  background:
    linear-gradient(rgba(33, 52, 40, 0.95), rgba(24, 39, 30, 0.98)),
    url("../images/image8.png") center / cover no-repeat;
  border: 2px solid #152318;
  padding: 0.4rem;
}

.sprite-card img {
  width: 100%;
  max-height: 70px;
  object-fit: contain;
  image-rendering: pixelated;
}

.anim-sprite {
  width: 32px;
  height: 32px;
  margin: 0.2rem auto 0.15rem;
  image-rendering: pixelated;
  background-repeat: no-repeat;
  background-position: 0 0;
  background-size: auto;
  transform: scale(1.75);
  transform-origin: center center;
  animation: sprite-0-3 700ms steps(4) infinite;
}

.sprite-slime {
  background-image: url("../images/pixel/sheet_slime.png");
  animation-duration: 760ms;
}

.sprite-wolf {
  background-image: url("../images/pixel/sheet_wolf.png");
  animation-duration: 700ms;
}

.sprite-miner-dorr {
  background-image: url("../images/pixel/sheet_miner_dorr.png");
  animation-duration: 860ms;
}

.sprite-reke {
  background-image: url("../images/pixel/sheet_reke.png");
  animation-duration: 820ms;
}

@keyframes sprite-0-3 {
  from { background-position: 0 0; }
  to   { background-position: -128px 0; }
}

.sprite-card span {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.93rem;
  color: #d8e9d4;
}

.section { margin-top: 1rem; }

.discord-shell {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem;
  background:
    linear-gradient(rgba(18, 30, 22, 0.84), rgba(14, 24, 18, 0.92)),
    url("../images/background2.png") center / cover no-repeat;
}

.discord-copy h2 {
  margin-bottom: 0.4rem;
}

.discord-copy .lead {
  margin: 0 0 0.9rem;
  max-width: 48ch;
}

.discord-widget-wrap {
  padding: 0;
  overflow: hidden;
  width: 350px;
  max-width: 100%;
  background: #151720;
}

.discord-widget-wrap iframe {
  display: block;
  width: 350px;
  max-width: 100%;
  border: 0;
}

.section-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.kit {
  background:
    linear-gradient(rgba(35, 58, 44, 0.9), rgba(27, 43, 33, 0.95));
  padding: 0.8rem;
}

.kit-quest {
  background:
    linear-gradient(rgba(18, 30, 22, 0.84), rgba(16, 26, 19, 0.9)),
    url("../images/image2.png") center / cover no-repeat;
}

.kit-prof {
  background:
    linear-gradient(rgba(19, 31, 23, 0.84), rgba(16, 27, 20, 0.9)),
    url("../images/image7.png") center / cover no-repeat;
}

.kit-battle {
  background:
    linear-gradient(rgba(20, 32, 24, 0.84), rgba(16, 26, 19, 0.9)),
    url("../images/background1.png") center / cover no-repeat;
}

.kit-about-quest {
  background:
    linear-gradient(rgba(20, 32, 24, 0.84), rgba(15, 25, 19, 0.9)),
    url("../images/background2.png") center / cover no-repeat;
}

.kit-about-craft {
  background:
    linear-gradient(rgba(19, 31, 23, 0.84), rgba(16, 26, 19, 0.9)),
    url("../images/image5.png") center / cover no-repeat;
}

.kit-about-combat {
  background:
    linear-gradient(rgba(18, 30, 22, 0.84), rgba(15, 25, 19, 0.9)),
    url("../images/background3.png") center / cover no-repeat;
}

.kit ul {
  margin: 0.7rem 0 0;
  padding-left: 1.1rem;
  color: #d8e8d1;
}

.kit li { margin-bottom: 0.35rem; }

.download-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.download-panel {
  padding-top: 1.25rem;
  padding-bottom: 1.1rem;
}

.download-panel h2 {
  line-height: 1.75;
  margin-bottom: 0.35rem;
}

.download-panel .lead {
  line-height: 1.35;
  margin-top: 0.6rem;
  margin-bottom: 1rem;
}

.download-card {
  background:
    linear-gradient(rgba(45, 70, 52, 0.9), rgba(29, 46, 35, 0.95));
  padding: 0.9rem;
}

.download-card.dl-win {
  background:
    linear-gradient(rgba(24, 38, 29, 0.84), rgba(19, 30, 23, 0.9)),
    url("../images/image2.png") center / cover no-repeat;
}

.download-card.dl-android {
  background:
    linear-gradient(rgba(23, 37, 28, 0.84), rgba(18, 29, 22, 0.9)),
    url("../images/image4.png") center / cover no-repeat;
}

.download-card.dl-zip {
  background:
    linear-gradient(rgba(24, 38, 29, 0.84), rgba(19, 30, 23, 0.9)),
    url("../images/image6.png") center / cover no-repeat;
}

.download-meta {
  color: #d2e3ce;
  margin: 0.5rem 0 0.8rem;
}

.footer {
  margin: 1rem 0 1.2rem;
  background:
    linear-gradient(rgba(32, 50, 38, 0.94), rgba(20, 33, 25, 0.98)),
    url("../images/image7.png") center / cover no-repeat;
  padding: 0.7rem 0.9rem;
  font-size: 1rem;
  color: #d2e4ce;
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.footer .legal-note {
  width: 100%;
  font-size: 0.9rem;
  color: #c4d8c1;
  opacity: 0.95;
}

.footer .visit-note {
  width: 100%;
  font-size: 0.95rem;
  color: #d7e8ce;
}

.pixel-form {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.85rem;
}

.pixel-form input,
.pixel-form textarea {
  width: 100%;
  padding: 0.55rem 0.65rem;
  border: 2px solid #1b2b1f;
  background: rgba(15, 24, 18, 0.95);
  color: #eff6e9;
  outline: none;
}

.pixel-form input:focus,
.pixel-form textarea:focus {
  border-color: #89d3a4;
}

.pixel-form .checkbox-line {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 0.2rem;
}

.pixel-form .checkbox-line input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
}

.form-help {
  margin: 0.2rem 0 0;
  color: #e9dbc8;
}

.delete-warn {
  margin-top: 0.9rem;
  padding: 0.65rem 0.75rem;
  background: rgba(58, 34, 20, 0.9);
  border: 2px solid #5f3923;
  color: #ffebd4;
}

.delete-warn ul {
  margin: 0.5rem 0 0;
  padding-left: 1.1rem;
}

.delete-warn li {
  margin-bottom: 0.25rem;
}

.status-box {
  margin-top: 0.9rem;
  border: 2px solid #1d2d1f;
  background: rgba(14, 22, 16, 0.9);
  color: #d8e7d2;
  padding: 0.55rem 0.65rem;
  min-height: 2.2rem;
}

.status-box.loading {
  border-color: #63755b;
  color: #eef6da;
}

.status-box.success {
  border-color: #6eb58c;
  background: rgba(20, 42, 29, 0.9);
  color: #d6f9df;
}

.status-box.error {
  border-color: #a36a5c;
  background: rgba(52, 26, 22, 0.9);
  color: #ffd6d0;
}

.info-list {
  margin-top: 0.7rem;
  color: #d5e5d0;
}

.info-list li { margin-bottom: 0.3rem; }

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; }
  .section-grid { grid-template-columns: 1fr 1fr; }
  .download-grid { grid-template-columns: 1fr 1fr; }
  .discord-shell { grid-template-columns: 1fr; }
  .discord-copy { text-align: center; }
  .discord-widget-wrap { margin: 0 auto; }
}

@media (max-width: 640px) {
  .wrap { width: min(1120px, calc(100% - 1rem)); }
  .topbar-inner { flex-direction: column; align-items: stretch; }
  .brand { justify-content: center; }
  .nav-links { justify-content: center; }
  .sprite-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section-grid,
  .download-grid { grid-template-columns: 1fr; }
}
