
:root {
  --bg: #070812;
  --bg-alt: #0b0d18;
  --bg-soft: #111423;
  --surface: rgba(16, 19, 32, 0.78);
  --surface-strong: rgba(20, 24, 40, 0.92);
  --surface-soft: rgba(255, 255, 255, 0.04);
  --surface-elevated: rgba(26, 30, 49, 0.82);
  --border: rgba(160, 173, 214, 0.14);
  --border-strong: rgba(160, 173, 214, 0.22);
  --text: #eff2ff;
  --muted: #a6acc9;
  --muted-2: #7d85a6;
  --primary: #6f87ff;
  --primary-2: #8c5dff;
  --accent: #1ed6ff;
  --success: #2de0b8;
  --danger: #ff6482;
  --warning: #ffc66d;
  --radius: 22px;
  --radius-lg: 28px;
  --radius-sm: 14px;
  --shadow-lg: 0 32px 80px -24px rgba(85, 107, 255, 0.38);
  --shadow-md: 0 18px 50px -20px rgba(0, 0, 0, 0.72);
  --shadow-sm: 0 10px 24px -16px rgba(0, 0, 0, 0.6);
  --grad: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 52%, var(--accent) 100%);
  --grad-soft: linear-gradient(135deg, rgba(111, 135, 255, 0.2), rgba(140, 93, 255, 0.16), rgba(30, 214, 255, 0.14));
  --grad-glow: radial-gradient(circle at 20% 20%, rgba(111,135,255,0.22), transparent 45%), radial-gradient(circle at 80% 0%, rgba(30,214,255,0.12), transparent 42%), radial-gradient(circle at 80% 80%, rgba(140,93,255,0.14), transparent 40%);
  --dock-h: 82px;
  color-scheme: dark;
}

/* Royal Theme */
[data-theme="royal"] {
  --bg: #0a0a1a;
  --bg-alt: #0f0f25;
  --bg-soft: #1a1a35;
  --surface: rgba(30, 25, 50, 0.85);
  --surface-strong: rgba(40, 35, 65, 0.95);
  --surface-soft: rgba(255, 215, 0, 0.04);
  --surface-elevated: rgba(50, 45, 80, 0.88);
  --border: rgba(218, 165, 32, 0.18);
  --border-strong: rgba(218, 165, 32, 0.28);
  --text: #fff8e7;
  --muted: #c9b896;
  --muted-2: #9a8a6a;
  --primary: #ffd700;
  --primary-2: #daa520;
  --accent: #ff6b6b;
  --success: #4ecdc4;
  --danger: #ff6b6b;
  --warning: #ffd93d;
  --grad: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 52%, #ff8c00 100%);
  --grad-soft: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(218, 165, 32, 0.12), rgba(255, 140, 0, 0.1));
  --grad-glow: radial-gradient(circle at 20% 20%, rgba(255,215,0,0.18), transparent 45%), radial-gradient(circle at 80% 0%, rgba(255,140,0,0.12), transparent 42%), radial-gradient(circle at 80% 80%, rgba(218,165,32,0.14), transparent 40%);
}

/* Glass Theme */
[data-theme="glass"] {
  --bg: #0f0f1a;
  --bg-alt: #141422;
  --bg-soft: #1a1a2e;
  --surface: rgba(255, 255, 255, 0.05);
  --surface-strong: rgba(255, 255, 255, 0.08);
  --surface-soft: rgba(255, 255, 255, 0.02);
  --surface-elevated: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #ffffff;
  --muted: #b8b8b8;
  --muted-2: #888888;
  --primary: #e0e0e0;
  --primary-2: #ffffff;
  --accent: #87ceeb;
  --success: #90ee90;
  --danger: #ff6b6b;
  --warning: #ffd700;
  --grad: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 52%, var(--accent) 100%);
  --grad-soft: linear-gradient(135deg, rgba(224, 224, 224, 0.1), rgba(255, 255, 255, 0.08), rgba(135, 206, 235, 0.06));
  --grad-glow: radial-gradient(circle at 20% 20%, rgba(255,255,255,0.08), transparent 45%), radial-gradient(circle at 80% 0%, rgba(135,206,235,0.06), transparent 42%), radial-gradient(circle at 80% 80%, rgba(255,255,255,0.05), transparent 40%);
}

/* Neon Theme */
[data-theme="neon"] {
  --bg: #050505;
  --bg-alt: #0a0a0a;
  --bg-soft: #0f0f0f;
  --surface: rgba(20, 20, 20, 0.9);
  --surface-strong: rgba(30, 30, 30, 0.95);
  --surface-soft: rgba(0, 255, 255, 0.03);
  --surface-elevated: rgba(40, 40, 40, 0.92);
  --border: rgba(0, 255, 255, 0.2);
  --border-strong: rgba(0, 255, 255, 0.35);
  --text: #00ffff;
  --muted: #00cccc;
  --muted-2: #009999;
  --primary: #ff00ff;
  --primary-2: #00ffff;
  --accent: #ffff00;
  --success: #00ff00;
  --danger: #ff0000;
  --warning: #ffaa00;
  --grad: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 52%, var(--accent) 100%);
  --grad-soft: linear-gradient(135deg, rgba(255, 0, 255, 0.2), rgba(0, 255, 255, 0.16), rgba(255, 255, 0, 0.12));
  --grad-glow: radial-gradient(circle at 20% 20%, rgba(255,0,255,0.25), transparent 45%), radial-gradient(circle at 80% 0%, rgba(0,255,255,0.2), transparent 42%), radial-gradient(circle at 80% 80%, rgba(255,255,0,0.18), transparent 40%);
}

/* Sunset Theme */
[data-theme="sunset"] {
  --bg: #1a0a1a;
  --bg-alt: #1f0f1f;
  --bg-soft: #2a1525;
  --surface: rgba(40, 20, 35, 0.85);
  --surface-strong: rgba(50, 25, 45, 0.92);
  --surface-soft: rgba(255, 100, 100, 0.04);
  --surface-elevated: rgba(60, 30, 55, 0.88);
  --border: rgba(255, 150, 100, 0.18);
  --border-strong: rgba(255, 150, 100, 0.28);
  --text: #fff0e6;
  --muted: #d4a994;
  --muted-2: #a67c5b;
  --primary: #ff6b35;
  --primary-2: #ff8c42;
  --accent: #ffd166;
  --success: #06d6a0;
  --danger: #ef476f;
  --warning: #ffd166;
  --grad: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 52%, var(--accent) 100%);
  --grad-soft: linear-gradient(135deg, rgba(255, 107, 53, 0.18), rgba(255, 140, 66, 0.14), rgba(255, 209, 102, 0.12));
  --grad-glow: radial-gradient(circle at 20% 20%, rgba(255,107,53,0.2), transparent 45%), radial-gradient(circle at 80% 0%, rgba(255,209,102,0.15), transparent 42%), radial-gradient(circle at 80% 80%, rgba(255,140,66,0.16), transparent 40%);
}

/* Emerald Theme */
[data-theme="emerald"] {
  --bg: #051410;
  --bg-alt: #0a1a15;
  --bg-soft: #0f251f;
  --surface: rgba(15, 40, 30, 0.85);
  --surface-strong: rgba(20, 50, 40, 0.92);
  --surface-soft: rgba(50, 200, 100, 0.04);
  --surface-elevated: rgba(25, 60, 45, 0.88);
  --border: rgba(50, 200, 100, 0.18);
  --border-strong: rgba(50, 200, 100, 0.28);
  --text: #e8fff4;
  --muted: #7dd3a0;
  --muted-2: #5aa67a;
  --primary: #10b981;
  --primary-2: #34d399;
  --accent: #06b6d4;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --grad: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 52%, var(--accent) 100%);
  --grad-soft: linear-gradient(135deg, rgba(16, 185, 129, 0.18), rgba(52, 211, 153, 0.14), rgba(6, 182, 212, 0.12));
  --grad-glow: radial-gradient(circle at 20% 20%, rgba(16,185,129,0.2), transparent 45%), radial-gradient(circle at 80% 0%, rgba(6,182,212,0.15), transparent 42%), radial-gradient(circle at 80% 80%, rgba(52,211,153,0.16), transparent 40%);
}

[data-theme="mono"] {
  --bg: #f4f5f7;
  --bg-alt: #ffffff;
  --bg-soft: #e5e7eb;
  --surface: rgba(255, 255, 255, 0.88);
  --surface-strong: rgba(255, 255, 255, 0.96);
  --surface-soft: rgba(17, 24, 39, 0.04);
  --surface-elevated: rgba(255, 255, 255, 0.92);
  --border: rgba(17, 24, 39, 0.12);
  --border-strong: rgba(17, 24, 39, 0.22);
  --text: #111827;
  --muted: #4b5563;
  --muted-2: #6b7280;
  --primary: #111827;
  --primary-2: #4b5563;
  --accent: #9ca3af;
  --grad: linear-gradient(135deg, #111827, #4b5563, #9ca3af);
  color-scheme: light;
}

[data-theme="candy"] {
  --bg: #1d1028;
  --bg-alt: #2a1738;
  --bg-soft: #3a1f4d;
  --surface: rgba(58, 31, 77, 0.86);
  --surface-strong: rgba(74, 40, 96, 0.94);
  --surface-soft: rgba(255, 138, 216, 0.06);
  --surface-elevated: rgba(86, 46, 110, 0.9);
  --border: rgba(255, 138, 216, 0.22);
  --border-strong: rgba(120, 220, 255, 0.3);
  --text: #fff7fd;
  --muted: #ffc7ee;
  --muted-2: #dba8ff;
  --primary: #ff7ad9;
  --primary-2: #7dd3fc;
  --accent: #fde68a;
  --grad: linear-gradient(135deg, #ff7ad9, #7dd3fc 52%, #fde68a);
}

[data-theme="forest"] {
  --bg: #06120e;
  --bg-alt: #0d1f18;
  --bg-soft: #123226;
  --surface: rgba(13, 31, 24, 0.88);
  --surface-strong: rgba(18, 50, 38, 0.94);
  --surface-soft: rgba(182, 255, 190, 0.05);
  --surface-elevated: rgba(23, 63, 47, 0.9);
  --border: rgba(147, 197, 114, 0.22);
  --border-strong: rgba(190, 242, 100, 0.3);
  --text: #efffed;
  --muted: #b7d7b0;
  --muted-2: #83a978;
  --primary: #84cc16;
  --primary-2: #22c55e;
  --accent: #facc15;
  --grad: linear-gradient(135deg, #84cc16, #22c55e 52%, #facc15);
}

[data-theme="cosmic"] {
  --bg: #050714;
  --bg-alt: #0e1024;
  --bg-soft: #171936;
  --surface: rgba(14, 16, 36, 0.88);
  --surface-strong: rgba(23, 25, 54, 0.95);
  --surface-soft: rgba(99, 102, 241, 0.07);
  --surface-elevated: rgba(30, 32, 68, 0.92);
  --border: rgba(129, 140, 248, 0.24);
  --border-strong: rgba(244, 114, 182, 0.32);
  --text: #f4f7ff;
  --muted: #b8c0ff;
  --muted-2: #8c95d8;
  --primary: #818cf8;
  --primary-2: #f472b6;
  --accent: #22d3ee;
  --grad: linear-gradient(135deg, #818cf8, #f472b6 52%, #22d3ee);
}

/* Psychedelic Theme */
[data-theme="psychedelic"] {
  --bg: #1a0a2e;
  --bg-alt: #2d1b4e;
  --bg-soft: #3d2a5e;
  --surface: rgba(60, 20, 100, 0.85);
  --surface-strong: rgba(80, 30, 120, 0.92);
  --surface-soft: rgba(255, 0, 255, 0.06);
  --surface-elevated: rgba(70, 25, 110, 0.88);
  --border: rgba(255, 0, 255, 0.25);
  --border-strong: rgba(255, 0, 255, 0.4);
  --text: #fff0f5;
  --muted: #d8b4fe;
  --muted-2: #a855f7;
  --primary: #ff00ff;
  --primary-2: #00ffff;
  --accent: #ff6b6b;
  --success: #00ff88;
  --danger: #ff0055;
  --warning: #ffaa00;
  --grad: linear-gradient(135deg, #ff00ff 0%, #00ffff 50%, #ff6b6b 100%);
  --grad-soft: linear-gradient(135deg, rgba(255, 0, 255, 0.2), rgba(0, 255, 255, 0.18), rgba(255, 107, 107, 0.15));
  --grad-glow: radial-gradient(circle at 20% 20%, rgba(255,0,255,0.3), transparent 45%), radial-gradient(circle at 80% 0%, rgba(0,255,255,0.25), transparent 42%), radial-gradient(circle at 80% 80%, rgba(255,107,107,0.2), transparent 40%);
}

/* Custom Color Override */
[data-custom-color] {
  --primary: var(--custom-color);
  --grad: linear-gradient(135deg, var(--custom-color) 0%, var(--primary-2) 52%, var(--accent) 100%);
  --grad-soft: linear-gradient(135deg, var(--custom-color-opacity, 0.2), rgba(140, 93, 255, 0.16), rgba(30, 214, 255, 0.14));
  --grad-glow: radial-gradient(circle at 20% 20%, var(--custom-color-opacity, 0.22), transparent 45%), radial-gradient(circle at 80% 0%, rgba(30,214,255,0.12), transparent 42%), radial-gradient(circle at 80% 80%, rgba(140,93,255,0.14), transparent 40%);
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  height: 100%;
  overflow-x: hidden;
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
}

body {
  min-height: 100%;
  margin: 0;
  padding-top: 104px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  color: var(--text);
  background:
    var(--grad-glow),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-alt) 100%);
  background-attachment: fixed, fixed;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overscroll-behavior-x: none;
}

.marquee-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 32px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-2) 50%, var(--accent) 100%);
  background-size: 200% 100%;
  animation: gradientShift 8s ease infinite;
  z-index: 1001;
  overflow: hidden;
  display: flex;
  align-items: center;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.marquee-content {
  display: flex;
  animation: marquee 20s linear infinite;
  white-space: nowrap;
}

.marquee-content span {
  flex-shrink: 0;
  padding: 0 50px;
  color: white;
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.marquee-content span a {
  color: white;
  text-decoration: none;
  border-bottom: 1px dashed rgba(255,255,255,0.5);
}

.marquee-content span a:hover {
  border-bottom-style: solid;
}

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

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.055;
  background-image:
    linear-gradient(rgba(255,255,255,0.9) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.9) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: radial-gradient(circle at center, black 45%, transparent 100%);
}

img, svg, video, canvas { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; }
a {
  color: var(--accent);
  text-decoration: none;
  transition: color .16s ease, opacity .16s ease, transform .16s ease, border-color .16s ease, background-color .16s ease, box-shadow .16s ease;
}
a:hover { opacity: .92; }

::selection {
  background: rgba(111, 135, 255, 0.32);
  color: #fff;
}

/* Layout */
.container {
  width: min(1120px, calc(100% - 32px));
  margin-inline: auto;
  padding-top: 20px;
  padding-bottom: 40px;
}

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: clip;
}

.app-shell > main {
  flex: 1;
  position: relative;
}

/* Topbar */
.topbar {
  position: fixed;
  top: 32px;
  left: 0;
  right: 0;
  z-index: 50;
  margin: 0;
  width: 100%;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0;
  background: rgba(10, 12, 20, 0.9);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
  padding: 0;
  height: auto;
  line-height: 1;
  transform: translateY(0);
}

.topbar::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(255,255,255,0.12), rgba(111,135,255,0.18), rgba(30,214,255,0.12), rgba(255,255,255,0.06));
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  min-height: 76px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-weight: 800;
  letter-spacing: -0.02em;
  min-width: 0;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--grad);
  color: white;
  font-weight: 900;
  box-shadow: 0 14px 36px -16px rgba(111, 135, 255, 0.85), inset 0 1px 0 rgba(255,255,255,0.25);
  flex-shrink: 0;
}

.brand-logo {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  object-fit: contain;
  flex-shrink: 0;
}

.brand > div:last-child {
  min-width: 0;
}

.brand > div:last-child > div:first-child {
  font-size: 17px;
  line-height: 1.05;
}

.brand-sub {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  margin-top: 2px;
  letter-spacing: .04em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  min-width: 0;
}

.nav-links a {
  color: var(--muted);
  padding: 10px 15px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  border: 1px solid transparent;
  background: transparent;
}

.nav-links a:hover {
  color: var(--text);
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.06);
  transform: translateY(-1px);
}

.nav-links a.active {
  color: var(--text);
  background: linear-gradient(135deg, rgba(111,135,255,0.18), rgba(30,214,255,0.12));
  border-color: rgba(111,135,255,0.25);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  min-height: 46px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.08);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow .3s cubic-bezier(0.4, 0, 0.2, 1), background-color .3s ease, border-color .3s ease, opacity .3s ease, color .3s ease;
  text-decoration: none;
  color: var(--text);
  background: rgba(255,255,255,0.04);
  box-shadow: var(--shadow-sm);
  position: relative;
  isolation: isolate;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.btn:hover {
  transform: translateY(-2px);
  border-color: rgba(111,135,255,0.2);
  background: rgba(255,255,255,0.08);
  box-shadow: 0 8px 24px -12px rgba(111,135,255,0.3);
}

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

.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(circle at 50% 0%, rgba(255,255,255,0.16), transparent 55%);
  opacity: 0;
  transition: opacity .18s ease;
}

.btn:hover::after { opacity: 1; }

.btn-primary {
  background: var(--grad);
  color: white;
  border-color: transparent;
  box-shadow: 0 18px 44px -18px rgba(111, 135, 255, 0.7), 0 8px 18px -12px rgba(0, 0, 0, 0.6);
}

.btn-primary:hover {
  box-shadow: 0 24px 60px -22px rgba(111, 135, 255, 0.95), 0 12px 30px -14px rgba(0, 0, 0, 0.7);
}

.btn-primary::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255,255,255,0.28), transparent 32%, rgba(255,255,255,0.08));
  opacity: .7;
  z-index: -1;
  filter: blur(0.2px);
}

.btn-ghost {
  background: rgba(255,255,255,0.02);
  border-color: rgba(255,255,255,0.1);
  box-shadow: none;
}

.btn-ghost:hover { background: rgba(255,255,255,0.06); }

.btn-danger {
  background: rgba(255,100,130,0.1);
  color: #ff91a7;
  border-color: rgba(255,100,130,0.22);
  box-shadow: none;
}

.btn-danger:hover {
  background: rgba(255,100,130,0.14);
  border-color: rgba(255,100,130,0.36);
}

.btn-sm {
  min-height: 38px;
  padding: 8px 13px;
  font-size: 13px;
  border-radius: 12px;
}

.btn-block { width: 100%; }

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: 0 12px 40px -12px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255,255,255,0.05);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(111,135,255,0.2);
  box-shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255,255,255,0.08);
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.08) 0%, transparent 50%, rgba(0,0,0,0.02) 100%);
  pointer-events: none;
}

.card-pad-lg { padding: 36px; }

.card:hover {
  border-color: rgba(111, 135, 255, 0.22);
}

a.card {
  display: block;
}

/* Forms */
.field { margin-bottom: 18px; min-width: 0; }
.field label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 8px;
  letter-spacing: .02em;
}

.input,
.textarea,
select {
  width: 100%;
  padding: 13px 15px;
  background: rgba(11, 13, 23, 0.9);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease, transform .16s ease;
  min-width: 0;
  outline: none;
}

.input::placeholder,
.textarea::placeholder {
  color: #7f88aa;
}

.input:focus,
.textarea:focus,
select:focus {
  border-color: rgba(111,135,255,0.45);
  box-shadow: 0 0 0 4px rgba(111,135,255,0.16);
  background: rgba(15, 18, 31, 0.96);
}

.textarea {
  resize: vertical;
  min-height: 110px;
}

.field-help {
  font-size: 12px;
  color: var(--muted-2);
  margin-top: 8px;
}

.field-prefix {
  display: flex;
  align-items: stretch;
  background: rgba(11, 13, 23, 0.9);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  overflow: hidden;
  min-width: 0;
}

.field-prefix span {
  padding: 13px 14px;
  color: var(--muted);
  background: rgba(255,255,255,0.03);
  font-size: 14px;
  border-inline-end: 1px solid rgba(255,255,255,0.06);
  white-space: nowrap;
}

.field-prefix .input {
  border: none;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
}

.field-prefix:focus-within {
  border-color: rgba(111,135,255,0.45);
  box-shadow: 0 0 0 4px rgba(111,135,255,0.16);
}

/* Alerts */
.alert {
  padding: 14px 16px;
  border-radius: 14px;
  margin-bottom: 18px;
  font-size: 14px;
  border: 1px solid transparent;
  backdrop-filter: blur(14px);
}

.alert-error {
  background: rgba(255,100,130,0.08);
  border-color: rgba(255,100,130,0.25);
  color: #ffb0bd;
}

.alert-success {
  background: rgba(45,224,184,0.08);
  border-color: rgba(45,224,184,0.25);
  color: #81f0d2;
}

/* Hero (home) */
.hero {
  padding: 88px 0 72px;
  text-align: center;
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(111, 135, 255, 0.2) 0%, transparent 70%);
  pointer-events: none;
  z-index: -1;
  animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 0.8; transform: translate(-50%, -50%) scale(1.1); }
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 15px;
  background: var(--grad-soft);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  color: #d3ddff;
  margin-bottom: 24px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}

.hero h1 {
  font-size: clamp(44px, 7.4vw, 84px);
  line-height: 0.98;
  font-weight: 900;
  letter-spacing: -0.055em;
  margin-bottom: 20px;
  text-wrap: balance;
}

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

.hero p {
  font-size: 18px;
  color: var(--muted);
  max-width: 640px;
  margin: 0 auto 34px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  align-items: center;
}

.demo-url {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 999px;
  font-family: 'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;
  font-size: 14px;
  color: var(--muted);
  margin-top: 26px;
  box-shadow: var(--shadow-sm);
}

.demo-url b { color: var(--text); font-weight: 700; }

/* Feature grid */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 18px;
  margin: 60px 0;
}

.feature {
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px -12px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255,255,255,0.05);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  min-width: 0;
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.08) 0%, transparent 50%, rgba(0,0,0,0.02) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.feature:hover {
  transform: translateY(-8px);
  border-color: rgba(111, 135, 255, 0.35);
  box-shadow: 0 20px 60px -20px rgba(111, 135, 255, 0.5), inset 0 1px 0 rgba(255,255,255,0.08);
}

.feature:hover::before {
  opacity: 1;
}

.feature-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--grad-soft);
  border: 1px solid rgba(255,255,255,0.08);
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  font-size: 20px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}

.feature h3 {
  font-size: 16px;
  margin-bottom: 8px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.feature p {
  font-size: 14px;
  color: var(--muted);
}

/* Page header */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin: 36px 0 24px;
  gap: 16px;
  flex-wrap: wrap;
}

.page-header h1 {
  font-size: clamp(28px, 3.4vw, 42px);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.02;
  margin-bottom: 6px;
}

.page-header p {
  color: var(--muted);
  margin-top: 4px;
}

.page-header a[target="_blank"] {
  word-break: break-word;
}

/* Auth pages */
.auth-wrap {
  min-height: calc(100vh - 96px);
  display: grid;
  place-items: center;
  padding: 40px 20px 92px;
}

.auth-card {
  width: 100%;
  max-width: 520px;
}

.auth-card h1 {
  font-size: clamp(24px, 3vw, 30px);
  font-weight: 900;
  margin-bottom: 8px;
  letter-spacing: -0.04em;
}

.auth-card .sub {
  color: var(--muted);
  margin-bottom: 28px;
  font-size: 14px;
}

.divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 22px 0;
  color: var(--muted);
  font-size: 12px;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
}

.tg-wrap {
  display: flex;
  justify-content: center;
  width: 100%;
  min-height: 60px;
  align-items: center;
  margin: 20px 0;
  position: relative;
}

.tg-wrap > * { 
  max-width: 100%; 
  display: block;
}

.tg-wrap iframe {
  display: block !important;
  border: none !important;
  margin: 0 auto !important;
  width: auto !important;
  height: auto !important;
}

.mobile-menu-toggle {
  display: none;
  pointer-events: auto !important;
  position: relative;
  z-index: 10005;
}

.admin-nav-menu {
  display: block;
  margin-bottom: 20px;
  position: relative;
  z-index: 10004;
}

@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: inline-flex;
  }
  
  .admin-nav-menu {
    display: none;
    padding: 15px;
    background: rgba(10, 12, 20, 0.95);
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 20px;
    position: relative;
    z-index: 10004;
  }
  
  .admin-nav-menu.active {
    display: block;
  }
  
  .admin-nav-menu > div {
    flex-direction: column;
    width: 100%;
  }
  
  .admin-nav-menu a {
    width: 100%;
    text-align: center;
  }
  
  .card {
    padding: 16px !important;
    margin: 12px 0 !important;
  }
  
  .card-pad-lg {
    padding: 20px !important;
  }
  
  .dash-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
  
  .stat-card {
    padding: 20px !important;
  }
  
  table {
    font-size: 13px !important;
  }
  
  table th, table td {
    padding: 8px !important;
  }
}

.tg-auth-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 20px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #0088cc 0%, #00a0dc 100%);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 15px rgba(0, 136, 204, 0.3);
  text-decoration: none;
}

.tg-auth-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 136, 204, 0.4);
  background: linear-gradient(135deg, #0099dd 0%, #00b0ed 100%);
}

.tg-auth-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(0, 136, 204, 0.3);
}

.tg-auth-button[data-style="shine"] {
  position: relative;
  overflow: hidden;
}

.tg-auth-button[data-style="shine"]::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.5s;
}

.tg-auth-button[data-style="shine"]:hover::before {
  left: 100%;
}

.auth-switch {
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
  color: var(--muted);
}

/* Dashboard / profile */
.dash-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

/* Admin panel responsive tables */
@media (max-width: 760px) {
  .card table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .card table thead {
    display: none;
  }
  
  .card table tbody {
    display: block;
  }
  
  .card table tr {
    display: block;
    margin-bottom: 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
  }
  
  .card table td {
    display: block;
    padding: 8px 0;
    text-align: left;
  }
  
  .card table td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--muted);
    display: block;
    margin-bottom: 4px;
    font-size: 12px;
  }
  
  .card table td:last-child {
    text-align: left;
    padding-top: 12px;
  }
  
  .card table td:last-child::before {
    display: none;
  }
}

.stat-card {
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  position: relative;
  overflow: hidden;
}

.stat-card::after {
  content: "";
  position: absolute;
  inset: auto -24px -28px auto;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(111,135,255,0.16), transparent 64%);
  pointer-events: none;
}

.stat-label {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.stat-value {
  font-size: 28px;
  font-weight: 900;
  margin-top: 4px;
  letter-spacing: -0.04em;
}

.stat-icon {
  font-size: 32px;
  margin-bottom: 8px;
}

.stat-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.stat-change {
  font-size: 12px;
  color: var(--muted);
}

/* Text size variations */
.public-shell[data-text-size="small"] {
  font-size: 14px;
}

.public-shell[data-text-size="small"] .public-name {
  font-size: 20px;
}

.public-shell[data-text-size="small"] .public-bio {
  font-size: 13px;
}

.public-shell[data-text-size="small"] .public-link {
  font-size: 14px;
  padding: 12px 20px;
}

.public-shell[data-text-size="medium"] {
  font-size: 16px;
}

.public-shell[data-text-size="large"] {
  font-size: 18px;
}

.public-shell[data-text-size="large"] .public-name {
  font-size: 28px;
}

.public-shell[data-text-size="large"] .public-bio {
  font-size: 16px;
}

.public-shell[data-text-size="large"] .public-link {
  font-size: 16px;
  padding: 14px 24px;
}

.public-shell[data-text-size="xlarge"] {
  font-size: 20px;
}

.public-shell[data-text-size="xlarge"] .public-name {
  font-size: 32px;
}

.public-shell[data-text-size="xlarge"] .public-bio {
  font-size: 18px;
}

.public-shell[data-text-size="xlarge"] .public-link {
  font-size: 18px;
  padding: 16px 28px;
}

/* Card style variations */
.public-shell[data-card-style="minimal"] .public-card {
  background: transparent;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
}

.public-shell[data-card-style="rounded"] .public-card {
  border-radius: 32px;
}

.public-shell[data-card-style="glass"] .public-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.public-shell[data-card-style="neumorphic"] .public-card {
  background: #0a0a0f;
  box-shadow: 8px 8px 16px rgba(0, 0, 0, 0.4), -8px -8px 16px rgba(255, 255, 255, 0.02);
  border: none;
}

.public-shell[data-card-style="editorial"] .public-card {
  background: rgba(255, 255, 255, 0.94);
  color: #111827;
  border: 1px solid rgba(17, 24, 39, 0.12);
  box-shadow: 0 28px 70px -38px rgba(0, 0, 0, 0.55);
}

.public-shell[data-card-style="editorial"] .public-name,
.public-shell[data-card-style="editorial"] .public-bio,
.public-shell[data-card-style="editorial"] .public-link {
  color: #111827;
}

.public-shell[data-card-style="poster"] .public-card {
  border: 3px solid var(--primary);
  box-shadow: 12px 12px 0 rgba(0, 0, 0, 0.45), 0 26px 90px -42px var(--primary);
  backdrop-filter: none;
}

.public-shell[data-profile-layout="compact"] .public-card {
  max-width: 520px;
  padding-top: 30px;
}

.public-shell[data-profile-layout="compact"] .public-avatar {
  width: 86px;
  height: 86px;
}

.public-shell[data-profile-layout="compact"] .public-links {
  gap: 8px;
}

.public-shell[data-profile-layout="showcase"] {
  align-items: center;
}

.public-shell[data-profile-layout="showcase"] .public-card {
  max-width: 760px;
}

.public-shell[data-profile-layout="showcase"] .public-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.public-shell[data-button-shape="square"] .public-link,
.public-shell[data-button-shape="square"] .share-btn,
.public-shell[data-button-shape="square"] .social-link {
  border-radius: 6px;
}

.public-shell[data-button-shape="pill"] .public-link,
.public-shell[data-button-shape="pill"] .share-btn,
.public-shell[data-button-shape="pill"] .social-link {
  border-radius: 999px;
}

/* Links editor */
.links-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
  pointer-events: auto;
  position: relative;
  z-index: 1;
}

.link-row {
  display: flex;
  gap: 10px;
  align-items: center;
  cursor: move;
}

.link-row .input { flex: 1; }

.drag-handle {
  width: 32px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  color: var(--muted);
  cursor: grab;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 16px;
  font-weight: bold;
  letter-spacing: -2px;
}

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

.icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  color: var(--muted);
  cursor: pointer;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: transform .16s ease, border-color .16s ease, color .16s ease, background-color .16s ease;
}

.icon-btn:hover {
  color: var(--danger);
  border-color: rgba(255,100,130,0.3);
  background: rgba(255,100,130,0.08);
  transform: translateY(-1px);
}

/* Pages list */
.pages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 16px;
}

.page-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  min-width: 0;
}

.page-item:hover {
  transform: translateY(-2px);
  border-color: rgba(111,135,255,0.22);
}

.page-item .slug {
  font-family: 'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;
  font-size: 13px;
  color: #94b2ff;
  word-break: break-all;
}

.page-item .title {
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.03em;
  word-break: break-word;
}

.page-item .actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
  flex-wrap: wrap;
}

.page-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  min-width: 0;
  transition: all 0.2s ease;
}

.page-card:hover {
  transform: translateY(-2px);
  border-color: rgba(111,135,255,0.22);
  box-shadow: 0 12px 32px -12px rgba(111,135,255,0.3);
}

.page-card-preview {
  display: flex;
  gap: 16px;
}

.page-card-avatar {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid rgba(255,255,255,0.1);
}

.page-card-avatar-placeholder {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: var(--grad);
  display: grid;
  place-items: center;
  font-size: 28px;
  font-weight: 900;
  color: #fff;
  flex-shrink: 0;
}

.page-card-info {
  flex: 1;
  min-width: 0;
}

.page-card-title {
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -0.03em;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-card-slug {
  font-family: 'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;
  font-size: 13px;
  color: #94b2ff;
  margin-bottom: 8px;
}

.page-card-meta {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.page-card-actions {
  display: flex;
  gap: 8px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

/* Public profile page */
.public-shell {
  min-height: 100vh;
  padding: 24px 20px 44px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow-x: clip;
  position: relative;
  text-align: center;
  direction: ltr;
}

body.public-body {
  padding-top: 0 !important;
  background: var(--bg);
}

.public-shell[data-background-image] {
  background-size: cover;
  background-position: center center;
  background-attachment: fixed;
  background-repeat: no-repeat;
  min-height: 100vh;
}

.public-shell[data-background-image]::before {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, var(--bg-overlay, 0.58));
  z-index: -1;
}

.public-card {
  width: 100%;
  max-width: 640px;
  text-align: center;
  background:
    linear-gradient(180deg, rgba(18, 21, 34, 0.95), rgba(14, 16, 27, 0.92)),
    var(--grad-soft);
  border: 1px solid var(--border-strong);
  border-radius: 24px;
  padding: 44px 32px 32px;
  box-shadow: 0 28px 100px -36px rgba(0,0,0,0.9), 0 0 60px rgba(111,135,255,0.15), inset 0 1px 0 rgba(255,255,255,0.1);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  position: relative;
  overflow: hidden;
  animation: fadeInUp 0.6s ease-out;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.public-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 32px 120px -36px rgba(0,0,0,0.95), 0 0 80px rgba(111,135,255,0.2), inset 0 1px 0 rgba(255,255,255,0.15);
}

.public-body .public-shell::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -3;
  background:
    linear-gradient(140deg, rgba(111,135,255,0.18), transparent 34%),
    linear-gradient(320deg, rgba(30,214,255,0.12), transparent 38%),
    var(--bg);
}

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

.public-card[data-cover-image] {
  padding-top: 0;
}

.public-cover-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 24px 24px 0 0;
  display: none;
}

.public-card[data-cover-image] .public-cover-image {
  display: block;
}

.public-video {
  margin: 24px 0;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.3);
  position: relative;
}

.public-video[data-background="true"] {
  position: fixed;
  inset: 0;
  z-index: -2;
  margin: 0;
  border-radius: 0;
  pointer-events: none;
}

.public-video[data-background="true"] iframe,
.public-video[data-background="true"] video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.public-video-iframe {
  width: 100%;
  aspect-ratio: 16/9;
  border: none;
}

.public-video-player {
  width: 100%;
  max-height: 400px;
  border-radius: 12px;
}

.public-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 0%, rgba(111,135,255,0.14), transparent 30%),
    radial-gradient(circle at 0% 100%, rgba(30,214,255,0.12), transparent 34%);
  pointer-events: none;
}

.public-card > * { position: relative; z-index: 1; }

.public-avatar {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  margin: 0 auto 18px;
  padding: 4px;
  background: var(--grad);
  display: grid;
  place-items: center;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.1) inset,
    0 18px 44px -18px rgba(111,135,255,0.9),
    0 0 80px rgba(111,135,255,0.2);
  animation: avatarPulse 3s ease-in-out infinite;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.public-avatar:hover {
  transform: scale(1.05);
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.15) inset,
    0 24px 56px -18px rgba(111,135,255,1),
    0 0 100px rgba(111,135,255,0.3);
}

@keyframes avatarPulse {
  0%, 100% {
    box-shadow:
      0 0 0 1px rgba(255,255,255,0.08) inset,
      0 18px 44px -18px rgba(111,135,255,0.8),
      0 0 80px rgba(111,135,255,0.16);
  }
  50% {
    box-shadow:
      0 0 0 1px rgba(255,255,255,0.12) inset,
      0 18px 44px -18px rgba(111,135,255,1),
      0 0 100px rgba(111,135,255,0.24);
  }
}

.public-avatar img,
.public-avatar div {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface-elevated);
  color: white;
  display: grid;
  place-items: center;
  font-size: 38px;
  font-weight: 900;
  border: 1px solid rgba(255,255,255,0.08);
}

.public-name {
  font-size: clamp(24px, 4vw, 34px);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.05;
  color: var(--profile-text-color, var(--text));
}

.public-handle {
  color: var(--muted);
  font-size: 14px;
  margin-top: 6px;
  margin-bottom: 16px;
}

.public-bio {
  color: var(--profile-text-color, var(--text));
  font-size: 15px;
  margin-bottom: 24px;
  opacity: 0.95;
  line-height: 1.8;
}

.social-links {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.social-link {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  border: 1px solid var(--border-strong);
  background: linear-gradient(145deg, rgba(255,255,255,0.12), rgba(255,255,255,0.04));
  color: var(--profile-text-color, var(--text));
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  display: grid;
  place-items: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.social-link:hover {
  background: var(--primary);
  border-color: var(--primary);
  transform: translateY(-3px) scale(1.1);
  box-shadow: 0 12px 32px -12px rgba(111,135,255,0.6);
  color: #fff;
}

.public-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 10px;
}

.public-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 20px;
  border-radius: 14px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--profile-text-color, var(--text));
  font-weight: 600;
  letter-spacing: -0.01em;
  text-align: start;
  box-shadow: 0 4px 20px -8px rgba(0,0,0,0.3);
  min-width: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.public-link-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.public-link::after {
  content: "↗";
  color: var(--muted);
  font-size: 15px;
  flex-shrink: 0;
}

.public-link:hover {
  transform: translateY(-3px) scale(1.01);
  border-color: var(--primary);
  background: rgba(255,255,255,0.08);
  box-shadow: 
    0 24px 60px -20px rgba(111,135,255,0.5),
    0 0 0 1px rgba(111,135,255,0.2),
    0 0 40px rgba(111,135,255,0.2);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Button Style: Solid */
.public-link[data-style="solid"] {
  background: var(--grad);
  border: none;
  color: #fff;
}

.public-link[data-style="solid"]:hover {
  opacity: 0.9;
  background: var(--grad);
}

/* Button Style: Glass */
.public-link[data-style="glass"] {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

/* Button Style: Outline */
.public-link[data-style="outline"] {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}

.public-link[data-style="outline"]:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* Button Style: Gradient */
.public-link[data-style="gradient"] {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 50%, var(--accent) 100%);
  border: none;
  color: #fff;
}

/* Button Style: Minimal */
.public-link[data-style="minimal"] {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-weight: 600;
}

.public-link[data-style="minimal"]:hover {
  background: rgba(255, 255, 255, 0.06);
}

.public-footer {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.share-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: rgba(255,255,255,0.03);
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.06);
}

.share-label {
  font-size: 13px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0;
  font-weight: 600;
}

.share-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.share-btn {
  min-width: 44px;
  height: 44px;
  padding: 0 12px;
  border-radius: 14px;
  border: 1px solid var(--border-strong);
  background: linear-gradient(145deg, rgba(255,255,255,0.1), rgba(255,255,255,0.035));
  color: var(--profile-text-color, var(--text));
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  display: grid;
  place-items: center;
}

.share-btn:hover {
  background: rgba(255,255,255,0.1);
  transform: translateY(-2px);
  border-color: rgba(255,255,255,0.2);
}

.share-twitter:hover { background: #1da1f2; color: #fff; border-color: #1da1f2; }
.share-facebook:hover { background: #1877f2; color: #fff; border-color: #1877f2; }
.share-linkedin:hover { background: #0a66c2; color: #fff; border-color: #0a66c2; }
.share-telegram:hover { background: #0088cc; color: #fff; border-color: #0088cc; }
.share-copy:hover { background: var(--success); color: #fff; border-color: var(--success); }

.qr-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 20px;
  background: rgba(255,255,255,0.03);
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.06);
}

.qr-code {
  width: 150px;
  height: 150px;
  border-radius: 14px;
  border: 3px solid var(--qr-border-color, rgba(255,255,255,0.1));
  padding: 10px;
  background: #fff;
  box-shadow: 0 16px 40px -24px var(--qr-border-color, #fff);
}

.qr-actions {
  display: flex;
  gap: 10px;
}

/* Footer */
.footer {
  margin-top: auto;
  padding: 40px 0 100px;
  border-top: 1px solid rgba(255,255,255,0.08);
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  background: linear-gradient(180deg, transparent, rgba(255,255,255,0.02));
  position: relative;
  z-index: 1;
  padding-bottom: calc(100px + env(safe-area-inset-bottom));
}

.footer-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 20px;
  align-items: center;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
}

.footer-brand strong {
  font-size: 16px;
  color: var(--text);
}

.footer-brand span {
  font-size: 12px;
  color: var(--muted);
}

.footer-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--primary);
}

.footer-bottom {
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.footer-bottom p {
  margin: 0;
  color: var(--muted);
}

@media (min-width: 768px) {
  .footer-content {
    flex-direction: row;
    justify-content: space-between;
  }
  
  .footer-brand {
    flex-direction: row;
    gap: 8px;
  }
}

/* Cookie Consent Popup */
.cookie-consent {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(10, 12, 20, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  padding: 24px 32px;
  z-index: 10000;
  max-width: 90%;
  width: 500px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translate(-50%, 20px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

.cookie-consent-content p {
  margin: 0 0 16px 0;
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
}

.cookie-consent-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
}

/* Mobile app nav */
.drawer-open .mobile-dock {
  display: none;
}

.mobile-menu-toggle {
  display: none;
  pointer-events: auto !important;
  position: relative;
  z-index: 10005;
}

.mobile-drawer {
  display: none;
}

@media (max-width: 1024px) {
  .topbar {
    width: min(1200px, calc(100% - 12px));
    margin-top: 0;
    border-radius: 22px;
  }

  .topbar-inner {
    padding: 12px 14px;
    min-height: 72px;
  }

  .nav-links,
  .desktop-only-cta {
    display: none !important;
  }

  .mobile-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .container {
    width: min(1120px, calc(100% - 20px));
  }

  .hero {
    padding-top: 68px;
  }

  .page-header {
    align-items: flex-start;
  }

  .card,
  .public-card,
  .feature,
  .stat-card,
  .page-item {
    border-radius: 24px;
  }

  .public-shell {
    padding-top: 40px;
  }

  .hero h1 {
    letter-spacing: -0.06em;
  }

  .link-row {
    align-items: stretch;
  }

  .link-row .input,
  .field-prefix .input {
    min-width: 0;
  }

  .page-item .actions {
    gap: 10px;
  }
}

@media (max-width: 840px) {
  .auth-wrap {
    padding-inline: 14px;
  }

  .hero p {
    font-size: 17px;
  }

  .demo-url {
    font-size: 13px;
    max-width: 100%;
    word-break: break-word;
  }

  .features {
    grid-template-columns: 1fr;
    margin: 44px 0;
  }

  .page-header {
    margin-top: 28px;
  }

  .page-item .actions {
    flex-direction: row;
  }
}

@media (max-width: 760px) {
  .topbar {
    border-radius: 20px;
  }

  .topbar-inner {
    gap: 10px;
  }

  .brand > div:last-child > div:first-child {
    font-size: 16px;
  }

  .card,
  .card-pad-lg {
    padding: 22px;
  }

  .hero {
    padding: 56px 0 42px;
  }

  .hero h1 {
    font-size: clamp(38px, 12vw, 60px);
  }

  .hero p {
    font-size: 16px;
  }

  .page-header h1 {
    font-size: clamp(24px, 8vw, 32px);
  }

  .pages-grid {
    grid-template-columns: 1fr;
  }

  .public-shell {
    padding: 28px 14px 120px;
  }
  
  .public-card {
    padding: 32px 20px 24px;
    border-radius: 24px;
  }

  .public-avatar {
    width: 96px;
    height: 96px;
  }

  .public-avatar img,
  .public-avatar div {
    font-size: 32px;
  }

  .public-name {
    font-size: 22px;
  }

  .public-handle {
    font-size: 13px;
  }

  .public-bio {
    font-size: 14px;
    line-height: 1.5;
  }

  .public-link {
    padding: 14px 18px;
    border-radius: 14px;
    font-size: 15px;
  }

  .social-link {
    width: 44px;
    height: 44px;
    font-size: 18px;
  }

  .share-buttons {
    gap: 8px;
  }

  .share-btn {
    width: 40px;
    height: 40px;
    font-size: 14px;
  }

  .qr-code {
    width: 140px;
    height: 140px;
  }

  .link-row {
    flex-direction: column;
  }

  .icon-btn {
    align-self: flex-end;
    width: 100%;
    max-width: 52px;
  }

  .field-prefix {
    flex-direction: column;
  }

  .field-prefix span {
    border-inline-end: none;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    white-space: normal;
  }

  .field-prefix .input {
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .auth-card {
    max-width: 100%;
  }

  .tg-wrap iframe {
    max-width: 100%;
  }
}

@media (max-width: 640px) {
  .topbar {
    position: fixed;
    top: 32px;
    width: 100%;
    margin: 0;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
  }

  .topbar-inner {
    padding: 12px 16px;
    min-height: 68px;
  }

  .brand .brand-sub {
    display: none;
  }

  .brand > div:last-child > div:first-child {
    font-size: 15px;
  }

  .brand-logo {
    width: 38px;
    height: 38px;
    border-radius: 13px;
  }

  .mobile-dock {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom));
    z-index: 60;
    padding: 8px;
    border-radius: 20px;
    background: rgba(10, 12, 20, 0.95);
    border: 1px solid rgba(255,255,255,0.08);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    box-shadow: 0 18px 44px -24px rgba(0,0,0,0.85);
  }

  .mobile-dock-item {
    min-width: 0;
    display: grid;
    place-items: center;
    gap: 4px;
    padding: 10px 8px 9px;
    border-radius: 16px;
    color: var(--muted);
    background: transparent;
    border: 1px solid transparent;
    text-align: center;
    line-height: 1.1;
    font-weight: 700;
    font-size: 11px;
    letter-spacing: .01em;
    cursor: pointer;
  }

  .mobile-dock-item .icon {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    background: rgba(255,255,255,0.06);
    color: var(--text);
    font-size: 14px;
    margin-bottom: 3px;
  }

  .mobile-dock-item.is-active {
    color: var(--text);
    background: linear-gradient(180deg, rgba(111,135,255,0.18), rgba(255,255,255,0.03));
    border-color: rgba(111,135,255,0.22);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
  }

  .mobile-dock-item.is-active .icon {
    background: var(--grad);
    color: #fff;
  }

  .mobile-dock-item--menu {
    color: #d9e1ff;
  }

  .mobile-dock-item--menu .icon {
    background: rgba(111,135,255,0.18);
    color: #fff;
  }

  .app-shell > main {
    padding-bottom: calc(var(--dock-h) + 28px + env(safe-area-inset-bottom));
  }

  .footer {
    padding-bottom: calc(22px + env(safe-area-inset-bottom));
  }

  .hidden-mobile {
    display: none !important;
  }
}

@media (min-width: 641px) {
  .mobile-dock {
    display: none !important;
  }
}

/* Mobile drawer */
body.drawer-open {
  overflow: hidden;
}

.mobile-drawer {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
}

.mobile-drawer.is-open {
  display: block;
}

.mobile-drawer__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 5, 10, 0.72);
  backdrop-filter: blur(12px);
}

.mobile-drawer__panel {
  position: absolute;
  inset: 0;
  border-radius: 0;
  background: linear-gradient(180deg, rgba(14, 17, 28, 0.98), rgba(8, 10, 16, 0.98));
  border: none;
  box-shadow: 0 30px 110px -36px rgba(0,0,0,0.92);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 100;
}

.mobile-drawer__panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 0%, rgba(111,135,255,0.16), transparent 28%),
    radial-gradient(circle at 100% 15%, rgba(30,214,255,0.10), transparent 22%);
  pointer-events: none;
}

.mobile-drawer__header,
.mobile-drawer__section,
.mobile-drawer__footer {
  position: relative;
  z-index: 1;
}

.mobile-drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.mobile-drawer__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.mobile-drawer__brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 13px;
  background: var(--grad);
  display: grid;
  place-items: center;
  font-weight: 900;
  color: #fff;
  flex-shrink: 0;
}

.mobile-drawer__brand-text {
  min-width: 0;
}

.mobile-drawer__brand-text strong {
  display: block;
  font-size: 15px;
  letter-spacing: -0.03em;
}

.mobile-drawer__brand-text span {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 1px;
}

.mobile-drawer__close {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.05);
  color: var(--text);
  font-size: 28px;
  font-weight: 300;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.mobile-drawer__close:hover {
  background: rgba(255,50,50,0.15);
  border-color: rgba(255,50,50,0.3);
  color: #ff6b6b;
}

.mobile-drawer__section {
  padding: 16px 14px 0;
  overflow: auto;
  min-height: 0;
}

.mobile-drawer__section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .22em;
  text-transform: uppercase;
  margin: 0 4px 10px;
}

.mobile-drawer__section-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(255,255,255,0.12), transparent);
}

.mobile-drawer__links {
  display: grid;
  gap: 10px;
}

.mobile-drawer__link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 15px;
  border-radius: 18px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.mobile-drawer__link:hover {
  transform: translateY(-1px);
  border-color: rgba(111,135,255,0.22);
  background: rgba(255,255,255,0.06);
}

.mobile-drawer__link-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: rgba(255,255,255,0.06);
  display: grid;
  place-items: center;
  font-size: 18px;
  flex-shrink: 0;
}

.mobile-drawer__link-content {
  min-width: 0;
  flex: 1;
  text-align: start;
}

.mobile-drawer__link-content strong {
  display: block;
  font-size: 14px;
  letter-spacing: -0.02em;
  margin-bottom: 3px;
}

.mobile-drawer__link-content span {
  display: block;
  font-size: 12px;
  color: var(--muted);
}

.mobile-drawer__link-arrow {
  color: var(--muted);
  font-size: 16px;
  flex-shrink: 0;
}

.mobile-drawer__footer {
  margin-top: auto;
  padding: 14px 16px 16px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.mobile-drawer__footer-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

/* Utility overrides */
.text-gradient {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.glass-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.09);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.no-scrollbar {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.no-scrollbar::-webkit-scrollbar {
  width: 0;
  height: 0;
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}


/* Theme System */
.theme-royal{--primary:#6f87ff;--primary-2:#8c5dff;--accent:#1ed6ff}
.theme-neon{--primary:#00e5ff;--primary-2:#a855f7;--accent:#00ff95}
.theme-glass{--primary:#60a5fa;--primary-2:#c084fc;--accent:#22d3ee}
.theme-sunset{--primary:#ff7a18;--primary-2:#ff3d77;--accent:#ffd166}
.theme-emerald{--primary:#10b981;--primary-2:#059669;--accent:#34d399}
.theme-psychedelic{--primary:#ff00ff;--primary-2:#00ffff;--accent:#ff6b6b;--gradient-1:#ff00ff;--gradient-2:#00ffff;--gradient-3:#ff0080;--gradient-4:#8000ff}

.theme-psychedelic .public-shell {
  background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2), var(--gradient-3), var(--gradient-4));
  background-size: 400% 400%;
  animation: psychedelicGradient 8s ease infinite;
}

@keyframes psychedelicGradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.theme-psychedelic .public-card {
  background: rgba(0, 0, 0, 0.8);
  border: 2px solid rgba(255, 0, 255, 0.5);
  box-shadow: 0 0 30px rgba(255, 0, 255, 0.3), 0 0 60px rgba(0, 255, 255, 0.2);
}

.theme-psychedelic .public-link {
  background: linear-gradient(90deg, var(--gradient-1), var(--gradient-2));
  border: 2px solid rgba(255, 255, 255, 0.3);
  animation: psychedelicBorder 3s ease infinite;
}

@keyframes psychedelicBorder {
  0%, 100% { border-color: var(--gradient-1); }
  33% { border-color: var(--gradient-2); }
  66% { border-color: var(--gradient-3); }
}
.theme-cyberpunk{--primary:#00ff41;--primary-2:#ff0055;--accent:#00d9ff;--gradient-1:#00ff41;--gradient-2:#ff0055;--gradient-3:#00d9ff;--gradient-4:#ffff00}
.theme-aurora{--primary:#00ff88;--primary-2:#00aaff;--accent:#ff00aa;--gradient-1:#00ff88;--gradient-2:#00aaff;--gradient-3:#ff00aa;--gradient-4:#ffaa00}
.theme-midnight{--primary:#7c3aed;--primary-2:#db2777;--accent:#f472b6;--gradient-1:#7c3aed;--gradient-2:#db2777;--gradient-3:#f472b6;--gradient-4:#8b5cf6}
.theme-ocean{--primary:#0ea5e9;--primary-2:#06b6d4;--accent:#14b8a6;--gradient-1:#0ea5e9;--gradient-2:#06b6d4;--gradient-3:#14b8a6;--gradient-4:#0284c7}
.theme-fire{--primary:#f97316;--primary-2:#dc2626;--accent:#eab308;--gradient-1:#f97316;--gradient-2:#dc2626;--gradient-3:#eab308;--gradient-4:#ef4444}

[data-theme="royal"] .public-card { border-color: rgba(255, 215, 0, 0.34); box-shadow: 0 28px 90px -42px rgba(255, 184, 28, 0.55), inset 0 1px 0 rgba(255,255,255,0.18); }
[data-theme="glass"] .public-card { background: rgba(255,255,255,0.09); border-color: rgba(255,255,255,0.28); }
[data-theme="neon"] .public-card { border-color: rgba(0,255,255,0.35); box-shadow: 0 0 0 1px rgba(255,0,255,0.12), 0 30px 100px -36px rgba(0,255,255,0.38); }
[data-theme="sunset"] .public-card { background: linear-gradient(180deg, rgba(54, 24, 42, 0.95), rgba(31, 15, 31, 0.94)); }
[data-theme="emerald"] .public-card { border-color: rgba(52,211,153,0.3); box-shadow: 0 28px 90px -42px rgba(16,185,129,0.62); }
[data-theme="cyberpunk"] .public-card { border-color: rgba(0,255,65,0.36); background: linear-gradient(180deg, rgba(8,16,12,0.96), rgba(14,8,20,0.94)); }
[data-theme="aurora"] .public-card { background: linear-gradient(160deg, rgba(5,32,30,0.95), rgba(17,18,54,0.93), rgba(50,12,56,0.9)); }
[data-theme="midnight"] .public-card { background: linear-gradient(180deg, rgba(18,15,44,0.97), rgba(8,9,20,0.95)); }
[data-theme="ocean"] .public-card { background: linear-gradient(180deg, rgba(5,32,50,0.96), rgba(5,17,34,0.95)); }
[data-theme="fire"] .public-card { background: linear-gradient(180deg, rgba(54,22,12,0.96), rgba(26,8,8,0.94)); }
[data-theme="mono"] .public-card { background: rgba(255,255,255,0.95); border-color: rgba(17,24,39,0.16); box-shadow: 0 24px 70px -42px rgba(17,24,39,0.5); }
[data-theme="candy"] .public-card { background: linear-gradient(180deg, rgba(58,31,77,0.95), rgba(29,16,40,0.93)); border-color: rgba(255,122,217,0.28); }
[data-theme="forest"] .public-card { background: linear-gradient(180deg, rgba(13,31,24,0.96), rgba(6,18,14,0.94)); border-color: rgba(132,204,22,0.3); }
[data-theme="cosmic"] .public-card { background: linear-gradient(180deg, rgba(14,16,36,0.96), rgba(5,7,20,0.94)); border-color: rgba(244,114,182,0.28); }
.public-link::after { content: ">"; }

.social-telegram, .share-telegram { color: #69d2ff; }
.social-youtube { color: #ff6b6b; }
.social-instagram { color: #ff7ac8; }
.social-github { color: #e7eaf3; }
.social-discord { color: #9aa7ff; }
.share-copy { min-width: 64px; }

input, textarea, select {
  font-size: 16px !important;
}
img,video{max-width:100%;height:auto}

.mobile-dock{
position:fixed!important;
bottom:0;
left:0;
right:0;
z-index:10003;
padding-bottom:env(safe-area-inset-bottom);
pointer-events:auto;
}

/* Final mobile improvements */
html,body{overflow-x:hidden!important}
@media (max-width:768px){
  .topbar,.header{position:fixed!important;top:32px;left:0;right:0;z-index:10004}
  body{padding-top:104px}
  body.public-body{padding-top:0!important}
  .container{max-width:100%;padding-left:14px;padding-right:14px}
  .public-shell{padding:12px 12px 36px;align-items:flex-start;min-height:100svh}
  .public-card{border-radius:18px;padding:32px 18px 24px;max-width:100%}
  .public-cover-image{height:150px;border-radius:18px 18px 0 0}
  .public-card[data-cover-image]{padding-top:0}
  .public-avatar{width:92px;height:92px;margin-bottom:14px}
  .public-name{font-size:26px;line-height:1.12;overflow-wrap:anywhere}
  .public-bio{font-size:14px;line-height:1.65}
  .public-link{padding:14px 14px;gap:10px}
  .public-shell[data-profile-layout="showcase"] .public-links{grid-template-columns:1fr}
  .share-section,.qr-section{padding:14px}
  .share-buttons{gap:8px}
  .qr-actions{flex-wrap:wrap;justify-content:center}
}
