:root {
    --bg-primary: #030712;
    --bg-secondary: #0f172a;
    --accent-color: #8b5cf6;
    --accent-glow: rgba(139, 92, 246, 0.4);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --border-color: rgba(255, 255, 255, 0.1);
    --success-color: #10b981;
    --card-bg: rgba(15, 23, 42, 0.65);
    --button-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    width: 100vw;
    max-width: 100vw;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 2rem 0;
}

/* --- Background layer — single fixed root, children absolute inside it --- */
#onboarding-bg-layer {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

#onboarding-bg-tint {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background:
        radial-gradient(ellipse at 15% 15%, rgba(139, 92, 246, 0.18) 0%, transparent 45%),
        radial-gradient(ellipse at 85% 80%, rgba(217, 70, 239, 0.12) 0%, transparent 45%);
}

#onboarding-stars-canvas {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    display: block;
}

/* --- Content Layout --- */
#onboarding-container {
    width: 100%;
    max-width: 850px;
    padding: 2.5rem;
    margin: 0 auto;
    z-index: 10;
    position: relative;
    animation: container-reveal 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes container-reveal {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

header {
    text-align: center;
    margin-bottom: 5rem;
}

.logo {
    font-family: 'Outfit', sans-serif;
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 3rem;
    letter-spacing: -2px;
    color: white;
    text-decoration: none;
    display: inline-block;
}

.logo-white {
    color: white;
}

.logo-gradient {
    background: linear-gradient(135deg, #8b5cf6, #d946ef);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* --- Step Indicator (Refined) --- */
.step-indicator {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.25rem;
}

.step-circle {
    width: 42px;
    height: 42px;
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-secondary);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(5px);
}

.step-circle.active {
    background: #6366f1;
    color: white;
    border-color: #818cf8;
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.6);
    transform: scale(1.15);
}

.step-circle.completed {
    background: linear-gradient(135deg, #059669, #34d399);
    color: transparent;
    border-color: #34d399;
    box-shadow: 0 0 18px rgba(52, 211, 153, 0.4);
    font-size: 0;
}

.step-circle.completed::after {
    content: '✓';
    font-size: 1rem;
    font-weight: 900;
    color: white;
}

.step-line {
    width: 50px;
    height: 1px;
    background: linear-gradient(90deg, rgba(255,255,255,0.12) 0%, rgba(255,255,255,0.04) 100%);
}

.slide {
    display: none;
}

.slide.active {
    display: block;
}

/* --- Typography (Expensive Feel) --- */
h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 4rem;
    margin-bottom: 2rem;
    text-align: center;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -3px;
    color: #fff;
}

.text-gradient {
    background: linear-gradient(135deg, #818cf8, #d946ef);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 4rem;
    font-size: 1.4rem;
    font-weight: 300;
    letter-spacing: -0.5px;
}

/* --- Refined Glass Card --- */
.glass {
    background: var(--card-bg);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 32px;
    padding: 4rem;
    box-shadow:
        0 40px 100px -20px rgba(0, 0, 0, 0.7),
        inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
}

.glass::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.7), rgba(217, 70, 239, 0.7), transparent);
    border-radius: 32px 32px 0 0;
    pointer-events: none;
}

.glass::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0%, transparent 60%);
    border-radius: 32px;
    pointer-events: none;
}

.form-group {
    margin-bottom: 2.5rem;
}

label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #cbd5e1;
    text-transform: uppercase;
    letter-spacing: 2px;
}

input,
select {
    width: 100%;
    padding: 1.2rem 1.5rem;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    color: white;
    font-size: 1.15rem;
    outline: none;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

select option {
    color: #111;
}

.tone-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.tone-option {
    padding: 0.7rem 1.2rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.tone-option:hover {
    background: rgba(139, 92, 246, 0.15);
    border-color: rgba(139, 92, 246, 0.4);
    color: white;
}

.tone-option.selected {
    background: rgba(139, 92, 246, 0.25);
    border-color: rgba(139, 92, 246, 0.7);
    color: white;
}

input:focus,
select:focus {
    border-color: rgba(139, 92, 246, 0.5);
    background: rgba(139, 92, 246, 0.08);
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.15), inset 0 0 0 1px rgba(139, 92, 246, 0.2);
    transform: translateY(-2px);
}

/* --- Premium Button --- */
.btn {
    padding: 1.4rem 3rem;
    border-radius: 18px;
    font-size: 1.2rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    border: none;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--button-gradient);
    color: white;
    width: 100%;
    box-shadow: 0 15px 40px -10px rgba(99, 102, 241, 0.6);
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -60%;
    width: 40%;
    height: 200%;
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(30deg);
    transition: all 0.6s ease;
    filter: blur(20px);
}

.btn-primary:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 25px 50px -15px rgba(99, 102, 241, 0.7);
}

.btn-primary:hover::after {
    left: 120%;
}

.btn-primary:active {
    transform: translateY(-2px);
}

.button-group {
    display: flex;
    gap: 2rem;
}

.btn-outline {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    flex: 1;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: #fff;
    transform: translateY(-3px);
}

/* --- Final Step Details --- */
.success-icon {
    font-size: 6rem;
    text-align: center;
    margin-bottom: 2.5rem;
    filter: drop-shadow(0 0 30px rgba(139, 92, 246, 0.6));
    animation: icon-float 3s infinite ease-in-out;
}

@keyframes icon-float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }
}

.code-card {
    padding: 2.5rem;
}

pre {
    background: #020617;
    padding: 2rem;
    border-radius: 18px;
    font-size: 1rem;
    color: #60a5fa;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-family: 'JetBrains Mono', monospace;
    margin-bottom: 2.5rem;
}

.next-steps {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.btn-link {
    color: #94a3b8;
    background: none;
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s ease, letter-spacing 0.3s ease;
    font-weight: 600;
    padding: 1.4rem 2rem;
}

.btn-link:hover {
    color: #fff;
    letter-spacing: 0.5px;
}

/* Responsive */
@media (max-width: 768px) {
    h1 {
        font-size: 2.8rem;
        letter-spacing: -2px;
    }

    .glass {
        padding: 2.5rem;
    }
}

@media (max-width: 480px) {
    #onboarding-container {
        padding: 1rem;
    }

    h1 {
        font-size: 2.2rem;
    }

    .glass {
        padding: 1.5rem;
    }

    .button-group {
        flex-direction: column;
        gap: 1rem;
    }

    .logo {
        font-size: 2rem;
        margin-bottom: 2rem;
    }

    .step-indicator {
        gap: 0.5rem;
    }

    .step-circle {
        width: 32px;
        height: 32px;
        font-size: 0.85rem;
    }

    .step-line {
        width: 25px;
    }
}

/* --- Social Login Styles --- */
.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 2.5rem 0;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.divider:not(:empty)::before {
    margin-right: 1.5rem;
}

.divider:not(:empty)::after {
    margin-left: 1.5rem;
}

.social-login-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.btn-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: white;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    padding: 1.1rem;
    width: 100%;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    border-radius: 16px;
    cursor: pointer;
}

.btn-social img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.btn-social:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

.btn-google:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-facebook:hover {
    background: rgba(24, 119, 242, 0.1);
    border-color: rgba(24, 119, 242, 0.4);
}

.btn-linkedin:hover {
    background: rgba(10, 102, 194, 0.1);
    border-color: rgba(10, 102, 194, 0.4);
}