@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;500;600;700;800;900&family=Pacifico&family=Space+Mono:wght@400;700&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
img { max-width: 100%; }
a { text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: inherit; }

:root {
  --bg:        #06060f;
  --surface:   #0d0d1e;
  --surface2:  #131326;
  --border:    rgba(255,121,198,0.15);
  --accent:    #ff79c6;
  --accent2:   #bd93f9;
  --cyan:      #8be9fd;
  --green:     #50fa7b;
  --text:      #f8f8f2;
  --muted:     #7a7a9d;
  --danger:    #ff5555;
  --success:   #50fa7b;
  --radius:    12px;
  --radius-lg: 20px;
  --shadow:    0 4px 30px rgba(0,0,0,0.6);
  --glow:      0 0 20px rgba(255,121,198,0.25);
  --font:      'Nunito', sans-serif;
  --font-disp: 'Pacifico', cursive;
  --font-mono: 'Space Mono', monospace;
  --sidebar-w: 240px;
}

body.app-page {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  min-height: 100vh;
  line-height: 1.6;
}

body.app-page::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(255,121,198,0.06) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 80%, rgba(189,147,249,0.06) 0%, transparent 55%),
    radial-gradient(ellipse at 60% 10%, rgba(139,233,253,0.04) 0%, transparent 40%);
  pointer-events: none;
  z-index: 0;
}
body.app-page > * { position: relative; z-index: 1; }

.stars-bg { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
.star {
  position: absolute;
  font-size: 14px;
  color: var(--accent);
  opacity: 0.3;
  animation: star-float 4s ease-in-out infinite;
}
@keyframes star-float {
  0%,100% { transform: translateY(0) rotate(0deg); opacity: 0.3; }
  50%      { transform: translateY(-12px) rotate(20deg); opacity: 0.6; }
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 2rem;
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(6,6,15,0.8);
}
.nav-logo {
  font-family: var(--font-disp);
  font-size: 1.3rem;
  color: var(--accent);
  letter-spacing: -0.5px;
}
.nav-actions { display: flex; gap: 0.75rem; align-items: center; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.6rem 1.4rem;
  border-radius: 50px;
  font-family: var(--font);
  font-weight: 700;
  font-size: 0.9rem;
  border: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.btn-pink {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  box-shadow: 0 4px 15px rgba(255,121,198,0.35);
}
.btn-pink:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(255,121,198,0.5);
}
.btn-outline-sm {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text);
  padding: 0.45rem 1rem;
  font-size: 0.8rem;
  border-radius: 50px;
  font-family: var(--font);
  font-weight: 600;
  transition: all 0.2s;
}
.btn-outline-sm:hover { border-color: var(--accent); color: var(--accent); }
.btn-ghost {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--muted);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--text); }
.btn-lg  { padding: 0.85rem 2rem; font-size: 1rem; }
.btn-xl  { padding: 1rem 2.5rem; font-size: 1.1rem; }
.btn-sm  { padding: 0.35rem 0.85rem; font-size: 0.8rem; }
.btn-block { width: 100%; justify-content: center; }
.btn-pink-sm {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  padding: 0.45rem 1rem;
  font-size: 0.8rem;
  border-radius: 50px;
  font-family: var(--font);
  font-weight: 700;
  border: none;
  transition: all 0.2s;
}
.btn-pink-sm:hover { filter: brightness(1.1); transform: translateY(-1px); }

.input {
  width: 100%;
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.9rem;
  padding: 0.7rem 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  color-scheme: dark;
}
.input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255,121,198,0.12);
}
.input::placeholder { color: var(--muted); }
.input:-webkit-autofill,
.input:-webkit-autofill:hover,
.input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 100px var(--surface2) inset !important;
  box-shadow: 0 0 0 100px var(--surface2) inset !important;
  -webkit-text-fill-color: var(--text) !important;
  caret-color: var(--text);
}
.textarea { resize: vertical; min-height: 80px; }
.input-emoji {
  text-align: center;
  font-size: 1.3rem;
  padding: 0.5rem;
  max-width: 70px;
}

.alert {
  padding: 0.8rem 1.1rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.alert-error   { background: rgba(255,85,85,0.15);  border: 1px solid rgba(255,85,85,0.4);  color: #ff9999; }
.alert-success { background: rgba(80,250,123,0.12); border: 1px solid rgba(80,250,123,0.4); color: #50fa7b; }

.toast {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  padding: 0.85rem 1.2rem;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  animation: toast-in 0.3s ease;
  max-width: 360px;
}
.toast-success {
  background: rgba(80,250,123,0.15);
  border: 1px solid rgba(80,250,123,0.4);
  color: #50fa7b;
}
.toast button {
  background: none;
  border: none;
  color: inherit;
  font-size: 1rem;
  opacity: 0.7;
  margin-left: auto;
}
@keyframes toast-in {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

.back-home {
  display: inline-block;
  padding: 1rem 1.5rem;
  color: var(--muted);
  font-size: 0.85rem;
  transition: color 0.2s;
}
.back-home:hover { color: var(--accent); }

.auth-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 60px);
  padding: 2rem 1rem;
}
.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow), var(--glow);
}
.auth-logo {
  font-size: 2.5rem;
  text-align: center;
  color: var(--accent);
  margin-bottom: 0.25rem;
}
.auth-title {
  font-family: var(--font-disp);
  font-size: 1.6rem;
  text-align: center;
  color: var(--accent);
  margin-bottom: 1.5rem;
}
.auth-tabs {
  display: flex;
  background: var(--surface2);
  border-radius: 50px;
  padding: 4px;
  margin-bottom: 1.5rem;
  gap: 4px;
}
.auth-tab {
  flex: 1;
  padding: 0.5rem;
  border: none;
  border-radius: 50px;
  background: transparent;
  color: var(--muted);
  font-family: var(--font);
  font-weight: 700;
  font-size: 0.9rem;
  transition: all 0.2s;
}
.auth-tab.active {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  box-shadow: 0 2px 10px rgba(255,121,198,0.3);
}
.auth-form { display: flex; flex-direction: column; gap: 1rem; }
.input-group { display: flex; flex-direction: column; gap: 0.4rem; }
.input-group label { font-size: 0.85rem; font-weight: 700; color: var(--muted); }
.input-group small { font-weight: 400; opacity: 0.8; }
.input-wrap {
  display: flex;
  align-items: center;
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.input-wrap:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255,121,198,0.12);
}

.input-wrap .input {
  border: none !important;
  background: transparent !important;
  appearance: none;
  outline: none;
  flex: 1;
  box-shadow: none !important;
  color-scheme: dark;
}
.input-wrap .input:focus { box-shadow: none; }
.input-wrap .input:-webkit-autofill,
.input-wrap .input:-webkit-autofill:hover,
.input-wrap .input:-webkit-autofill:focus,
.input-wrap .input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 100px var(--surface2) inset !important;
  box-shadow: 0 0 0 100px var(--surface2) inset !important;
  -webkit-text-fill-color: var(--text) !important;
  caret-color: var(--text);
}
.input-prefix {
  padding: 0.7rem 0.5rem 0.7rem 1rem;
  color: var(--muted);
  font-size: 0.85rem;
  white-space: nowrap;
  font-family: var(--font-mono);
}
.pwd-toggle {
  background: none;
  border: none;
  padding: 0.5rem 0.8rem;
  font-size: 0.9rem;
  opacity: 0.6;
  transition: opacity 0.2s;
}
.pwd-toggle:hover { opacity: 1; }
.username-check { font-size: 0.8rem; font-weight: 700; margin-top: 0.2rem; }
.username-check.good { color: var(--success); }
.username-check.bad  { color: var(--danger); }
.auth-footer { font-size: 0.78rem; text-align: center; color: var(--muted); margin-top: 1rem; }

.hero {
  text-align: center;
  padding: 6rem 2rem 4rem;
  max-width: 760px;
  margin: 0 auto;
}
.hero-badge {
  display: inline-block;
  background: rgba(255,121,198,0.12);
  border: 1px solid rgba(255,121,198,0.3);
  color: var(--accent);
  border-radius: 50px;
  padding: 0.3rem 1rem;
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  letter-spacing: 0.5px;
}
.hero-title {
  font-family: var(--font);
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 1.2rem;
  color: var(--text);
}
.hero-title em { font-style: italic; color: var(--accent2); }
.gradient-text {
  background: linear-gradient(135deg, var(--accent), var(--accent2), var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub {
  font-size: 1.1rem;
  color: var(--muted);
  margin-bottom: 2.5rem;
  line-height: 1.7;
}
.hero-btns { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-bottom: 1.5rem; }
.hero-url {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--muted);
  background: var(--surface2);
  display: inline-block;
  padding: 0.4rem 1rem;
  border-radius: 50px;
  border: 1px solid var(--border);
}
.hero-url strong { color: var(--accent); }

.preview-section {
  padding: 2rem;
  overflow: hidden;
}
.preview-cards {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
  max-width: 900px;
  margin: 0 auto;
}
.preview-card {
  padding: 2rem 1.5rem;
  border-radius: var(--radius-lg);
  min-width: 180px;
  max-width: 200px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  transition: transform 0.3s;
  position: relative;
  overflow: hidden;
}
.preview-card:hover { transform: translateY(-6px); }
.active-card { transform: scale(1.05); }
.active-card:hover { transform: scale(1.05) translateY(-4px); }

.theme-preview-dark-kawaii {
  background: #06060f;
  border: 1px solid rgba(255,121,198,0.25);
  box-shadow: 0 0 30px rgba(255,121,198,0.12);
}
.theme-preview-sakura {
  background: #fff0f5;
  border: 1px solid rgba(232,116,154,0.4);
  box-shadow: 0 4px 20px rgba(232,116,154,0.2);
}
.theme-preview-vaporwave {
  background: #1a0030;
  border: 1px solid rgba(255,113,206,0.3);
  box-shadow: 0 0 30px rgba(255,113,206,0.15);
}

.pv-avatar { font-size: 2.2rem; }
.pv-name   { font-weight: 800; font-size: 0.9rem; }
.pv-bio    { font-size: 0.75rem; opacity: 0.7; }
.pv-btn {
  width: 100%;
  padding: 0.45rem 0.8rem;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  text-align: center;
  transition: all 0.2s;
}
.pv-tag {
  font-size: 0.65rem;
  font-family: var(--font-mono);
  opacity: 0.5;
  margin-top: 0.3rem;
}
.theme-preview-dark-kawaii .pv-name  { color: #f8f8f2; }
.theme-preview-dark-kawaii .pv-bio   { color: #bd93f9; }
.theme-preview-dark-kawaii .pv-btn-neon {
  background: transparent;
  border: 1px solid #ff79c6;
  color: #f8f8f2;
  box-shadow: 0 0 8px rgba(255,121,198,0.4);
}
.theme-preview-sakura .pv-name  { color: #5a2040; }
.theme-preview-sakura .pv-bio   { color: #c4698a; }
.theme-preview-sakura .pv-btn-pastel {
  background: rgba(232,116,154,0.2);
  border: none;
  color: #5a2040;
}
.theme-preview-vaporwave .pv-name  { color: #f8f8f2; }
.theme-preview-vaporwave .pv-bio   { color: #01cdfe; }
.theme-preview-vaporwave .pv-btn-gradient {
  background: linear-gradient(135deg,#ff71ce,#01cdfe);
  border: none;
  color: #fff;
}

.features {
  padding: 4rem 2rem;
  max-width: 1000px;
  margin: 0 auto;
}
.section-title {
  text-align: center;
  font-size: 1.8rem;
  font-weight: 900;
  margin-bottom: 3rem;
  color: var(--text);
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.8rem;
  transition: border-color 0.2s, transform 0.2s;
}
.feature-card:hover { border-color: rgba(255,121,198,0.4); transform: translateY(-3px); }
.feature-icon { font-size: 2rem; margin-bottom: 0.8rem; }
.feature-card h3 { font-size: 1rem; font-weight: 800; margin-bottom: 0.5rem; }
.feature-card p  { font-size: 0.88rem; color: var(--muted); line-height: 1.6; }

.cta-section {
  text-align: center;
  padding: 5rem 2rem;
  background: linear-gradient(135deg, rgba(255,121,198,0.06), rgba(189,147,249,0.06));
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.cta-section h2 { font-size: 2rem; font-weight: 900; margin-bottom: 0.75rem; }
.cta-section p  { color: var(--muted); margin-bottom: 2rem; }

.footer {
  text-align: center;
  padding: 2rem;
  color: var(--muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
}

.dashboard-page { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 1.5rem 1rem;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 200;
}
.sidebar-logo {
  font-family: var(--font-disp);
  font-size: 1.1rem;
  color: var(--accent);
  padding: 0.5rem 0.75rem 1rem;
  display: block;
}
.sidebar-profile {
  text-align: center;
  padding: 1rem 0.5rem 1.2rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1rem;
}
.sidebar-avatar {
  font-size: 2.5rem;
  margin-bottom: 0.4rem;
  line-height: 1;
}
.sidebar-username { font-size: 0.82rem; color: var(--muted); font-weight: 700; margin-bottom: 0.4rem; }
.sidebar-view-link {
  font-size: 0.75rem;
  color: var(--accent);
  opacity: 0.8;
  transition: opacity 0.2s;
}
.sidebar-view-link:hover { opacity: 1; }
.sidebar-nav { display: flex; flex-direction: column; gap: 0.25rem; flex: 1; }
.snav-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.9rem;
  border: none;
  background: transparent;
  color: var(--muted);
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 0.88rem;
  font-weight: 700;
  transition: all 0.2s;
  text-align: left;
}
.snav-btn:hover { background: rgba(255,121,198,0.08); color: var(--text); }
.snav-btn.active {
  background: rgba(255,121,198,0.15);
  color: var(--accent);
  box-shadow: inset 3px 0 0 var(--accent);
}
.snav-icon { font-size: 1rem; }
.sidebar-logout {
  display: block;
  padding: 0.7rem 0.9rem;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
  transition: color 0.2s;
  border-top: 1px solid var(--border);
  margin-top: 0.5rem;
  padding-top: 1rem;
}
.sidebar-logout:hover { color: var(--danger); }

.dash-main {
  margin-left: var(--sidebar-w);
  flex: 1;
  padding: 2.5rem;
  max-width: 860px;
}

.dash-tab { display: none; }
.dash-tab.active { display: block; }

.tab-header { margin-bottom: 2rem; }
.tab-header h2 { font-size: 1.6rem; font-weight: 900; margin-bottom: 0.3rem; }
.tab-header p  { color: var(--muted); font-size: 0.88rem; }

.dash-form { display: flex; flex-direction: column; gap: 1.5rem; }
.form-row  { display: flex; gap: 2rem; align-items: flex-start; flex-wrap: wrap; }
.form-col-avatar { flex: 0 0 160px; display: flex; flex-direction: column; align-items: center; gap: 0.7rem; }
.form-col-info   { flex: 1; min-width: 240px; display: flex; flex-direction: column; gap: 1rem; }
.field-group     { display: flex; flex-direction: column; gap: 0.4rem; }
.field-label     { font-size: 0.82rem; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; }
.field-label small { font-weight: 400; text-transform: none; letter-spacing: 0; }
.char-count      { font-size: 0.75rem; color: var(--muted); text-align: right; }

.avatar-preview {
  width: 90px;
  height: 90px;
  background: var(--surface2);
  border: 2px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  line-height: 1;
  overflow: hidden;
  transition: border-color 0.2s;
}
.avatar-preview img { width: 100%; height: 100%; object-fit: cover; }
.avatar-tabs { display: flex; gap: 0.4rem; }
.atab {
  padding: 0.3rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 50px;
  background: transparent;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  transition: all 0.2s;
}
.atab.active { background: rgba(255,121,198,0.15); border-color: var(--accent); color: var(--accent); }
.emoji-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
  max-height: 160px;
  overflow-y: auto;
  padding: 4px;
}
.emoji-btn {
  background: var(--surface2);
  border: 1.5px solid transparent;
  border-radius: 8px;
  font-size: 1.2rem;
  padding: 4px;
  line-height: 1;
  transition: all 0.15s;
}
.emoji-btn:hover   { border-color: var(--accent); transform: scale(1.15); }
.emoji-btn.selected { border-color: var(--accent); background: rgba(255,121,198,0.15); }

.add-link-card {
  background: var(--surface);
  border: 1.5px dashed rgba(255,121,198,0.3);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 2rem;
}
.add-link-card h3 { font-size: 1rem; margin-bottom: 1rem; color: var(--accent); }
.add-link-form    { display: flex; flex-direction: column; gap: 0.9rem; }
.add-link-top     { display: flex; gap: 0.75rem; align-items: flex-end; }

.style-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.style-option {
  cursor: pointer;
  position: relative;
}
.style-option input[type=radio] { display: none; }
.style-demo {
  display: block;
  padding: 0.35rem 0.85rem;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s;
  border: 1.5px solid transparent;
  font-family: var(--font);
}
.style-option.selected .style-demo,
.style-option:hover .style-demo { outline: 2px solid var(--accent); outline-offset: 2px; }

.pv-btn-neon     { border: 1px solid var(--accent); color: var(--text); background: transparent; box-shadow: 0 0 6px rgba(255,121,198,0.4); }
.pv-btn-pastel   { background: rgba(255,121,198,0.18); color: var(--text); }
.pv-btn-glass    { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.15); color: var(--text); backdrop-filter: blur(6px); }
.pv-btn-pixel    { border: 2px solid var(--text); color: var(--text); box-shadow: 2px 2px 0 var(--accent); background: transparent; }
.pv-btn-gradient { background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #fff; border: none; }
.pv-btn-outline  { border: 1.5px solid rgba(255,255,255,0.3); color: var(--text); background: transparent; }
.pv-btn-3d       { background: var(--accent); color: #fff; border: none; box-shadow: 0 4px 0 rgba(0,0,0,0.5); transform: translateY(-2px); }
.pv-btn-rainbow  { background: linear-gradient(90deg,#ff79c6,#bd93f9,#8be9fd,#50fa7b,#ff79c6); background-size: 200%; color: #fff; border: none; animation: rainbow 3s linear infinite; }
@keyframes rainbow { to { background-position: 200%; } }
.pv-btn-kawaii   { border: 2px dashed var(--accent); color: var(--text); background: transparent; }
.pv-btn-minimal  { border-bottom: 2px solid var(--accent); border-radius: 0 !important; color: var(--text); background: transparent; padding-left: 0; padding-right: 0; }

.links-list { display: flex; flex-direction: column; gap: 0.75rem; }
.link-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  flex-wrap: wrap;
  transition: border-color 0.2s;
}
.link-card:hover { border-color: rgba(255,121,198,0.3); }
.link-drag-handle {
  cursor: grab;
  color: var(--muted);
  font-size: 1.2rem;
  user-select: none;
  letter-spacing: -1px;
}
.link-drag-handle:active { cursor: grabbing; }
.link-icon { font-size: 1.4rem; flex: 0 0 30px; text-align: center; }
.link-info { flex: 1; min-width: 120px; }
.link-title { font-weight: 800; font-size: 0.9rem; }
.link-url   { font-size: 0.75rem; color: var(--muted); font-family: var(--font-mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 280px; }
.link-badge {
  font-size: 0.7rem;
  font-family: var(--font-mono);
  padding: 0.2rem 0.6rem;
  border-radius: 50px;
  background: rgba(255,121,198,0.1);
  border: 1px solid rgba(255,121,198,0.25);
  color: var(--accent);
}
.link-actions { display: flex; gap: 0.4rem; align-items: center; }
.icon-btn {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  transition: all 0.15s;
}
.icon-btn:hover { background: rgba(255,121,198,0.12); border-color: var(--accent); }
.icon-btn.danger:hover { background: rgba(255,85,85,0.12); border-color: var(--danger); }
.icon-btn.dimmed { opacity: 0.4; }
.inline-form { display: inline; }

.link-edit-form {
  width: 100%;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
  margin-top: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.edit-row { display: flex; gap: 0.5rem; align-items: center; }
.edit-actions { display: flex; gap: 0.5rem; }

.style-picker.small .style-demo { padding: 0.25rem 0.65rem; font-size: 0.72rem; }

.empty-state {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--muted);
}
.empty-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }

.social-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  margin-bottom: 0.5rem;
}
.social-field { display: flex; flex-direction: column; gap: 0.4rem; }
.social-icon-label {
  display: inline-block;
  width: 20px;
  font-size: 1rem;
  text-align: center;
  margin-right: 4px;
}

.theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}
.theme-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  position: relative;
}
.theme-card:hover   { border-color: rgba(255,121,198,0.4); transform: translateY(-2px); }
.theme-card.selected { border-color: var(--accent); box-shadow: 0 0 20px rgba(255,121,198,0.2); }
.theme-card input[type=radio] { display: none; }
.theme-preview-mini {
  height: 70px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  position: relative;
  overflow: hidden;
}
.tpm-dot  { width: 22px; height: 22px; border-radius: 50%; }
.tpm-line { width: 70%; height: 10px; border: 1.5px solid; border-radius: 50px; }
.theme-card-info { display: flex; flex-direction: column; gap: 0.2rem; }
.theme-card-info strong { font-size: 0.9rem; font-weight: 800; }
.theme-card-info span   { font-size: 0.75rem; color: var(--muted); }
.theme-check {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  background: var(--accent);
  color: #fff;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 0.7rem;
  display: none;
  align-items: center;
  justify-content: center;
  font-weight: 900;
}
.theme-card.selected .theme-check { display: flex; }

.color-row   { display: flex; align-items: center; gap: 0.75rem; }
.color-picker {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  border: 2px solid var(--border);
  background: none;
  cursor: pointer;
  padding: 2px;
}
.color-label { font-family: var(--font-mono); font-size: 0.88rem; color: var(--text); }
.color-swatches { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.75rem; }
.swatch {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid transparent;
  transition: all 0.15s;
  cursor: pointer;
}
.swatch:hover { transform: scale(1.2); border-color: #fff; }
.bg-presets { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem; }
.bg-preset-btn {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 50px;
  padding: 0.35rem 0.85rem;
  font-size: 0.78rem;
  font-family: var(--font);
  font-weight: 700;
  transition: all 0.2s;
}
.bg-preset-btn:hover { border-color: var(--accent); color: var(--accent); }

.security-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.8rem;
  margin-bottom: 1.5rem;
}
.security-card h3 { font-size: 1rem; font-weight: 800; margin-bottom: 1.2rem; }
.danger-zone { border-color: rgba(255,85,85,0.25); }
.danger-zone h3 { color: var(--danger); }
.danger-zone p  { font-size: 0.88rem; color: var(--muted); }

.not-found {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  text-align: center;
  gap: 1rem;
  padding: 2rem;
}
.nf-emoji { font-size: 3rem; margin-bottom: 0.5rem; }
.not-found h1 { font-size: 2rem; font-weight: 900; }
.not-found p  { color: var(--muted); }
.nf-actions { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; margin-top: 0.5rem; }

.hidden { display: none !important; }

@media (max-width: 768px) {
  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
    flex-direction: row;
    flex-wrap: wrap;
    padding: 1rem;
    gap: 0.5rem;
  }
  .sidebar-logo   { flex: 0 0 100%; }
  .sidebar-profile{ display: none; }
  .sidebar-nav    {
    flex-direction: row;
    flex: 1;
    overflow-x: auto;
    gap: 0.25rem;
  }
  .snav-btn { white-space: nowrap; min-width: auto; }
  .sidebar-logout { border-top: none; padding-top: 0; margin-top: 0; }
  .dash-main { margin-left: 0; padding: 1.5rem; }
  .form-row  { flex-direction: column; }
  .form-col-avatar { flex: 0 0 auto; align-self: center; }
  .add-link-top { flex-wrap: wrap; }
  .link-url { max-width: 140px; }
  .theme-grid { grid-template-columns: repeat(2, 1fr); }
  .social-grid { grid-template-columns: 1fr; }
}
