:root {
  --bg: #0f172a;
  --card: #111827;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --primary: #22c55e;
  --primary-dark: #16a34a;
  --line: #1f2937;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: linear-gradient(180deg, #020617 0%, #0f172a 100%);
  color: var(--text);
}

.container { max-width: 1000px; margin: 0 auto; padding: 20px; }
header h1 { margin: 8px 0; }
header p { color: var(--muted); margin-top: 0; }
nav { display: flex; gap: 12px; flex-wrap: wrap; }
nav a { color: #93c5fd; text-decoration: none; }
nav a:hover { text-decoration: underline; }

.grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
.card {
  border: 1px solid var(--line);
  background: rgba(17, 24, 39, 0.85);
  border-radius: 14px;
  padding: 16px;
}

.label { display: block; margin: 10px 0 6px; color: #cbd5e1; }
input[type="file"], select, input[type="range"] { width: 100%; }
button, .button {
  display: inline-block;
  margin-top: 14px;
  background: var(--primary);
  color: #052e16;
  border: none;
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}
button:hover, .button:hover { background: var(--primary-dark); color: #dcfce7; }
.button.secondary { background: #334155; color: #e2e8f0; margin-left: 10px; }
.disabled { opacity: 0.5; pointer-events: none; }

.tip { color: var(--muted); font-size: 14px; }
.stats p { margin: 6px 0; }
.preview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.preview-grid figure { margin: 0; }
.preview-grid img {
  width: 100%;
  min-height: 140px;
  object-fit: contain;
  border: 1px dashed #475569;
  border-radius: 10px;
  background: #020617;
}
.ad-slot { border-style: dashed; border-color: #475569; }
.footer { color: var(--muted); text-align: center; font-size: 14px; }

@media (max-width: 760px) {
  .preview-grid { grid-template-columns: 1fr; }
}
