/* DashShot — фірмовий стиль DASH */
@import url('https://fonts.googleapis.com/css2?family=Unbounded:wght@400;600;800&family=IBM+Plex+Sans:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap&subset=cyrillic');

:root {
  --bg: #0b0c0e;
  --panel: #14161a;
  --panel-2: #1a1d22;
  --line: #2a2e35;
  --ink: #edeee9;
  --muted: #8b9096;
  --lime: #c8f24b;
  --lime-dim: #a5c93c;
  --red: #ff6b4a;
  --font-display: 'Unbounded', sans-serif;
  --font-body: 'IBM Plex Sans', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
}

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

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  min-height: 100vh;
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(200, 242, 75, 0.06), transparent),
    repeating-linear-gradient(0deg, transparent, transparent 47px, rgba(255,255,255,0.015) 47px, rgba(255,255,255,0.015) 48px);
}

::selection { background: var(--lime); color: #0b0c0e; }

/* ---------- шапка ---------- */
.top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 32px;
  border-bottom: 1px dashed var(--line);
}
.wordmark {
  font-family: var(--font-display);
  font-weight: 800; font-size: 18px; letter-spacing: 0.04em;
  color: var(--ink); text-decoration: none; text-transform: uppercase;
}
.wordmark em { font-style: normal; color: var(--lime); }
.top nav { display: flex; gap: 8px; align-items: center; }

/* ---------- кнопки ---------- */
.btn {
  font-family: var(--font-body); font-size: 14px; font-weight: 600;
  padding: 10px 18px; cursor: pointer; border-radius: 2px;
  background: transparent; color: var(--ink);
  border: 1px dashed var(--line);
  transition: border-color .15s, background .15s, transform .1s;
}
.btn:hover { border-color: var(--lime); color: var(--lime); }
.btn:active { transform: translateY(1px); }
.btn.primary {
  background: var(--lime); color: #0b0c0e; border: 1px solid var(--lime);
}
.btn.primary:hover { background: var(--lime-dim); border-color: var(--lime-dim); color: #0b0c0e; }
.btn.danger:hover { border-color: var(--red); color: var(--red); }
.btn.small { padding: 6px 12px; font-size: 12.5px; }
.btn.tab { border-style: solid; border-color: transparent; color: var(--muted); }
.btn.tab.active { color: var(--lime); border-bottom: 2px solid var(--lime); border-radius: 0; }

/* ---------- логін ---------- */
.login-wrap {
  min-height: calc(100vh - 80px);
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 40px; padding: 40px 20px;
}
.login-hero { text-align: center; }
.login-hero h1 {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(32px, 6vw, 56px); line-height: 1.05;
  text-transform: uppercase; letter-spacing: 0.02em;
}
.login-hero h1 em { font-style: normal; color: var(--lime); }
.login-hero p { color: var(--muted); margin-top: 14px; font-size: 15px; }

.card {
  background: var(--panel);
  border: 1px dashed var(--line);
  padding: 32px;
  width: min(380px, 92vw);
  position: relative;
}
.card::before {
  content: ''; position: absolute; inset: -1px;
  border-top: 3px solid var(--lime); pointer-events: none;
}
.field { margin-bottom: 18px; }
.field label {
  display: block; font-size: 11px; text-transform: uppercase;
  letter-spacing: 0.12em; color: var(--muted); margin-bottom: 8px;
  font-family: var(--font-mono);
}
.field input {
  width: 100%; padding: 12px 14px;
  background: var(--bg); border: 1px solid var(--line); border-radius: 2px;
  color: var(--ink); font-family: var(--font-body); font-size: 15px;
  outline: none; transition: border-color .15s;
}
.field input:focus { border-color: var(--lime); }
.form-error { color: var(--red); font-size: 13.5px; min-height: 20px; margin-bottom: 10px; }

/* ---------- основной экран ---------- */
.main { max-width: 1100px; margin: 0 auto; padding: 36px 24px 80px; }

.dropzone {
  border: 2px dashed var(--line);
  padding: 90px 30px;
  text-align: center; cursor: pointer;
  transition: border-color .2s, background .2s;
  position: relative;
}
.dropzone:hover, .dropzone.over { border-color: var(--lime); background: rgba(200, 242, 75, 0.03); }
.dropzone h2 {
  font-family: var(--font-display); font-weight: 600; font-size: 22px;
  text-transform: uppercase; margin-bottom: 14px;
}
.dropzone p { color: var(--muted); font-size: 14.5px; line-height: 1.7; }
kbd {
  font-family: var(--font-mono); font-size: 12.5px;
  background: var(--panel-2); border: 1px solid var(--line);
  border-bottom-width: 2px; border-radius: 3px; padding: 2px 7px;
  color: var(--lime);
}

/* ---------- редактор ---------- */
.editor { display: none; }
.editor.on { display: block; }
.toolbar {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  padding: 10px; background: var(--panel); border: 1px dashed var(--line);
  border-bottom: none; position: sticky; top: 0; z-index: 5;
}
.tool {
  width: 38px; height: 38px; display: grid; place-items: center;
  background: transparent; border: 1px solid transparent; border-radius: 2px;
  color: var(--muted); cursor: pointer; transition: all .12s;
}
.tool:hover { color: var(--ink); border-color: var(--line); }
.tool.active { color: #0b0c0e; background: var(--lime); }
.tool svg { width: 19px; height: 19px; }
.toolbar .sep { width: 1px; height: 24px; background: var(--line); margin: 0 6px; }
.swatch {
  width: 22px; height: 22px; border-radius: 50%; cursor: pointer;
  border: 2px solid transparent; transition: transform .1s;
}
.swatch:hover { transform: scale(1.15); }
.swatch.active { border-color: var(--ink); }
.toolbar .spacer { flex: 1; }

.canvas-wrap {
  border: 1px dashed var(--line);
  background:
    repeating-conic-gradient(#101216 0% 25%, #14171b 0% 50%) 0 0 / 24px 24px;
  overflow: auto; max-height: 72vh; text-align: center; padding: 20px;
}
#canvas { max-width: 100%; cursor: crosshair; box-shadow: 0 8px 40px rgba(0,0,0,.5); }

.text-input {
  position: absolute; z-index: 10;
  background: transparent; border: 1px dashed var(--lime);
  color: inherit; font-weight: 700; font-family: var(--font-body);
  outline: none; padding: 2px 6px; min-width: 120px;
}

/* ---------- результат ---------- */
.overlay {
  position: fixed; inset: 0; background: rgba(5,6,8,0.8);
  display: none; align-items: center; justify-content: center; z-index: 50;
  backdrop-filter: blur(4px);
}
.overlay.on { display: flex; }
.modal {
  background: var(--panel); border: 1px dashed var(--line);
  padding: 36px; width: min(560px, 92vw); position: relative;
}
.modal::before {
  content: ''; position: absolute; inset: -1px;
  border-top: 3px solid var(--lime); pointer-events: none;
}
.modal h3 {
  font-family: var(--font-display); font-weight: 600; font-size: 17px;
  text-transform: uppercase; margin-bottom: 22px;
}
.link-row { display: flex; gap: 8px; }
.link-row input {
  flex: 1; padding: 12px 14px; font-family: var(--font-mono); font-size: 14px;
  background: var(--bg); border: 1px solid var(--lime); color: var(--lime);
  border-radius: 2px; outline: none;
}
.modal .actions { display: flex; gap: 8px; margin-top: 22px; justify-content: flex-end; }

/* ---------- история ---------- */
.history { display: none; }
.history.on { display: block; }
.grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px; margin-top: 24px;
}
.shot-card {
  background: var(--panel); border: 1px dashed var(--line);
  overflow: hidden; transition: border-color .15s;
}
.shot-card:hover { border-color: var(--lime); }
.shot-card a.thumb {
  display: block; height: 150px;
  background: #0e1013 center / cover no-repeat;
}
.shot-card .meta {
  padding: 10px 12px; font-family: var(--font-mono); font-size: 11.5px;
  color: var(--muted); display: flex; justify-content: space-between; align-items: center;
}
.shot-card .row {
  display: flex; gap: 6px; padding: 0 12px 12px;
}
.shot-card select {
  background: var(--bg); color: var(--muted); border: 1px dashed var(--line);
  font-family: var(--font-body); font-size: 12px; padding: 5px 6px; border-radius: 2px;
}
.empty { color: var(--muted); text-align: center; padding: 60px 0; font-size: 15px; }
.expires-tag { color: var(--red); }

/* ---------- страница просмотра ---------- */
.view-wrap {
  min-height: calc(100vh - 80px);
  display: flex; flex-direction: column; align-items: center;
  padding: 40px 20px; gap: 20px;
}
.view-wrap img {
  max-width: min(1200px, 96vw); max-height: 76vh;
  border: 1px dashed var(--line); box-shadow: 0 12px 60px rgba(0,0,0,.6);
}
.view-meta { font-family: var(--font-mono); font-size: 13px; color: var(--muted); }
.view-actions { display: flex; gap: 10px; }
.gone-msg { text-align: center; padding: 100px 20px; }
.gone-msg h1 { font-family: var(--font-display); font-size: 42px; color: var(--lime); margin-bottom: 16px; }
.gone-msg p { color: var(--muted); }
body.gone .view-wrap { display: none; }
body:not(.gone) .gone-msg { display: none; }

.toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%) translateY(80px);
  background: var(--lime); color: #0b0c0e; font-weight: 600; font-size: 14px;
  padding: 12px 22px; border-radius: 2px; transition: transform .25s;
  z-index: 100; pointer-events: none;
}
.toast.on { transform: translateX(-50%) translateY(0); }

.footer-note {
  text-align: center; padding: 24px; color: #4a4f56;
  font-family: var(--font-mono); font-size: 11.5px;
}
.footer-note a { color: #6a7078; text-decoration: none; border-bottom: 1px dashed #3a3f46; }
.footer-note a:hover { color: var(--lime); border-bottom-color: var(--lime); }

/* ---------- інструкція на головній ---------- */
.steps {
  width: min(720px, 92vw); margin: 0 auto;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
}
.step {
  border: 1px dashed var(--line); background: var(--panel);
  padding: 20px 18px; position: relative;
}
.step .num {
  font-family: var(--font-display); font-weight: 800; font-size: 15px;
  color: var(--lime); margin-bottom: 10px;
}
.step h3 { font-size: 14.5px; font-weight: 600; margin-bottom: 8px; }
.step p { color: var(--muted); font-size: 13px; line-height: 1.6; }
.step a { color: var(--lime); text-decoration: none; border-bottom: 1px dashed var(--lime-dim); }
.step a:hover { border-bottom-style: solid; }
.steps-title {
  text-align: center; font-family: var(--font-mono); font-size: 11.5px;
  text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted);
  margin-bottom: 18px;
}
@media (max-width: 640px) { .steps { grid-template-columns: 1fr; } }
