<style>
    /* =======================================================================
           CSS VARIABLES FOR THEMING
           ======================================================================= */
    :root {
        --card-bg: #ffffff;
        --bg-surface: #f8f9fa;
        --bg-body: #ffffff;
        --body-color: #1e293b;
        --secondary: #64748b;
        --muted: #94a3b8;
        --border-color: #e2e8f0;
        --border-color-light: #f1f5f9;
        --primary: #667eea;
        --primary-rgb: 102, 126, 234;
        --primary-dark: #5568d3;
        --accent: #764ba2;
        --accent-rgb: 118, 75, 162;
        --success: #10b981;
        --warning: #f59e0b;
        --info: #3b82f6;
        --danger: #ef4444;
        --glow-color: rgba(102,126,234,0.15);
    }

    [data-bs-theme="dark"] {
        --card-bg: #1e293b;
        --bg-surface: #0f172a;
        --bg-body: #0a0f1a;
        --body-color: #f1f5f9;
        --secondary: #94a3b8;
        --muted: #64748b;
        --border-color: #334155;
        --border-color-light: #1e293b;
        --primary: #818cf8;
        --primary-rgb: 129,140,248;
        --primary-dark: #6366f1;
        --accent: #a78bfa;
        --accent-rgb: 167,139,250;
        --success: #34d399;
        --warning: #fbbf24;
        --info: #60a5fa;
        --danger: #f87171;
        --glow-color: rgba(129,140,248,0.2);
    }

    /* =======================================================================
           PREMIUM OUTER BACKGROUND (Drift + Pulse)
           ======================================================================= */
    body {
        background: #0a0f14;
    }

    .register-wrapper {
        min-height: 100vh;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 2rem 1rem;
        position: relative;
        overflow: hidden;
        background: linear-gradient(90deg, #0a0f14 0%, #131b2b 20%, #080c0f 40%, #080b0f 60%, #080c0f 80%, #0a0f14 90%, #0a0f14 100%);
        background-size: 300% 300%;
        animation: outer-drift 17s ease-in-out infinite;
    }

    @keyframes outer-drift {
        0% {
            background-position: 0% 50%;
        }

        50% {
            background-position: 100% 50%;
        }

        100% {
            background-position: 0% 50%;
        }
    }

    /* Glow overlay */
    .register-wrapper::before {
        content: "";
        position: absolute;
        top: -20%;
        left: -20%;
        width: 140%;
        height: 140%;
        background: radial-gradient(circle at 30% 40%, rgba(118,75,250,0.22), transparent 60%), radial-gradient(circle at 70% 60%, rgba(102,126,234,0.20), transparent 70%);
        filter: blur(120px);
        opacity: 0.55;
        pointer-events: none;
        animation: outer-pulse 7s ease-in-out infinite, outer-glide 28s ease-in-out infinite;
    }

    @keyframes outer-pulse {
        0%, 100% {
            opacity: .45;
            transform: scale(1);
        }

        50% {
            opacity: .65;
            transform: scale(1.08);
        }
    }

    @keyframes outer-glide {
        0% {
            transform: translate(0,0) scale(1);
        }

        50% {
            transform: translate(6%,8%) scale(1.05);
        }

        100% {
            transform: translate(0,0) scale(1);
        }
    }

    /* Micro-texture */
    .register-wrapper::after {
        content: "";
        position: absolute;
        inset: 0;
        background: radial-gradient(circle, rgba(255,255,255,0.03), transparent 70%);
        opacity: 0.15;
        pointer-events: none;
    }

    /* =======================================================================
           REGISTER CARD
           ======================================================================= */
    .register-card {
        border-radius: 1.5rem;
        background: var(--card-bg);
        overflow: hidden;
        border: 1px solid var(--border-color);
        box-shadow: 0 20px 60px rgba(var(--primary-rgb), 0.15), 0 8px 24px rgba(0,0,0,0.1);
        animation: fadeInUp 0.8s ease-out;
        backdrop-filter: blur(20px);
        max-width: 550px;
        width: 100%;
        position: relative;
        z-index: 3;
    }

    /* Fade animation */
    @keyframes fadeInUp {
        0% {
            opacity: 0;
            transform: translateY(40px);
        }

        100% {
            opacity: 1;
            transform: translateY(0);
        }
    }

    [data-bs-theme="dark"] .register-card {
        box-shadow: 0 20px 60px rgba(var(--primary-rgb), 0.25), 0 8px 24px rgba(0, 0, 0, 0.4);
    }

    /* =======================================================================
           GRADIENT HEADER
           ======================================================================= */
    .card-header-premium {
        background: linear-gradient( 135deg, #667eea, #764ba2, #f093fb, #4facfe, #00f2fe );
        background-size: 300% 300%;
        animation: gradient-shift 15s ease infinite;
        padding: 2.5rem 2rem 1.5rem;
        text-align: center;
        position: relative;
    }

    @keyframes gradient-shift {
        0% {
            background-position: 0% 50%;
        }

        50% {
            background-position: 100% 50%;
        }

        100% {
            background-position: 0% 50%;
        }
    }

    .register-icon-wrapper {
        width: 70px;
        height: 70px;
        background: rgba(255,255,255,0.25);
        border-radius: 50%;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin-bottom: 1rem;
        backdrop-filter: blur(20px);
        border: 2px solid rgba(255,255,255,0.3);
        animation: float 4s ease-in-out infinite;
    }

        .register-icon-wrapper i {
            font-size: 2rem;
            color: white;
            filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
        }

    @keyframes float {
        0%, 100% {
            transform: translateY(0);
        }

        50% {
            transform: translateY(-15px);
        }
    }

    .card-title-premium {
        font-size: 1.75rem;
        font-weight: 800;
        color: white;
        margin-bottom: 0.25rem;
        text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
    }

    .card-subtitle-premium {
        color: rgba(255,255,255,0.9);
        font-size: 0.95rem;
        font-weight: 500;
        text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    }

    /* =======================================================================
           FORM CONTROLS
           ======================================================================= */
    .card-body-premium {
        padding: 2rem 2rem 2.5rem;
    }

    .form-group-premium {
        margin-bottom: 1.25rem;
    }

    .form-label-premium {
        font-weight: 600;
        margin-bottom: 0.5rem;
        color: var(--body-color);
        display: flex;
        align-items: center;
        gap: 0.5rem;
        font-size: 0.95rem;
    }

        .form-label-premium i {
            color: var(--primary);
            font-size: 1.1rem;
        }

    .form-control-premium {
        background: var(--bg-surface);
        border: 2px solid var(--border-color);
        border-radius: .75rem;
        padding: 0.875rem 1.25rem;
        width: 100%;
        font-weight: 500;
        transition: all .3s cubic-bezier(0.4, 0, 0.2, 1);
        color: var(--body-color);
        font-size: 0.95rem;
    }

        .form-control-premium::placeholder {
            color: var(--muted);
        }

        .form-control-premium:focus {
            border-color: var(--primary);
            box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.12), 0 8px 24px rgba(var(--primary-rgb), 0.1);
            background: var(--card-bg);
            outline: none;
            transform: translateY(-2px);
        }

        .form-control-premium:hover:not(:focus) {
            border-color: rgba(var(--primary-rgb), 0.5);
        }

    /* Password wrapper */
    .password-wrapper {
        position: relative;
    }

        .password-wrapper .form-control-premium {
            padding-right: 3rem;
        }

    .password-toggle {
        position: absolute;
        right: 1rem;
        top: 50%;
        transform: translateY(-50%);
        cursor: pointer;
        color: var(--muted);
        font-size: 1.2rem;
        transition: color 0.3s ease;
        z-index: 2;
    }

        .password-toggle:hover {
            color: var(--primary);
        }

    /* Validation messages */
    .text-danger {
        color: var(--danger) !important;
        font-size: 0.85rem;
        margin-top: 0.5rem;
        display: block;
        font-weight: 500;
    }

    /* Checkboxes */
    .form-check-premium {
        display: flex;
        align-items: flex-start;
        gap: .75rem;
        margin-bottom: 1rem;
    }

    .form-check-input-premium {
        width: 1.25rem;
        height: 1.25rem;
        border: 2px solid var(--border-color);
        border-radius: 0.375rem;
        background: var(--bg-surface);
        cursor: pointer;
        transition: all 0.3s ease;
        margin: 0;
        flex-shrink: 0;
        margin-top: 0.1rem;
    }

        .form-check-input-premium:checked {
            background: linear-gradient(135deg, var(--primary), var(--accent));
            border-color: var(--primary);
            box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.2);
        }

        .form-check-input-premium:focus {
            box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.2);
            outline: none;
        }

    .form-check-label-premium {
        color: var(--body-color);
        font-weight: 500;
        font-size: 0.9rem;
        cursor: pointer;
        user-select: none;
        line-height: 1.4;
    }

        .form-check-label-premium a {
            color: var(--primary);
            text-decoration: none;
            font-weight: 600;
            transition: color 0.3s ease;
        }

            .form-check-label-premium a:hover {
                color: var(--accent);
                text-decoration: underline;
            }

    /* Button */
    .btn-premium {
        background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
        color: white !important;
        font-weight: 700;
        padding: 1rem 2rem;
        border-radius: 0.75rem;
        border: none;
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 0 8px 24px rgba(var(--primary-rgb), 0.35), 0 4px 12px rgba(var(--primary-rgb), 0.2);
        position: relative;
        z-index: 1;
        overflow: hidden;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.75rem;
        width: 100%;
        cursor: pointer;
        font-size: 1.05rem;
        letter-spacing: 0.3px;
        margin-top: 1rem;
    }

        .btn-premium::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: linear-gradient( 90deg, transparent, rgba(255, 255, 255, 0.3), transparent );
            transform: translateX(-100%);
            pointer-events: none;
        }

        .btn-premium::after {
            content: '';
            position: absolute;
            top: 50%;
            left: 50%;
            width: 0;
            height: 0;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.5);
            transform: translate(-50%, -50%);
            transition: width 0.6s ease, height 0.6s ease;
            pointer-events: none;
        }

        .btn-premium:hover {
            transform: translateY(-3px);
            box-shadow: 0 12px 36px rgba(var(--primary-rgb), 0.5), 0 8px 16px rgba(var(--primary-rgb), 0.3);
            color: white !important;
        }

            .btn-premium:hover::before {
                animation: shimmer 1.5s ease-in-out;
            }

        .btn-premium:active {
            transform: translateY(-1px);
        }

            .btn-premium:active::after {
                width: 300px;
                height: 300px;
                transition: width 0s, height 0s;
            }

        .btn-premium i {
            font-size: 1.2rem;
            position: relative;
            z-index: 2;
            pointer-events: none;
        }

    @keyframes shimmer {
        0% {
            transform: translateX(-100%) translateY(-100%) rotate(45deg);
        }

        100% {
            transform: translateX(200%) translateY(200%) rotate(45deg);
        }
    }

    [data-bs-theme="dark"] .btn-premium {
        box-shadow: 0 8px 24px rgba(var(--primary-rgb), 0.4), 0 4px 12px rgba(0, 0, 0, 0.3);
    }

        [data-bs-theme="dark"] .btn-premium:hover {
            box-shadow: 0 12px 36px rgba(var(--primary-rgb), 0.6), 0 8px 16px rgba(0, 0, 0, 0.4);
        }

    /* Footer links */
    .register-footer {
        text-align: center;
        margin-top: 1.5rem;
        padding-top: 1.5rem;
        border-top: 2px solid var(--border-color);
        position: relative;
    }

        .register-footer::before {
            content: '';
            position: absolute;
            top: -1px;
            left: 50%;
            transform: translateX(-50%);
            width: 60px;
            height: 2px;
            background: linear-gradient(90deg, transparent, var(--primary), transparent);
        }

    .link-premium {
        color: var(--primary);
        text-decoration: none;
        font-weight: 600;
        font-size: 0.95rem;
        position: relative;
        display: inline-block;
        transition: all 0.3s ease;
    }

        .link-premium::after {
            content: '';
            position: absolute;
            bottom: -2px;
            left: 0;
            width: 0;
            height: 2px;
            background: linear-gradient(90deg, var(--primary), var(--accent));
            transition: width 0.3s ease;
        }

        .link-premium:hover {
            color: var(--accent);
            transform: translateX(2px);
        }

            .link-premium:hover::after {
                width: 100%;
            }

        .link-premium i {
            margin-left: 0.25rem;
            font-size: 0.85rem;
            transition: transform 0.3s ease;
        }

        .link-premium:hover i {
            transform: translateX(3px);
        }

    /* Alert messages */
    .alert-premium-success {
        background: rgba(16, 185, 129, 0.12);
        border: 1px solid rgba(16, 185, 129, 0.35);
        color: var(--body-color);
    }

    .alert-premium {
        border-radius: 0.75rem;
        padding: 1rem 1.25rem;
        margin-bottom: 1.5rem;
        border: 1px solid rgba(239, 68, 68, 0.3);
        background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(220, 38, 38, 0.1));
        color: var(--danger);
        animation: slideInDown 0.5s ease-out;
        font-weight: 500;
    }

        .alert-premium i {
            margin-right: 0.5rem;
            font-size: 1.1rem;
        }

    @keyframes slideInDown {
        from {
            opacity: 0;
            transform: translateY(-30px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    /* =======================================================================
           RESPONSIVE DESIGN
           ======================================================================= */
    @media (max-width: 768px) {
        .register-wrapper {
            padding: 1.5rem 1rem;
        }

        .register-card {
            border-radius: 1.25rem;
        }

        .card-header-premium {
            padding: 2rem 1.5rem 1.25rem;
        }

        .register-icon-wrapper {
            width: 60px;
            height: 60px;
            margin-bottom: 0.75rem;
        }

            .register-icon-wrapper i {
                font-size: 1.75rem;
            }

        .card-title-premium {
            font-size: 1.5rem;
        }

        .card-subtitle-premium {
            font-size: 0.9rem;
        }

        .card-body-premium {
            padding: 1.5rem 1.5rem 2rem;
        }

        .form-group-premium {
            margin-bottom: 1rem;
        }

        .btn-premium {
            padding: 0.875rem 1.5rem;
            font-size: 1rem;
        }
    }

    @media (max-width: 480px) {
        .card-body-premium {
            padding: 1.25rem 1.25rem 1.75rem;
        }

        .form-control-premium {
            padding: 0.75rem 1rem;
        }

        .btn-premium {
            padding: 0.875rem 1.25rem;
        }
    }
}

/* Vril Chat: break out of layout container for full-bleed register */
.register-page-host {
    margin-left: calc(-0.5 * var(--bs-gutter-x, 1.5rem));
    margin-right: calc(-0.5 * var(--bs-gutter-x, 1.5rem));
    width: calc(100% + var(--bs-gutter-x, 1.5rem));
    max-width: 100vw;
}