:root {
  --bg: #0a0d1a;
  --bg2: #0d1121;
  --panel: rgba(18, 22, 40, 0.55);
  --panel-solid: #12162a;
  --line: rgba(255, 255, 255, 0.09);
  --ink: #f4f5fb;
  --sub: #aab0c8;
  --muted: #6b7291;
  --blue: #4f6ef7;
  --purple: #9b5cf6;
  --grad: linear-gradient(135deg, var(--blue) 0%, var(--purple) 100%);
  --radius: 16px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(1100px 600px at 82% 15%, rgba(79, 110, 247, 0.16), transparent 60%),
    radial-gradient(900px 700px at 95% 55%, rgba(155, 92, 246, 0.14), transparent 60%),
    var(--bg);
}

a { color: inherit; text-decoration: none; }

.glass {
  background: var(--panel);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 12px;
  padding: 13px 22px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  font-family: inherit;
}
.btn.primary {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 10px 30px rgba(79, 110, 247, 0.35);
}
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost {
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink);
  border-color: var(--line);
}
.btn.ghost:hover { background: rgba(255, 255, 255, 0.06); }

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.wordmark { display: inline-flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 800; letter-spacing: -0.01em; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

/* Shared page shell (viewer / error / delete pages) */
.page-wrap { min-height: 100vh; display: flex; flex-direction: column; }
.viewer-head { padding: 22px clamp(20px, 5vw, 56px) 0; }
.wordmark-sm { display: inline-flex; }
.wordmark-sm .wordmark { font-size: 17px; }

.viewer-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 24px clamp(16px, 5vw, 56px) 48px;
}
.viewer-frame {
  display: block;
  max-width: min(1200px, 92vw);
  max-height: 74vh;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}
.viewer-img { display: block; max-width: 100%; max-height: 74vh; width: auto; height: auto; object-fit: contain; background: #05070f; }
.viewer-actions { display: flex; gap: 12px; }

.error-main { flex: 1; display: flex; align-items: center; justify-content: center; padding: 24px clamp(16px, 5vw, 56px); }
.error-card { padding: clamp(28px, 5vw, 44px); max-width: 480px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.error-code { font-size: 13px; font-weight: 800; color: var(--muted); letter-spacing: 0.08em; }
.error-card h1 { font-size: 24px; margin: 2px 0 0; }
.error-card p { color: var(--sub); font-size: 14.5px; line-height: 1.55; margin: 0 0 8px; }
.delete-form { display: flex; gap: 10px; margin-top: 8px; }

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px clamp(20px, 5vw, 56px);
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
  flex-wrap: wrap;
}
.footer-part a { color: var(--sub); font-weight: 600; }
.footer-part a:hover { color: var(--ink); }

.wordmark-sm { display: inline-flex; align-items: center; gap: 8px; }
.footer-version { font-size: 11px; color: var(--muted); font-weight: 600; padding: 2px 7px; border: 1px solid var(--line); border-radius: 99px; }
