/* ============================================================
   LinkForge – Link-in-Bio Website Builder
   Premium Design System
   ============================================================ */

/* ---------- Google Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Outfit:wght@400;500;600;700;800&display=swap');

/* ---------- CSS Custom Properties ---------- */
:root {
    /* Brand palette */
    --primary: #6c5ce7;
    --primary-light: #a29bfe;
    --primary-dark: #4a3fc7;
    --accent: #00cec9;
    --accent-light: #81ecec;
    --danger: #ff6b6b;
    --success: #00b894;
    --warning: #fdcb6e;

    /* Surfaces */
    --bg-primary: #0f0f1a;
    --bg-secondary: #1a1a2e;
    --bg-card: rgba(30, 30, 55, 0.7);
    --bg-glass: rgba(255, 255, 255, 0.04);
    --bg-input: rgba(255, 255, 255, 0.06);

    /* Text */
    --text-primary: #f0f0f5;
    --text-secondary: #a0a0c0;
    --text-muted: #6a6a8a;

    /* Borders */
    --border-color: rgba(255, 255, 255, 0.08);
    --border-active: rgba(108, 92, 231, 0.5);

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 16px 64px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 40px rgba(108, 92, 231, 0.15);

    /* Spacing scale */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;

    /* Radii */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 50%;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);

    /* Dynamic theme color (overridden by JS) */
    --theme-color: #6c5ce7;
    --theme-color-light: #a29bfe;
    --theme-color-dark: #4a3fc7;
}

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* --- Body background is now handled by .bg-orbs + .bg-grid --- */

a {
    color: var(--primary-light);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--accent-light);
}

img {
    display: block;
    max-width: 100%;
}

/* ---------- Typography ---------- */
h1,
h2,
h3,
h4 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    line-height: 1.2;
}

.heading-xl {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-light), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.heading-lg {
    font-size: clamp(1.5rem, 3vw, 2rem);
}

.heading-md {
    font-size: 1.25rem;
}

.text-secondary {
    color: var(--text-secondary);
}

.text-muted {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* ---------- Layout Utilities ---------- */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius-md);
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
    outline: none;
    white-space: nowrap;
}

.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(255, 255, 255, 0.1), transparent);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.btn:hover::after {
    opacity: 1;
}

.btn:active {
    transform: scale(0.97);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    box-shadow: 0 4px 16px rgba(108, 92, 231, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 6px 24px rgba(108, 92, 231, 0.45);
    transform: translateY(-1px);
}

.btn-accent {
    background: linear-gradient(135deg, var(--accent), #00b3ae);
    color: #0f0f1a;
    box-shadow: 0 4px 16px rgba(0, 206, 201, 0.3);
}

.btn-accent:hover {
    box-shadow: 0 6px 24px rgba(0, 206, 201, 0.45);
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1.5px solid var(--border-color);
}

.btn-outline:hover {
    border-color: var(--primary-light);
    background: rgba(108, 92, 231, 0.08);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger), #e74c3c);
    color: #fff;
    box-shadow: 0 4px 16px rgba(255, 107, 107, 0.3);
}

.btn-danger:hover {
    box-shadow: 0 6px 24px rgba(255, 107, 107, 0.45);
    transform: translateY(-1px);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    padding: 0.5rem 0.75rem;
}

.btn-ghost:hover {
    color: var(--text-primary);
    background: var(--bg-glass);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
}

.btn-block {
    width: 100%;
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: var(--radius-sm);
    font-size: 1.1rem;
}

/* ---------- Cards / Glass Panels ---------- */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    box-shadow: var(--shadow-md);
}

.card-elevated {
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    position: relative;
}

.card-elevated::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--accent), var(--primary));
    background-size: 200% 100%;
    animation: gradient-slide 4s ease infinite;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

@keyframes gradient-slide {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

.card:hover {
    border-color: rgba(108, 92, 231, 0.15);
    box-shadow: var(--shadow-md), 0 0 30px rgba(108, 92, 231, 0.06);
    transition: all var(--transition-base);
}

/* ---------- Inputs & Forms ---------- */
.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    margin-bottom: var(--space-lg);
}

.form-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    background: var(--bg-input);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    transition: all var(--transition-base);
    outline: none;
}

.form-input:focus,
.form-textarea:focus {
    border-color: var(--primary);
    background: rgba(108, 92, 231, 0.06);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.15);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--text-muted);
}

.form-textarea {
    resize: vertical;
    min-height: 80px;
}

/* ---------- Color Swatch Picker ---------- */
.color-swatches {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.color-swatch {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    border: 3px solid transparent;
    cursor: pointer;
    transition: all var(--transition-base);
    position: relative;
}

.color-swatch:hover {
    transform: scale(1.15);
}

.color-swatch.active {
    border-color: #fff;
    box-shadow: 0 0 0 2px var(--primary), 0 4px 12px rgba(0, 0, 0, 0.3);
    transform: scale(1.1);
}

.color-swatch.active::after {
    content: '✓';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* ---------- Navigation ---------- */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(15, 15, 26, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid transparent;
    border-image: linear-gradient(90deg, transparent, var(--primary), var(--accent), transparent) 1;
    padding: var(--space-md) 0;
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-family: 'Outfit', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
}

.navbar-brand .brand-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

/* ---------- AUTH PAGE ---------- */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-xl);
}

.auth-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-width: 960px;
    width: 100%;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    min-height: 580px;
}

.auth-hero {
    background: linear-gradient(135deg, var(--primary-dark), #2d1b69 30%, #0d0d2b 70%, #1a1a2e);
    background-size: 200% 200%;
    animation: auth-gradient-shift 8s ease-in-out infinite;
    padding: var(--space-3xl);
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

@keyframes auth-gradient-shift {

    0%,
    100% {
        background-position: 0% 0%;
    }

    25% {
        background-position: 100% 0%;
    }

    50% {
        background-position: 100% 100%;
    }

    75% {
        background-position: 0% 100%;
    }
}

.auth-hero::before {
    content: '';
    position: absolute;
    width: 350px;
    height: 350px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 206, 201, 0.18), transparent 70%);
    top: -80px;
    right: -80px;
    animation: pulse-glow 5s ease-in-out infinite;
}

.auth-hero::after {
    content: '';
    position: absolute;
    width: 250px;
    height: 250px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(108, 92, 231, 0.22), transparent 70%);
    bottom: -50px;
    left: -50px;
    animation: pulse-glow 5s ease-in-out 2.5s infinite;
}

@keyframes pulse-glow {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.5;
    }

    50% {
        transform: scale(1.25);
        opacity: 1;
    }
}

.auth-hero-content {
    position: relative;
    z-index: 1;
}

.auth-hero h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #fff, var(--accent-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--space-md);
}

.auth-hero p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.05rem;
    line-height: 1.7;
}

.auth-hero .hero-features {
    margin-top: var(--space-xl);
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.hero-feature {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
}

.hero-feature-icon {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.auth-form-panel {
    background: var(--bg-secondary);
    padding: var(--space-3xl) var(--space-2xl);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-form-panel h2 {
    font-size: 1.5rem;
    margin-bottom: var(--space-xs);
}

.auth-form-panel .subtitle {
    color: var(--text-secondary);
    margin-bottom: var(--space-xl);
}

.auth-toggle {
    margin-top: var(--space-xl);
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.auth-toggle a {
    font-weight: 600;
}

.auth-error {
    background: rgba(255, 107, 107, 0.1);
    border: 1px solid rgba(255, 107, 107, 0.3);
    color: var(--danger);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    margin-bottom: var(--space-md);
    display: none;
}

.auth-error.show {
    display: block;
    animation: shake 0.4s ease;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-6px);
    }

    75% {
        transform: translateX(6px);
    }
}

/* Username availability indicator */
.username-status {
    font-size: 0.8rem;
    font-weight: 500;
    margin-top: 2px;
    display: none;
}

.username-status.available {
    color: var(--success);
    display: block;
}

.username-status.taken {
    color: var(--danger);
    display: block;
}

.username-status.checking {
    color: var(--text-muted);
    display: block;
}

/* ---- Google Sign-In Button ---- */
.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 0.8rem 1.5rem;
    background: #fff;
    color: #3c4043;
    border: 1.5px solid #dadce0;
    border-radius: var(--radius-md);
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
    outline: none;
}

.btn-google:hover {
    background: #f7f8f8;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

.btn-google:active {
    transform: scale(0.98);
}

.btn-google svg {
    flex-shrink: 0;
}

/* ---- Auth Divider ("or sign in with email") ---- */
.auth-divider {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin: var(--space-lg) 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.auth-divider span {
    color: var(--text-muted);
    font-size: 0.8rem;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ---- Forgot Password Link ---- */
.auth-forgot {
    text-align: right;
    margin-top: calc(-1 * var(--space-sm));
    margin-bottom: var(--space-md);
}

.auth-forgot a {
    font-size: 0.85rem;
    color: var(--text-muted);
    transition: color var(--transition-fast);
}

.auth-forgot a:hover {
    color: var(--primary-light);
}

/* ---- Auth Success Message ---- */
.auth-success {
    background: rgba(0, 184, 148, 0.1);
    border: 1px solid rgba(0, 184, 148, 0.3);
    color: var(--success);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    margin-bottom: var(--space-md);
    display: none;
}

.auth-success.show {
    display: block;
    animation: fade-in 0.3s ease;
}

/* ---- Email Verification View ---- */
.verify-email-icon {
    font-size: 3.5rem;
    text-align: center;
    margin-bottom: var(--space-md);
    animation: bounce-subtle 2s ease-in-out infinite;
}

@keyframes bounce-subtle {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

/* ---- Account Settings (Dashboard) ---- */
.account-info {
    margin-bottom: var(--space-lg);
    padding: var(--space-md);
    background: var(--bg-glass);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.account-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-sm) 0;
}

.account-info-row+.account-info-row {
    border-top: 1px solid var(--border-color);
}

.account-label {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
}

.account-value {
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 600;
}

.account-action-section {
    padding: var(--space-lg) 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: var(--space-lg);
}

.account-action-section h4 {
    margin-bottom: var(--space-xs);
    font-size: 0.95rem;
}

/* ---- Danger Zone ---- */
.danger-zone {
    padding: var(--space-lg);
    border: 1.5px solid rgba(255, 107, 107, 0.3);
    border-radius: var(--radius-md);
    background: rgba(255, 107, 107, 0.04);
}

.danger-zone h4 {
    color: var(--danger);
    font-size: 0.95rem;
    margin-bottom: var(--space-xs);
}

.delete-confirm-group {
    margin-bottom: var(--space-md);
    animation: fade-in 0.3s ease;
}

.delete-confirm-group .form-input {
    border-color: rgba(255, 107, 107, 0.4);
}

.delete-confirm-group .form-input:focus {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.15);
    background: rgba(255, 107, 107, 0.04);
}

/* ---------- DASHBOARD ---------- */
.dashboard {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: var(--space-xl);
    padding: var(--space-xl) 0;
    min-height: calc(100vh - 70px);
}

.dashboard-main {
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
}

/* Profile picture upload */
.avatar-upload {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.avatar-preview {
    width: 100px;
    height: 100px;
    border-radius: var(--radius-full);
    border: 3px solid var(--border-color);
    overflow: hidden;
    position: relative;
    cursor: pointer;
    transition: all var(--transition-base);
    flex-shrink: 0;
    background: var(--bg-glass);
}

.avatar-preview:hover {
    border-color: var(--primary);
}

.avatar-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-preview .avatar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--text-muted);
}

.avatar-preview .avatar-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-fast);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
}

.avatar-preview:hover .avatar-overlay {
    opacity: 1;
}

.avatar-info h4 {
    margin-bottom: var(--space-xs);
}

.avatar-info p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Links editor section */
.links-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-md);
}

.link-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-sm);
    transition: all var(--transition-base);
    cursor: grab;
}

.link-item:hover {
    border-color: var(--primary-light);
    background: rgba(108, 92, 231, 0.04);
}

.link-item.dragging {
    opacity: 0.5;
    border-color: var(--primary);
    background: rgba(108, 92, 231, 0.1);
}

.link-drag-handle {
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: grab;
    user-select: none;
    flex-shrink: 0;
}

.link-drag-handle:active {
    cursor: grabbing;
}

.link-fields {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-sm);
}

.link-fields .form-input {
    margin: 0;
    padding: 0.6rem 0.8rem;
    font-size: 0.85rem;
}

.link-delete {
    flex-shrink: 0;
}

.links-empty {
    text-align: center;
    padding: var(--space-2xl);
    color: var(--text-muted);
}

.links-empty .empty-icon {
    font-size: 2.5rem;
    margin-bottom: var(--space-md);
    opacity: 0.3;
}

/* Save / action bar */
.action-bar {
    display: flex;
    gap: var(--space-md);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--border-color);
}

/* Profile share link */
.share-link-bar {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--space-sm) var(--space-md);
    margin-bottom: var(--space-lg);
}

.share-link-bar input {
    flex: 1;
    background: none;
    border: none;
    color: var(--primary-light);
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    outline: none;
}

.copy-feedback {
    font-size: 0.75rem;
    color: var(--success);
    font-weight: 600;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.copy-feedback.show {
    opacity: 1;
}

/* ---------- PREVIEW SIDEBAR ---------- */
.preview-sidebar {
    position: sticky;
    top: 90px;
    height: fit-content;
}

.phone-frame {
    background: #000;
    border-radius: 40px;
    padding: 12px;
    box-shadow: var(--shadow-lg);
    max-width: 375px;
    margin: 0 auto;
}

.phone-screen {
    border-radius: 30px;
    overflow: hidden;
    background: var(--bg-secondary);
    min-height: 600px;
    position: relative;
}

.phone-notch {
    width: 120px;
    height: 28px;
    background: #000;
    border-radius: 0 0 16px 16px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.preview-content {
    padding: var(--space-xl) var(--space-lg);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.preview-avatar {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: var(--space-md);
    border: 3px solid var(--theme-color);
    background: var(--bg-glass);
}

.preview-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-avatar .preview-avatar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--text-muted);
}

.preview-name {
    font-family: 'Outfit', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: var(--space-xs);
}

.preview-bio {
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-bottom: var(--space-lg);
    max-width: 260px;
}

.preview-link-btn {
    display: block;
    width: 100%;
    max-width: 280px;
    padding: 0.75rem 1rem;
    margin-bottom: var(--space-sm);
    border-radius: var(--radius-md);
    background: var(--theme-color);
    color: #fff;
    font-weight: 600;
    font-size: 0.85rem;
    text-align: center;
    transition: all var(--transition-base);
    border: none;
    cursor: pointer;
}

.preview-link-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

/* ---------- ANIMATED BACKGROUND ---------- */
.bg-orbs {
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    overflow: hidden;
}

.bg-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    will-change: transform;
}

.bg-orb-1 {
    width: 500px;
    height: 500px;
    top: -15%;
    left: -10%;
    background: radial-gradient(circle, rgba(108, 92, 231, 0.25) 0%, transparent 70%);
    animation: orb-drift-1 18s ease-in-out infinite;
}

.bg-orb-2 {
    width: 400px;
    height: 400px;
    bottom: -10%;
    right: -8%;
    background: radial-gradient(circle, rgba(108, 92, 231, 0.15) 0%, transparent 70%);
    animation: orb-drift-2 22s ease-in-out infinite;
}

.bg-orb-3 {
    width: 350px;
    height: 350px;
    top: 40%;
    right: 15%;
    background: radial-gradient(circle, rgba(158, 142, 255, 0.2) 0%, transparent 70%);
    animation: orb-drift-3 20s ease-in-out infinite;
}

.bg-orb-4 {
    width: 300px;
    height: 300px;
    bottom: 25%;
    left: 10%;
    background: radial-gradient(circle, rgba(108, 92, 255, 0.18) 0%, transparent 70%);
    animation: orb-drift-4 25s ease-in-out infinite;
}

@keyframes orb-drift-1 {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    25% {
        transform: translate(60px, 40px) scale(1.1);
    }

    50% {
        transform: translate(30px, 80px) scale(0.95);
    }

    75% {
        transform: translate(-20px, 50px) scale(1.05);
    }
}

@keyframes orb-drift-2 {

    0%,
    100% {
        transform: translate(0, 0) scale(1) rotate(0deg);
    }

    33% {
        transform: translate(-50px, -60px) scale(1.15) rotate(5deg);
    }

    66% {
        transform: translate(-80px, -20px) scale(0.9) rotate(-3deg);
    }
}

@keyframes orb-drift-3 {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    25% {
        transform: translate(-40px, 30px) scale(1.08);
    }

    50% {
        transform: translate(20px, -40px) scale(0.92);
    }

    75% {
        transform: translate(50px, 20px) scale(1.12);
    }
}

@keyframes orb-drift-4 {

    0%,
    100% {
        transform: translate(0, 0) scale(1) rotate(0deg);
    }

    20% {
        transform: translate(30px, -50px) scale(1.1) rotate(4deg);
    }

    40% {
        transform: translate(70px, -20px) scale(0.95) rotate(-2deg);
    }

    60% {
        transform: translate(40px, 40px) scale(1.08) rotate(3deg);
    }

    80% {
        transform: translate(-10px, 60px) scale(0.98) rotate(-4deg);
    }
}

/* Subtle grid overlay */
.bg-grid {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, black 0%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, black 0%, transparent 70%);
}

/* ---------- PUBLIC PROFILE PAGE ---------- */
.profile-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-xl);
    position: relative;
}

.profile-card {
    max-width: 460px;
    width: 100%;
    text-align: center;
    padding: var(--space-2xl) var(--space-xl);
    background: rgba(20, 20, 40, 0.65);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow:
        0 16px 64px rgba(0, 0, 0, 0.4),
        0 0 80px rgba(var(--theme-rgb, 108, 92, 231), 0.08);
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: var(--radius-full);
    overflow: hidden;
    margin: 0 auto var(--space-lg);
    border: 4px solid var(--theme-color);
    box-shadow: 0 0 30px rgba(var(--theme-rgb, 108, 92, 231), 0.25);
    animation: avatar-glow 4s ease-in-out infinite alternate;
}

@keyframes avatar-glow {
    0% {
        box-shadow: 0 0 20px rgba(var(--theme-rgb, 108, 92, 231), 0.2);
    }

    100% {
        box-shadow: 0 0 40px rgba(var(--theme-rgb, 108, 92, 231), 0.4);
    }
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-name {
    font-family: 'Outfit', sans-serif;
    font-size: 1.85rem;
    font-weight: 700;
    margin-bottom: var(--space-xs);
    background: linear-gradient(135deg, #fff 30%, rgba(var(--theme-rgb, 108, 92, 231), 0.8));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.profile-bio {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: var(--space-xl);
    line-height: 1.6;
}

/* ---- Profile Search ---- */
.profile-search {
    margin-bottom: var(--space-lg);
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 14px;
    font-size: 0.9rem;
    pointer-events: none;
    opacity: 0.5;
    z-index: 1;
}

.search-input {
    width: 100%;
    padding: 0.75rem 2.5rem 0.75rem 2.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xl);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    outline: none;
    transition: all var(--transition-base);
}

.search-input:focus {
    border-color: var(--theme-color, var(--primary));
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(var(--theme-rgb, 108, 92, 231), 0.15);
}

.search-input::placeholder {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.search-clear {
    position: absolute;
    right: 12px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.7rem;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    z-index: 1;
}

.search-clear:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
}

.search-hint {
    margin-top: 6px;
    text-align: center;
}

.search-hint-text {
    font-size: 0.72rem;
    color: var(--text-muted);
    opacity: 0.6;
}

.search-no-results {
    text-align: center;
    padding: var(--space-lg);
    color: var(--text-muted);
    font-size: 0.9rem;
    animation: fade-in 0.3s ease;
}

/* ---- Numbered Links ---- */
.profile-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.profile-link-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.profile-link-wrapper.link-hidden {
    opacity: 0;
    transform: scale(0.95) translateY(-5px);
    max-height: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
    pointer-events: none;
    gap: 0;
}

.profile-link-wrapper.link-visible {
    opacity: 1;
    transform: scale(1) translateY(0);
    max-height: 100px;
}

.link-number-badge {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(var(--theme-rgb, 108, 92, 231), 0.15);
    border: 1.5px solid rgba(var(--theme-rgb, 108, 92, 231), 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 700;
    color: rgba(var(--theme-rgb, 108, 92, 231), 1);
    font-family: 'Inter', sans-serif;
    transition: all var(--transition-base);
}

.profile-link-wrapper:hover .link-number-badge {
    background: rgba(var(--theme-rgb, 108, 92, 231), 0.3);
    transform: scale(1.1);
}

.profile-link-btn {
    display: block;
    flex: 1;
    padding: 0.9rem 1.25rem;
    border-radius: var(--radius-md);
    background: var(--theme-color);
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
    text-align: center;
    transition: all var(--transition-base);
    border: none;
    cursor: pointer;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.profile-link-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.6s ease;
}

.profile-link-btn:hover::before {
    left: 100%;
}

.profile-link-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(255, 255, 255, 0.1), transparent);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.profile-link-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
    color: #fff;
}

.profile-link-btn:hover::after {
    opacity: 1;
}

.link-title-text {
    position: relative;
    z-index: 1;
}

.profile-link-btn .click-count {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.7rem;
    opacity: 0.6;
    z-index: 1;
}

.profile-footer {
    margin-top: var(--space-2xl);
    color: var(--text-muted);
    font-size: 0.8rem;
}

.profile-footer a {
    font-weight: 600;
}

/* Profile not found */
.profile-not-found {
    text-align: center;
    padding: var(--space-3xl);
}

.profile-not-found .nf-icon {
    font-size: 4rem;
    margin-bottom: var(--space-lg);
    opacity: 0.3;
}

.profile-not-found h2 {
    margin-bottom: var(--space-sm);
}

.profile-not-found p {
    color: var(--text-secondary);
}

/* ---- Profile mobile responsive ---- */
@media (max-width: 500px) {
    .profile-card {
        padding: var(--space-xl) var(--space-md);
        border-radius: var(--radius-lg);
    }

    .profile-avatar {
        width: 100px;
        height: 100px;
    }

    .profile-name {
        font-size: 1.5rem;
    }

    .bg-orb {
        filter: blur(60px);
        opacity: 0.4;
    }

    .bg-orb-1 {
        width: 300px;
        height: 300px;
    }

    .bg-orb-2 {
        width: 250px;
        height: 250px;
    }

    .bg-orb-3 {
        width: 200px;
        height: 200px;
    }

    .bg-orb-4 {
        width: 180px;
        height: 180px;
    }
}

/* ---------- Loading / Spinner ---------- */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.page-loader {
    position: fixed;
    inset: 0;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity var(--transition-slow);
}

.page-loader.hidden {
    opacity: 0;
    pointer-events: none;
}

.page-loader .loader-icon {
    width: 48px;
    height: 48px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* ---------- Toast Notifications ---------- */
.toast-container {
    position: fixed;
    top: var(--space-xl);
    right: var(--space-xl);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.toast {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--space-md) var(--space-lg);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: var(--shadow-md);
    animation: slide-in 0.3s ease;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    min-width: 280px;
}

.toast.success {
    border-left: 3px solid var(--success);
}

.toast.error {
    border-left: 3px solid var(--danger);
}

.toast.info {
    border-left: 3px solid var(--primary);
}

@keyframes slide-in {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slide-out {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.toast.removing {
    animation: slide-out 0.3s ease forwards;
}

/* ---------- Modals ---------- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: var(--space-xl);
}

.modal-overlay.show {
    display: flex;
    animation: fade-in 0.2s ease;
}

@keyframes fade-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    max-width: 480px;
    width: 100%;
    box-shadow: var(--shadow-lg);
    animation: modal-pop 0.3s ease;
}

@keyframes modal-pop {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-lg);
}

.modal-header h3 {
    font-size: 1.2rem;
}

/* ---------- Section Titles ---------- */
.section-title {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: var(--space-md);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    background: linear-gradient(135deg, var(--primary-light), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--primary), transparent);
}

/* ---------- Animated Background Theme Picker ---------- */
.bg-theme-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.bg-theme-option {
    cursor: pointer;
    text-align: center;
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    padding: 8px;
    transition: all var(--transition-base);
    background: rgba(255, 255, 255, 0.03);
}

.bg-theme-option:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
}

.bg-theme-option.active {
    border-color: var(--primary);
    background: rgba(108, 92, 231, 0.1);
    box-shadow: 0 0 12px rgba(108, 92, 231, 0.15);
}

.bg-theme-preview {
    width: 100%;
    height: 60px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    position: relative;
    margin-bottom: 6px;
}

.bg-theme-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Mini preview thumbnails */
.bg-preview-none {
    background: rgba(255, 255, 255, 0.04);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--text-muted);
}

.bg-preview-aurora {
    background: linear-gradient(135deg, #1a0533 0%, #0a0a1a 40%, #0d1b2a 100%);
    overflow: hidden;
}

.bg-preview-aurora::before,
.bg-preview-aurora::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(12px);
    animation: mini-drift 3s ease-in-out infinite;
}

.bg-preview-aurora::before {
    width: 60%;
    height: 80%;
    top: -20%;
    left: 10%;
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.4), rgba(0, 206, 201, 0.2));
}

.bg-preview-aurora::after {
    width: 50%;
    height: 70%;
    bottom: -10%;
    right: 5%;
    background: linear-gradient(225deg, rgba(168, 132, 255, 0.3), rgba(108, 92, 231, 0.15));
    animation-delay: -1.5s;
}

.bg-preview-waves {
    background: linear-gradient(180deg, #0a0a1a 0%, #0d1b2a 100%);
    overflow: hidden;
}

.bg-preview-waves::before,
.bg-preview-waves::after {
    content: '';
    position: absolute;
    left: -10%;
    width: 120%;
    height: 40%;
    border-radius: 40%;
    animation: mini-wave 3s ease-in-out infinite;
}

.bg-preview-waves::before {
    bottom: -10%;
    background: rgba(108, 92, 231, 0.2);
}

.bg-preview-waves::after {
    bottom: -15%;
    background: rgba(108, 92, 231, 0.1);
    animation-delay: -1s;
}

.bg-preview-particles {
    background: #0a0a1a;
    overflow: hidden;
}

.bg-preview-particles::before {
    content: '· · ·\A· · ·\A· · ·';
    white-space: pre;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 10px;
    color: rgba(108, 92, 231, 0.5);
    letter-spacing: 8px;
    line-height: 14px;
    animation: mini-drift 4s ease-in-out infinite;
}

.bg-preview-mesh {
    background:
        radial-gradient(ellipse at 20% 30%, rgba(108, 92, 231, 0.3), transparent 60%),
        radial-gradient(ellipse at 80% 70%, rgba(0, 206, 201, 0.2), transparent 60%),
        radial-gradient(ellipse at 50% 50%, rgba(158, 132, 255, 0.15), transparent 60%),
        #0a0a1a;
    animation: mini-mesh-shift 4s ease-in-out infinite;
    background-size: 200% 200%;
}

.bg-preview-spotlight {
    background: #0a0a1a;
    overflow: hidden;
}

.bg-preview-spotlight::before {
    content: '';
    position: absolute;
    width: 120%;
    height: 120%;
    top: -20%;
    left: -10%;
    background: conic-gradient(from 0deg at 50% 120%, transparent 0deg, rgba(108, 92, 231, 0.15) 20deg, transparent 40deg);
    animation: mini-rotate 4s linear infinite;
}

@keyframes mini-drift {

    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(4px, -3px);
    }
}

@keyframes mini-wave {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

@keyframes mini-mesh-shift {

    0%,
    100% {
        background-position: 0% 0%;
    }

    50% {
        background-position: 100% 100%;
    }
}

@keyframes mini-rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* ---------- Profile Animated Background Themes ---------- */
.animated-bg-layer {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

/* ---- Aurora Theme ---- */
.aurora-bg {
    z-index: -1;
}

.aurora-ribbon {
    position: absolute;
    width: 150%;
    height: 60%;
    border-radius: 40%;
    filter: blur(60px);
    opacity: 0.7;
    will-change: transform;
}

.aurora-r1 {
    top: -30%;
    left: -20%;
    animation: aurora-flow-1 12s ease-in-out infinite;
}

.aurora-r2 {
    top: 10%;
    right: -30%;
    animation: aurora-flow-2 15s ease-in-out infinite;
}

.aurora-r3 {
    bottom: -20%;
    left: -10%;
    animation: aurora-flow-3 18s ease-in-out infinite;
}

@keyframes aurora-flow-1 {

    0%,
    100% {
        transform: translateX(0) rotate(0deg) scaleY(1);
    }

    25% {
        transform: translateX(5%) rotate(3deg) scaleY(1.1);
    }

    50% {
        transform: translateX(-3%) rotate(-2deg) scaleY(0.9);
    }

    75% {
        transform: translateX(4%) rotate(2deg) scaleY(1.05);
    }
}

@keyframes aurora-flow-2 {

    0%,
    100% {
        transform: translateX(0) rotate(0deg) scaleX(1);
    }

    33% {
        transform: translateX(-6%) rotate(-4deg) scaleX(1.1);
    }

    66% {
        transform: translateX(4%) rotate(3deg) scaleX(0.95);
    }
}

@keyframes aurora-flow-3 {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    20% {
        transform: translateY(-5%) rotate(2deg);
    }

    40% {
        transform: translateY(3%) rotate(-3deg);
    }

    60% {
        transform: translateY(-4%) rotate(1deg);
    }

    80% {
        transform: translateY(2%) rotate(-2deg);
    }
}

/* ---- Waves Theme ---- */
.waves-bg {
    z-index: -1;
}

.wave-svg {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 200%;
    height: auto;
    min-height: 200px;
}

.wave-1 {
    animation: wave-sway 8s ease-in-out infinite;
    bottom: -10px;
}

.wave-2 {
    animation: wave-sway 10s ease-in-out infinite reverse;
    bottom: -20px;
}

.wave-3 {
    animation: wave-sway 12s ease-in-out infinite;
    bottom: -30px;
}

@keyframes wave-sway {

    0%,
    100% {
        transform: translateX(0) translateY(0);
    }

    25% {
        transform: translateX(-5%) translateY(-8px);
    }

    50% {
        transform: translateX(-10%) translateY(0);
    }

    75% {
        transform: translateX(-5%) translateY(8px);
    }
}

/* ---- Particles Theme ---- */
.particles-canvas {
    z-index: -1;
    width: 100%;
    height: 100%;
}

/* ---- Gradient Mesh Theme ---- */
.mesh-bg {
    z-index: -1;
    background-size: 200% 200%;
    animation: mesh-shift 15s ease-in-out infinite;
}

@keyframes mesh-shift {

    0%,
    100% {
        background-position: 0% 0%;
        background-size: 200% 200%;
    }

    25% {
        background-position: 100% 0%;
        background-size: 220% 220%;
    }

    50% {
        background-position: 100% 100%;
        background-size: 180% 180%;
    }

    75% {
        background-position: 0% 100%;
        background-size: 210% 210%;
    }
}

/* ---- Spotlight Theme ---- */
.spotlight-bg {
    z-index: -1;
}

.spotlight-beam {
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    animation: spotlight-rotate 20s linear infinite;
}

.spot-1 {
    animation-duration: 20s;
}

.spot-2 {
    animation-duration: 28s;
    animation-direction: reverse;
}

.spot-3 {
    animation-duration: 35s;
}

@keyframes spotlight-rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .auth-wrapper {
        grid-template-columns: 1fr;
    }

    .auth-hero {
        display: none;
    }

    .dashboard {
        grid-template-columns: 1fr;
    }

    .preview-sidebar {
        position: static;
        order: -1;
    }

    .phone-frame {
        max-width: 320px;
    }
}

@media (max-width: 600px) {
    .container {
        padding: 0 var(--space-md);
    }

    .card {
        padding: var(--space-lg);
    }

    .auth-form-panel {
        padding: var(--space-xl) var(--space-lg);
    }

    .link-fields {
        grid-template-columns: 1fr;
    }

    .action-bar {
        flex-direction: column;
    }

    .navbar-brand span {
        display: none;
    }

    .toast-container {
        left: var(--space-md);
        right: var(--space-md);
    }

    .toast {
        min-width: auto;
    }
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ---------- Selection ---------- */
::selection {
    background: var(--primary);
    color: #fff;
}

/* ---------- Hidden utility ---------- */
.hidden {
    display: none !important;
}

/* ---------- Fade-in animation utility ---------- */
.fade-in {
    animation: fade-in 0.5s ease;
}