/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Variables ── */
:root {
  --bg:        #0d0d0f;
  --surface:   #16161a;
  --border:    #2a2a32;
  --accent:    #7c5cfc;
  --accent-lt: #a487fd;
  --text:      #eeeef2;
  --muted:     #6b6b80;
  --radius:    14px;
  --qr-size:   260px;
}

/* ── Base ── */
html, body {
  height: 100%;
}
body {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px 16px;
}

/* ── Page wrapper ── */
.page {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* ── Header ── */
header {
  text-align: center;
}

.logo {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
}
.logo-y    { color: var(--accent-lt); }
.logo-qrs  { color: var(--accent); }

.tagline {
  margin-top: 8px;
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 300;
}

/* ── Card ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

label {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

input[type="url"] {
  width: 100%;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
  caret-color: var(--accent);
}
input[type="url"]::placeholder { color: var(--muted); }
input[type="url"]:focus {
  border-color: var(--accent);
}

/* ── QR area ── */
.qr-area {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: var(--qr-size);
  background: var(--bg);
  border: 1.5px dashed var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.3s;
}
.qr-area.has-qr {
  border-style: solid;
  border-color: var(--border);
  padding: 20px;
}

/* Placeholder */
.qr-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--border);
  font-size: 0.8rem;
}

/* Canvas (QR output) */
#qr-canvas {
  width: var(--qr-size) !important;
  height: var(--qr-size) !important;
  image-rendering: pixelated;
  border-radius: 6px;
}

/* ── Buttons ── */
.actions {
  display: flex;
  gap: 10px;
}

.btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 11px 14px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: opacity 0.15s, transform 0.1s;
}
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { opacity: 0.88; }

.btn-ghost {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--accent-lt); color: var(--accent-lt); }

/* ── Toast ── */
.toast {
  font-size: 0.82rem;
  text-align: center;
  color: var(--accent-lt);
  min-height: 18px;
  transition: opacity 0.3s;
}

/* ── Footer ── */
footer {
  text-align: center;
  font-size: 0.75rem;
  color: var(--muted);
}

/* ── Responsive ── */
@media (max-width: 380px) {
  .actions { flex-direction: column; }
}
