/* ============================================
   ONBOARDING USER STYLES
   Premium dark theme with glassmorphism
   ============================================ */

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: rgba(255, 255, 255, 0.04);
    --bg-card-hover: rgba(255, 255, 255, 0.06);
    --border: rgba(255, 255, 255, 0.08);
    --border-focus: rgba(99, 102, 241, 0.5);
    --text-primary: #f0f0f5;
    --text-secondary: #8888a0;
    --text-muted: #555568;
    --accent: #6366f1;
    --accent-light: #818cf8;
    --accent-glow: rgba(99, 102, 241, 0.3);
    --success: #10b981;
    --success-glow: rgba(16, 185, 129, 0.3);
    --warning: #f59e0b;
    --warning-glow: rgba(245, 158, 11, 0.2);
    --gradient: linear-gradient(135deg, #6366f1, #8b5cf6, #a78bfa);
    --gradient-success: linear-gradient(135deg, #10b981, #34d399);
    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    overflow: hidden;
    position: relative;
}

/* Animated background shapes */
.bg-shapes {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.15;
    animation: float 20s ease-in-out infinite;
}

.shape-1 {
    width: 500px;
    height: 500px;
    background: #6366f1;
    top: -200px;
    right: -100px;
    animation-delay: 0s;
}

.shape-2 {
    width: 400px;
    height: 400px;
    background: #8b5cf6;
    bottom: -150px;
    left: -100px;
    animation-delay: -7s;
}

.shape-3 {
    width: 300px;
    height: 300px;
    background: #a78bfa;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -14s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    25% {
        transform: translate(50px, -30px) scale(1.1);
    }

    50% {
        transform: translate(-30px, 50px) scale(0.95);
    }

    75% {
        transform: translate(30px, 30px) scale(1.05);
    }
}

/* Container */
.container {
    width: 100%;
    max-width: 480px;
    position: relative;
    z-index: 1;
}

/* Logo */
.logo-wrapper {
    text-align: center;
    margin-bottom: 24px;
}

.brand-logo {
    max-width: 140px;
    height: auto;
    filter: drop-shadow(0 4px 20px rgba(99, 102, 241, 0.2));
}

/* Progress Bar */
.progress-wrapper {
    margin-bottom: 32px;
}

.progress-bar {
    height: 4px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 16px;
}

.progress-fill {
    height: 100%;
    background: var(--gradient);
    width: 0%;
    border-radius: 4px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    padding: 0 8px;
}

.progress-step {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    transition: var(--transition);
}

.progress-step.active {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
    box-shadow: 0 0 20px var(--accent-glow);
}

.progress-step.done {
    background: var(--success);
    border-color: var(--success);
    color: white;
    box-shadow: 0 0 20px var(--success-glow);
}

/* Steps */
.step {
    display: none;
    animation: fadeSlide 0.5s ease-out;
}

.step.active {
    display: block;
}

@keyframes fadeSlide {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 24px;
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

.card-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(139, 92, 246, 0.15));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: var(--accent-light);
    border: 1px solid rgba(99, 102, 241, 0.2);
}

h1 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    text-align: center;
    margin-bottom: 6px;
    background: linear-gradient(135deg, var(--text-primary), var(--accent-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 20px;
}

/* Form Elements */
.input-group {
    position: relative;
    margin-bottom: 16px;
}

.input-group input {
    width: 100%;
    padding: 16px 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    font-weight: 400;
    transition: var(--transition);
    outline: none;
}

.input-group input::placeholder {
    color: transparent;
}

.input-group label {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.95rem;
    pointer-events: none;
    transition: var(--transition);
}

.input-group input:focus,
.input-group input:not(:placeholder-shown) {
    border-color: var(--border-focus);
    background: rgba(99, 102, 241, 0.03);
}

.input-group input:focus+label,
.input-group input:not(:placeholder-shown)+label {
    top: -8px;
    left: 14px;
    font-size: 0.75rem;
    background: var(--bg-primary);
    padding: 2px 8px;
    border-radius: 4px;
    color: var(--accent-light);
}

/* Buttons */
.btn {
    width: 100%;
    padding: 16px 24px;
    background: var(--gradient);
    border: none;
    border-radius: var(--radius-sm);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
    margin-top: 8px;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent);
    opacity: 0;
    transition: var(--transition);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px var(--accent-glow);
}

.btn:hover::before {
    opacity: 1;
}

.btn:active {
    transform: translateY(0);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn:disabled:hover {
    box-shadow: none;
}

/* Status/Waiting Box */
.status-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: rgba(245, 158, 11, 0.05);
    border: 1px solid rgba(245, 158, 11, 0.15);
    border-radius: var(--radius-sm);
    margin-top: 20px;
    color: var(--warning);
    font-size: 0.9rem;
    font-weight: 500;
    animation: fadeSlide 0.4s ease-out;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2.5px solid rgba(245, 158, 11, 0.2);
    border-top-color: var(--warning);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    flex-shrink: 0;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Verified Box */
.verified-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: rgba(16, 185, 129, 0.05);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: var(--radius-sm);
    margin-top: 20px;
    color: var(--success);
    font-size: 0.9rem;
    font-weight: 500;
    animation: pulseGreen 0.6s ease-out;
}

@keyframes pulseGreen {
    0% {
        transform: scale(0.95);
        opacity: 0;
    }

    50% {
        transform: scale(1.02);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Secret Code Box */
.code-box {
    text-align: center;
    padding: 24px 0 0;
    margin-top: 20px;
    border-top: 1px solid var(--border);
    animation: fadeSlide 0.5s ease-out;
}

.code-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(139, 92, 246, 0.15));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: var(--accent-light);
}

.code-box h2 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.code-boxes {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.code-char {
    width: 36px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(99, 102, 241, 0.3);
    border-radius: 8px;
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--accent-light);
    font-family: 'Inter', monospace;
    text-transform: uppercase;
}

.code-dash {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-muted);
    margin: 0 2px;
}

.code-note {
    font-size: 0.85rem;
    color: var(--warning);
    margin-bottom: 20px;
    line-height: 1.5;
}

/* Completion Card */
.card-complete {
    text-align: center;
    position: relative;
}

.complete-icon {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: var(--gradient-success);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    color: white;
    animation: scaleIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 10px 40px var(--success-glow);
}

@keyframes scaleIn {
    from {
        transform: scale(0);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.card-complete h1 {
    font-size: 2rem;
    background: var(--gradient-success);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.complete-sub {
    margin-bottom: 24px;
}

.complete-details {
    text-align: left;
    background: rgba(16, 185, 129, 0.05);
    border: 1px solid rgba(16, 185, 129, 0.1);
    border-radius: var(--radius-sm);
    padding: 16px 20px;
}

.complete-details .detail-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    font-size: 0.9rem;
}

.complete-details .detail-row:last-child {
    border-bottom: none;
}

.complete-details .detail-label {
    color: var(--text-secondary);
}

.complete-details .detail-value {
    color: var(--text-primary);
    font-weight: 500;
}

/* Confetti animation */
.confetti {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.confetti-piece {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 2px;
    animation: confettiFall 3s ease-out forwards;
    opacity: 0;
}

@keyframes confettiFall {
    0% {
        transform: translateY(-20px) rotate(0deg);
        opacity: 1;
    }

    100% {
        transform: translateY(400px) rotate(720deg);
        opacity: 0;
    }
}

/* Hidden utility */
.hidden {
    display: none !important;
}

/* Responsive */
@media (max-width: 520px) {
    body {
        padding: 16px;
        align-items: flex-start;
        padding-top: 40px;
    }

    .card {
        padding: 28px 20px;
    }

    h1 {
        font-size: 1.5rem;
    }

    .secret-code {
        font-size: 1.5rem;
    }
}