:root {
  --ink: #d8fff3;
  --text: #f2fffb;
  --muted: #6bbbb0;
  --dim: #3d8279;
  --accent: #19ffd2;
  --accent-soft: rgba(25, 255, 210, 0.12);
  --panel: rgba(4, 28, 24, 0.86);
  --line: rgba(25, 255, 210, 0.22);
  --shadow: rgba(0, 0, 0, 0.42);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Outfit", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 74% 18%, rgba(25, 255, 210, 0.11), transparent 30%),
    radial-gradient(circle at 8% 72%, rgba(26, 149, 126, 0.16), transparent 33%),
    linear-gradient(135deg, #001713 0%, #031f1a 42%, #000d0c 100%);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(25, 255, 210, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(25, 255, 210, 0.04) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.72), transparent 82%);
}

.stage {
  min-height: 100vh;
  padding: 18px clamp(14px, 3vw, 42px) 28px;
}

.topbar {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 18px;
  max-width: 1280px;
  height: 50px;
  margin: 0 auto 14px;
  color: var(--ink);
  font-weight: 700;
  font-size: 13px;
}

.brand, .top-links a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
}

.brand {
  min-width: max-content;
}

.brand-mark {
  width: 32px;
  height: 20px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: linear-gradient(135deg, var(--accent), #0b5a4d);
  box-shadow: 0 0 24px rgba(25, 255, 210, 0.28);
}

.nav-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--line), rgba(25, 255, 210, 0.03));
}

.top-links {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.top-links a {
  min-height: 34px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(4, 34, 29, 0.72);
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.top-links a:hover {
  border-color: rgba(25, 255, 210, 0.72);
  color: #ffffff;
}

.hero {
  position: relative;
  max-width: 1280px;
  min-height: 760px;
  margin: 0 auto;
  border: 1px solid rgba(25, 255, 210, 0.18);
  border-radius: 8px;
  isolation: isolate;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(4, 38, 32, 0.98), rgba(1, 17, 15, 0.96)),
    repeating-linear-gradient(90deg, rgba(25, 255, 210, 0.06) 0 1px, transparent 1px 38px);
  box-shadow: 0 32px 80px var(--shadow), inset 0 0 0 1px rgba(255, 255, 255, 0.025);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(90deg, rgba(25, 255, 210, 0.13) 0 1px, transparent 1px) 0 0 / 80px 100%,
    linear-gradient(rgba(25, 255, 210, 0.07) 0 1px, transparent 1px) 0 0 / 100% 80px;
  opacity: 0.45;
}

.hero::after {
  content: "";
  position: absolute;
  left: 9%;
  right: 9%;
  bottom: 92px;
  height: 1px;
  z-index: 1;
  background: linear-gradient(90deg, transparent, rgba(25, 255, 210, 0.8), transparent);
  box-shadow: 0 0 34px rgba(25, 255, 210, 0.45);
}

.sky-orbit, .floating-stone, .mountains, .mountain, .paper-panel, .forest, .tree, .ground, .tool-rail { display: none; }

.upload-panel {
  position: absolute;
  z-index: 10;
  left: 34px;
  top: 150px;
  width: 326px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.32), 0 0 38px rgba(25, 255, 210, 0.07);
  backdrop-filter: blur(18px);
}

.panel-heading p {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.panel-heading h1 {
  margin: 0 0 20px;
  max-width: 260px;
  color: #ffffff;
  font-size: 34px;
  line-height: 0.96;
  letter-spacing: 0;
}

.drop-grid { display: grid; gap: 12px; }

.drop-card {
  display: grid;
  grid-template-columns: 44px 1fr;
  grid-template-rows: auto auto;
  gap: 4px 13px;
  min-height: 76px;
  padding: 14px;
  border: 1px solid rgba(25, 255, 210, 0.18);
  border-radius: 8px;
  background: rgba(1, 20, 18, 0.82);
  color: var(--text);
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.drop-card:hover, .drop-card.is-dragging {
  transform: translateY(-2px);
  border-color: rgba(25, 255, 210, 0.72);
  background: rgba(4, 43, 36, 0.88);
}

.drop-card input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.drop-icon { grid-row: 1 / 3; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 8px; background: var(--accent); color: #001713; font-weight: 900; box-shadow: 0 0 26px rgba(25, 255, 210, 0.22); }
.drop-title { align-self: end; font-weight: 800; font-size: 16px; }
.drop-name { min-width: 0; color: var(--muted); font-size: 12px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.actions { display: flex; gap: 10px; margin-top: 15px; }
.control-button { flex: 1; height: 44px; border: 1px solid rgba(25, 255, 210, 0.34); border-radius: 8px; background: var(--accent); color: #001713; font: inherit; font-size: 13px; font-weight: 900; cursor: pointer; }
.control-button.ghost { color: var(--ink); background: rgba(5, 39, 33, 0.74); }

.viewer-card {
  position: absolute;
  z-index: 9;
  left: 50%;
  top: 90px;
  width: min(560px, 45vw);
  height: 610px;
  transform: translateX(-18%);
}

.viewer { width: 100%; height: 100%; cursor: grab; }
.viewer:active { cursor: grabbing; }
.viewer-status, .viewer-hint { position: absolute; left: 50%; transform: translateX(-50%); border: 1px solid var(--line); border-radius: 8px; background: rgba(2, 22, 19, 0.88); color: var(--ink); font-weight: 800; backdrop-filter: blur(14px); pointer-events: none; }
.viewer-status { top: 18px; padding: 8px 13px; font-size: 12px; }
.viewer-status.is-hidden { display: none; }
.viewer-hint { bottom: 28px; padding: 9px 16px; font-size: 13px; }

@media (max-width: 980px) {
  .topbar { height: auto; align-items: flex-start; }
  .nav-line { display: none; }
  .top-links { margin-left: auto; }
  .hero { min-height: 820px; }
  .upload-panel { left: 50%; top: 470px; width: min(94vw, 360px); transform: translateX(-50%); }
  .viewer-card { left: 50%; top: 70px; width: min(92vw, 470px); height: 480px; transform: translateX(-50%); }
}

@media (max-width: 680px) {
  .stage { padding: 12px; }
  .topbar { display: grid; gap: 12px; }
  .top-links { justify-content: flex-start; margin-left: 0; }
  .hero { min-height: 890px; }
  .upload-panel { top: 500px; }
  .viewer-card { top: 72px; height: 430px; }
  .panel-heading h1 { font-size: 31px; }
}
