/* =============================================================================
   style.css — BioLink Design System
   Ästhetik: Cyberpunk-Luxury · Dark · Glassmorphism · Electric Indigo + Cyan
   Fonts: Syne (Display) · DM Mono (Code/Tags)
   ============================================================================= */

/* ---------------------------------------------------------------------------
   1. Custom Properties (Design Tokens)
   --------------------------------------------------------------------------- */
:root {
  /* Farben */
  --bg-void:        #05050a;
  --bg-deep:        #08080f;
  --bg-surface:     #0e0e1a;
  --bg-elevated:    #141428;
  --bg-glass:       rgba(14, 14, 26, 0.6);
  --bg-glass-hover: rgba(20, 20, 40, 0.75);

  --accent:         #6366f1; /* Override per Profil via inline style */
  --accent-rgb:     99, 102, 241;
  --accent-dim:     rgba(99, 102, 241, 0.15);
  --accent-bright:  #818cf8;
  --cyan:           #22d3ee;
  --cyan-rgb:       34, 211, 238;
  --cyan-dim:       rgba(34, 211, 238, 0.12);

  --discord:        #5865F2;
  --discord-hover:  #4752c4;

  /* Text */
  --text-primary:   #f0f0ff;
  --text-secondary: #8888aa;
  --text-muted:     #555577;
  --text-inverse:   #0a0a14;

  /* Borders */
  --border:         rgba(255, 255, 255, 0.06);
  --border-accent:  rgba(99, 102, 241, 0.3);
  --border-glow:    rgba(99, 102, 241, 0.5);

  /* Radius */
  --r-sm:   8px;
  --r-md:   14px;
  --r-lg:   20px;
  --r-xl:   28px;
  --r-full: 9999px;

  /* Spacing */
  --space-xs:  4px;
  --space-sm:  8px;
  --space-md:  16px;
  --space-lg:  24px;
  --space-xl:  40px;
  --space-2xl: 64px;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(0,0,0,.4), 0 1px 2px rgba(0,0,0,.6);
  --shadow-md:  0 4px 16px rgba(0,0,0,.5);
  --shadow-lg:  0 8px 32px rgba(0,0,0,.6);
  --shadow-glow: 0 0 30px rgba(var(--accent-rgb), 0.2);

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in:  cubic-bezier(0.7, 0, 0.84, 0);

  /* Fonts */
  --font-display: 'Syne', system-ui, sans-serif;
  --font-mono:    'DM Mono', 'Courier New', monospace;
}

/* ---------------------------------------------------------------------------
   2. Reset & Base
   --------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  font-family: var(--font-display);
  background: var(--bg-void);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Grain overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
  opacity: 0.018;
  pointer-events: none;
  z-index: 9999;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
input, textarea, select { font-family: inherit; }
audio { width: 100%; }

.mono { font-family: var(--font-mono); }
.accent { color: var(--accent); }

/* ---------------------------------------------------------------------------
   3. Glass Panel
   --------------------------------------------------------------------------- */
.glass-panel {
  background: var(--bg-glass);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}

/* ---------------------------------------------------------------------------
   4. Navigation
   --------------------------------------------------------------------------- */
.nav {
  position: fixed;
  top: var(--space-md);
  left: 50%;
  transform: translateX(-50%);
  width: min(calc(100% - 2rem), 900px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-sm) var(--space-md);
  z-index: 100;
  border-radius: var(--r-full);
  border: 1px solid var(--border);
  transition: background .3s;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -.02em;
}

.brand-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
  animation: pulseDot 2s ease-in-out infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .6; transform: scale(.8); }
}

.brand-name { color: var(--text-primary); font-family: var(--font-display); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

/* ---------------------------------------------------------------------------
   5. Buttons
   --------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  padding: .55em 1.25em;
  border-radius: var(--r-full);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .875rem;
  transition: all .2s var(--ease-out);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  transition: background .2s;
}
.btn:hover::after { background: rgba(255,255,255,0.06); }

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 20px rgba(var(--accent-rgb),.35);
}
.btn-primary:hover {
  background: var(--accent-bright);
  box-shadow: 0 0 30px rgba(var(--accent-rgb),.55);
  transform: translateY(-1px);
}

.btn-ghost {
  background: var(--bg-elevated);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  color: var(--text-primary);
  border-color: var(--border-accent);
}

.btn-discord {
  background: var(--discord);
  color: #fff;
  box-shadow: 0 0 20px rgba(88,101,242,.35);
}
.btn-discord:hover {
  background: var(--discord-hover);
  transform: translateY(-1px);
  box-shadow: 0 0 30px rgba(88,101,242,.55);
}

.btn-danger:hover { color: #ff6b6b; border-color: rgba(255,107,107,.3); }

.btn-lg {
  padding: .8em 1.8em;
  font-size: 1rem;
}
.btn-sm {
  padding: .35em .9em;
  font-size: .8rem;
}

/* ---------------------------------------------------------------------------
   6. Landing Page — Hero
   --------------------------------------------------------------------------- */
#particleCanvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.landing-page { background: var(--bg-void); }

.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: var(--space-2xl);
  max-width: 1200px;
  margin: 0 auto;
  padding: calc(80px + var(--space-2xl)) var(--space-xl) var(--space-2xl);
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-preview { display: none; }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: .6em;
  padding: .4em 1em;
  background: var(--accent-dim);
  border: 1px solid var(--border-accent);
  border-radius: var(--r-full);
  font-size: .8rem;
  color: var(--accent-bright);
  font-family: var(--font-mono);
  margin-bottom: var(--space-lg);
  width: fit-content;
}

@media (max-width: 900px) { .hero-badge { margin-inline: auto; } }

.badge-pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-bright);
  animation: pulseDot 1.5s ease-in-out infinite;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -.04em;
  margin-bottom: var(--space-md);
}

.gradient-text {
  background: linear-gradient(135deg, var(--accent), var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: var(--space-xl);
  max-width: 480px;
}

@media (max-width: 900px) { .hero-subtitle { margin-inline: auto; } }

.hero-cta {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}

@media (max-width: 900px) { .hero-cta { justify-content: center; } }

.hero-note {
  font-size: .8rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  width: 100%;
}

/* Hero Preview Cards */
.hero-preview {
  position: relative;
  height: 420px;
}

.preview-card {
  position: absolute;
  padding: var(--space-md);
}

.float-1 {
  width: 220px;
  top: 10%;
  left: 20%;
  animation: float 6s ease-in-out infinite;
}

.float-2 {
  width: 160px;
  bottom: 20%;
  left: 0;
  animation: float 7s ease-in-out infinite .5s;
}

.float-3 {
  width: 180px;
  top: 25%;
  right: 0;
  animation: float 8s ease-in-out infinite 1s;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-12px); }
}

.preview-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--cyan));
  margin-bottom: var(--space-sm);
}

.preview-line {
  height: 10px;
  border-radius: var(--r-full);
  background: var(--bg-elevated);
  margin-bottom: 8px;
}
.preview-line-name { width: 80px; background: linear-gradient(90deg, var(--accent-dim), var(--bg-elevated)); }
.preview-line-bio  { width: 120px; }

.preview-music {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}
.preview-music-icon { font-size: 1.4rem; }
.preview-music-bar {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 28px;
}
.preview-music-bar span {
  width: 4px;
  border-radius: var(--r-full);
  background: var(--accent);
  animation: bar 1.2s ease-in-out infinite;
}
.preview-music-bar span:nth-child(1) { height: 60%; animation-delay: 0s; }
.preview-music-bar span:nth-child(2) { height: 100%; animation-delay: .1s; }
.preview-music-bar span:nth-child(3) { height: 40%; animation-delay: .2s; }
.preview-music-bar span:nth-child(4) { height: 80%; animation-delay: .3s; }
.preview-music-bar span:nth-child(5) { height: 55%; animation-delay: .4s; }

@keyframes bar {
  0%, 100% { transform: scaleY(.4); }
  50%       { transform: scaleY(1); }
}

.preview-card-links { display: flex; flex-direction: column; gap: 8px; }
.preview-link-btn {
  height: 32px;
  border-radius: var(--r-full);
  background: linear-gradient(90deg, rgba(var(--accent-rgb),.2), var(--bg-elevated));
  border: 1px solid var(--border-accent);
}
.preview-link-btn-2 { opacity: .7; }
.preview-link-btn-3 { opacity: .4; }

/* ---------------------------------------------------------------------------
   7. Features Section
   --------------------------------------------------------------------------- */
.features {
  position: relative;
  z-index: 1;
  padding: var(--space-2xl) var(--space-xl);
  max-width: 1200px;
  margin: 0 auto;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-md);
}

.feature-card {
  padding: var(--space-xl) var(--space-lg);
  transition: transform .3s var(--ease-out), box-shadow .3s;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
  border-color: var(--border-accent);
}

.feature-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--r-md);
  background: var(--accent-dim);
  border: 1px solid var(--border-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-bright);
  margin-bottom: var(--space-md);
}

.feature-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: var(--space-sm);
}

.feature-card p {
  font-size: .9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.feature-card code {
  font-family: var(--font-mono);
  font-size: .8em;
  color: var(--accent-bright);
}

/* ---------------------------------------------------------------------------
   8. Footer
   --------------------------------------------------------------------------- */
.footer {
  text-align: center;
  padding: var(--space-xl);
  color: var(--text-muted);
  font-size: .85rem;
  font-family: var(--font-mono);
  position: relative;
  z-index: 1;
}

/* ---------------------------------------------------------------------------
   9. Dashboard Layout
   --------------------------------------------------------------------------- */
.dashboard-page {
  background: var(--bg-void);
}

.dashboard-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: var(--space-lg);
  max-width: 1200px;
  margin: 0 auto;
  padding: calc(90px + var(--space-md)) var(--space-lg) var(--space-2xl);
  min-height: 100vh;
}

@media (max-width: 768px) {
  .dashboard-layout { grid-template-columns: 1fr; }
}

/* Sidebar */
.dashboard-sidebar {
  position: sticky;
  top: calc(80px + var(--space-md));
  height: fit-content;
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.sidebar-profile {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.sidebar-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid var(--border-accent);
  object-fit: cover;
}

.sidebar-name {
  font-weight: 700;
  font-size: .95rem;
  margin-bottom: .2rem;
}

.sidebar-tag {
  font-size: .75rem;
  color: var(--text-muted);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: .3rem;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: .75em;
  padding: .65em 1em;
  border-radius: var(--r-md);
  font-weight: 500;
  font-size: .9rem;
  color: var(--text-secondary);
  transition: all .2s;
  text-align: left;
  width: 100%;
  background: none;
  border: none;
}

.sidebar-link:hover {
  color: var(--text-primary);
  background: var(--bg-elevated);
}

.sidebar-link.active {
  color: var(--accent-bright);
  background: var(--accent-dim);
  border: 1px solid var(--border-accent);
}

.sidebar-profile-url {
  font-size: .75rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  background: var(--bg-void);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: .6em .9em;
  word-break: break-all;
  line-height: 1.6;
}

/* Main */
.dashboard-main {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.tab-panel { display: none; }
.tab-panel.active { display: flex; flex-direction: column; gap: var(--space-md); }

.panel-header h2 {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -.03em;
  margin-bottom: .25rem;
}

.panel-header p {
  color: var(--text-secondary);
  font-size: .9rem;
}

/* Alerts */
.alert {
  display: flex;
  align-items: center;
  gap: .75em;
  padding: var(--space-md);
  border-radius: var(--r-md);
  font-size: .9rem;
}

.alert-success {
  background: rgba(34, 197, 94, .12);
  border: 1px solid rgba(34, 197, 94, .3);
  color: #4ade80;
}

.alert-error {
  background: rgba(239, 68, 68, .12);
  border: 1px solid rgba(239, 68, 68, .3);
  color: #f87171;
}

/* Forms */
.editor-form {
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
  display: block;
}

.form-input {
  background: var(--bg-void);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 8px 12px;
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: border-color .2s, box-shadow .2s;
  width: 100%;
}

.form-input:focus {
  outline: none;
  border-color: var(--border-accent);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .15);
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
  line-height: 1.6;
}

.form-hint {
  font-size: .78rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.form-color {
  width: 52px;
  height: 42px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: none;
  cursor: pointer;
  padding: 2px;
}

.color-picker-row {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.color-preview {
  font-size: .85rem;
  color: var(--text-muted);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--space-md);
}

/* Radio Cards */
.radio-group {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.radio-card {
  display: flex;
  align-items: center;
  gap: .5em;
  padding: .6em 1.1em;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--bg-void);
  cursor: pointer;
  font-size: .9rem;
  font-weight: 500;
  transition: all .2s;
}

.radio-card:hover { border-color: var(--border-accent); }
.radio-card.active {
  border-color: var(--accent);
  background: var(--accent-dim);
  color: var(--accent-bright);
}
.radio-card input { display: none; }

/* Gradient Preview */
.gradient-preview {
  height: 80px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: linear-gradient(135deg, #0a0a0f, #1a0a2e);
  transition: background .3s;
}

/* Upload Zone */
.upload-zone {
  position: relative;
  border: 2px dashed var(--border);
  border-radius: var(--r-md);
  padding: var(--space-xl);
  text-align: center;
  color: var(--text-muted);
  cursor: pointer;
  transition: all .2s;
}

.upload-zone:hover {
  border-color: var(--border-accent);
  background: var(--accent-dim);
  color: var(--text-secondary);
}

.upload-zone svg { margin: 0 auto var(--space-sm); opacity: .5; }
.upload-zone p { font-size: .85rem; }

.upload-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

/* Current music */
.current-music {
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

/* Links Editor */
.link-row {
  display: grid;
  grid-template-columns: 160px 1fr auto auto;
  gap: var(--space-sm);
  align-items: center;
  padding: var(--space-md);
  background: var(--bg-void);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  transition: border-color .2s;
}

.link-row:hover { border-color: var(--border-accent); }

.link-row select,
.link-row input {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: .5em .75em;
  color: var(--text-primary);
  font-size: .875rem;
}

.link-row select:focus,
.link-row input:focus {
  outline: none;
  border-color: var(--border-accent);
}

.link-remove-btn {
  width: 34px;
  height: 34px;
  border-radius: var(--r-sm);
  background: rgba(239,68,68,.1);
  border: 1px solid rgba(239,68,68,.2);
  color: #f87171;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s;
  cursor: pointer;
}

.link-remove-btn:hover {
  background: rgba(239,68,68,.2);
  border-color: rgba(239,68,68,.5);
}

#linksContainer {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

/* ---------------------------------------------------------------------------
   10. Profil-Seite
   --------------------------------------------------------------------------- */
.profile-page {
  min-height: 100vh;
  background: var(--bg-void);
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.profile-bg-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 0;
}

.owner-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(var(--accent-rgb), .15);
  border-bottom: 1px solid var(--border-accent);
  padding: .6rem var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: .85rem;
  color: var(--accent-bright);
  z-index: 50;
  backdrop-filter: blur(10px);
}

.profile-main {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  padding: var(--space-2xl) var(--space-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
}

/* Profilkarte */
.profile-card {
  width: 100%;
  padding: var(--space-md) var(--space-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-md);
  border: 1px solid rgba(255,255,255,.1);
  box-shadow: 0 0 0 1px var(--border-accent) inset, var(--shadow-lg);
  overflow: hidden;
  padding-top: 0;
}

/* Banner */
.profile-banner {
  width: calc(100% + var(--space-lg) * 2);
  height: 120px;
  margin: 0 calc(var(--space-lg) * -1) 0;
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  background-size: cover;
  background-position: center top;
  flex-shrink: 0;
}

.profile-banner--gradient { opacity: .6; }

.animate-in {
  animation: slideUp .6s var(--ease-out) both;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Profile Header */
.profile-header {
  text-align: center;
  padding: var(--space-sm) var(--space-md) 6px;
}

/* Avatar */
.profile-avatar-wrap {
  position: relative;
  width: 120px;
  height: 120px;
  margin-top: -50px;
}

.profile-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  object-fit: cover;
  border: 3px solid var(--accent);
  box-shadow: 0 0 20px rgba(var(--accent-rgb), 0.3);
  position: relative;
  z-index: 1;
}

/* Avatar Frames — only box-shadow effects */
[data-avatar-frame="ring"] .profile-avatar {
  box-shadow: 0 0 0 4px var(--bg-void), 0 0 0 6px var(--accent);
}
[data-avatar-frame="glow"] .profile-avatar {
  box-shadow: 0 0 20px rgba(var(--accent-rgb), 0.5), 0 0 40px rgba(var(--accent-rgb), 0.2);
}
[data-avatar-frame="thick"] .profile-avatar {
  border-width: 4px;
}

.profile-avatar-glow {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--glow-color, #6366f1) 0%, transparent 70%);
  opacity: .4;
  filter: blur(8px);
  z-index: 0;
  animation: avatarGlow 3s ease-in-out infinite;
}

@keyframes avatarGlow {
  0%, 100% { opacity: .3; transform: scale(1); }
  50%       { opacity: .55; transform: scale(1.1); }
}

/* Profile Name & Tag */
.profile-name {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.2;
  margin-top: 6px;
  margin-bottom: 2px;
}

.profile-tag {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

/* Profile Bio */
.profile-bio {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.5;
  max-width: 400px;
  margin: 4px auto;
}

.profile-bio strong {
  color: var(--accent-bright);
  font-weight: 700;
}

.profile-bio em {
  color: var(--text-secondary);
  font-style: italic;
}

.profile-bio code {
  background: rgba(var(--accent-rgb), 0.1);
  border: 1px solid var(--border-accent);
  padding: 2px 6px;
  border-radius: var(--r-sm);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent-bright);
}

/* Profile Badges (Discord-style role pills) */
.profile-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px;
  margin: 5px 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--r-full);
  font-size: 0.75rem;
  font-weight: 600;
  border: 1.5px solid var(--badge-color, var(--accent));
  background: rgba(var(--accent-rgb), 0.08);
  color: var(--badge-color, var(--accent-bright));
  transition: all 0.2s var(--ease-out);
}

.badge:hover {
  transform: scale(1.05);
  background: rgba(var(--accent-rgb), 0.15);
}

.badge-icon {
  font-size: 0.8rem;
  display: inline-flex;
  align-items: center;
}

.badge-name {
  color: inherit;
}

/* Roles (database-assigned, like VIP/Admin/Owner) */
.profile-roles {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px;
  margin: 5px 0;
}

.role-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--r-full);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 1.5px solid var(--role-color);
  background: color-mix(in srgb, var(--role-color) 12%, transparent);
  color: var(--role-color);
}

.role-icon {
  font-size: 0.75rem;
}

.role-name {
  color: inherit;
}

/* Custom Tags (user-defined text pills) */
.profile-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px;
  margin: 4px 0;
}

.tag-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--r-full);
  font-size: 0.75rem;
  font-weight: 500;
  background: rgba(var(--accent-rgb), 0.12);
  border: 1px solid var(--border-accent);
  color: var(--accent-bright);
}

/* Profile Links */
.profile-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  max-width: 500px;
  margin: 10px auto;
  padding: 0 var(--space-md);
}

.profile-link-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 10px 18px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.25s var(--ease-out);
  min-height: 48px;
}

.profile-link-btn:hover {
  border-color: var(--accent);
  background: rgba(var(--accent-rgb), 0.1);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(var(--accent-rgb), 0.2);
}

.profile-link-btn:active {
  transform: translateY(0);
}

/* Platform-specific hover colors */
.profile-link-btn[data-platform="twitter"]:hover   { border-color: #1d9bf0; }
.profile-link-btn[data-platform="instagram"]:hover { border-color: #e1306c; }
.profile-link-btn[data-platform="github"]:hover    { border-color: #fff; }
.profile-link-btn[data-platform="youtube"]:hover   { border-color: #ff0000; }
.profile-link-btn[data-platform="twitch"]:hover    { border-color: #9147ff; }
.profile-link-btn[data-platform="discord"]:hover   { border-color: #5865f2; }
.profile-link-btn[data-platform="spotify"]:hover   { border-color: #1db954; }
.profile-link-btn[data-platform="tiktok"]:hover    { border-color: #fe2c55; }
.profile-link-btn[data-platform="steam"]:hover     { border-color: #c7d5e0; }

.link-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--button-color, var(--accent-bright));
}

.link-icon svg {
  width: 100%;
  height: 100%;
}

.link-label {
  flex: 1;
  font-size: 0.95rem;
}

/* Profile Stats */
.profile-stats {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-md);
  margin: 10px auto;
  padding: 6px var(--space-md);
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  max-width: 500px;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-align: center;
  flex: 1;
}

.stat-value {
  font-size: 1.25rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--accent-bright);
}

.stat-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.stat-divider {
  width: 1px;
  height: 28px;
  background: var(--border);
}

/* Musik Player */
.music-player {
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  border-top: 1px solid var(--border);
}

.music-info {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.music-bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 24px;
  flex-shrink: 0;
}

.music-bars span {
  width: 3px;
  border-radius: var(--r-full);
  background: var(--accent);
  animation: bar 1.2s ease-in-out infinite;
  transform-origin: bottom;
}

.music-bars span:nth-child(1) { height: 50%; animation-delay: 0s; }
.music-bars span:nth-child(2) { height: 100%; animation-delay: .1s; }
.music-bars span:nth-child(3) { height: 35%; animation-delay: .2s; }
.music-bars span:nth-child(4) { height: 75%; animation-delay: .3s; }
.music-bars span:nth-child(5) { height: 55%; animation-delay: .4s; }

.music-bars.paused span { animation-play-state: paused; }

.music-text {
  display: flex;
  flex-direction: column;
  gap: .1rem;
  flex: 1;
  min-width: 0;
}

.music-now {
  font-size: .7rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .1em;
}

.music-title {
  font-weight: 600;
  font-size: .9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.music-controls {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.music-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all .2s;
  box-shadow: 0 0 15px rgba(var(--accent-rgb), .4);
}

.music-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 0 25px rgba(var(--accent-rgb), .6);
}

.music-progress {
  flex: 1;
  height: 4px;
  background: var(--bg-elevated);
  border-radius: var(--r-full);
  overflow: hidden;
  cursor: pointer;
}

.music-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--cyan));
  border-radius: var(--r-full);
  transition: width .1s linear;
}

/* Profile Footer */
.profile-footer {
  margin-top: var(--space-md);
  padding-top: var(--space-sm);
  border-top: 1px solid var(--border);
  text-align: center;
  opacity: .6;
  transition: opacity .2s;
}

.profile-footer:hover { opacity: 1; }

.profile-footer-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

.profile-footer-link:hover {
  color: var(--accent-bright);
}

/* ---------------------------------------------------------------------------
   11. Error Page
   --------------------------------------------------------------------------- */
.error-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: var(--space-lg);
  background: var(--bg-void);
}

.error-content {
  text-align: center;
  padding: var(--space-2xl) var(--space-xl);
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  align-items: center;
}

.error-code {
  font-size: 5rem;
  font-weight: 300;
  color: var(--accent-bright);
  line-height: 1;
}

.error-content h1 { font-size: 1.5rem; font-weight: 700; }
.error-content p  { color: var(--text-secondary); }

/* ---------------------------------------------------------------------------
   12. Scrollbar (Webkit)
   --------------------------------------------------------------------------- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-void); }
::-webkit-scrollbar-thumb { background: var(--bg-elevated); border-radius: var(--r-full); }
::-webkit-scrollbar-thumb:hover { background: var(--accent-dim); }

/* ---------------------------------------------------------------------------
   13. Utilities
   --------------------------------------------------------------------------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border-width: 0;
}

/* Selection */
::selection {
  background: rgba(var(--accent-rgb), .3);
  color: var(--text-primary);
}

/* ---------------------------------------------------------------------------
   14. Video Background & Effects
   --------------------------------------------------------------------------- */
.profile-bg-video {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
}


.profile-effect-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ---------------------------------------------------------------------------
   15. Profile Tags
   --------------------------------------------------------------------------- */
.profile-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  justify-content: center;
}

.profile-tag-pill {
  display: inline-flex;
  align-items: center;
  padding: .3em .85em;
  border-radius: var(--r-full);
  font-size: .75rem;
  font-weight: 600;
  font-family: var(--font-mono);
  background: var(--accent-dim);
  border: 1px solid var(--border-accent);
  color: var(--accent-bright);
  letter-spacing: .05em;
}

/* Dashboard Tags Editor */
.tags-grid {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.tag-pill-btn {
  display: inline-flex;
  align-items: center;
  padding: .35em .9em;
  border-radius: var(--r-full);
  font-size: .8rem;
  font-weight: 600;
  font-family: var(--font-mono);
  background: var(--bg-void);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all .15s;
}

.tag-pill-btn:hover {
  border-color: var(--border-accent);
  color: var(--text-primary);
}

.tag-pill-btn.selected {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent-bright);
}

.tag-custom-row {
  display: flex;
  gap: .5rem;
  align-items: center;
  margin-top: .5rem;
}

/* Effect selector */
.effect-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: .5rem;
}

.effect-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .4rem;
  padding: .75em;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--bg-void);
  cursor: pointer;
  font-size: .8rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all .2s;
  text-align: center;
}

.effect-card:hover { border-color: var(--border-accent); color: var(--text-primary); }
.effect-card.active {
  border-color: var(--accent);
  background: var(--accent-dim);
  color: var(--accent-bright);
}
.effect-card input { display: none; }
.effect-card .effect-icon { font-size: 1.4rem; }

/* ---------------------------------------------------------------------------
   16. Polish Additions
   --------------------------------------------------------------------------- */

/* Tag pill fade-in stagger animation */
.profile-tag-pill {
  animation: tagIn .4s var(--ease-out) both;
}
@keyframes tagIn {
  from { opacity: 0; transform: scale(.85); }
  to   { opacity: 1; transform: scale(1); }
}

/* Owner bar — stronger blur */
.owner-bar {
  backdrop-filter: blur(20px) saturate(1.6);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
}

/* Profile main padding when owner bar is shown */
.has-owner-bar .profile-main { padding-top: calc(var(--space-2xl) + 40px); }

/* Hide scrollbar on profile page */
.profile-page { scrollbar-width: none; }
.profile-page::-webkit-scrollbar { display: none; }

/* Mobile sidebar: horizontal scroll */
@media (max-width: 768px) {
  .dashboard-sidebar {
    position: static;
    display: block;
  }
  .sidebar-nav {
    flex-direction: row;
    overflow-x: auto;
    gap: .25rem;
    padding-bottom: .25rem;
  }
  .sidebar-link {
    flex-shrink: 0;
    font-size: .8rem;
    padding: .5em .8em;
  }
  .sidebar-profile-url { display: none; }
}

/* ---------------------------------------------------------------------------
   17. Click-to-Enter Overlay
   --------------------------------------------------------------------------- */
.click-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  /* Fade-in beim Laden */
  opacity: 1;
  transition: opacity .4s ease;
}

/* Gleicher Hintergrund wie das Profil — stark geblurred */
.click-overlay-bg {
  position: absolute;
  inset: -20px; /* etwas größer damit blur-Kanten nicht sichtbar */
  background-size: cover;
  background-position: center;
  filter: blur(24px) brightness(.7) saturate(1.3);
  transform: scale(1.05);
  z-index: 0;
}

/* Dunkles Tint-Layer */
.click-overlay-tint {
  position: absolute;
  inset: 0;
  background: rgba(5, 5, 10, 0.55);
  z-index: 1;
}

/* Zentrierter Content */
.click-overlay-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
  animation: overlayContentIn .6s var(--ease-out) .1s both;
  user-select: none;
}

@keyframes overlayContentIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.click-overlay-avatar {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.25);
  box-shadow: 0 0 40px rgba(var(--accent-rgb), .4), 0 8px 32px rgba(0,0,0,.6);
  object-fit: cover;
  transition: transform .3s var(--ease-out), box-shadow .3s;
}

.click-overlay:hover .click-overlay-avatar {
  transform: scale(1.05);
  box-shadow: 0 0 60px rgba(var(--accent-rgb), .6), 0 8px 32px rgba(0,0,0,.6);
}

.click-overlay-name {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -.04em;
  color: #fff;
}

.click-overlay-hint {
  font-size: .8rem;
  font-family: var(--font-mono);
  color: rgba(255,255,255,.45);
  letter-spacing: .12em;
  text-transform: lowercase;
  animation: hintPulse 2s ease-in-out infinite;
}

@keyframes hintPulse {
  0%, 100% { opacity: .45; }
  50%       { opacity: .9; }
}

/* Fade-out beim Klick */
.click-overlay.exiting {
  opacity: 0;
  pointer-events: none;
}

/* ---------------------------------------------------------------------------
   18. Volume Slider
   --------------------------------------------------------------------------- */
.volume-control {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex: 1;
}

.volume-slider {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  height: 4px;
  border-radius: var(--r-full);
  background: var(--bg-elevated);
  outline: none;
  cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  box-shadow: 0 0 6px rgba(var(--accent-rgb), .5);
  transition: transform .15s, box-shadow .15s;
}

.volume-slider::-webkit-slider-thumb:hover {
  transform: scale(1.25);
  box-shadow: 0 0 12px rgba(var(--accent-rgb), .7);
}

.volume-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: none;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
}

/* ---------------------------------------------------------------------------
   Copy URL Button
   --------------------------------------------------------------------------- */
.sidebar-profile-url {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .4rem;
}

.copy-url-btn {
  font-size: .7rem;
  padding: .2rem .6rem;
  margin-left: auto;
  opacity: .7;
  transition: opacity .2s, background .2s;
}

.copy-url-btn:hover {
  opacity: 1;
}

.copy-url-btn.copy-url-success {
  color: #4ade80;
  border-color: rgba(74, 222, 128, .4);
  opacity: 1;
}

/* ---------------------------------------------------------------------------
   Link Drag-to-Reorder
   --------------------------------------------------------------------------- */
.link-drag-handle {
  cursor: grab;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  padding: 0 .3rem;
  flex-shrink: 0;
  transition: color .2s;
}

.link-drag-handle:hover {
  color: var(--text-secondary);
}

.link-drag-handle:active {
  cursor: grabbing;
}

.link-row.dragging {
  opacity: .4;
}

.link-row.drag-over {
  border-color: var(--accent);
  background: var(--accent-dim);
}

/* ---------------------------------------------------------------------------
   Milestone Toast Notification
   --------------------------------------------------------------------------- */
.milestone-toast {
  position: fixed;
  bottom: var(--space-lg);
  left: 50%;
  transform: translateX(-50%) translateY(120px);
  background: var(--bg-glass);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border: 1px solid var(--border-accent);
  border-radius: var(--r-lg);
  padding: var(--space-md) var(--space-lg);
  display: flex;
  align-items: center;
  gap: var(--space-md);
  z-index: 200;
  max-width: 320px;
  box-shadow: var(--shadow-lg);
  animation: toastSlideUp .4s var(--ease-out) forwards;
}

.milestone-toast-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.milestone-toast-content {
  display: flex;
  flex-direction: column;
  gap: .2rem;
}

.milestone-toast-title {
  font-size: .9rem;
  font-weight: 600;
  color: var(--accent-bright);
}

.milestone-toast-text {
  font-size: .8rem;
  color: var(--text-secondary);
}

@keyframes toastSlideUp {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(120px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

@keyframes toastSlideDown {
  from {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
  to {
    opacity: 0;
    transform: translateX(-50%) translateY(120px);
  }
}

/* ---------------------------------------------------------------------------
   Theme Presets
   --------------------------------------------------------------------------- */
[data-theme="violet"] { --accent: #a855f7; --accent-rgb: 168, 85, 247; }
[data-theme="cyan"] { --accent: #22d3ee; --accent-rgb: 34, 211, 238; }
[data-theme="emerald"] { --accent: #10b981; --accent-rgb: 16, 185, 129; }
[data-theme="rose"] { --accent: #f43f5e; --accent-rgb: 244, 63, 94; }
[data-theme="amber"] { --accent: #f59e0b; --accent-rgb: 245, 158, 11; }
[data-theme="fuchsia"] { --accent: #ec4899; --accent-rgb: 236, 72, 153; }
[data-theme="blue"] { --accent: #3b82f6; --accent-rgb: 59, 130, 246; }

/* ---------------------------------------------------------------------------
   Link Button Styles
   --------------------------------------------------------------------------- */
[data-link-style="glass"] .link-row {
  background: rgba(14, 14, 26, 0.4);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(var(--accent-rgb), 0.2);
}

[data-link-style="solid"] .link-row {
  background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.2), rgba(var(--accent-rgb), 0.05));
  border: 1px solid var(--border-accent);
}

[data-link-style="minimal"] .link-row {
  background: transparent;
  border: 1px solid var(--border);
}

[data-link-style="pill"] .link-row {
  background: rgba(var(--accent-rgb), 0.15);
  border: 1px solid var(--accent);
  border-radius: var(--r-full);
  padding: 12px 24px;
}

[data-link-style="card"] .link-row {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}

[data-link-style="neon"] .link-row {
  background: transparent;
  border: 2px solid var(--accent);
  box-shadow: inset 0 0 10px rgba(var(--accent-rgb), 0.2), 0 0 20px rgba(var(--accent-rgb), 0.2);
}

/* ---------------------------------------------------------------------------
   Link Hover Effects
   --------------------------------------------------------------------------- */
[data-link-hover="scale"] .link-row:hover {
  transform: scale(1.05);
}

[data-link-hover="slide"] .link-row:hover {
  transform: translateX(8px);
}

[data-link-hover="glow"] .link-row:hover {
  box-shadow: 0 0 30px rgba(var(--accent-rgb), 0.4);
}

[data-link-hover="shine"] .link-row:hover::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  animation: shineEffect 0.6s;
}

@keyframes shineEffect {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* ---------------------------------------------------------------------------
   Status Indicator
   --------------------------------------------------------------------------- */
.status-badge {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 3px solid var(--bg-void);
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.status-badge.online { background: #10b981; color: white; }
.status-badge.away { background: #f59e0b; color: white; }
.status-badge.busy { background: #ef4444; color: white; }
.status-badge.offline { background: #6b7280; color: white; }

/* ---------------------------------------------------------------------------
   Birthday Ribbon
   --------------------------------------------------------------------------- */
.birthday-ribbon {
  position: absolute;
  top: -8px;
  right: -8px;
  background: linear-gradient(135deg, #ec4899, #f43f5e);
  color: white;
  padding: 4px 12px;
  border-radius: var(--r-md);
  font-size: 0.75rem;
  font-weight: 600;
  transform: rotate(12deg);
  box-shadow: var(--shadow-md);
  z-index: 10;
}

/* ---------------------------------------------------------------------------
   Link Follower Badge
   --------------------------------------------------------------------------- */
.link-follower-badge {
  font-size: 0.75rem;
  background: rgba(var(--accent-rgb), 0.2);
  border: 1px solid var(--accent);
  padding: 2px 8px;
  border-radius: var(--r-full);
  color: var(--accent-bright);
  font-weight: 600;
  white-space: nowrap;
}

/* ---------------------------------------------------------------------------
   Link Groups & Organization
   --------------------------------------------------------------------------- */
.link-group-header {
  padding: var(--space-md) 0;
  margin-top: var(--space-lg);
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  color: var(--accent);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.link-group-header:first-child {
  margin-top: 0;
}

.link-description {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

.link-pinned-icon {
  color: var(--accent);
  font-size: 1.2rem;
}

/* ---------------------------------------------------------------------------
   Confetti Canvas
   --------------------------------------------------------------------------- */
#confetti-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 150;
}

/* ---------------------------------------------------------------------------
   Profile Animations
   --------------------------------------------------------------------------- */
[data-profile-anim="fade"] .profile-header {
  animation: fadeInProfile 0.8s var(--ease-out);
}

@keyframes fadeInProfile {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------------------------------------------------------------------------
   Dashboard Settings Styles
   --------------------------------------------------------------------------- */
.settings-section {
  padding: var(--space-lg);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  margin-bottom: var(--space-lg);
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-md);
}

.settings-row:last-child {
  margin-bottom: 0;
}

.settings-label {
  font-weight: 600;
  color: var(--text-primary);
}

.settings-sublabel {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

.theme-card, .frame-card, .style-card {
  display: inline-flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  border: 2px solid transparent;
  border-radius: var(--r-md);
  cursor: pointer;
  transition: all 0.3s var(--ease-out);
  margin-right: var(--space-md);
  margin-bottom: var(--space-md);
}

.theme-card:hover, .frame-card:hover, .style-card:hover {
  border-color: var(--accent);
  background: rgba(var(--accent-rgb), 0.1);
}

.theme-card input[type="radio"]:checked + label,
.frame-card input[type="radio"]:checked + label,
.style-card input[type="radio"]:checked + label {
  border-color: var(--accent);
}

.theme-swatch {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--border);
}

input[type="range"] {
  width: 100%;
  height: 6px;
  border-radius: var(--r-full);
  background: var(--bg-glass);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  box-shadow: 0 0 10px rgba(var(--accent-rgb), 0.4);
}

input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: none;
  box-shadow: 0 0 10px rgba(var(--accent-rgb), 0.4);
}

.checkbox-group {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  cursor: pointer;
}

.checkbox-item input[type="checkbox"] {
  cursor: pointer;
  accent-color: var(--accent);
}

/* ---------------------------------------------------------------------------
   Select/Input Field Enhancements
   --------------------------------------------------------------------------- */
select.form-input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%238888aa' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

input[type="date"].form-input,
input[type="time"].form-input {
  color: var(--text-primary);
}

input[type="date"].form-input::placeholder {
  color: var(--text-muted);
}

/* ---------------------------------------------------------------------------
   Button Consistency & Polish
   --------------------------------------------------------------------------- */
.btn {
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: all 0.2s var(--ease-out);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
  overflow: hidden;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(var(--accent-rgb), 0.2);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-bright));
  color: white;
  box-shadow: 0 4px 12px rgba(var(--accent-rgb), 0.3);
}

.btn-primary:hover {
  box-shadow: 0 12px 32px rgba(var(--accent-rgb), 0.4);
}

.btn-ghost {
  background: transparent;
  color: var(--accent-bright);
  border: 1px solid var(--border-accent);
}

.btn-ghost:hover {
  background: rgba(var(--accent-rgb), 0.1);
  border-color: var(--accent);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.85rem;
}

/* ---------------------------------------------------------------------------
   Panel Headers & Sections
   --------------------------------------------------------------------------- */
.panel-header {
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--border);
}

.panel-header h2 {
  margin-bottom: 2px;
  color: var(--text-primary);
  font-size: 1.5rem;
}

.panel-header p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 0;
}

/* ---------------------------------------------------------------------------
   Alert Messages
   --------------------------------------------------------------------------- */
.alert {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--r-lg);
  margin-bottom: var(--space-lg);
  font-weight: 500;
  animation: slideDown 0.3s var(--ease-out);
}

.alert-success {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #10b981;
}

.alert-error {
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid rgba(244, 63, 94, 0.3);
  color: #f43f5e;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------------------------------------------------------------------------
   Link Row Grid Refinements
   --------------------------------------------------------------------------- */
.link-row {
  display: grid;
  grid-template-columns: 24px 1fr auto auto auto;
  gap: var(--space-md);
  align-items: center;
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  transition: all 0.2s var(--ease-out);
  position: relative;
}

.link-row:hover {
  border-color: var(--border-accent);
  background: rgba(var(--accent-rgb), 0.05);
}

.link-row-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.link-row-label {
  font-weight: 600;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.link-row-url {
  font-size: 0.85rem;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-mono);
}

/* ---------------------------------------------------------------------------
   Form Input Improvements
   --------------------------------------------------------------------------- */
input[type="range"] {
  width: 100%;
  height: 6px;
  border-radius: var(--r-full);
  background: linear-gradient(90deg, var(--bg-glass) 0%, var(--bg-elevated) 100%);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-bright));
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(var(--accent-rgb), 0.4);
  border: 2px solid var(--bg-void);
}

input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-bright));
  cursor: pointer;
  border: 2px solid var(--bg-void);
  box-shadow: 0 4px 12px rgba(var(--accent-rgb), 0.4);
}

/* ---------------------------------------------------------------------------
   Misc Improvements
   --------------------------------------------------------------------------- */
.glass-panel {
  background: var(--bg-glass);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}

.mono {
  font-family: var(--font-mono);
  font-size: 0.9rem;
}

/* Smooth transitions for all interactive elements */
button, a, input, select, textarea {
  transition: background-color 0.2s, border-color 0.2s, box-shadow 0.2s, color 0.2s;
}

/* ---------------------------------------------------------------------------
   Music Player Enhancements
   --------------------------------------------------------------------------- */
#musicPlayer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px var(--space-lg);
  margin: var(--space-lg) auto;
  max-width: 500px;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}

.music-info {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  flex: 1;
}

.music-bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 24px;
  opacity: 0.6;
}

.music-bars span {
  width: 3px;
  background: var(--accent);
  border-radius: 2px;
  animation: musicBars 0.6s ease-in-out infinite;
}

.music-bars span:nth-child(1) { animation-delay: 0s; }
.music-bars span:nth-child(2) { animation-delay: 0.1s; }
.music-bars span:nth-child(3) { animation-delay: 0.2s; }
.music-bars span:nth-child(4) { animation-delay: 0.3s; }
.music-bars span:nth-child(5) { animation-delay: 0.4s; }

.music-bars.paused span {
  animation: none;
  height: 4px;
}

@keyframes musicBars {
  0%, 100% { height: 4px; }
  50% { height: 16px; }
}

.music-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.music-now {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.music-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}

.music-controls {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.music-btn {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
  background: rgba(var(--accent-rgb), 0.2);
  border: 1px solid var(--border-accent);
  color: var(--accent);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s var(--ease-out);
}

.music-btn:hover {
  background: rgba(var(--accent-rgb), 0.3);
  border-color: var(--accent);
  transform: scale(1.1);
}

.volume-control {
  display: flex;
  align-items: center;
  gap: 8px;
}

.volume-slider {
  width: 120px;
  height: 4px;
}

/* ---------------------------------------------------------------------------
   Dashboard Layout Refinements
   --------------------------------------------------------------------------- */
.dashboard-container {
  display: flex;
  min-height: 100vh;
  gap: var(--space-xl);
}

.dashboard-sidebar {
  width: 280px;
  background: var(--bg-elevated);
  border-right: 1px solid var(--border);
  padding: var(--space-lg);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
  font-weight: 700;
  color: var(--text-primary);
}

.sidebar-logo-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-bottom: var(--space-2xl);
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--r-md);
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s var(--ease-out);
  text-align: left;
  font-family: inherit;
  font-size: 0.95rem;
}

.sidebar-link:hover {
  background: rgba(var(--accent-rgb), 0.1);
  color: var(--text-primary);
  border-color: var(--border-accent);
}

.sidebar-link.active {
  background: rgba(var(--accent-rgb), 0.2);
  border-color: var(--accent);
  color: var(--accent-bright);
}

.sidebar-profile-url {
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  align-items: center;
  text-align: center;
  font-size: 0.85rem;
}

.copy-url-btn {
  margin-top: var(--space-sm);
}

.dashboard-main {
  flex: 1;
  padding: var(--space-lg);
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
}

.tab-panel {
  display: none;
  animation: fadeIn 0.3s var(--ease-out);
}

.tab-panel.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.editor-form {
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

/* Fix form label styling for consistency */
.form-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  display: block;
  margin-bottom: 6px;
}

.form-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: block;
  margin-top: 4px;
}

.char-counter {
  text-align: right;
}

/* Color picker styling */
.color-picker-row {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.color-option {
  width: 50px;
  height: 50px;
  border-radius: var(--r-md);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
}

.color-option:hover {
  border-color: var(--border-accent);
  transform: scale(1.05);
}

.color-option.selected {
  border-color: var(--text-primary);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.3);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .dashboard-container {
    flex-direction: column;
    gap: var(--space-lg);
  }

  .dashboard-sidebar {
    width: 100%;
    height: auto;
    position: relative;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .sidebar-nav {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
  }
}

/* ---------------------------------------------------------------------------
   Custom Color Application
   --------------------------------------------------------------------------- */
:root {
  --button-color: #6366f1;
  --bg-effects-color: #6366f1;
  --music-player-color: #6366f1;
  --backplate-color: #0a0a0f;
}

/* Apply backplate color */
.profile-page {
  --bg-elevated-custom: var(--backplate-color);
}

/* Apply music player color */
.music-btn {
  background: rgba(var(--music-player-color), 0.2);
  border-color: var(--music-player-color);
  color: var(--music-player-color);
}

.music-btn:hover {
  background: rgba(var(--music-player-color), 0.3);
  border-color: var(--music-player-color);
}

.music-bars span {
  background: var(--music-player-color);
}

/* Apply background effects color to particles/effects */
.profile-page canvas {
  filter: hue-rotate(calc(hue(var(--bg-effects-color))));
}

/* Badge Item in Dashboard */
.badge-item {
  animation: fadeIn 0.3s var(--ease-out);
}
