* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

/* Auth-nav flicker prevention
   Static pages include the Login nav item in HTML.
   We set html[data-auth-hint="in"] very early (inline head script) when a recent
   sessionStorage auth cache indicates the user is logged in, so Login stays hidden
   during navigation before the main JS updates the menu.
*/
html[data-auth-hint="in"] .nav-links li[data-auth-item="login"] {
    display: none !important;
}

/* Ensure sticky footer layout can always stretch to the viewport height */
html, body {
    height: 100%;
}

:root {
    --primary-color: #2563eb;
    --secondary-color: #3b82f6;
    --accent-color: #60a5fa;
    --dark-bg: #0a0e1a;
    --darker-bg: #050810;
    --card-bg: #111827;
    --card-hover: #1f2937;
    --light-bg: #f8fafc;
    --text-dark: #1e293b;
    --text-light: #ffffff;
    --text-gray: #9ca3af;
    --border-color: #1f2937;
    --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-3: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --gradient-4: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    --gradient-5: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 40px rgba(37, 99, 235, 0.6);

    /* Shared page background (mesh + dots) */
    --bg-orb1-rgb: 96, 165, 250;   /* blue */
    --bg-orb2-rgb: 167, 139, 250;  /* purple */
    --bg-orb3-rgb: 245, 158, 11;   /* amber */
    --bg-grid-rgb: 96, 165, 250;
    --bg-orb-opacity-1: 0.18;
    --bg-orb-opacity-2: 0.16;
    --bg-orb-opacity-3: 0.12;
    --bg-grid-opacity: 0.07;
    --bg-grid-size: 22px;

    /* Background v12 (live metaballs) palette defaults (overridden per page theme) */
    --bg12-c1: 56, 189, 248;   /* cyan */
    --bg12-c2: 99, 102, 241;   /* indigo */
    --bg12-c3: 168, 85, 247;   /* purple */
    --bg12-c4: 34, 197, 94;    /* green */
    --bg12-c5: 236, 72, 153;   /* pink */
    --bg12-c6: 245, 158, 11;   /* amber */

    /* Navbar accents (inherit from the current page theme) */
    --nav-accent-rgb: var(--bg-orb1-rgb);
    --nav-accent2-rgb: var(--bg-orb2-rgb);
}

/* Page background themes (same style, different colors) */
body.theme-home {
    --bg-orb1-rgb: 96, 165, 250;
    --bg-orb2-rgb: 236, 72, 153;
    --bg-orb3-rgb: 167, 139, 250;
    --bg-grid-rgb: 96, 165, 250;

    --bg12-c1: 96, 165, 250;   /* blue */
    --bg12-c2: 236, 72, 153;   /* pink */
    --bg12-c3: 167, 139, 250;  /* purple */
    --bg12-c4: 56, 189, 248;   /* cyan */
    --bg12-c5: 99, 102, 241;   /* indigo */
    --bg12-c6: 245, 158, 11;   /* amber */
}

body.theme-about {
    --bg-orb1-rgb: 96, 165, 250;
    --bg-orb2-rgb: 167, 139, 250;
    --bg-orb3-rgb: 16, 185, 129;
    --bg-grid-rgb: 96, 165, 250;

    --bg12-c1: 96, 165, 250;   /* blue */
    --bg12-c2: 167, 139, 250;  /* purple */
    --bg12-c3: 16, 185, 129;   /* green */
    --bg12-c4: 56, 189, 248;   /* cyan */
    --bg12-c5: 99, 102, 241;   /* indigo */
    --bg12-c6: 245, 158, 11;   /* amber */
}

body.theme-contact {
    --bg-orb1-rgb: 96, 165, 250;
    --bg-orb2-rgb: 167, 139, 250;
    --bg-orb3-rgb: 245, 158, 11;
    --bg-grid-rgb: 96, 165, 250;

    --bg12-c1: 96, 165, 250;   /* blue */
    --bg12-c2: 167, 139, 250;  /* purple */
    --bg12-c3: 245, 158, 11;   /* amber */
    --bg12-c4: 56, 189, 248;   /* cyan */
    --bg12-c5: 236, 72, 153;   /* pink */
    --bg12-c6: 16, 185, 129;   /* green */
}

body.theme-faq {
    --bg-orb1-rgb: 45, 212, 191;   /* teal */
    --bg-orb2-rgb: 236, 72, 153;   /* pink */
    --bg-orb3-rgb: 96, 165, 250;   /* blue */
    --bg-grid-rgb: 45, 212, 191;

    --bg12-c1: 45, 212, 191;   /* teal */
    --bg12-c2: 236, 72, 153;   /* pink */
    --bg12-c3: 96, 165, 250;   /* blue */
    --bg12-c4: 167, 139, 250;  /* purple */
    --bg12-c5: 56, 189, 248;   /* cyan */
    --bg12-c6: 245, 158, 11;   /* amber */
}

body.theme-addons {
    --bg-orb1-rgb: 16, 185, 129;
    --bg-orb2-rgb: 96, 165, 250;
    --bg-orb3-rgb: 167, 139, 250;
    --bg-grid-rgb: 96, 165, 250;

    --bg12-c1: 16, 185, 129;   /* green */
    --bg12-c2: 96, 165, 250;   /* blue */
    --bg12-c3: 167, 139, 250;  /* purple */
    --bg12-c4: 56, 189, 248;   /* cyan */
    --bg12-c5: 99, 102, 241;   /* indigo */
    --bg12-c6: 245, 158, 11;   /* amber */
}

body.theme-portfolio {
    --bg-orb1-rgb: 167, 139, 250;
    --bg-orb2-rgb: 96, 165, 250;
    --bg-orb3-rgb: 236, 72, 153;
    --bg-grid-rgb: 167, 139, 250;

    --bg12-c1: 167, 139, 250;  /* purple */
    --bg12-c2: 96, 165, 250;   /* blue */
    --bg12-c3: 236, 72, 153;   /* pink */
    --bg12-c4: 99, 102, 241;   /* indigo */
    --bg12-c5: 56, 189, 248;   /* cyan */
    --bg12-c6: 245, 158, 11;   /* amber */
}

body.theme-legal {
    --bg-orb1-rgb: 96, 165, 250;
    --bg-orb2-rgb: 148, 163, 184;
    --bg-orb3-rgb: 167, 139, 250;
    --bg-grid-rgb: 96, 165, 250;
    --bg-grid-opacity: 0.06;

    /* Softer legal palette */
    --bg12-c1: 96, 165, 250;   /* blue */
    --bg12-c2: 167, 139, 250;  /* purple */
    --bg12-c3: 148, 163, 184;  /* slate */
    --bg12-c4: 45, 212, 191;   /* teal */
    --bg12-c5: 99, 102, 241;   /* indigo */
    --bg12-c6: 245, 158, 11;   /* amber */
}

/* Legal pages (same background style, distinct per-page colors) */
body.theme-privacy {
    --bg-orb1-rgb: 96, 165, 250;   /* blue */
    --bg-orb2-rgb: 167, 139, 250;  /* purple */
    --bg-orb3-rgb: 45, 212, 191;   /* teal */
    --bg-grid-rgb: 96, 165, 250;
    --bg-grid-opacity: 0.06;

    --bg12-c1: 96, 165, 250;   /* blue */
    --bg12-c2: 167, 139, 250;  /* purple */
    --bg12-c3: 45, 212, 191;   /* teal */
    --bg12-c4: 56, 189, 248;   /* cyan */
    --bg12-c5: 99, 102, 241;   /* indigo */
    --bg12-c6: 148, 163, 184;  /* slate */
}

body.theme-terms {
    --bg-orb1-rgb: 16, 185, 129;   /* green */
    --bg-orb2-rgb: 96, 165, 250;   /* blue */
    --bg-orb3-rgb: 148, 163, 184;  /* slate */
    --bg-grid-rgb: 16, 185, 129;
    --bg-grid-opacity: 0.06;

    --bg12-c1: 16, 185, 129;   /* green */
    --bg12-c2: 96, 165, 250;   /* blue */
    --bg12-c3: 148, 163, 184;  /* slate */
    --bg12-c4: 45, 212, 191;   /* teal */
    --bg12-c5: 99, 102, 241;   /* indigo */
    --bg12-c6: 167, 139, 250;  /* purple */
}

body.theme-cookies {
    --bg-orb1-rgb: 245, 158, 11;   /* amber */
    --bg-orb2-rgb: 236, 72, 153;   /* pink */
    --bg-orb3-rgb: 167, 139, 250;  /* purple */
    --bg-grid-rgb: 245, 158, 11;
    --bg-grid-opacity: 0.06;

    --bg12-c1: 245, 158, 11;   /* amber */
    --bg12-c2: 236, 72, 153;   /* pink */
    --bg12-c3: 167, 139, 250;  /* purple */
    --bg12-c4: 96, 165, 250;   /* blue */
    --bg12-c5: 56, 189, 248;   /* cyan */
    --bg12-c6: 99, 102, 241;   /* indigo */
}

body.theme-auth {
    --bg-orb1-rgb: 96, 165, 250;
    --bg-orb2-rgb: 16, 185, 129;
    --bg-orb3-rgb: 167, 139, 250;
    --bg-grid-rgb: 96, 165, 250;

    --bg12-c1: 96, 165, 250;   /* blue */
    --bg12-c2: 16, 185, 129;   /* green */
    --bg12-c3: 167, 139, 250;  /* purple */
    --bg12-c4: 56, 189, 248;   /* cyan */
    --bg12-c5: 99, 102, 241;   /* indigo */
    --bg12-c6: 236, 72, 153;   /* pink */
}

body.theme-tools {
    --bg-orb1-rgb: 45, 212, 191;
    --bg-orb2-rgb: 167, 139, 250;
    --bg-orb3-rgb: 96, 165, 250;
    --bg-grid-rgb: 45, 212, 191;

    --bg12-c1: 45, 212, 191;   /* teal */
    --bg12-c2: 167, 139, 250;  /* purple */
    --bg12-c3: 96, 165, 250;   /* blue */
    --bg12-c4: 56, 189, 248;   /* cyan */
    --bg12-c5: 99, 102, 241;   /* indigo */
    --bg12-c6: 16, 185, 129;   /* green */
}

body.theme-error {
    --bg-orb1-rgb: 239, 68, 68;
    --bg-orb2-rgb: 245, 158, 11;
    --bg-orb3-rgb: 167, 139, 250;
    --bg-grid-rgb: 239, 68, 68;

    --bg12-c1: 239, 68, 68;    /* red */
    --bg12-c2: 245, 158, 11;   /* amber */
    --bg12-c3: 167, 139, 250;  /* purple */
    --bg12-c4: 236, 72, 153;   /* pink */
    --bg12-c5: 96, 165, 250;   /* blue */
    --bg12-c6: 99, 102, 241;   /* indigo */
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-light);
    background: var(--dark-bg);
    /* Hint to the browser that the page is dark so native menus (select dropdowns) match better */
    color-scheme: dark;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
}

/* Sticky footer: make main take remaining space so footer can sit at the bottom */
body > main {
    flex: 1 0 auto;
}

/* Sticky footer: keep footer at the bottom when content is short */
body > footer {
    margin-top: auto;
}

/* CRITICAL: Force disable ALL blur effects globally */
* {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

/* Allow blur ONLY on specific decorative elements that don't cover the page */
.decorative-blur-allowed {
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
}

#background-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -3;
    pointer-events: none;
    background: radial-gradient(1200px circle at 50% 10%, rgba(255, 255, 255, 0.04), transparent 45%),
        linear-gradient(160deg, #050810 0%, #070b17 45%, #050810 100%);
}

header, main, footer {
    position: relative;
    z-index: 1;
}

/* Desktop UI scaling: render the site at ~90% (similar to browser 90% zoom)
   NOTE: We counter-scale the fixed background layers so they still fully cover the viewport.
   Admin pages have their own scaling strategy and are excluded.
*/
@media (min-width: 1024px) {
    body:not(.page-admin) {
        zoom: 0.9;
    }
    body:not(.page-admin) #background-canvas,
    body:not(.page-admin)::before,
    body:not(.page-admin)::after {
        zoom: 1.1111111;
    }
}

/* Modal (used for ban notice on login) */
.bws-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    z-index: 3000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 18px;
    overflow: auto;
}

.bws-modal {
    width: min(720px, 100%);
    background: rgba(10, 14, 26, 0.92);
    border: 1px solid rgba(245, 158, 11, 0.30);
    border-radius: 18px;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.6);
    overflow: hidden;
    max-height: calc(100vh - 36px);
    display: flex;
    flex-direction: column;
    margin: 18px auto;
}

.bws-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 18px 18px 14px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(236, 72, 153, 0.06));
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.bws-modal-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: #fde68a;
}

.bws-modal-sub {
    margin-top: 2px;
    color: #cbd5e1;
    font-size: 0.95rem;
}

.bws-modal-close {
    appearance: none;
    border: 1px solid rgba(148, 163, 184, 0.20);
    background: rgba(15, 23, 42, 0.55);
    color: #e2e8f0;
    border-radius: 12px;
    width: 40px;
    height: 40px;
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
}

.bws-modal-close:hover {
    background: rgba(15, 23, 42, 0.75);
}

.bws-modal-body {
    padding: 18px;
    overflow: auto;
    flex: 1 1 auto;
    min-height: 0;
}

.bws-ban-row {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.10);
}

.bws-ban-row:last-child {
    border-bottom: none;
}

.bws-ban-label {
    color: #94a3b8;
    font-weight: 700;
}

.bws-ban-value {
    color: #e2e8f0;
}

.bws-modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding-top: 16px;
}

@media (max-width: 520px) {
    .bws-ban-row {
        grid-template-columns: 1fr;
    }
    .bws-modal-actions {
        flex-direction: column;
        align-items: stretch;
    }
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(900px circle at 12% 18%, rgba(var(--bg-orb1-rgb), calc(var(--bg-orb-opacity-1) + 0.06)) 0%, transparent 58%),
        radial-gradient(820px circle at 92% 14%, rgba(var(--bg-orb2-rgb), calc(var(--bg-orb-opacity-2) + 0.05)) 0%, transparent 60%),
        radial-gradient(980px circle at 50% 118%, rgba(var(--bg-orb3-rgb), calc(var(--bg-orb-opacity-3) + 0.05)) 0%, transparent 62%),
        conic-gradient(from 210deg at 55% 22%, rgba(var(--bg-orb2-rgb), 0.10), transparent 34%, rgba(var(--bg-orb1-rgb), 0.08), transparent 68%, rgba(var(--bg-orb3-rgb), 0.08)),
        radial-gradient(rgba(var(--bg-grid-rgb), var(--bg-grid-opacity)) 1px, transparent 1px);
    background-size: auto, auto, auto, auto, var(--bg-grid-size) var(--bg-grid-size);
    background-position: center, center, center, center, 0 0;
    -webkit-mask-image: radial-gradient(circle at 50% 16%, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 72%);
    mask-image: radial-gradient(circle at 50% 16%, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 72%);
    pointer-events: none;
    z-index: -2;
}

body::after {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(900px circle at 50% 18%, rgba(255, 255, 255, 0.035), transparent 55%),
        radial-gradient(1100px circle at 50% 120%, rgba(0, 0, 0, 0.55), transparent 60%),
        linear-gradient(180deg, rgba(0, 0, 0, 0.00) 0%, rgba(0, 0, 0, 0.18) 45%, rgba(0, 0, 0, 0.35) 100%);
    pointer-events: none;
    z-index: -1;
}

/* ==========================================
   Background v2 (preview on Home only)
   Add class `bg-v2` on <body> to enable.
   ========================================== */

body.bg-v2 {
    /* Base colors for v2 (can be customized per theme later) */
    --bg2-base-1: 3, 6, 16;     /* deep navy */
    --bg2-base-2: 6, 10, 26;    /* navy */
    --bg2-a1: 96, 165, 250;     /* blue */
    --bg2-a2: 167, 139, 250;    /* purple */
    --bg2-a3: 236, 72, 153;     /* pink */
}

/* Replace the canvas background with an aurora-style gradient */
body.bg-v2 #background-canvas {
    background:
        radial-gradient(1200px circle at 18% 12%, rgba(var(--bg2-a1), 0.18) 0%, transparent 60%),
        radial-gradient(1000px circle at 82% 16%, rgba(var(--bg2-a2), 0.16) 0%, transparent 62%),
        radial-gradient(1100px circle at 52% 118%, rgba(var(--bg2-a3), 0.14) 0%, transparent 62%),
        linear-gradient(160deg, rgb(var(--bg2-base-1)) 0%, rgb(var(--bg2-base-2)) 50%, rgb(var(--bg2-base-1)) 100%);
    background-size: 140% 140%, 140% 140%, 140% 140%, auto;
    background-position: 0% 0%, 100% 0%, 50% 100%, 0 0;
    animation: bg2-drift 18s ease-in-out infinite;
}

@keyframes bg2-drift {
    0%, 100% {
        background-position: 0% 0%, 100% 0%, 50% 100%, 0 0;
    }
    50% {
        background-position: 12% 6%, 88% 10%, 48% 94%, 0 0;
    }
}

/* Override mesh/dots overlays with a softer grain + vignette for v2 */
body.bg-v2::before {
    background:
        radial-gradient(900px circle at 30% 18%, rgba(255, 255, 255, 0.05) 0%, transparent 58%),
        radial-gradient(1100px circle at 70% 22%, rgba(255, 255, 255, 0.035) 0%, transparent 60%),
        radial-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px);
    background-size: auto, auto, 26px 26px;
    background-position: center, center, 0 0;
    -webkit-mask-image: radial-gradient(circle at 50% 14%, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 72%);
    mask-image: radial-gradient(circle at 50% 14%, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 72%);
    opacity: 0.9;
}

body.bg-v2::after {
    background:
        radial-gradient(900px circle at 50% 16%, rgba(255, 255, 255, 0.03), transparent 58%),
        radial-gradient(1100px circle at 50% 120%, rgba(0, 0, 0, 0.62), transparent 62%),
        linear-gradient(180deg, rgba(0, 0, 0, 0.00) 0%, rgba(0, 0, 0, 0.16) 45%, rgba(0, 0, 0, 0.36) 100%);
}

/* ==========================================
   Background v3 (preview on Home only)
   NO dots/grid pattern.
   Enable with class `bg-v3` on <body>.
   ========================================== */

body.bg-v3 {
    --bg3-base-1: 2, 6, 18;
    --bg3-base-2: 6, 10, 28;
    --bg3-blob-1: 99, 102, 241;   /* indigo */
    --bg3-blob-2: 34, 211, 238;   /* cyan */
    --bg3-blob-3: 244, 114, 182;  /* pink */
}

body.bg-v3 #background-canvas {
    background:
        radial-gradient(900px circle at 18% 18%, rgba(var(--bg3-blob-2), 0.18) 0%, transparent 62%),
        radial-gradient(1000px circle at 82% 22%, rgba(var(--bg3-blob-1), 0.16) 0%, transparent 64%),
        radial-gradient(1100px circle at 55% 118%, rgba(var(--bg3-blob-3), 0.14) 0%, transparent 65%),
        conic-gradient(from 210deg at 55% 18%, rgba(var(--bg3-blob-1), 0.08), transparent 30%, rgba(var(--bg3-blob-2), 0.06), transparent 62%, rgba(var(--bg3-blob-3), 0.06)),
        linear-gradient(160deg, rgb(var(--bg3-base-1)) 0%, rgb(var(--bg3-base-2)) 52%, rgb(var(--bg3-base-1)) 100%);
    background-size: 140% 140%, 140% 140%, 140% 140%, 140% 140%, auto;
    background-position: 0% 0%, 100% 0%, 50% 100%, 50% 0%, 0 0;
    animation: bg3-drift 22s ease-in-out infinite;
}

@keyframes bg3-drift {
    0%, 100% {
        background-position: 0% 0%, 100% 0%, 50% 100%, 50% 0%, 0 0;
    }
    50% {
        background-position: 10% 8%, 90% 12%, 48% 92%, 52% 6%, 0 0;
    }
}

/* Override existing mesh/dots overlays: keep only soft highlight + vignette (no dots) */
body.bg-v3::before {
    background:
        radial-gradient(900px circle at 28% 16%, rgba(255, 255, 255, 0.045) 0%, transparent 62%),
        radial-gradient(1100px circle at 72% 20%, rgba(255, 255, 255, 0.03) 0%, transparent 64%),
        linear-gradient(120deg, rgba(255, 255, 255, 0.018), transparent 38%, rgba(255, 255, 255, 0.014));
    background-size: auto, auto, auto;
    background-position: center, center, center;
    -webkit-mask-image: radial-gradient(circle at 50% 14%, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 72%);
    mask-image: radial-gradient(circle at 50% 14%, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 72%);
    opacity: 1;
}

body.bg-v3::after {
    background:
        radial-gradient(900px circle at 50% 18%, rgba(255, 255, 255, 0.028), transparent 60%),
        radial-gradient(1200px circle at 50% 120%, rgba(0, 0, 0, 0.66), transparent 65%),
        linear-gradient(180deg, rgba(0, 0, 0, 0.00) 0%, rgba(0, 0, 0, 0.14) 45%, rgba(0, 0, 0, 0.38) 100%);
}

/* ==========================================
   Background v4 (preview on Home only)
   NO dots/grid. Slow drift.
   Enable with class `bg-v4` on <body>.
   ========================================== */

body.bg-v4 {
    --bg4-base-1: 2, 6, 18;
    --bg4-base-2: 7, 12, 32;
    --bg4-g1: 56, 189, 248;   /* sky */
    --bg4-g2: 168, 85, 247;   /* purple */
    --bg4-g3: 34, 211, 238;   /* cyan */
    --bg4-g4: 244, 114, 182;  /* pink */
}

/* Main aurora layers (no dot pattern) */
body.bg-v4 #background-canvas {
    background:
        radial-gradient(900px circle at 18% 22%, rgba(var(--bg4-g3), 0.18) 0%, transparent 64%),
        radial-gradient(1000px circle at 86% 18%, rgba(var(--bg4-g2), 0.16) 0%, transparent 66%),
        radial-gradient(1100px circle at 52% 118%, rgba(var(--bg4-g4), 0.13) 0%, transparent 66%),
        conic-gradient(from 200deg at 50% 16%, rgba(var(--bg4-g1), 0.08), transparent 32%, rgba(var(--bg4-g2), 0.06), transparent 62%, rgba(var(--bg4-g4), 0.05)),
        linear-gradient(160deg, rgb(var(--bg4-base-1)) 0%, rgb(var(--bg4-base-2)) 55%, rgb(var(--bg4-base-1)) 100%);
    background-size: 150% 150%, 150% 150%, 150% 150%, 160% 160%, auto;
    background-position: 0% 0%, 100% 0%, 50% 100%, 50% 0%, 0 0;
    animation: bg4-drift 38s ease-in-out infinite;
}

@keyframes bg4-drift {
    0%, 100% {
        background-position: 0% 0%, 100% 0%, 50% 100%, 50% 0%, 0 0;
    }
    50% {
        background-position: 10% 7%, 90% 11%, 48% 94%, 52% 8%, 0 0;
    }
}

/* Soft highlight + vignette only (no dots) */
body.bg-v4::before {
    background:
        radial-gradient(900px circle at 28% 14%, rgba(255, 255, 255, 0.04) 0%, transparent 62%),
        radial-gradient(1100px circle at 72% 20%, rgba(255, 255, 255, 0.028) 0%, transparent 66%),
        linear-gradient(120deg, rgba(255, 255, 255, 0.012), transparent 40%, rgba(255, 255, 255, 0.010));
    background-size: auto, auto, auto;
    background-position: center, center, center;
    -webkit-mask-image: radial-gradient(circle at 50% 14%, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 72%);
    mask-image: radial-gradient(circle at 50% 14%, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 72%);
    opacity: 1;
}

body.bg-v4::after {
    background:
        radial-gradient(900px circle at 50% 16%, rgba(255, 255, 255, 0.024), transparent 60%),
        radial-gradient(1200px circle at 50% 120%, rgba(0, 0, 0, 0.68), transparent 66%),
        linear-gradient(180deg, rgba(0, 0, 0, 0.00) 0%, rgba(0, 0, 0, 0.12) 45%, rgba(0, 0, 0, 0.40) 100%);
}

/* ==========================================
   Background v5 (preview on Home only)
   Completely new look: soft horizon glow + moving light beams.
   NO dots/grid. Enable with class `bg-v5` on <body>.
   ========================================== */

body.bg-v5 {
    --bg5-base-1: 3, 7, 20;
    --bg5-base-2: 8, 12, 34;
    --bg5-glow-1: 34, 211, 238;  /* cyan */
    --bg5-glow-2: 16, 185, 129;  /* green */
    --bg5-glow-3: 245, 158, 11;  /* amber */
}

body.bg-v5 #background-canvas {
    /* Base nebula + subtle beams (no dots) */
    background:
        radial-gradient(1200px circle at 50% 115%, rgba(var(--bg5-glow-3), 0.14) 0%, transparent 62%),
        radial-gradient(900px circle at 18% 22%, rgba(var(--bg5-glow-1), 0.16) 0%, transparent 64%),
        radial-gradient(1000px circle at 86% 18%, rgba(var(--bg5-glow-2), 0.14) 0%, transparent 66%),
        repeating-linear-gradient(
            120deg,
            rgba(255, 255, 255, 0.00) 0px,
            rgba(255, 255, 255, 0.00) 240px,
            rgba(255, 255, 255, 0.018) 280px,
            rgba(255, 255, 255, 0.00) 340px,
            rgba(255, 255, 255, 0.00) 520px
        ),
        linear-gradient(160deg, rgb(var(--bg5-base-1)) 0%, rgb(var(--bg5-base-2)) 55%, rgb(var(--bg5-base-1)) 100%);
    background-size: 140% 140%, 140% 140%, 140% 140%, 260% 260%, auto;
    background-position: 50% 120%, 0% 0%, 100% 0%, 0% 0%, 0 0;
    animation: bg5-drift 48s ease-in-out infinite;
}

@keyframes bg5-drift {
    0%, 100% {
        background-position: 50% 120%, 0% 0%, 100% 0%, 0% 0%, 0 0;
    }
    50% {
        background-position: 50% 114%, 10% 8%, 90% 12%, 16% 10%, 0 0;
    }
}

/* Replace mesh/dots overlays with a clean highlight + vignette */
body.bg-v5::before {
    background:
        radial-gradient(1100px circle at 50% 10%, rgba(255, 255, 255, 0.045), transparent 62%),
        linear-gradient(90deg, rgba(255, 255, 255, 0.010), transparent 22%, rgba(255, 255, 255, 0.010));
    background-size: auto, auto;
    background-position: center, center;
    -webkit-mask-image: radial-gradient(circle at 50% 14%, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 74%);
    mask-image: radial-gradient(circle at 50% 14%, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 74%);
    opacity: 1;
}

body.bg-v5::after {
    background:
        radial-gradient(900px circle at 50% 18%, rgba(255, 255, 255, 0.022), transparent 60%),
        radial-gradient(1300px circle at 50% 120%, rgba(0, 0, 0, 0.70), transparent 66%),
        linear-gradient(180deg, rgba(0, 0, 0, 0.00) 0%, rgba(0, 0, 0, 0.10) 42%, rgba(0, 0, 0, 0.42) 100%);
}

/* ==========================================
   Background v6 (preview on Home only)
   Completely new look: smooth "liquid" gradients.
   NO dots/grid. Enable with class `bg-v6` on <body>.
   ========================================== */

body.bg-v6 {
    --bg6-base-1: 2, 6, 18;
    --bg6-base-2: 8, 12, 34;
    --bg6-a1: 59, 130, 246;   /* blue */
    --bg6-a2: 139, 92, 246;   /* violet */
    --bg6-a3: 16, 185, 129;   /* green */
    --bg6-a4: 245, 158, 11;   /* amber */
}

body.bg-v6 #background-canvas {
    background:
        radial-gradient(900px circle at 18% 18%, rgba(var(--bg6-a1), 0.18) 0%, transparent 64%),
        radial-gradient(1100px circle at 82% 22%, rgba(var(--bg6-a2), 0.16) 0%, transparent 66%),
        radial-gradient(1200px circle at 52% 118%, rgba(var(--bg6-a3), 0.14) 0%, transparent 66%),
        linear-gradient(115deg,
            rgba(var(--bg6-a4), 0.06) 0%,
            rgba(255, 255, 255, 0.00) 22%,
            rgba(var(--bg6-a1), 0.06) 48%,
            rgba(255, 255, 255, 0.00) 72%,
            rgba(var(--bg6-a2), 0.05) 100%
        ),
        linear-gradient(160deg, rgb(var(--bg6-base-1)) 0%, rgb(var(--bg6-base-2)) 55%, rgb(var(--bg6-base-1)) 100%);
    background-size: 150% 150%, 150% 150%, 150% 150%, 220% 220%, auto;
    background-position: 0% 0%, 100% 0%, 50% 100%, 0% 0%, 0 0;
    animation: bg6-flow 42s ease-in-out infinite;
}

@keyframes bg6-flow {
    0%, 100% {
        background-position: 0% 0%, 100% 0%, 50% 100%, 0% 0%, 0 0;
    }
    50% {
        background-position: 12% 10%, 88% 14%, 48% 92%, 18% 12%, 0 0;
    }
}

/* Clean overlays: subtle highlight + vignette only */
body.bg-v6::before {
    background:
        radial-gradient(1100px circle at 50% 10%, rgba(255, 255, 255, 0.045), transparent 62%),
        radial-gradient(900px circle at 50% 120%, rgba(0, 0, 0, 0.18), transparent 60%);
    background-size: auto, auto;
    background-position: center, center;
    -webkit-mask-image: radial-gradient(circle at 50% 14%, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 74%);
    mask-image: radial-gradient(circle at 50% 14%, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 74%);
    opacity: 1;
}

body.bg-v6::after {
    background:
        radial-gradient(900px circle at 50% 18%, rgba(255, 255, 255, 0.02), transparent 60%),
        radial-gradient(1300px circle at 50% 120%, rgba(0, 0, 0, 0.72), transparent 68%),
        linear-gradient(180deg, rgba(0, 0, 0, 0.00) 0%, rgba(0, 0, 0, 0.10) 42%, rgba(0, 0, 0, 0.44) 100%);
}

/* ==========================================
   Background v7 (preview on Home only)
   "Nebula ring + fog drift": conic glow (blurred) + deep fog.
   NO dots/grid. Enable with class `bg-v7` on <body>.
   ========================================== */

body.bg-v7 {
    --bg7-deep-1: 3, 5, 12;
    --bg7-deep-2: 7, 10, 28;
    --bg7-c1: 56, 189, 248;   /* cyan */
    --bg7-c2: 168, 85, 247;   /* purple */
    --bg7-c3: 34, 197, 94;    /* green */
    --bg7-c4: 251, 113, 133;  /* rose */
}

body.bg-v7 #background-canvas {
    background:
        radial-gradient(900px circle at 22% 28%, rgba(var(--bg7-c1), 0.14) 0%, transparent 62%),
        radial-gradient(1100px circle at 78% 26%, rgba(var(--bg7-c2), 0.13) 0%, transparent 66%),
        radial-gradient(1200px circle at 56% 116%, rgba(var(--bg7-c3), 0.10) 0%, transparent 66%),
        radial-gradient(900px circle at 50% 65%, rgba(255, 255, 255, 0.02) 0%, transparent 58%),
        linear-gradient(165deg, rgb(var(--bg7-deep-1)) 0%, rgb(var(--bg7-deep-2)) 52%, rgb(var(--bg7-deep-1)) 100%);
    background-size: 160% 160%, 170% 170%, 160% 160%, 150% 150%, auto;
    background-position: 0% 0%, 100% 0%, 50% 100%, 50% 50%, 0 0;
    animation: bg7-fog 56s ease-in-out infinite;
}

@keyframes bg7-fog {
    0%, 100% {
        background-position: 0% 0%, 100% 0%, 50% 100%, 50% 50%, 0 0;
    }
    50% {
        background-position: 10% 14%, 90% 12%, 48% 92%, 52% 48%, 0 0;
    }
}

/* Overlays: blurred conic "ring" + vignette (still no dots) */
body.bg-v7::before {
    background:
        conic-gradient(from 210deg at 52% 46%,
            rgba(var(--bg7-c1), 0.00) 0deg,
            rgba(var(--bg7-c1), 0.10) 38deg,
            rgba(var(--bg7-c2), 0.10) 92deg,
            rgba(var(--bg7-c4), 0.08) 150deg,
            rgba(var(--bg7-c3), 0.09) 220deg,
            rgba(var(--bg7-c1), 0.10) 300deg,
            rgba(var(--bg7-c1), 0.00) 360deg
        ),
        radial-gradient(1200px circle at 50% 38%, rgba(255, 255, 255, 0.035), transparent 66%),
        radial-gradient(1200px circle at 50% 120%, rgba(0, 0, 0, 0.30), transparent 62%);
    background-size: 180% 180%, auto, auto;
    background-position: 50% 50%, center, center;
    filter: blur(34px) saturate(1.05);
    opacity: 0.95;
    -webkit-mask-image: radial-gradient(circle at 50% 46%, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 72%);
    mask-image: radial-gradient(circle at 50% 46%, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 72%);
    animation: bg7-orbit 64s ease-in-out infinite;
}

@keyframes bg7-orbit {
    0%, 100% {
        transform: translate3d(0, 0, 0) rotate(0deg) scale(1.02);
    }
    50% {
        transform: translate3d(-1.2%, 1.0%, 0) rotate(18deg) scale(1.06);
    }
}

body.bg-v7::after {
    background:
        radial-gradient(900px circle at 50% 18%, rgba(255, 255, 255, 0.018), transparent 62%),
        radial-gradient(1400px circle at 50% 120%, rgba(0, 0, 0, 0.78), transparent 70%),
        linear-gradient(180deg, rgba(0, 0, 0, 0.00) 0%, rgba(0, 0, 0, 0.10) 44%, rgba(0, 0, 0, 0.48) 100%);
}

@media (prefers-reduced-motion: reduce) {
    body.bg-v7 #background-canvas,
    body.bg-v7::before {
        animation: none;
    }
}

/* ==========================================
   Background v8 (preview on Home only)
   Blurred colored "balls" drifting slowly around.
   NO dots/grid. Enable with class `bg-v8` on <body>.
   ========================================== */

body.bg-v8 {
    --bg8-base-1: 2, 6, 18;
    --bg8-base-2: 7, 10, 28;
    --bg8-b1: 59, 130, 246;   /* blue */
    --bg8-b2: 168, 85, 247;   /* purple */
    --bg8-b3: 16, 185, 129;   /* green */
    --bg8-b4: 236, 72, 153;   /* pink */
    --bg8-b5: 245, 158, 11;   /* amber */
    --bg8-b6: 56, 189, 248;   /* cyan */
}

/* The canvas stays fixed; we only use its CSS background */
body.bg-v8 #background-canvas {
    background:
        radial-gradient(circle at 50% 50%, rgba(var(--bg8-b1), 0.55) 0%, rgba(var(--bg8-b1), 0.00) 62%),
        radial-gradient(circle at 50% 50%, rgba(var(--bg8-b2), 0.50) 0%, rgba(var(--bg8-b2), 0.00) 62%),
        radial-gradient(circle at 50% 50%, rgba(var(--bg8-b3), 0.44) 0%, rgba(var(--bg8-b3), 0.00) 62%),
        radial-gradient(circle at 50% 50%, rgba(var(--bg8-b4), 0.46) 0%, rgba(var(--bg8-b4), 0.00) 62%),
        radial-gradient(circle at 50% 50%, rgba(var(--bg8-b5), 0.34) 0%, rgba(var(--bg8-b5), 0.00) 62%),
        radial-gradient(circle at 50% 50%, rgba(var(--bg8-b6), 0.38) 0%, rgba(var(--bg8-b6), 0.00) 62%),
        linear-gradient(165deg, rgb(var(--bg8-base-1)) 0%, rgb(var(--bg8-base-2)) 58%, rgb(var(--bg8-base-1)) 100%);

    background-repeat: no-repeat;

    /* Each "ball" is its own background layer with its own size */
    background-size:
        900px 900px,
        760px 760px,
        980px 980px,
        720px 720px,
        680px 680px,
        820px 820px,
        auto;

    background-position:
        12% 18%,
        78% 22%,
        50% 86%,
        88% 78%,
        18% 76%,
        52% 34%,
        0 0;

    /* Additive-ish blending so colors softly combine */
    background-blend-mode: screen, screen, screen, screen, screen, screen, normal;

    /* Make them "kugler" (blurred blobs) */
    filter: blur(26px) saturate(1.15);
    transform: translateZ(0);

    animation: bg8-drift 58s ease-in-out infinite;
}

@keyframes bg8-drift {
    0%, 100% {
        background-position:
            12% 18%,
            78% 22%,
            50% 86%,
            88% 78%,
            18% 76%,
            52% 34%,
            0 0;
    }
    50% {
        background-position:
            28% 30%,
            62% 14%,
            42% 74%,
            76% 62%,
            10% 58%,
            60% 46%,
            0 0;
    }
}

/* Remove any dot/mesh look for this version; keep only soft highlight + vignette */
body.bg-v8::before {
    background:
        radial-gradient(1200px circle at 50% 10%, rgba(255, 255, 255, 0.040), transparent 64%),
        radial-gradient(1200px circle at 50% 120%, rgba(0, 0, 0, 0.26), transparent 64%);
    -webkit-mask-image: radial-gradient(circle at 50% 22%, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 74%);
    mask-image: radial-gradient(circle at 50% 22%, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 74%);
    opacity: 1;
}

body.bg-v8::after {
    background:
        radial-gradient(1100px circle at 50% 120%, rgba(0, 0, 0, 0.78), transparent 70%),
        linear-gradient(180deg, rgba(0, 0, 0, 0.00) 0%, rgba(0, 0, 0, 0.10) 46%, rgba(0, 0, 0, 0.48) 100%);
}

@media (prefers-reduced-motion: reduce) {
    body.bg-v8 #background-canvas {
        animation: none;
    }
}

/* ==========================================
   Background v9 (preview on Home only)
   "Live plasma swirl": rotating blurred conic glows + slow drift.
   NO dots/grid. Enable with class `bg-v9` on <body>.
   ========================================== */

body.bg-v9 {
    --bg9-deep-1: 2, 6, 18;
    --bg9-deep-2: 8, 12, 34;

    --bg9-c1: 99, 102, 241;   /* indigo */
    --bg9-c2: 56, 189, 248;   /* cyan */
    --bg9-c3: 236, 72, 153;   /* pink */
    --bg9-c4: 34, 197, 94;    /* green */
    --bg9-c5: 245, 158, 11;   /* amber */
}

/* Keep the base dark; the motion happens in overlays */
body.bg-v9 #background-canvas {
    background:
        radial-gradient(1200px circle at 50% 120%, rgba(var(--bg9-c2), 0.06), transparent 62%),
        linear-gradient(165deg, rgb(var(--bg9-deep-1)) 0%, rgb(var(--bg9-deep-2)) 55%, rgb(var(--bg9-deep-1)) 100%);
}

/* First plasma layer */
body.bg-v9::before {
    background:
        conic-gradient(from 180deg at 50% 50%,
            rgba(var(--bg9-c2), 0.00) 0deg,
            rgba(var(--bg9-c2), 0.38) 40deg,
            rgba(var(--bg9-c1), 0.34) 95deg,
            rgba(var(--bg9-c3), 0.30) 160deg,
            rgba(var(--bg9-c4), 0.28) 235deg,
            rgba(var(--bg9-c5), 0.22) 300deg,
            rgba(var(--bg9-c2), 0.00) 360deg
        ),
        radial-gradient(1000px circle at 50% 10%, rgba(255, 255, 255, 0.03), transparent 66%);

    background-size: 140vmax 140vmax, auto;
    background-position: 50% 50%, center;
    filter: blur(70px) saturate(1.1);
    opacity: 0.85;

    -webkit-mask-image: radial-gradient(circle at 50% 50%, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 74%);
    mask-image: radial-gradient(circle at 50% 50%, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 74%);

    animation: bg9-spin-a 62s linear infinite;
}

@keyframes bg9-spin-a {
    0%   { transform: translate3d(-1.5%, -1.0%, 0) rotate(0deg) scale(1.05); }
    50%  { transform: translate3d( 1.2%,  0.8%, 0) rotate(180deg) scale(1.08); }
    100% { transform: translate3d(-1.5%, -1.0%, 0) rotate(360deg) scale(1.05); }
}

/* Second plasma layer + vignette */
body.bg-v9::after {
    background:
        conic-gradient(from 20deg at 46% 54%,
            rgba(var(--bg9-c3), 0.00) 0deg,
            rgba(var(--bg9-c3), 0.26) 60deg,
            rgba(var(--bg9-c5), 0.18) 140deg,
            rgba(var(--bg9-c2), 0.24) 210deg,
            rgba(var(--bg9-c1), 0.22) 300deg,
            rgba(var(--bg9-c3), 0.00) 360deg
        ),
        radial-gradient(1400px circle at 50% 120%, rgba(0, 0, 0, 0.80), transparent 70%),
        linear-gradient(180deg, rgba(0, 0, 0, 0.00) 0%, rgba(0, 0, 0, 0.10) 46%, rgba(0, 0, 0, 0.50) 100%);

    background-size: 150vmax 150vmax, auto, auto;
    background-position: 50% 50%, center, center;
    filter: blur(90px) saturate(1.05);
    opacity: 0.72;

    -webkit-mask-image: radial-gradient(circle at 50% 50%, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 78%);
    mask-image: radial-gradient(circle at 50% 50%, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 78%);

    animation: bg9-spin-b 78s linear infinite;
}

@keyframes bg9-spin-b {
    0%   { transform: translate3d( 1.3%,  1.1%, 0) rotate(0deg) scale(1.04); }
    50%  { transform: translate3d(-1.0%, -0.8%, 0) rotate(-160deg) scale(1.08); }
    100% { transform: translate3d( 1.3%,  1.1%, 0) rotate(-320deg) scale(1.04); }
}

@media (prefers-reduced-motion: reduce) {
    body.bg-v9::before,
    body.bg-v9::after {
        animation: none;
    }
}

/* ==========================================
   Background v10 (preview on Home only)
   "Live aurora ribbons" rendered in JS on #background-canvas.
   This version intentionally disables the CSS overlay layers.
   Enable with class `bg-v10` on <body>.
   ========================================== */

body.bg-v10 #background-canvas {
    background: transparent;
}

body.bg-v10::before,
body.bg-v10::after {
    background: none;
    -webkit-mask-image: none;
    mask-image: none;
    filter: none;
    opacity: 0;
}

/* ==========================================
   Background v11 (preview on Home only)
   "Live light curtains" rendered in JS on #background-canvas.
   Enable with class `bg-v11` on <body>.
   ========================================== */

body.bg-v11 #background-canvas {
    background: transparent;
}

body.bg-v11::before,
body.bg-v11::after {
    background: none;
    -webkit-mask-image: none;
    mask-image: none;
    filter: none;
    opacity: 0;
}

/* ==========================================
   Background v12 (preview on Home only)
   "Live metaballs" rendered in JS on #background-canvas.
   Enable with class `bg-v12` on <body>.
   ========================================== */

body.bg-v12 #background-canvas {
    background: transparent;
}

body.bg-v12::before {
    /* Soft top highlight (no dots) */
    background:
        radial-gradient(1200px circle at 50% 8%, rgba(255, 255, 255, 0.045), transparent 64%),
        radial-gradient(1200px circle at 50% 120%, rgba(0, 0, 0, 0.22), transparent 64%);
    -webkit-mask-image: radial-gradient(circle at 50% 18%, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 74%);
    mask-image: radial-gradient(circle at 50% 18%, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 74%);
    filter: none;
    opacity: 1;
}

/* Auth/tools pages: reduce the remaining top glow so it doesn't look like a "band" */
body.theme-tools.bg-v12::before {
    background:
        radial-gradient(1200px circle at 50% 7%, rgba(255, 255, 255, 0.020), transparent 70%),
        radial-gradient(1200px circle at 50% 120%, rgba(0, 0, 0, 0.18), transparent 68%);
    opacity: 0.85;
}

body.bg-v12::after {
    /* Stronger vignette to keep UI readable */
    background:
        radial-gradient(1400px circle at 50% 120%, rgba(0, 0, 0, 0.82), transparent 70%),
        linear-gradient(180deg, rgba(0, 0, 0, 0.05) 0%, rgba(0, 0, 0, 0.16) 46%, rgba(0, 0, 0, 0.56) 100%);
    -webkit-mask-image: none;
    mask-image: none;
    filter: none;
    opacity: 1;
}

body.theme-tools.bg-v12::after {
    /* Slightly softer vignette on tools pages to avoid a noticeable top strip */
    background:
        radial-gradient(1400px circle at 50% 120%, rgba(0, 0, 0, 0.78), transparent 72%),
        linear-gradient(180deg, rgba(0, 0, 0, 0.02) 0%, rgba(0, 0, 0, 0.14) 46%, rgba(0, 0, 0, 0.52) 100%);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 15px rgba(37, 99, 235, 0.4);
    }
    50% {
        box-shadow: 0 0 25px rgba(37, 99, 235, 0.6);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-6px);
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0);
    }
}

@keyframes rotateIn {
    from {
        opacity: 0;
        transform: rotate(-200deg) scale(0);
    }
    to {
        opacity: 1;
        transform: rotate(0) scale(1);
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

@keyframes wave {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(20deg); }
    75% { transform: rotate(-20deg); }
}

@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes borderRun {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes textGlow {
    0%, 100% {
        text-shadow: 0 0 10px rgba(96, 165, 250, 0.5),
                     0 0 20px rgba(96, 165, 250, 0.3);
    }
    50% {
        text-shadow: 0 0 20px rgba(96, 165, 250, 0.8),
                     0 0 40px rgba(96, 165, 250, 0.5),
                     0 0 60px rgba(96, 165, 250, 0.3);
    }
}

@keyframes scaleUp {
    from {
        transform: scale(0.5);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes glitch {
    0% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
    100% { transform: translate(0); }
}

@keyframes spotlight {
    0% { background-position: -500px 0; }
    100% { background-position: 500px 0; }
}

.animate-on-scroll {
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }
.delay-6 { animation-delay: 0.6s; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 30px;
    position: relative;
    z-index: 1;
}

/* Header & Navigation */
header {
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    color: var(--text-light);
    padding: 14px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-bottom: none;
}

header::before {
    display: none;
}

header:hover::before {
    opacity: 1;
}

header::after {
    display: none;
}

header.scrolled::after {
    opacity: 1;
    transform: scaleX(1);
}

header.scrolled {
    padding: 10px 0;
    box-shadow: none;
    border-bottom: none;
}

.skip-link {
    position: absolute;
    left: 12px;
    top: 10px;
    padding: 10px 14px;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(96, 165, 250, 0.35);
    border-radius: 10px;
    color: var(--text-light);
    text-decoration: none;
    transform: translateY(-140%);
    transition: transform 0.2s ease;
    z-index: 1100;
}

.skip-link:focus {
    transform: translateY(0);
    outline: none;
}

nav {
    max-width: 1180px;
    margin: 0 auto;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    gap: 16px;

    /* Floating pill */
    border-radius: 999px;
    background: rgba(10, 14, 26, 0.28);
    border: 1px solid rgba(var(--nav-accent-rgb), 0.18);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.42);
}

nav::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: radial-gradient(1200px 100px at 15% 0%, rgba(var(--nav-accent-rgb), 0.18), transparent 60%),
                radial-gradient(900px 90px at 85% 0%, rgba(var(--nav-accent2-rgb), 0.14), transparent 55%);
    opacity: 0.75;
    pointer-events: none;
}

nav::after {
    content: '';
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 8px;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg,
        transparent,
        rgba(var(--nav-accent-rgb), 0.55),
        rgba(var(--nav-accent2-rgb), 0.55),
        rgba(var(--nav-accent-rgb), 0.55),
        transparent);
    opacity: 0.0;
    transform: scaleX(0.92);
    transition: opacity 0.25s ease, transform 0.25s ease;
    pointer-events: none;
}

header.scrolled nav {
    background: rgba(10, 14, 26, 0.42);
    border-color: rgba(var(--nav-accent-rgb), 0.22);
}

header.scrolled nav::after {
    opacity: 1;
    transform: scaleX(1);
}

.logo {
    position: relative;
    z-index: 10;
}

.logo h1 {
    font-size: 1.45rem;
    font-weight: 800;
    background: linear-gradient(135deg, rgb(var(--nav-accent-rgb)) 0%, rgb(var(--nav-accent2-rgb)) 60%, rgb(var(--nav-accent-rgb)) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 140% 140%;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-shadow: 0 0 22px rgba(var(--nav-accent-rgb), 0.22);
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo h1::before {
    content: '';
    display: none;
}

@keyframes pulse-gem {
    0%, 100% { opacity: 0.8; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.1); }
}

@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.logo h1:hover {
    filter: drop-shadow(0 0 18px rgba(var(--nav-accent-rgb), 0.55));
}

.logo h1:focus-visible {
    outline: 2px solid rgba(var(--nav-accent-rgb), 0.6);
    outline-offset: 6px;
    border-radius: 10px;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 10;
    position: relative;
}

.mobile-menu-toggle span {
    width: 28px;
    height: 3px;
    background: linear-gradient(90deg, rgb(var(--nav-accent-rgb)), rgb(var(--nav-accent2-rgb)));
    border-radius: 3px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(9px, 9px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(9px, -9px);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 0.35rem;
    align-items: center;
    padding: 0;
    border-radius: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    position: relative;
    z-index: 10;
}

.nav-links li {
    position: relative;
}

.nav-links a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
    position: relative;
    display: inline-block;
    overflow: hidden;
    letter-spacing: 0.3px;
}

.nav-links a:focus-visible {
    outline: 2px solid rgba(var(--nav-accent-rgb), 0.55);
    outline-offset: 3px;
}

.nav-links a::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(var(--nav-accent-rgb), 0.14), rgba(var(--nav-accent2-rgb), 0.14));
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 12px;
}

.nav-links a::after {
    display: none;
}

.nav-links a:hover::before {
    opacity: 1;
}

.nav-links a:hover::after {
    transform: translateX(-50%) scaleX(1);
}

.nav-links a:hover {
    color: rgb(var(--nav-accent-rgb));
    transform: translateY(-1px);
    text-shadow: 0 2px 10px rgba(var(--nav-accent-rgb), 0.32);
}

.nav-links a.active {
    color: rgb(var(--nav-accent-rgb));
    background: rgba(var(--nav-accent-rgb), 0.14);
    border: 1px solid rgba(var(--nav-accent-rgb), 0.32);
    box-shadow: 0 4px 15px rgba(var(--nav-accent-rgb), 0.16),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.nav-links a.active::after {
    transform: translateX(-50%) scaleX(1);
}

/* Push auth items to the right on desktop */
.nav-links li[data-auth-item="login"],
.nav-links li[data-auth-item="profile"] {
    margin-left: auto;
}

/* Auth buttons */
.nav-links li[data-auth-item="profile"] a {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(var(--nav-accent-rgb), 0.20);
    font-weight: 700;
}

.nav-links li[data-auth-item="profile"] a:hover {
    background: rgba(var(--nav-accent-rgb), 0.12);
}

.nav-links li[data-auth-item="logout"] a {
    background: rgba(148, 163, 184, 0.08);
    border: 1px solid rgba(148, 163, 184, 0.22);
    color: rgba(226, 232, 240, 0.92);
    font-weight: 700;
}

.nav-links li[data-auth-item="logout"] a:hover {
    background: rgba(148, 163, 184, 0.12);
    border-color: rgba(148, 163, 184, 0.32);
    color: rgba(226, 232, 240, 1);
}

/* Special styling for login button */
.nav-links li[data-auth-item="login"] a {
    background: linear-gradient(135deg, rgba(var(--nav-accent-rgb), 0.22), rgba(var(--nav-accent2-rgb), 0.22));
    border: 1px solid rgba(var(--nav-accent-rgb), 0.40);
    padding: 0.75rem 1.5rem;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(var(--nav-accent-rgb), 0.22);
}

.nav-links li[data-auth-item="login"] a:hover {
    background: linear-gradient(135deg, rgba(var(--nav-accent-rgb), 0.30), rgba(var(--nav-accent2-rgb), 0.30));
    box-shadow: 0 6px 20px rgba(var(--nav-accent-rgb), 0.38);
    transform: translateY(-2px);
}

/* Mobile Navigation Overlay */
.nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: none;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 999;
}

.nav-overlay.active {
    opacity: 1;
    pointer-events: all;
}

/* Responsive Navigation */
@media (max-width: 768px) {
    nav {
        max-width: calc(100% - 24px);
        padding: 10px 14px;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 80%;
        max-width: 400px;
        background: rgba(15, 23, 42, 0.98);
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        padding: 2rem;
        border-radius: 0;
        border: none;
        box-shadow: -8px 0 32px rgba(0, 0, 0, 0.5);
        transition: right 0.5s cubic-bezier(0.4, 0, 0.2, 1);
        border-left: 1px solid rgba(96, 165, 250, 0.2);
    }
    
    .nav-links::before {
        content: '';
        position: absolute;
        inset: 0;
        background: linear-gradient(180deg,
            rgba(var(--nav-accent-rgb), 0.10) 0%,
            rgba(var(--nav-accent2-rgb), 0.10) 60%,
            rgba(var(--nav-accent-rgb), 0.08) 100%);
        opacity: 0.5;
    }
    
    .nav-links.active {
        right: 0;
    }
    
    .nav-links li {
        width: 100%;
        opacity: 0;
        transform: translateX(50px);
    }
    
    .nav-links.active li {
        opacity: 1;
        transform: translateX(0);
        animation: slideInRight 0.5s ease forwards;
    }
    
    .nav-links.active li:nth-child(1) { animation-delay: 0.1s; }
    .nav-links.active li:nth-child(2) { animation-delay: 0.15s; }
    .nav-links.active li:nth-child(3) { animation-delay: 0.2s; }
    .nav-links.active li:nth-child(4) { animation-delay: 0.25s; }
    .nav-links.active li:nth-child(5) { animation-delay: 0.3s; }
    .nav-links.active li:nth-child(6) { animation-delay: 0.35s; }
    
    @keyframes slideInRight {
        to {
            opacity: 1;
            transform: translateX(0);
        }
    }
    
    .nav-links a {
        width: 100%;
        text-align: center;
        padding: 1rem 2rem;
        font-size: 1.1rem;
        border-radius: 15px;
    }
}

/* Hero Section */
.hero {
    background: linear-gradient(180deg, var(--darker-bg) 0%, var(--dark-bg) 100%);
    color: var(--text-light);
    padding: 130px 20px 90px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Home: let the shared background show through at the top */
body.theme-home header {
    background: transparent;
}

body.theme-home header.scrolled {
    background: transparent;
}

body.theme-home .hero {
    background: transparent;
}

body.theme-home .hero::before {
    background: none;
}

body.theme-home .hero::after {
    opacity: 0;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 0%, rgba(37, 99, 235, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="50" height="50" patternUnits="userSpaceOnUse"><path d="M 50 0 L 0 0 0 50" fill="none" stroke="rgba(255,255,255,0.02)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.5;
}

/* Page Header */
.page-header {
    background: linear-gradient(180deg, var(--darker-bg) 0%, var(--dark-bg) 100%);
    color: var(--text-light);
    padding: 120px 20px 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Tool/authenticated pages: let the live background show through at the top */
body.theme-tools:not(.page-chat):not(.page-admin):not(.page-settings):not(.page-contracts):not(.page-contract) .page-header {
    background: linear-gradient(180deg, rgba(5, 8, 16, 0.35) 0%, rgba(10, 14, 26, 0.12) 100%);
}

/* Chat page: keep the header crisp (avoid seeing the blurred v12 canvas through it). */
body.page-chat.theme-tools .page-header {
    /* Let the live background show through (match Home's "transparent top"). */
    background: none !important;
    background-color: transparent !important;
    background-image: none !important;
    border-bottom: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

/* Admin + Account Settings: same transparent-top behavior (no blocking layer). */
body.page-admin.theme-tools .page-header,
body.page-settings.theme-tools .page-header {
    background: none !important;
    background-color: transparent !important;
    background-image: none !important;
    border-bottom: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

/* Chat page: no spotlight sweep on the header area. */
body.page-chat .page-header::before {
    display: none;
}

/* Chat page: keep the header crisp, but allow the live background to render normally. */
body.page-chat #background-canvas {
    display: block;
}

/* Chat page: remove the thin top stripe above the sidebar/header ("Conversations"). */
body.page-chat .chat-sidebar,
body.page-chat .chat-main {
    border-top: none;
}

body.page-chat .chat-sidebar-header,
body.page-chat .chat-main-header {
    border-bottom: none;
    background: rgba(17, 24, 39, 0.78);
}

body.theme-tools .page-header::before {
    display: none;
}

body.theme-tools .page-header h1,
body.theme-tools .page-header p {
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.55);
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(96, 165, 250, 0.1), transparent);
    animation: spotlight 8s linear infinite;
}

.page-header h1 {
    font-size: clamp(2.1rem, 4vw, 2.6rem);
    margin-bottom: 1rem;
    font-weight: 800;
    animation: slideInDown 0.8s ease forwards;
    position: relative;
    display: inline-block;
}

.page-header h1::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--secondary-color), var(--accent-color));
    animation: scaleUp 0.8s ease 0.5s forwards;
}

.page-header p {
    font-size: 1.05rem;
    color: var(--text-gray);
    max-width: 600px;
    margin: 0 auto;
    animation: fadeInUp 0.8s ease 0.3s forwards;
    opacity: 0;
}

.header-stats {
    display: flex;
    justify-content: center;
    gap: 36px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    animation: fadeInUp 0.8s ease 0.5s forwards;
    opacity: 0;
}

.stat-number {
    font-size: 1.7rem;
    font-weight: 700;
    background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    color: #94a3b8;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stats-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    animation: fadeInUp 0.8s ease 0.6s forwards;
    opacity: 0;
}

.stats-loading {
    color: #60a5fa;
    font-size: 0.9rem;
    font-weight: 500;
    animation: pulse 1.5s ease-in-out infinite;
}

.last-updated {
    color: #94a3b8;
    font-size: 0.85rem;
    opacity: 0.8;
    transition: opacity 0.3s ease-in-out;
}

.last-updated:hover {
    opacity: 1;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-content h2 {
    font-size: clamp(2rem, 4vw, 2.7rem);
    margin-bottom: 1rem;
    font-weight: 800;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    line-height: 1.3;
    animation: fadeInUp 0.8s ease forwards;
}

.hero-content p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 0.8s ease 0.2s forwards;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-content .cta-button {
    animation: fadeInUp 0.8s ease 0.4s forwards;
}

.cta-button {
    display: inline-block;
    background: var(--text-light);
    color: var(--primary-color);
    padding: 1rem 2.5rem;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease-in-out;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.cta-button::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;
}

.cta-button:hover::before {
    left: 100%;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    background: var(--accent-color);
    color: white;
}

.cta-button.secondary {
    background: transparent;
    border: 2px solid var(--secondary-color);
    color: var(--text-light);
}

.cta-button.secondary:hover {
    background: var(--secondary-color);
    color: white;
}

/* Features Section */
.features-section {
    padding: 80px 20px;
    background: var(--dark-bg);
}

.features-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--text-light);
    position: relative;
    display: inline-block;
    width: 100%;
}

.features-section h2::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--secondary-color), var(--accent-color), transparent);
    border-radius: 2px;
    animation: glow 2s ease-in-out infinite;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    background: var(--card-bg);
    padding: 2.5rem 2rem;
    border-radius: 15px;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: var(--secondary-color);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.2);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1.2rem;
    display: inline-block;
    transition: transform 0.3s ease;
}

.feature-card:hover .feature-icon {
    transform: scale(1.08);
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.8rem;
    color: var(--text-light);
    font-weight: 600;
}

.feature-card p {
    color: var(--text-gray);
    line-height: 1.7;
    font-size: 0.95rem;
}

/* CTA Section */
.cta-section {
    padding: 80px 20px;
    background: var(--darker-bg);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, rgba(37, 99, 235, 0.1) 0%, transparent 70%);
    animation: pulse 6s ease-in-out infinite;
}

.cta-section h2 {
    font-size: 2.5rem;
    margin-bottom: 1.2rem;
    color: var(--text-light);
    position: relative;
    z-index: 1;
    display: inline-block;
}

.cta-section h2::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--secondary-color), var(--accent-color), transparent);
    border-radius: 2px;
    animation: glow 2s ease-in-out infinite;
}

.cta-section p {
    font-size: 1.1rem;
    color: var(--text-gray);
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* About Content */
.about-content {
    padding: 80px 20px;
    background: var(--dark-bg);
}

.about-hero {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 60px;
    margin-bottom: 80px;
    align-items: start;
}

.about-hero-content {
    position: relative;
}

.hero-badge {
    display: inline-block;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(37, 99, 235, 0.1) 100%);
    border: 1px solid rgba(59, 130, 246, 0.4);
    color: #60a5fa;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 20px;
    letter-spacing: 1px;
}

.about-hero-content h2 {
    font-size: 3rem;
    margin-bottom: 25px;
    background: linear-gradient(135deg, #fff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.hero-description {
    font-size: 1.15rem;
    color: #cbd5e1;
    line-height: 1.8;
    margin-bottom: 30px;
}

.hero-highlights {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.highlight-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(59, 130, 246, 0.2);
    padding: 12px 20px;
    border-radius: 12px;
    color: #cbd5e1;
    font-weight: 500;
    transition: all 0.3s ease;
}

.highlight-item:hover {
    border-color: rgba(59, 130, 246, 0.5);
    background: rgba(15, 23, 42, 0.8);
    transform: translateY(-2px);
}

.highlight-icon {
    font-size: 1.5rem;
}

.about-hero-stats {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin-bottom: 5rem;
    align-items: center;
}

.about-text h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-light);
}

.about-text p {
    font-size: 1.1rem;
    color: var(--text-gray);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.about-stats {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.stat-card {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    padding: 25px;
    border-radius: 15px;
    border: 1px solid rgba(59, 130, 246, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.3);
}

.stat-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.stat-card .stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
    transition: all 0.3s;
    position: relative;
    z-index: 1;
}

.stat-card:hover .stat-number {
    transform: scale(1.05);
}

.stat-card .stat-label {
    font-size: 0.95rem;
    color: #94a3b8;
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
}

.stat-bar {
    height: 4px;
    background: rgba(59, 130, 246, 0.2);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.stat-progress {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6 0%, #60a5fa 100%);
    border-radius: 2px;
    transition: width 1s ease;
}

/* About page value cards (replaces public stats) */
.value-card {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    padding: 22px;
    border-radius: 15px;
    border: 1px solid rgba(59, 130, 246, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.value-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.value-card:hover::before {
    opacity: 1;
}

.value-card:hover {
    transform: translateY(-4px);
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 10px 26px rgba(59, 130, 246, 0.25);
}

.value-icon {
    font-size: 2rem;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

.value-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
    position: relative;
    z-index: 1;
}

.value-text {
    color: #94a3b8;
    font-size: 0.95rem;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

.services-section h2 {
    font-size: 2.5rem;
    margin-bottom: 50px;
    text-align: center;
    background: linear-gradient(135deg, #fff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.service-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.service-card {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    padding: 30px;
    border-radius: 15px;
    border: 1px solid rgba(59, 130, 246, 0.2);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 0;
    background: linear-gradient(180deg, #3b82f6, #60a5fa);
    transition: height 0.4s ease;
}

.service-card:hover::before {
    height: 100%;
}

.service-card:hover {
    transform: translateY(-8px);
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 15px 40px rgba(59, 130, 246, 0.3);
}

.service-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.service-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.service-card h3 {
    font-size: 1.4rem;
    margin: 0;
    color: #fff;
}

.service-card p {
    color: #cbd5e1;
    line-height: 1.7;
    margin-bottom: 20px;
    font-size: 1.05rem;
}

.service-features {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.service-features li {
    color: #94a3b8;
    font-size: 0.95rem;
    padding-left: 5px;
}

.service-features li::before {
    content: attr(data-icon);
    margin-right: 8px;
    color: #10b981;
}

.cta-banner {
    margin-top: 80px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(37, 99, 235, 0.05) 100%);
    border: 2px solid rgba(59, 130, 246, 0.3);
    border-radius: 20px;
    padding: 50px;
    position: relative;
    overflow: hidden;
}

.cta-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

.cta-content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
    justify-content: center;
}

.cta-icon {
    font-size: 4rem;
    animation: float 3s ease-in-out infinite;
}

.cta-text {
    flex: 1;
    min-width: 300px;
    text-align: center;
}

.cta-text h3 {
    font-size: 2rem;
    margin-bottom: 15px;
    color: #fff;
}

.cta-text p {
    color: #cbd5e1;
    font-size: 1.15rem;
    line-height: 1.6;
    margin: 0;
}

.cta-button {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    padding: 16px 35px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    white-space: nowrap;
    display: inline-block;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(59, 130, 246, 0.4);
}

.service-features li {
    color: #94a3b8;
    font-size: 0.95rem;
    padding-left: 5px;
}

.service-features li::before {
    content: attr(data-icon);
    margin-right: 8px;
    color: #10b981;
}

/* Addons Section */
.addons-section {
    padding: 80px 20px;
    background: var(--dark-bg);
}

.addons-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-light);
    font-weight: 700;
    position: relative;
    display: inline-block;
    width: 100%;
}

.addons-section h2::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--secondary-color), var(--accent-color), transparent);
    border-radius: 2px;
    animation: glow 2s ease-in-out infinite;
}

.addons-section .section-subtitle {
    text-align: center;
    font-size: 1.05rem;
    color: var(--text-gray);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.addons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.addon-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 16px;
    text-align: left;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.addon-card.featured {
    border: 2px solid rgba(59, 130, 246, 0.4);
    box-shadow: 0 0 40px rgba(59, 130, 246, 0.2);
}

.addon-image {
    width: 100%;
    height: auto;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    margin-bottom: 25px;
    background: #0a0e1a;
}

.addon-image img {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
    transition: transform 0.5s ease;
}

.addon-card:hover .addon-image img {
    transform: scale(1.03);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(10, 14, 26, 0.9) 100%);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.addon-card:hover .image-overlay {
    opacity: 1;
}

.preview-badge {
    background: rgba(59, 130, 246, 0.9);
    color: white;
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    backdrop-filter: none;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.preview-badge:hover {
    background: rgba(59, 130, 246, 1);
    transform: scale(1.03);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.45);
}

.addon-content {
    padding: 0;
}

.addon-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: bold;
    letter-spacing: 1px;
    box-shadow: 0 4px 10px rgba(245, 87, 108, 0.4);
    animation: pulse 2s ease-in-out infinite;
    z-index: 10;
}

.addon-header {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 25px;
}

.addon-meta {
    flex: 1;
}

.addon-meta h3 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #fff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.addon-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin: 25px 0;
    padding: 20px;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 12px;
}

.addon-stats .stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    text-align: center;
}

.addon-stats .stat-icon {
    font-size: 1.5rem;
}

.addon-stats .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #3b82f6;
}

.addon-stats .stat-label {
    font-size: 0.85rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.addon-wishlist {
    display: flex;
    align-items: center;
    gap: 10px;
}

.hearts {
    font-size: 1.2rem;
    animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.1); }
    50% { transform: scale(1); }
}

.wishlist-text {
    color: #94a3b8;
    font-size: 0.9rem;
}

.wishlist-text span {
    color: #ef4444;
    font-weight: 600;
}

.addon-rating {
    display: flex;
    align-items: center;
    gap: 10px;
}

.stars {
    font-size: 1rem;
    letter-spacing: 2px;
}

.rating-text {
    color: #94a3b8;
    font-size: 0.9rem;
}

.addon-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.addon-card:hover::before {
    opacity: 1;
}

.addon-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.25);
    border-color: var(--secondary-color);
    background: var(--card-hover);
}

.addon-icon {
    font-size: 2.5rem;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    width: 60px;
    height: 60px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.addon-card:hover .addon-icon {
    transform: scale(1.08) rotate(3deg);
}

.addon-description {
    color: #cbd5e1;
    line-height: 1.8;
    margin-bottom: 25px;
    font-size: 1.05rem;
}

.addon-features {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
}

.addon-features h4 {
    color: #3b82f6;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.addon-features ul {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    padding: 0;
    margin: 0;
}

.addon-features li {
    color: #cbd5e1;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
}

.addon-highlights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.highlight {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 15px;
    background: rgba(59, 130, 246, 0.05);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.highlight:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.4);
    transform: translateY(-1px);
}

.highlight-icon {
    font-size: 1.8rem;
    flex-shrink: 0;
}

.highlight strong {
    display: block;
    color: #fff;
    margin-bottom: 5px;
    font-size: 0.95rem;
}

.highlight p {
    color: #94a3b8;
    font-size: 0.85rem;
    margin: 0;
    line-height: 1.4;
}

.feature-icon {
    color: #10b981;
    font-weight: bold;
    font-size: 1.1rem;
}

.addon-tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.tag {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #60a5fa;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.tag:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.5);
    transform: translateY(-1px);
}

.addon-footer {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding-top: 25px;
    border-top: 1px solid rgba(59, 130, 246, 0.2);
}

.price-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.price-row {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.price-note {
    color: #94a3b8;
    font-size: 0.9rem;
}

.price-label {
    color: #94a3b8;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.button-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.buy-button.primary {
    flex: 1;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    justify-content: center;
}

.buy-button.secondary {
    background: rgba(59, 130, 246, 0.1);
    border: 2px solid rgba(59, 130, 246, 0.3);
    color: #60a5fa;
}

.buy-button.secondary:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.3);
}

.addon-card h3 {
    font-size: 1.35rem;
    margin-bottom: 0.8rem;
    color: var(--text-light);
    position: relative;
    z-index: 1;
    transition: all 0.3s ease-in-out;
    font-weight: 600;
}

.addon-card:hover h3 {
    color: var(--accent-color);
    text-shadow: 0 0 15px rgba(96, 165, 250, 0.3);
}

.addon-card p {
    color: var(--text-gray);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.price {
    font-size: 1.6rem;
    font-weight: bold;
    color: var(--secondary-color);
    margin-bottom: 1.2rem;
    position: relative;
    display: inline-block;
    transition: all 0.3s ease;
}

.addon-card:hover .price {
    transform: scale(1.03);
    color: var(--accent-color);
}

.buy-button {
    background: var(--secondary-color);
    color: white;
    border: none;
    padding: 0.75rem 1.8rem;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.buy-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.buy-button:hover::before {
    width: 300px;
    height: 300px;
}

.buy-button:hover {
    background: var(--primary-color);
    transform: scale(1.02);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.35);
}

.button-icon {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.buy-button:hover .button-icon {
    transform: translateX(3px);
}

.info-banner {
    margin-top: 60px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(37, 99, 235, 0.05) 100%);
    border: 2px solid rgba(59, 130, 246, 0.3);
    border-radius: 20px;
    padding: 40px;
    position: relative;
    overflow: hidden;
}

.info-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

.banner-content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
}

.banner-icon {
    font-size: 3rem;
    animation: float 3s ease-in-out infinite;
}

.banner-text {
    flex: 1;
    min-width: 300px;
}

.banner-text h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #fff;
}

.banner-text p {
    color: #cbd5e1;
    font-size: 1.05rem;
    line-height: 1.6;
    margin: 0;
}

.banner-button {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 14px 28px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.banner-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.4);
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Portfolio Section */
.portfolio-section {
    padding: 80px 20px;
    background: var(--darker-bg);
}

.portfolio-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-light);
    font-weight: 700;
    position: relative;
    display: inline-block;
    width: 100%;
}

.portfolio-section h2::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--secondary-color), var(--accent-color), transparent);
    border-radius: 2px;
    animation: glow 2s ease-in-out infinite;
}

.portfolio-section .section-subtitle {
    text-align: center;
    font-size: 1.05rem;
    color: var(--text-gray);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.portfolio-item {
    background: var(--card-bg);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid var(--border-color);
    position: relative;
}

.portfolio-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.15) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 2;
}

.portfolio-item:hover::after {
    opacity: 1;
}

.portfolio-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.25);
    border-color: var(--secondary-color);
}

.portfolio-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.portfolio-item:hover img {
    transform: scale(1.05);
}

.portfolio-content {
    padding: 1.5rem;
    position: relative;
    z-index: 3;
    transition: all 0.3s;
}

.portfolio-item:hover .portfolio-content {
    transform: translateY(-2px);
}

.portfolio-content h3 {
    font-size: 1.3rem;
    margin-bottom: 0.7rem;
    color: var(--text-light);
    transition: all 0.3s;
    font-weight: 600;
}

.portfolio-item:hover .portfolio-content h3 {
    color: var(--accent-color);
    text-shadow: 0 0 10px rgba(96, 165, 250, 0.25);
}

.portfolio-content p {
    color: var(--text-gray);
    margin-bottom: 1rem;
    line-height: 1.6;
    font-size: 0.95rem;
}

.portfolio-tag {
    display: inline-block;
    background: var(--secondary-color);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s;
}

.portfolio-item:hover .portfolio-tag {
    transform: scale(1.05);
    background: var(--accent-color);
    box-shadow: 0 3px 10px rgba(96, 165, 250, 0.4);
}

/* About Section */
.about-section {
    padding: 80px 20px;
    background: var(--dark-bg);
    text-align: center;
}

.about-section h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: var(--text-light);
    font-weight: 700;
    position: relative;
    display: inline-block;
}

.about-section h2::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--secondary-color), var(--accent-color), transparent);
    border-radius: 2px;
    animation: glow 2s ease-in-out infinite;
}

.about-section p {
    font-size: 1.05rem;
    max-width: 800px;
    margin: 1rem auto;
    color: var(--text-gray);
    line-height: 1.8;
}

/* Contact Section */
.contact-section {
    padding: 80px 20px;
    background: var(--darker-bg);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 50px;
    max-width: 1200px;
    margin: 0 auto;
}

.contact-form-wrapper {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 20px;
    padding: 40px;
    position: relative;
    overflow: hidden;
}

.contact-form-wrapper::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

.form-header {
    position: relative;
    z-index: 1;
    margin-bottom: 30px;
}

.form-header h2 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #fff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.form-header p {
    color: #94a3b8;
    font-size: 1rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 25px;
    position: relative;
    z-index: 1;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: all 0.3s ease;
}

.form-group.focused label {
    color: #3b82f6;
    transform: translateY(-2px);
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #cbd5e1;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.label-icon {
    font-size: 1.2rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 14px 18px;
    background: rgba(15, 23, 42, 0.5);
    border: 2px solid rgba(59, 130, 246, 0.2);
    border-radius: 12px;
    color: #fff;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3b82f6;
    background: rgba(15, 23, 42, 0.8);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.08);
    transform: translateY(-1px);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #64748b;
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 18px center;
    padding-right: 45px;
}

.form-group select option {
    background: #0f172a;
    color: #fff;
    padding: 10px;
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
    line-height: 1.6;
}

/* Choice controls (radio/checkbox) - make them feel more modern */
input[type="radio"],
input[type="checkbox"] {
    accent-color: rgb(var(--nav-accent-rgb));
}

.choice-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 8px;
}

.choice-option {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.choice-option input {
    position: absolute;
    opacity: 0;
    /* Do not disable pointer events; some browsers won't toggle reliably otherwise */
    pointer-events: auto;
    width: 1px;
    height: 1px;
}

.choice-option span {
    display: inline-flex;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 2px solid rgba(148, 163, 184, 0.22);
    background: rgba(15, 23, 42, 0.45);
    color: #e2e8f0;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

/* Square checkbox box + green checkmark */
.choice-option span::before {
    content: '';
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    border-radius: 4px;
    border: 2px solid rgba(148, 163, 184, 0.55);
    background: rgba(2, 6, 23, 0.35);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.22);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 14px;
    line-height: 1;
    margin-top: 2px;
    transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, color 0.18s ease;
}

.choice-option:hover span {
    transform: translateY(-1px);
    border-color: rgba(var(--nav-accent-rgb), 0.45);
}

.choice-option:focus-within span {
    box-shadow: 0 0 0 3px rgba(var(--nav-accent-rgb), 0.14);
    border-color: rgba(var(--nav-accent-rgb), 0.55);
}

.choice-option input:checked + span {
    border-color: rgba(var(--nav-accent-rgb), 0.65);
    background: linear-gradient(135deg, rgba(var(--nav-accent-rgb), 0.18), rgba(var(--nav-accent2-rgb), 0.16));
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}

.choice-option input:checked + span::before {
    content: '✓';
    color: #22c55e;
    border-color: rgba(34, 197, 94, 0.95);
    background: rgba(34, 197, 94, 0.14);
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.12), inset 0 0 0 1px rgba(0, 0, 0, 0.22);
}

.submit-button {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.submit-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.submit-button:hover::before {
    left: 100%;
}

.submit-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.35);
}

.submit-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.form-success {
    text-align: center;
    padding: 60px 30px;
    position: relative;
    z-index: 1;
}

.success-icon {
    font-size: 5rem;
    margin-bottom: 20px;
    animation: bounceIn 0.6s ease;
}

.form-success h3 {
    font-size: 2rem;
    color: #10b981;
    margin-bottom: 15px;
}

.form-success p {
    color: #94a3b8;
    font-size: 1.1rem;
    line-height: 1.6;
}

.contact-info-wrapper {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.info-card {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 20px;
    padding: 30px;
    transition: all 0.3s ease;
}

.info-card:hover {
    border-color: rgba(59, 130, 246, 0.4);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.2);
}

.info-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #fff;
}

.info-description {
    color: #94a3b8;
    margin-bottom: 25px;
    line-height: 1.6;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-method {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px;
    background: rgba(59, 130, 246, 0.05);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.contact-method:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.4);
    transform: translateX(5px);
}

.method-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.method-content {
    flex: 1;
}

.method-content h4 {
    color: #fff;
    margin-bottom: 5px;
    font-size: 1.1rem;
}

.method-content p {
    color: #94a3b8;
    margin: 0;
    font-size: 0.95rem;
}

.method-content a {
    color: #60a5fa;
    text-decoration: none;
    transition: color 0.3s ease;
}

.method-content a:hover {
    color: #3b82f6;
    text-decoration: underline;
}

.business-hours {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.hour-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: rgba(15, 23, 42, 0.5);
    border-radius: 8px;
}

.hour-row .day {
    color: #cbd5e1;
    font-weight: 500;
}

.hour-row .time {
    color: #60a5fa;
    font-weight: 600;
}

.hours-note {
    color: #94a3b8;
    font-size: 0.9rem;
    margin: 0;
    padding: 12px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 8px;
}

.info-card.highlight {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(37, 99, 235, 0.05) 100%);
    border: 2px solid rgba(59, 130, 246, 0.3);
    text-align: center;
}

.info-card.highlight .highlight-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    display: block;
}

.info-card.highlight h3 {
    margin-bottom: 15px;
}

.info-card.highlight p {
    color: #cbd5e1;
    margin-bottom: 25px;
    line-height: 1.7;
}

.info-button {
    display: inline-block;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    padding: 12px 28px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.info-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.4);
}

.features-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(59, 130, 246, 0.05);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.feature-item:hover {
    background: rgba(59, 130, 246, 0.1);
    transform: translateX(5px);
}

.feature-item .feature-icon {
    font-size: 1.5rem;
}

.feature-item span:last-child {
    color: #cbd5e1;
    font-size: 0.95rem;
}
    height: 400px;
}

.submit-button:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(37, 99, 235, 0.4);
}

/* Footer */
footer {
    background: var(--darker-bg);
    color: var(--text-gray);
    text-align: center;
    padding: 1.0rem 0;
    border-top: 1px solid var(--border-color);
    font-size: 0.9rem;
}

/* Many pages have inline styles inside the footer; keep it compact anyway */
footer .container p {
    line-height: 1.35;
}

footer .container p[style*="margin-top"] {
    margin-top: 4px !important;
}

footer .container p[style*="font-size"] {
    font-size: 0.82rem !important;
}

footer .container > div[style*="display: flex"] {
    margin-top: 8px !important;
    gap: 12px !important;
    font-size: 0.82rem !important;
}

.site-footer-meta {
    color: #94a3b8;
    font-size: 0.9rem;
    margin-top: 8px;
}

.site-footer-links {
    margin-top: 12px;
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
    font-size: 0.9rem;
}

.site-footer-links a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.3s ease;
}

.site-footer-links a:hover {
    color: #e2e8f0;
    text-decoration: underline;
}

.site-footer-sep {
    color: #475569;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        flex-direction: column;
        gap: 1rem;
    }

    .hero-content h2,
    .page-header h1 {
        font-size: 2rem;
    }

    .hero-content p {
        font-size: 1.1rem;
    }

    .features-section h2,
    .addons-section h2,
    .portfolio-section h2,
    .about-section h2,
    .cta-section h2 {
        font-size: 2rem;
    }

    .addons-grid,
    .portfolio-grid,
    .features-grid,
    .service-list {
        grid-template-columns: 1fr;
        max-width: 100%;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--card-bg);
    border-radius: 20px;
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideInDown 0.4s ease;
    border: 1px solid var(--border-color);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem;
    color: var(--text-gray);
    cursor: pointer;
    transition: color 0.3s;
    z-index: 1;
}

.modal-close:hover {
    color: var(--text-light);
}

.modal-body {
    padding: 2rem;
}

.modal-body h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: var(--text-light);
}

.modal-gallery {
    display: grid;
    gap: 1rem;
    margin-bottom: 2rem;
}

.modal-gallery img {
    width: 100%;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    transition: transform 0.3s;
    cursor: pointer;
}

.modal-gallery img:hover {
    transform: scale(1.02);
}

.modal-description h3 {
    font-size: 1.5rem;
    color: var(--text-light);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.modal-description p {
    color: var(--text-gray);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.modal-description ul {
    list-style: none;
    padding: 0;
    margin-bottom: 2rem;
}

.modal-description ul li {
    color: var(--text-gray);
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.modal-description ul li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--secondary-color);
    font-weight: bold;
}

.modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    margin-top: 2rem;
}

.modal-price {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--secondary-color);
}

.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: var(--darker-bg);
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}

/* ==========================================
   MODERN ADDONS PAGE STYLING
   ========================================== */

.addons-hero {
    position: relative;
    /* Match About/Portfolio: let the shared background show through */
    background: transparent;
    padding: 100px 20px 60px;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(37, 99, 235, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(96, 165, 250, 0.1) 0%, transparent 50%);
    animation: float 8s ease-in-out infinite;
}

.hero-badge {
    display: inline-block;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(37, 99, 235, 0.1));
    border: 1px solid rgba(96, 165, 250, 0.3);
    color: #60a5fa;
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 20px;
    letter-spacing: 0.5px;
    animation: fadeInUp 0.6s ease;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    background: linear-gradient(135deg, #fff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 0.6s ease 0.1s both;
}

.hero-subtitle {
    font-size: 1.05rem;
    color: #94a3b8;
    margin-bottom: 35px;
    animation: fadeInUp 0.6s ease 0.2s both;
}

.hero-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 25px;
    max-width: 900px;
    margin: 0 auto 30px;
    animation: fadeInUp 0.6s ease 0.3s both;
}

.hero-stat {
    background: rgba(17, 24, 39, 0.8);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 16px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s ease-in-out;
}

.hero-stat:hover {
    border-color: rgba(96, 165, 250, 0.5);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.2);
}

.hero-stat-icon {
    font-size: 1.8rem;
    filter: drop-shadow(0 0 10px rgba(96, 165, 250, 0.3));
}

.hero-stat-content {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.hero-stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: #60a5fa;
}

.hero-stat-label {
    font-size: 0.9rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.addons-showcase {
    padding: 60px 20px;
    /* Keep shared background visible behind the section */
    background: transparent;
}

.section-header {
    text-align: center;
    margin-bottom: 45px;
}

.section-header h2 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: #fff;
}

.section-header p {
    font-size: 1.1rem;
    color: #94a3b8;
}

.showcase-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 40px;
    max-width: 1400px;
    margin: 0 auto;
}

.modern-addon-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s ease-in-out;
    position: relative;
}

.modern-addon-card:hover {
    border-color: var(--secondary-color);
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(37, 99, 235, 0.2);
}

.addon-banner {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #0a0e1a;
}

.addon-banner-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease-in-out;
}

.modern-addon-card:hover .addon-banner-img {
    transform: scale(1.05);
}

.addon-badges {
    position: absolute;
    top: 15px;
    left: 15px;
    display: flex;
    gap: 10px;
    z-index: 10;
}

.badge {
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    backdrop-filter: none;
}

.badge-new {
    background: rgba(239, 68, 68, 0.9);
    color: white;
    animation: pulse 2s ease-in-out infinite;
}

.badge-featured {
    background: rgba(245, 158, 11, 0.9);
    color: white;
}

.addon-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(10, 14, 26, 0.95) 100%);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 30px;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.modern-addon-card:hover .addon-overlay {
    opacity: 1;
}

.overlay-btn {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease-in-out;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.overlay-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.4);
}

.addon-body {
    padding: 25px;
}

.addon-title-row {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 20px;
}

.addon-icon-wrap {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    width: 50px;
    height: 50px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 6px 15px rgba(59, 130, 246, 0.3);
}

.addon-icon {
    font-size: 1.6rem;
}

.addon-title-info {
    flex: 1;
}

.addon-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: #fff;
}

.addon-wishlist-info {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #94a3b8;
    font-size: 0.9rem;
}

.wishlist-icon {
    font-size: 1.1rem;
}

.addon-excerpt {
    color: #cbd5e1;
    line-height: 1.6;
    margin-bottom: 18px;
    font-size: 0.95rem;
}

.addon-stats-row {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    padding: 20px;
    background: rgba(15, 23, 42, 0.5);
    border-radius: 12px;
    border: 1px solid rgba(59, 130, 246, 0.1);
}

.mini-stat {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.mini-stat-icon {
    font-size: 1.3rem;
}

.mini-stat-value {
    font-weight: 600;
    color: #60a5fa;
    font-size: 1.1rem;
}

.addon-tags-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 25px;
}

.mini-tag {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease-in-out;
}

.mini-tag:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(96, 165, 250, 0.4);
    transform: translateY(-1px);
}

.addon-features-list {
    margin-bottom: 25px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    color: #cbd5e1;
    font-size: 0.95rem;
    border-bottom: 1px solid rgba(59, 130, 246, 0.1);
}

.feature-item:last-child {
    border-bottom: none;
}

.feature-check {
    color: #10b981;
    font-weight: 700;
    font-size: 1.1rem;
}

.addon-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 25px;
    border-top: 1px solid rgba(59, 130, 246, 0.2);
    gap: 20px;
    flex-wrap: wrap;
}

.addon-price-section {
    flex: 1;
}

.price-tag {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.price-amount {
    font-size: 1.6rem;
    font-weight: 700;
    color: #60a5fa;
}

.price-label {
    font-size: 0.85rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.addon-actions {
    display: flex;
    gap: 12px;
}

.btn {
    padding: 12px 25px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease-in-out;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

.btn-outline {
    background: transparent;
    color: #60a5fa;
    border: 2px solid rgba(96, 165, 250, 0.3);
}

.btn-outline:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(96, 165, 250, 0.5);
}

.custom-dev-cta {
    margin-top: 60px;
    padding: 35px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(37, 99, 235, 0.05));
    border: 2px solid rgba(59, 130, 246, 0.2);
    border-radius: 18px;
    position: relative;
    overflow: hidden;
}

.custom-dev-cta::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(96, 165, 250, 0.05) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

.cta-content {
    display: flex;
    align-items: center;
    gap: 30px;
    position: relative;
    z-index: 1;
}

.cta-icon {
    font-size: 3rem;
    filter: drop-shadow(0 0 15px rgba(96, 165, 250, 0.4));
}

.cta-text {
    flex: 1;
}

.cta-text h3 {
    font-size: 1.6rem;
    margin-bottom: 8px;
    color: #fff;
}

.cta-text p {
    color: #94a3b8;
    font-size: 1rem;
}

.cta-btn {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    padding: 15px 35px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease-in-out;
    white-space: nowrap;
}

.cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.4);
}

/* ==========================================
   MODERN PORTFOLIO PAGE STYLING
   ========================================== */

.portfolio-hero {
    /* Match About page: keep hero background transparent so the shared background shows through */
    background: transparent;
    padding: 100px 20px 60px;
    text-align: center;
}

.filter-tabs {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

.filter-tab {
    background: rgba(17, 24, 39, 0.8);
    border: 1px solid rgba(59, 130, 246, 0.2);
    color: #94a3b8;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
}

.filter-tab.active,
.filter-tab:hover {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
}

.portfolio-grid-modern {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 40px;
    margin-bottom: 80px;
}

.portfolio-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s ease-in-out;
    opacity: 1;
}

.portfolio-card:hover {
    border-color: var(--secondary-color);
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(37, 99, 235, 0.2);
}

.portfolio-image-wrap {
    position: relative;
    height: 240px;
    overflow: hidden;
    background: #0a0e1a;
}

.portfolio-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease-in-out;
}

.portfolio-card:hover .portfolio-image {
    transform: scale(1.05);
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(10, 14, 26, 0.7) 0%, rgba(10, 14, 26, 0.95) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.portfolio-card:hover .portfolio-overlay {
    opacity: 1;
}

.overlay-content {
    text-align: center;
    padding: 30px;
}

.overlay-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
    filter: drop-shadow(0 0 12px rgba(96, 165, 250, 0.5));
}

.overlay-content h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #fff;
}

.overlay-content p {
    color: #cbd5e1;
    margin-bottom: 20px;
}

.portfolio-badges {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    gap: 10px;
    z-index: 10;
}

.portfolio-badge {
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    backdrop-filter: none;
}

.portfolio-badge.new {
    background: rgba(239, 68, 68, 0.9);
    color: white;
}

.portfolio-badge.featured-badge {
    background: rgba(245, 158, 11, 0.9);
    color: white;
}

.portfolio-info {
    padding: 24px;
}

.portfolio-header {
    margin-bottom: 15px;
}

.portfolio-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: #fff;
}

.portfolio-category {
    color: #60a5fa;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.portfolio-description {
    color: #cbd5e1;
    line-height: 1.7;
    margin-bottom: 20px;
}

.portfolio-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(15, 23, 42, 0.5);
    border-radius: 10px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.meta-icon {
    font-size: 1.2rem;
}

.meta-value {
    color: #60a5fa;
    font-weight: 600;
    font-size: 0.95rem;
}

.portfolio-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tech-badge {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.coming-soon-content {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 30px;
    text-align: center;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05), rgba(37, 99, 235, 0.05));
}

.coming-soon-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    filter: drop-shadow(0 0 15px rgba(96, 165, 250, 0.3));
}

.coming-soon-content h3 {
    font-size: 1.5rem;
    margin-bottom: 8px;
    color: #fff;
}

.coming-soon-content p {
    color: #94a3b8;
    font-size: 1rem;
}

.portfolio-cta {
    display: inline-block;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    padding: 10px 25px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    margin-top: 10px;
    transition: all 0.3s ease-in-out;
}

.portfolio-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
}

.project-details-section {
    margin: 60px 0;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 35px;
    text-align: center;
    color: #fff;
}

.project-showcase {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 35px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 30px;
}

.project-showcase-images {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.main-showcase-image {
    width: 100%;
    height: 320px;
    border-radius: 10px;
    overflow: hidden;
    background: #0a0e1a;
}

.main-showcase-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.showcase-thumbnails {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.thumbnail {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease-in-out;
}

.thumbnail:hover,
.thumbnail.active {
    border-color: var(--secondary-color);
    transform: scale(1.05);
}

.project-showcase-content {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.showcase-icon {
    font-size: 2.5rem;
    filter: drop-shadow(0 0 12px rgba(96, 165, 250, 0.4));
}

.project-showcase-content h3 {
    font-size: 1.6rem;
    font-weight: 700;
    color: #fff;
}

.showcase-stats {
    display: flex;
    gap: 30px;
}

.showcase-stat {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.showcase-stat strong {
    font-size: 1.5rem;
    color: #60a5fa;
}

.showcase-stat span {
    font-size: 0.85rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.showcase-description {
    color: #cbd5e1;
    line-height: 1.7;
    font-size: 0.95rem;
}

.showcase-features h4 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: #fff;
}

.showcase-features ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.showcase-features li {
    color: #cbd5e1;
    font-size: 0.95rem;
    padding-left: 5px;
}

.showcase-actions {
    display: flex;
    gap: 15px;
    margin-top: auto;
}

.portfolio-cta-section {
    margin-top: 60px;
}

.cta-box {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(37, 99, 235, 0.05));
    border: 2px solid rgba(59, 130, 246, 0.2);
    border-radius: 18px;
    padding: 45px 30px;
    text-align: center;
}

.cta-box h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: #fff;
}

.cta-box p {
    font-size: 1.05rem;
    color: #94a3b8;
    margin-bottom: 30px;
}

.cta-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .showcase-grid {
        grid-template-columns: 1fr;
    }
    
    .project-showcase {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .portfolio-grid-modern,
    .showcase-grid {
        grid-template-columns: 1fr;
    }
    
    .cta-content {
        flex-direction: column;
        text-align: center;
    }
    
    .addon-footer,
    .addon-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .btn {
        justify-content: center;
    }
}

/* Accessibility polish */
:focus-visible {
    outline: 2px solid rgba(96, 165, 250, 0.65);
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}

/* Auth (login/register) */
.auth-section {
    padding: 28px 0 70px;
}

.auth-card {
    max-width: 520px;
    margin: 0 auto;
    background: rgba(17, 24, 39, 0.75);
    border: 1px solid rgba(59, 130, 246, 0.18);
    border-radius: 16px;
    padding: 26px 22px;
    box-shadow: 0 18px 60px rgba(0,0,0,0.35);
}

.auth-card h2 {
    margin-bottom: 6px;
}

.auth-subtitle {
    color: #94a3b8;
    margin-bottom: 18px;
    font-size: 0.95rem;
}

.auth-alert {
    border-radius: 12px;
    padding: 12px 12px;
    margin: 10px 0 16px;
    font-size: 0.95rem;
}

.auth-alert-error {
    background: rgba(239, 68, 68, 0.10);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #fecaca;
}

.auth-alert-success {
    background: rgba(34, 197, 94, 0.10);
    border: 1px solid rgba(34, 197, 94, 0.25);
    color: #bbf7d0;
}

.auth-form .form-group {
    margin-bottom: 14px;
}

.auth-footnote {
    margin-top: 14px;
    color: #94a3b8;
    font-size: 0.95rem;
    text-align: center;
}

.auth-footnote a {
    color: #60a5fa;
    text-decoration: none;
}

.auth-footnote a:hover {
    text-decoration: underline;
}

/* Chat */
.chat-section {
    padding: 24px 0 70px;
}

.chat-shell {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 14px;
    /* Keep the chat at a stable size and let the message list scroll. */
    height: clamp(560px, 72vh, 860px);
}

.chat-sidebar {
    background: rgba(17, 24, 39, 0.65);
    border: 1px solid rgba(59, 130, 246, 0.16);
    border-radius: 16px;
    overflow: hidden;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.chat-sidebar-header {
    padding: 14px 14px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    background: linear-gradient(180deg, rgba(37, 99, 235, 0.10), rgba(17, 24, 39, 0));
    position: relative;
}

.chat-new-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 38px;
    height: 38px;
    padding: 0;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    line-height: 1;
}

.chat-sidebar-title {
    font-weight: 700;
    letter-spacing: 0.2px;
}

.chat-sidebar-sub {
    color: #94a3b8;
    font-size: 0.9rem;
    margin-top: 2px;
}

.chat-sidebar-tools {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    flex-wrap: wrap;
    /* Leave room for the + new conversation button (absolute positioned on non-owner view). */
    padding-right: 54px;
}

.chat-ticket-lookup {
    display: flex;
    align-items: center;
    gap: 8px;
}

.chat-tool-input {
    width: 120px;
    padding: 9px 10px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(5, 8, 16, 0.5);
    color: #fff;
    outline: none;
}

.chat-tool-input:focus {
    border-color: rgba(96, 165, 250, 0.5);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.18);
}

.chat-tool-btn {
    padding: 9px 12px;
    border-radius: 12px;
    line-height: 1;
    white-space: nowrap;
}

.thread-list {
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    min-height: 0;
    overflow: auto;
}

.thread-empty {
    padding: 12px;
    border-radius: 12px;
    border: 1px dashed rgba(148, 163, 184, 0.22);
    color: #94a3b8;
    background: rgba(2, 6, 23, 0.25);
    font-size: 0.92rem;
}

.thread-item {
    display: flex;
    gap: 10px;
    padding: 10px 10px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    background: rgba(17, 24, 39, 0.55);
    cursor: pointer;
    transition: transform 0.12s ease, background 0.12s ease, border-color 0.12s ease;
}

.thread-item:hover {
    transform: translateY(-1px);
    background: rgba(31, 41, 55, 0.65);
    border-color: rgba(59, 130, 246, 0.25);
}

.thread-item.active {
    background: rgba(37, 99, 235, 0.12);
    border-color: rgba(96, 165, 250, 0.38);
}

.thread-avatar {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: rgba(59, 130, 246, 0.18);
}

.thread-meta {
    flex: 1;
    min-width: 0;
}

.thread-name {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-weight: 700;
    font-size: 0.98rem;
}

.thread-snippet {
    color: #94a3b8;
    font-size: 0.86rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 3px;
}

.thread-unread {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 20px;
    padding: 0 7px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    background: rgba(96, 165, 250, 0.18);
    border: 1px solid rgba(96, 165, 250, 0.35);
    color: #dbeafe;
}

.thread-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 20px;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
    border: 1px solid rgba(148, 163, 184, 0.18);
    color: #e5e7eb;
    margin-left: 6px;
}

.thread-badge-low {
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.28);
    color: #bbf7d0;
}

.thread-badge-medium {
    background: rgba(245, 158, 11, 0.14);
    border-color: rgba(245, 158, 11, 0.30);
    color: #fde68a;
}

.thread-badge-high {
    background: rgba(239, 68, 68, 0.14);
    border-color: rgba(239, 68, 68, 0.30);
    color: #fecaca;
}

.thread-badge-solved {
    background: rgba(34, 197, 94, 0.10);
    border-color: rgba(34, 197, 94, 0.22);
    color: #bbf7d0;
}

.chat-main {
    background: rgba(17, 24, 39, 0.65);
    border: 1px solid rgba(59, 130, 246, 0.16);
    border-radius: 16px;
    overflow: hidden;
    display: grid;
    grid-template-rows: auto 1fr auto auto;
    min-height: 0;
}

.chat-main-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    background: linear-gradient(180deg, rgba(37, 99, 235, 0.10), rgba(17, 24, 39, 0));
}

.chat-actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.chat-ticket {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    border: 1px solid rgba(96, 165, 250, 0.30);
    background: rgba(37, 99, 235, 0.12);
    color: #dbeafe;
    font-weight: 800;
    font-size: 0.9rem;
    letter-spacing: 0.2px;
    white-space: nowrap;
}

.chat-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
}

.chat-title-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(34, 197, 94, 0.8);
    box-shadow: 0 0 18px rgba(34, 197, 94, 0.35);
}

.chat-messages {
    padding: 14px;
    overflow: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 0;
}

/* Chat scrollbars (match dark theme) */
.chat-messages,
.thread-list,
.chat-command-menu {
    scrollbar-width: thin; /* Firefox */
    /* Use more opaque colors so the scrollbar doesn't look "blurry" on glassy backgrounds. */
    scrollbar-color: rgba(96, 165, 250, 0.70) rgba(2, 6, 23, 0.92);
}

.chat-messages::-webkit-scrollbar,
.thread-list::-webkit-scrollbar,
.chat-command-menu::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

.chat-messages::-webkit-scrollbar-track,
.thread-list::-webkit-scrollbar-track,
.chat-command-menu::-webkit-scrollbar-track {
    background: rgba(2, 6, 23, 0.92);
    border-radius: 999px;
}

.chat-messages::-webkit-scrollbar-thumb,
.thread-list::-webkit-scrollbar-thumb,
.chat-command-menu::-webkit-scrollbar-thumb {
    background: rgba(96, 165, 250, 0.62);
    border: 2px solid rgba(2, 6, 23, 0.92);
    border-radius: 999px;
}

.chat-messages::-webkit-scrollbar-thumb:hover,
.thread-list::-webkit-scrollbar-thumb:hover,
.chat-command-menu::-webkit-scrollbar-thumb:hover {
    background: rgba(96, 165, 250, 0.78);
}

/* Global scrollbars (site-wide) */
html {
    scrollbar-width: thin; /* Firefox */
    scrollbar-color: rgba(96, 165, 250, 0.70) rgba(2, 6, 23, 0.92);
}

* {
    scrollbar-width: thin; /* Firefox */
    scrollbar-color: rgba(96, 165, 250, 0.70) rgba(2, 6, 23, 0.92);
}

*::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

*::-webkit-scrollbar-track {
    background: rgba(2, 6, 23, 0.92);
}

*::-webkit-scrollbar-thumb {
    background: rgba(96, 165, 250, 0.62);
    border: 2px solid rgba(2, 6, 23, 0.92);
    border-radius: 999px;
}

*::-webkit-scrollbar-thumb:hover {
    background: rgba(96, 165, 250, 0.78);
}

.chat-msg {
    display: flex;
}

.chat-msg.mine {
    justify-content: flex-end;
}

.chat-bubble {
    max-width: min(640px, 92%);
    border-radius: 16px;
    padding: 10px 12px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    background: rgba(31, 41, 55, 0.55);
}

.chat-msg.mine .chat-bubble {
    background: rgba(37, 99, 235, 0.16);
    border-color: rgba(96, 165, 250, 0.30);
}

.chat-body {
    white-space: pre-wrap;
    word-wrap: break-word;
    color: #e5e7eb;
}

.chat-meta {
    margin-top: 6px;
    font-size: 0.78rem;
    color: rgba(148, 163, 184, 0.85);
}

.chat-composer {
    display: flex;
    gap: 10px;
    padding: 12px 14px 14px;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    position: relative;
}

.chat-command-menu {
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: calc(100% + 8px);
    z-index: 50;
    max-height: 220px;
    overflow: auto;
    padding: 6px;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(2, 6, 23, 0.92);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(10px);
}

.chat-command-item {
    padding: 10px 10px;
    border-radius: 12px;
    cursor: pointer;
    border: 1px solid transparent;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.chat-command-item:hover {
    background: rgba(31, 41, 55, 0.60);
    border-color: rgba(148, 163, 184, 0.18);
}

.chat-command-item.active {
    background: rgba(37, 99, 235, 0.16);
    border-color: rgba(96, 165, 250, 0.32);
}

.chat-command-name {
    font-weight: 800;
    color: #e5e7eb;
    letter-spacing: 0.2px;
}

.chat-command-desc {
    font-size: 0.86rem;
    color: #94a3b8;
}

.chat-input {
    flex: 1;
    padding: 12px 12px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(5, 8, 16, 0.5);
    color: #fff;
    outline: none;
}

.chat-input:focus {
    border-color: rgba(96, 165, 250, 0.5);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.18);
}

.chat-hint {
    padding: 0 14px 14px;
    color: #94a3b8;
    font-size: 0.9rem;
}

.chat-closed-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px 14px;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    background: rgba(17, 24, 39, 0.55);
}

.chat-closed-text {
    font-weight: 800;
    color: #bbf7d0;
    letter-spacing: 0.2px;
}

@media (max-width: 900px) {
    .chat-shell {
        grid-template-columns: 1fr;
        /* Mobile: still constrain overall height so messages scroll instead of growing the page. */
        height: calc(100vh - 220px);
    }

    .chat-sidebar {
        max-height: 260px;
    }

    .thread-list {
        max-height: 220px;
    }
}

/* Admin + Contracts */
.admin-section {
    padding: 24px 0 70px;
}

.admin-shell {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 14px;
    align-items: start;
}

.admin-nav {
    position: sticky;
    top: 92px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    border-radius: 16px;
    border: 1px solid rgba(59, 130, 246, 0.16);
    background: rgba(17, 24, 39, 0.65);
    box-shadow: 0 18px 60px rgba(0,0,0,0.35);
}

.admin-nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    background: rgba(17, 24, 39, 0.35);
    color: #cbd5e1;
    text-decoration: none;
    font-weight: 700;
    transition: transform 0.12s ease, background 0.12s ease, border-color 0.12s ease;
}

.admin-nav-link:hover {
    transform: translateY(-1px);
    border-color: rgba(96, 165, 250, 0.35);
    background: rgba(31, 41, 55, 0.55);
}

.admin-nav-link.active {
    color: #fff;
    border-color: rgba(96, 165, 250, 0.55);
    background: rgba(37, 99, 235, 0.16);
}

.admin-nav-ico {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: rgba(59, 130, 246, 0.18);
}

.admin-nav-foot {
    margin-top: 6px;
    padding-top: 10px;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.admin-content {
    min-width: 0;
}

.admin-segbar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.admin-seg {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid rgba(96, 165, 250, 0.22);
    color: #cbd5e1;
    text-decoration: none;
    background: rgba(17, 24, 39, 0.45);
    font-weight: 800;
    transition: transform 0.12s ease, background 0.12s ease, border-color 0.12s ease;
}

.admin-seg:hover {
    transform: translateY(-1px);
    border-color: rgba(96, 165, 250, 0.35);
    background: rgba(31, 41, 55, 0.55);
}

.admin-seg.active {
    color: #fff;
    border-color: rgba(96, 165, 250, 0.55);
    background: rgba(37, 99, 235, 0.16);
}

.admin-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.admin-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid rgba(96, 165, 250, 0.22);
    color: #cbd5e1;
    text-decoration: none;
    background: rgba(17, 24, 39, 0.45);
    transition: transform 0.12s ease, background 0.12s ease, border-color 0.12s ease;
}

.admin-tab:hover {
    transform: translateY(-1px);
    border-color: rgba(96, 165, 250, 0.35);
    background: rgba(31, 41, 55, 0.55);
}

.admin-tab.active {
    color: #fff;
    border-color: rgba(96, 165, 250, 0.5);
    background: rgba(37, 99, 235, 0.16);
}

.admin-alert {
    border-radius: 14px;
    padding: 12px 14px;
    margin-bottom: 14px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(17, 24, 39, 0.6);
}

.admin-alert-success {
    border-color: rgba(34, 197, 94, 0.25);
    background: rgba(34, 197, 94, 0.10);
    color: #bbf7d0;
}

.admin-alert-error {
    border-color: rgba(239, 68, 68, 0.25);
    background: rgba(239, 68, 68, 0.10);
    color: #fecaca;
}

.admin-alert-info {
    border-color: rgba(96, 165, 250, 0.25);
    background: rgba(96, 165, 250, 0.10);
    color: #dbeafe;
}

.admin-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    align-items: start;
}

.admin-card {
    background: rgba(17, 24, 39, 0.65);
    border: 1px solid rgba(59, 130, 246, 0.16);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 18px 60px rgba(0,0,0,0.35);
}

.admin-card-header {
    padding: 16px 16px 12px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    background: linear-gradient(180deg, rgba(37, 99, 235, 0.10), rgba(17, 24, 39, 0));
}

.admin-card-header h2 {
    font-size: 1.2rem;
    margin-bottom: 4px;
}

.admin-card-header p {
    color: #94a3b8;
    font-size: 0.95rem;
}

.admin-form {
    padding: 14px 16px 16px;
}

.admin-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    align-items: start;
}

.admin-form textarea,
.admin-form input[type="text"],
.admin-form select {
    width: 100%;
}

.admin-help {
    margin-top: 8px;
    color: #94a3b8;
    font-size: 0.88rem;
}

.admin-table-wrap {
    overflow: auto;
}

.admin-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.admin-table thead th {
    text-align: left;
    font-size: 0.82rem;
    letter-spacing: 0.35px;
    text-transform: uppercase;
    color: rgba(148, 163, 184, 0.9);
    padding: 12px 14px;
    background: rgba(5, 8, 16, 0.25);
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    position: sticky;
    top: 0;
    z-index: 1;
}

.admin-table tbody td {
    padding: 12px 14px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.10);
    color: #e5e7eb;
    vertical-align: top;
}

.admin-table tbody tr:hover td {
    background: rgba(31, 41, 55, 0.35);
}

/* Admin action helpers */
.admin-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

/* Admin live search */
.admin-search {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid rgba(96, 165, 250, 0.18);
    background: rgba(5, 8, 16, 0.35);
}

.admin-search:focus-within {
    border-color: rgba(var(--nav-accent-rgb), 0.55);
    box-shadow: 0 0 0 4px rgba(var(--nav-accent-rgb), 0.14);
}

.admin-search-icon {
    color: rgba(148, 163, 184, 0.95);
    font-weight: 900;
    width: 24px;
    text-align: center;
    user-select: none;
}

.admin-search-input {
    flex: 1 1 auto;
    width: 100%;
    border: none;
    outline: none;
    background: transparent;
    color: #e5e7eb;
    font-size: 0.98rem;
}

.admin-search-input::placeholder {
    color: rgba(148, 163, 184, 0.85);
}

.admin-search-clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(17, 24, 39, 0.35);
    color: #cbd5e1;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.86rem;
    transition: transform 0.12s ease, background 0.12s ease, border-color 0.12s ease;
}

.admin-search-clear:hover {
    transform: translateY(-1px);
    border-color: rgba(96, 165, 250, 0.35);
    background: rgba(31, 41, 55, 0.55);
}

.admin-search-hint {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid rgba(34, 197, 94, 0.22);
    background: rgba(34, 197, 94, 0.10);
    color: #86efac;
    font-weight: 800;
    font-size: 0.78rem;
    letter-spacing: 0.3px;
    user-select: none;
}

.admin-actions-stack {
    display: grid;
    gap: 10px;
}

.admin-table .btn {
    padding: 8px 12px;
    font-size: 0.92rem;
}

/* Collapsible panels inside admin tables (reduces vertical clutter) */
.admin-details {
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 14px;
    background: rgba(5, 8, 16, 0.35);
    padding: 10px 12px;
}

.admin-details summary {
    cursor: pointer;
    user-select: none;
    color: #e2e8f0;
    font-weight: 700;
}

.admin-details summary::marker {
    color: rgba(148, 163, 184, 0.85);
}

.admin-details-body {
    margin-top: 10px;
}

/* Admin table dropdowns (e.g., role changer) */
.admin-table select {
    padding: 8px 38px 8px 12px;
    border-radius: 10px;
    border: 2px solid rgba(148, 163, 184, 0.18);
    background: rgba(5, 8, 16, 0.55);
    color: #e2e8f0;
    font-size: 0.9rem;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.admin-table select:focus {
    outline: none;
    border-color: rgba(var(--nav-accent-rgb), 0.65);
    box-shadow: 0 0 0 3px rgba(var(--nav-accent-rgb), 0.14);
}

.admin-table select option {
    background: #0f172a;
    color: #fff;
}

.admin-link {
    color: #93c5fd;
    text-decoration: none;
}

.admin-link:hover {
    text-decoration: underline;
}

.pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(17, 24, 39, 0.35);
    color: #e5e7eb;
}

.pill-developer {
    border-color: rgba(139, 92, 246, 0.35);
    background: rgba(139, 92, 246, 0.10);
    color: #c4b5fd;
}

.pill-support {
    border-color: rgba(16, 185, 129, 0.35);
    background: rgba(16, 185, 129, 0.10);
    color: #6ee7b7;
}

.pill-user {
    border-color: rgba(96, 165, 250, 0.25);
    background: rgba(96, 165, 250, 0.08);
    color: #dbeafe;
}

.pill-signed {
    border-color: rgba(34, 197, 94, 0.30);
    background: rgba(34, 197, 94, 0.10);
    color: #bbf7d0;
}

.pill-pending {
    border-color: rgba(96, 165, 250, 0.25);
    background: rgba(96, 165, 250, 0.08);
    color: #dbeafe;
}

.contract-section {
    padding: 24px 0 70px;
}

.contract-card {
    background: rgba(17, 24, 39, 0.65);
    border: 1px solid rgba(59, 130, 246, 0.16);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 18px 60px rgba(0,0,0,0.35);
}

.contract-meta {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    background: linear-gradient(180deg, rgba(37, 99, 235, 0.10), rgba(17, 24, 39, 0));
}

.contract-meta-item span {
    display: block;
    color: #94a3b8;
    font-size: 0.82rem;
}

.contract-meta-item strong {
    display: block;
    margin-top: 3px;
    color: #fff;
    font-weight: 700;
}

.contract-body {
    padding: 16px;
    color: #e5e7eb;
    line-height: 1.8;
    background: rgba(5, 8, 16, 0.25);
}

.contract-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: flex-start;
    padding: 14px 16px 16px;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    flex-wrap: wrap;
}

.contract-final {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 14px 16px 16px;
}

.contract-final-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.25);
}

.contract-final-title {
    font-weight: 800;
}

.contract-final-sub {
    color: #94a3b8;
    font-size: 0.92rem;
    margin-top: 2px;
}

@media (max-width: 980px) {
    .admin-shell {
        grid-template-columns: 1fr;
    }

    .admin-nav {
        position: static;
        top: auto;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    .admin-nav-foot {
        width: 100%;
    }

    .admin-grid {
        grid-template-columns: 1fr;
    }

    .contract-meta {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .admin-form-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .contract-meta {
        grid-template-columns: 1fr;
    }
}

.chat-owner-note {
    margin: 12px 14px 0;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(2, 6, 23, 0.55);
    color: #cbd5e1;
    font-size: 0.92rem;
}

/* Auth pages (register/verify): transparent-top behavior (no blocking layer). */
body.page-register.theme-auth .page-header,
body.page-verify.theme-auth .page-header {
    background: none !important;
    background-color: transparent !important;
    background-image: none !important;
    border-bottom: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

/* Contracts pages: transparent-top behavior (no blocking layer). */
body.page-contracts.theme-tools .page-header,
body.page-contract.theme-tools .page-header {
    background: none !important;
    background-color: transparent !important;
    background-image: none !important;
    border-bottom: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

/* Disable the animated header sweep on pages where the header is transparent. */
body.page-register .page-header::before,
body.page-verify .page-header::before,
body.page-contracts .page-header::before,
body.page-contract .page-header::before {
    display: none;
}

/* Admin dialog (deny request) */
.admin-dialog {
    border: none;
    padding: 0;
    background: transparent;
    max-width: 520px;
    width: calc(100% - 24px);
}

.admin-dialog::backdrop {
    background: rgba(2, 6, 23, 0.72);
    backdrop-filter: blur(6px);
}

.admin-dialog-inner {
    border-radius: 16px;
    border: 1px solid rgba(96, 165, 250, 0.22);
    background: rgba(2, 6, 23, 0.92);
    box-shadow: 0 18px 60px rgba(0,0,0,0.55);
    padding: 14px;
}

.admin-dialog-title {
    font-size: 1.1rem;
    font-weight: 900;
    color: #fff;
}

.admin-dialog-sub {
    margin-top: 6px;
    color: #94a3b8;
    font-size: 0.95rem;
    line-height: 1.6;
}

.admin-dialog-textarea {
    width: 100%;
    margin-top: 10px;
    padding: 12px;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(5, 8, 16, 0.5);
    color: #fff;
    outline: none;
    resize: vertical;
}

.admin-dialog-textarea:focus {
    border-color: rgba(96, 165, 250, 0.5);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.18);
}

.admin-dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 12px;
    flex-wrap: wrap;
}