/* site.css — Linkboard design system */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=Inter:wght@400;500;600&display=swap');

/* ── TOKENS ── */
:root {
  --bg:            #0f0e17;
  --bg2:           #1a1825;
  --bg3:           #221f30;
  --surface:       rgba(255,255,255,0.04);
  --surface-hover: rgba(255,255,255,0.07);
  --border:        rgba(255,255,255,0.08);
  --border-md:     rgba(255,255,255,0.13);

  --text:          #fffffe;
  --text-2:        rgba(255,255,255,0.6);
  --text-3:        rgba(255,255,255,0.35);

  --accent:        #a78bfa;
  --accent-hover:  #c4b5fd;
  --accent-dim:    rgba(167,139,250,0.15);
  --accent-rgb:    167,139,250;

  --danger:        #f87171;
  --success:       #34d399;
  --warning:       #fbbf24;

  --font-display:  'Syne', system-ui, sans-serif;
  --font-body:     'Inter', system-ui, sans-serif;

  --radius-sm:     6px;
  --radius:        10px;
  --radius-lg:     16px;
  --radius-pill:   100px;

  --shadow:        0 4px 24px rgba(0,0,0,0.4);
  --shadow-sm:     0 2px 8px rgba(0,0,0,0.3);

  --transition:    0.18s ease;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ── TYPOGRAPHY ── */
.display { font-family: var(--font-display); }
h1,h2,h3,h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.15; }
h1 { font-size: clamp(2rem, 6vw, 3.5rem); }
h2 { font-size: clamp(1.4rem, 4vw, 2rem); }
h3 { font-size: 1.1rem; }
a  { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
p  { line-height: 1.7; color: var(--text-2); }

/* ── LAYOUT ── */
.container {
  max-width: 560px;
  margin: 0 auto;
  padding: 0 20px;
}
.container-wide {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-body); font-size: 0.875rem; font-weight: 600;
  padding: 11px 22px; border-radius: var(--radius); cursor: pointer;
  border: none; text-decoration: none; transition: var(--transition);
  white-space: nowrap; user-select: none;
}
.btn-primary {
  background: var(--accent); color: #0f0e17;
}
.btn-primary:hover { background: var(--accent-hover); color: #0f0e17; transform: translateY(-1px); }
.btn-ghost {
  background: transparent; color: var(--text-2); border: 1px solid var(--border-md);
}
.btn-ghost:hover { color: var(--text); border-color: rgba(var(--accent-rgb),0.5); }
.btn-danger { background: rgba(248,113,113,0.15); color: var(--danger); border: 1px solid rgba(248,113,113,0.2); }
.btn-danger:hover { background: rgba(248,113,113,0.25); }
.btn-sm { padding: 7px 14px; font-size: 0.8rem; }
.btn-full { width: 100%; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none !important; }

/* ── FORM ELEMENTS ── */
label { display: block; font-size: 0.8rem; font-weight: 600; color: var(--text-2); margin-bottom: 6px; letter-spacing: 0.02em; }
input[type=text], input[type=email], input[type=password], input[type=date],
input[type=url], input[type=color], textarea, select {
  width: 100%; background: var(--surface); border: 1px solid var(--border-md);
  border-radius: var(--radius-sm); color: var(--text); font-family: var(--font-body);
  font-size: 0.9rem; padding: 11px 14px; transition: border-color var(--transition);
  outline: none; -webkit-appearance: none; appearance: none;
}
input[type=text]:focus, input[type=email]:focus, input[type=password]:focus,
input[type=date]:focus, input[type=url]:focus, textarea:focus, select:focus {
  border-color: rgba(var(--accent-rgb),0.5);
  background: rgba(255,255,255,0.05);
}
input[type=color] { padding: 6px; height: 42px; cursor: pointer; }
textarea { resize: vertical; min-height: 90px; }
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23ffffff60' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }

.form-group { margin-bottom: 18px; }
.form-hint { font-size: 0.75rem; color: var(--text-3); margin-top: 5px; }
.form-error { font-size: 0.78rem; color: var(--danger); margin-top: 5px; display: none; }
.form-error.show { display: block; }

/* ── TOGGLE ── */
.toggle-wrap { display: flex; align-items: center; gap: 10px; }
.toggle { position: relative; width: 42px; height: 24px; flex-shrink: 0; }
.toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-slider {
  position: absolute; inset: 0; background: var(--bg3); border-radius: var(--radius-pill);
  cursor: pointer; transition: background var(--transition);
}
.toggle-slider::before {
  content: ''; position: absolute; left: 3px; top: 3px;
  width: 18px; height: 18px; border-radius: 50%; background: var(--text-3);
  transition: transform var(--transition), background var(--transition);
}
.toggle input:checked ~ .toggle-slider { background: var(--accent-dim); }
.toggle input:checked ~ .toggle-slider::before { transform: translateX(18px); background: var(--accent); }

/* ── CARD ── */
.card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px;
}
.card-sm { padding: 16px; border-radius: var(--radius); }

/* ── ALERT / TOAST ── */
.alert {
  padding: 12px 16px; border-radius: var(--radius-sm); font-size: 0.85rem;
  margin-bottom: 16px; display: none;
}
.alert.show { display: block; }
.alert-error   { background: rgba(248,113,113,0.1); border: 1px solid rgba(248,113,113,0.25); color: var(--danger); }
.alert-success { background: rgba(52,211,153,0.1);  border: 1px solid rgba(52,211,153,0.2);  color: var(--success); }

#toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(120%);
  background: var(--bg3); border: 1px solid var(--border-md); color: var(--text);
  font-size: 0.85rem; padding: 10px 20px; border-radius: var(--radius-pill);
  box-shadow: var(--shadow); transition: transform 0.3s ease; z-index: 9999;
  white-space: nowrap; max-width: 90vw; text-align: center;
}
#toast.show { transform: translateX(-50%) translateY(0); }
#toast.toast-error { border-color: rgba(248,113,113,0.4); color: var(--danger); }

/* ── DIVIDER ── */
.divider { border: none; border-top: 1px solid var(--border); margin: 24px 0; }

/* ── BADGE ── */
.badge {
  display: inline-block; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.04em;
  padding: 3px 9px; border-radius: var(--radius-pill); text-transform: uppercase;
}
.badge-accent { background: var(--accent-dim); color: var(--accent); }
.badge-muted  { background: var(--surface);    color: var(--text-3); }
.badge-success{ background: rgba(52,211,153,0.1); color: var(--success); }

/* ── RESPONSIVE ── */
@media (max-width: 480px) {
  .container, .container-wide { padding: 0 16px; }
}
