/**
 * ActProof.ai - Onboarding Wizard Styles
 * Premium, dynamic, and engaging animations
 */

/* ============================================
   CSS Variables for Onboarding
   ============================================ */

:root {
    --onboard-primary: #6366f1;
    --onboard-secondary: #a855f7;
    --onboard-accent: #22d3ee;
    --onboard-success: #10b981;
    --onboard-glow: rgba(99, 102, 241, 0.5);
}

/* ============================================
   Onboarding Overlay with Particles
   ============================================ */

.onboarding-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, rgba(15, 23, 42, 0.95) 0%, rgba(0, 0, 0, 0.98) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.onboarding-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Animated particles background */
.onboarding-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: linear-gradient(135deg, var(--onboard-primary), var(--onboard-secondary));
    border-radius: 50%;
    opacity: 0.6;
    animation: float-particle 15s infinite ease-in-out;
}

.particle:nth-child(odd) {
    animation-duration: 20s;
    background: linear-gradient(135deg, var(--onboard-accent), var(--onboard-primary));
}

.particle:nth-child(3n) {
    width: 4px;
    height: 4px;
    animation-duration: 25s;
}

@keyframes float-particle {
    0%, 100% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        transform: translateY(-100vh) rotate(720deg);
        opacity: 0;
    }
}

/* ============================================
   Main Container with Glass Effect
   ============================================ */

.onboarding-container {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.9) 0%, rgba(15, 23, 42, 0.95) 100%);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 28px;
    max-width: 960px;
    width: 92%;
    max-height: 92vh;
    overflow-y: auto;
    box-shadow:
        0 0 60px rgba(99, 102, 241, 0.2),
        0 0 120px rgba(168, 85, 247, 0.1),
        0 25px 80px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    animation: container-entrance 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

@keyframes container-entrance {
    0% {
        opacity: 0;
        transform: translateY(60px) scale(0.9) rotateX(10deg);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1) rotateX(0deg);
    }
}

/* Glowing border animation */
.onboarding-container::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg,
        var(--onboard-primary),
        var(--onboard-secondary),
        var(--onboard-accent),
        var(--onboard-primary));
    background-size: 400% 400%;
    border-radius: 30px;
    z-index: -1;
    animation: gradient-border 8s ease infinite;
    opacity: 0.5;
}

@keyframes gradient-border {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ============================================
   Header with Animated Logo
   ============================================ */

.onboarding-header {
    padding: 3rem 2.5rem 2rem;
    text-align: center;
    border-bottom: 1px solid rgba(99, 102, 241, 0.2);
    background: linear-gradient(180deg, rgba(99, 102, 241, 0.15) 0%, transparent 100%);
    position: relative;
    overflow: hidden;
}

/* Animated rings behind logo */
.onboarding-header::before,
.onboarding-header::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 2px solid rgba(99, 102, 241, 0.2);
    animation: pulse-ring 3s ease-out infinite;
}

.onboarding-header::before {
    width: 150px;
    height: 150px;
}

.onboarding-header::after {
    width: 200px;
    height: 200px;
    animation-delay: 0.5s;
}

@keyframes pulse-ring {
    0% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0.8;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
    }
}

.onboarding-logo {
    width: 90px;
    height: 90px;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 0 30px rgba(99, 102, 241, 0.5));
    animation: logo-float 4s ease-in-out infinite, logo-glow 2s ease-in-out infinite alternate;
    position: relative;
    z-index: 1;
}

@keyframes logo-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes logo-glow {
    0% { filter: drop-shadow(0 0 20px rgba(99, 102, 241, 0.4)); }
    100% { filter: drop-shadow(0 0 40px rgba(168, 85, 247, 0.6)); }
}

.onboarding-header h1 {
    font-size: 2.25rem;
    font-weight: 800;
    background: linear-gradient(135deg, #fff 0%, #a5b4fc 50%, #c4b5fd 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.75rem;
    animation: title-shimmer 3s ease-in-out infinite;
    position: relative;
    z-index: 1;
}

@keyframes title-shimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.onboarding-header p {
    color: rgba(148, 163, 184, 0.9);
    font-size: 1.15rem;
    max-width: 450px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.onboarding-close {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(148, 163, 184, 0.8);
    cursor: pointer;
    padding: 0.6rem;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
}

.onboarding-close:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
    color: #ef4444;
    transform: rotate(90deg);
}

/* ============================================
   Step Navigation with Progress
   ============================================ */

.onboarding-steps {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    padding: 1.5rem 2rem;
    background: rgba(15, 23, 42, 0.5);
    position: relative;
}

/* Progress line */
.onboarding-steps::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 2px;
    background: rgba(99, 102, 241, 0.2);
    z-index: 0;
}

.step-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    border-radius: 24px;
    font-size: 0.875rem;
    font-weight: 500;
    color: rgba(148, 163, 184, 0.6);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    z-index: 1;
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid transparent;
}

.step-indicator:hover {
    color: rgba(148, 163, 184, 0.9);
}

.step-indicator.active {
    background: linear-gradient(135deg, var(--onboard-primary) 0%, var(--onboard-secondary) 100%);
    color: white;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
    transform: scale(1.05);
    border-color: rgba(255, 255, 255, 0.2);
}

.step-indicator.completed {
    color: var(--onboard-success);
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.3);
}

.step-number {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(30, 41, 59, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.step-indicator.active .step-number {
    background: rgba(255, 255, 255, 0.25);
    animation: pulse-step 2s ease-in-out infinite;
}

@keyframes pulse-step {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.step-indicator.completed .step-number {
    background: var(--onboard-success);
    color: white;
}

.step-indicator.completed .step-number::after {
    content: '✓';
    font-size: 0.75rem;
}

/* ============================================
   Content Area
   ============================================ */

.onboarding-content {
    padding: 2.5rem;
    min-height: 400px;
    position: relative;
}

.onboarding-step {
    display: none;
    animation: step-fade-in 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.onboarding-step.active {
    display: block;
}

@keyframes step-fade-in {
    0% {
        opacity: 0;
        transform: translateX(30px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ============================================
   Welcome Step - Feature Cards
   ============================================ */

.welcome-intro {
    text-align: center;
    margin-bottom: 2rem;
}

.welcome-intro h2 {
    font-size: 1.5rem;
    color: white;
    margin-bottom: 0.5rem;
}

.welcome-intro p {
    color: rgba(148, 163, 184, 0.8);
}

.welcome-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
}

.feature-card {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.6) 0%, rgba(15, 23, 42, 0.8) 100%);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 20px;
    padding: 1.75rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: default;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--onboard-primary), var(--onboard-secondary), var(--onboard-accent));
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.feature-card:hover {
    border-color: rgba(99, 102, 241, 0.4);
    transform: translateY(-6px);
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.3),
        0 0 30px rgba(99, 102, 241, 0.15);
}

.feature-card:hover::before {
    transform: scaleX(1);
}

/* Staggered animation on load */
.feature-card:nth-child(1) { animation: card-entrance 0.6s ease 0.1s both; }
.feature-card:nth-child(2) { animation: card-entrance 0.6s ease 0.2s both; }
.feature-card:nth-child(3) { animation: card-entrance 0.6s ease 0.3s both; }
.feature-card:nth-child(4) { animation: card-entrance 0.6s ease 0.4s both; }
.feature-card:nth-child(5) { animation: card-entrance 0.6s ease 0.5s both; }
.feature-card:nth-child(6) { animation: card-entrance 0.6s ease 0.6s both; }

@keyframes card-entrance {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: inline-block;
    animation: icon-bounce 2s ease-in-out infinite;
}

.feature-card:nth-child(odd) .feature-icon {
    animation-delay: 0.5s;
}

@keyframes icon-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.feature-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    margin-bottom: 0.5rem;
}

.feature-card p {
    font-size: 0.9rem;
    color: rgba(148, 163, 184, 0.8);
    line-height: 1.6;
}

/* ============================================
   Example Repositories Step
   ============================================ */

.examples-intro {
    text-align: center;
    margin-bottom: 2rem;
}

.examples-intro h2 {
    font-size: 1.75rem;
    color: white;
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, #fff 0%, #a5b4fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.examples-intro p {
    color: rgba(148, 163, 184, 0.8);
    font-size: 1rem;
}

.example-repos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
}

.example-repo-card {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.7) 0%, rgba(15, 23, 42, 0.9) 100%);
    border: 2px solid rgba(99, 102, 241, 0.15);
    border-radius: 20px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

/* Animated gradient on hover */
.example-repo-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, transparent, rgba(99, 102, 241, 0.1), transparent 30%);
    animation: rotate-gradient 4s linear infinite;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.example-repo-card:hover::before {
    opacity: 1;
}

@keyframes rotate-gradient {
    100% { transform: rotate(360deg); }
}

.example-repo-card:hover {
    border-color: rgba(99, 102, 241, 0.5);
    transform: translateY(-8px) scale(1.02);
    box-shadow:
        0 25px 50px rgba(0, 0, 0, 0.4),
        0 0 40px rgba(99, 102, 241, 0.2);
}

.example-repo-card.selected {
    border-color: var(--onboard-primary);
    background: linear-gradient(145deg, rgba(99, 102, 241, 0.15) 0%, rgba(168, 85, 247, 0.1) 100%);
    box-shadow:
        0 0 30px rgba(99, 102, 241, 0.3),
        inset 0 0 30px rgba(99, 102, 241, 0.1);
}

.example-repo-card.selected::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 2px solid var(--onboard-primary);
    border-radius: 18px;
    animation: selected-pulse 2s ease-in-out infinite;
}

@keyframes selected-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Staggered entrance */
.example-repo-card:nth-child(1) { animation: repo-entrance 0.5s ease 0.1s both; }
.example-repo-card:nth-child(2) { animation: repo-entrance 0.5s ease 0.2s both; }
.example-repo-card:nth-child(3) { animation: repo-entrance 0.5s ease 0.3s both; }
.example-repo-card:nth-child(4) { animation: repo-entrance 0.5s ease 0.4s both; }

@keyframes repo-entrance {
    0% {
        opacity: 0;
        transform: translateY(40px) rotateX(10deg);
    }
    100% {
        opacity: 1;
        transform: translateY(0) rotateX(0deg);
    }
}

.example-repo-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.repo-icon {
    font-size: 2.5rem;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.repo-info h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    margin-bottom: 0.25rem;
}

.repo-info .risk-badge {
    font-size: 0.7rem;
    padding: 0.25rem 0.7rem;
    border-radius: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.risk-badge.minimal {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(16, 185, 129, 0.1));
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.risk-badge.limited {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(245, 158, 11, 0.1));
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.risk-badge.high {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(239, 68, 68, 0.1));
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.example-repo-card > p {
    font-size: 0.9rem;
    color: rgba(148, 163, 184, 0.8);
    margin-bottom: 1rem;
    line-height: 1.5;
    position: relative;
    z-index: 1;
}

.repo-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
    position: relative;
    z-index: 1;
}

.repo-meta-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: rgba(148, 163, 184, 0.7);
}

.repo-meta-item svg {
    width: 14px;
    height: 14px;
    opacity: 0.7;
}

.repo-components {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    position: relative;
    z-index: 1;
}

.component-tag {
    font-size: 0.75rem;
    padding: 0.3rem 0.75rem;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 12px;
    color: rgba(165, 180, 252, 0.9);
    transition: all 0.2s ease;
}

.example-repo-card:hover .component-tag {
    background: rgba(99, 102, 241, 0.25);
    border-color: rgba(99, 102, 241, 0.4);
}

.select-indicator {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid rgba(99, 102, 241, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
}

.example-repo-card:hover .select-indicator {
    border-color: rgba(99, 102, 241, 0.6);
    transform: scale(1.1);
}

.example-repo-card.selected .select-indicator {
    background: linear-gradient(135deg, var(--onboard-primary), var(--onboard-secondary));
    border-color: transparent;
    color: white;
    animation: check-pop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes check-pop {
    0% { transform: scale(0.5); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* ============================================
   Get Started Step
   ============================================ */

.tour-content {
    text-align: center;
    padding: 1rem 0;
}

.tour-content h2 {
    font-size: 2rem;
    color: white;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #fff 0%, var(--onboard-accent) 50%, #a5b4fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: celebration-text 2s ease-in-out infinite;
}

@keyframes celebration-text {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

.tour-content > p {
    color: rgba(148, 163, 184, 0.9);
    max-width: 500px;
    margin: 0 auto 2.5rem;
    font-size: 1.1rem;
    line-height: 1.6;
}

.tour-highlights {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.tour-highlight {
    text-align: center;
    animation: highlight-pop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.tour-highlight:nth-child(1) { animation-delay: 0.1s; }
.tour-highlight:nth-child(2) { animation-delay: 0.2s; }
.tour-highlight:nth-child(3) { animation-delay: 0.3s; }
.tour-highlight:nth-child(4) { animation-delay: 0.4s; }

@keyframes highlight-pop {
    0% {
        opacity: 0;
        transform: scale(0.5) translateY(20px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.tour-highlight-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--onboard-primary) 0%, var(--onboard-secondary) 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.75rem;
    font-size: 1.75rem;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.3);
    transition: all 0.3s ease;
}

.tour-highlight:hover .tour-highlight-icon {
    transform: translateY(-5px) rotate(5deg);
    box-shadow: 0 12px 32px rgba(99, 102, 241, 0.4);
}

.tour-highlight span {
    font-size: 0.9rem;
    color: rgba(148, 163, 184, 0.9);
    font-weight: 500;
}

/* Confetti animation container */
.confetti-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    background: var(--onboard-primary);
    animation: confetti-fall 3s ease-in-out infinite;
}

@keyframes confetti-fall {
    0% {
        transform: translateY(-100%) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* ============================================
   Footer with Animated Buttons
   ============================================ */

.onboarding-footer {
    padding: 1.5rem 2.5rem;
    border-top: 1px solid rgba(99, 102, 241, 0.15);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(180deg, transparent 0%, rgba(15, 23, 42, 0.5) 100%);
    border-radius: 0 0 28px 28px;
}

.skip-btn {
    background: transparent;
    border: none;
    color: rgba(148, 163, 184, 0.7);
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.skip-btn:hover {
    color: white;
    background: rgba(255, 255, 255, 0.05);
}

.nav-buttons {
    display: flex;
    gap: 1rem;
}

.prev-btn,
.next-btn,
.start-btn {
    padding: 0.9rem 2rem;
    border-radius: 16px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    position: relative;
    overflow: hidden;
}

.prev-btn {
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: rgba(165, 180, 252, 0.9);
}

.prev-btn:hover {
    background: rgba(30, 41, 59, 1);
    border-color: rgba(99, 102, 241, 0.5);
    transform: translateX(-3px);
}

.next-btn,
.start-btn {
    background: linear-gradient(135deg, var(--onboard-primary) 0%, var(--onboard-secondary) 100%);
    border: none;
    color: white;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
}

/* Animated shine effect */
.next-btn::before,
.start-btn::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;
}

.next-btn:hover::before,
.start-btn:hover::before {
    left: 100%;
}

.next-btn:hover,
.start-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.5);
}

/* Pulsing animation for primary CTA */
.start-btn {
    animation: cta-pulse 2s ease-in-out infinite;
}

@keyframes cta-pulse {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
    }
    50% {
        box-shadow: 0 4px 30px rgba(99, 102, 241, 0.6), 0 0 40px rgba(168, 85, 247, 0.3);
    }
}

/* Attention arrow animation */
.btn-arrow {
    transition: transform 0.3s ease;
}

.next-btn:hover .btn-arrow,
.start-btn:hover .btn-arrow {
    animation: arrow-bounce 0.6s ease infinite;
}

@keyframes arrow-bounce {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(5px); }
}

/* ============================================
   Interactive Tour Spotlight
   ============================================ */

.tour-spotlight-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9998;
    animation: overlay-fade 0.3s ease;
}

@keyframes overlay-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

.tour-spotlight-target {
    position: relative;
    z-index: 9999 !important;
    box-shadow:
        0 0 0 4px var(--onboard-primary),
        0 0 0 8px rgba(99, 102, 241, 0.3),
        0 0 40px rgba(99, 102, 241, 0.4);
    border-radius: 12px;
    animation: spotlight-attention 2s ease-in-out infinite;
}

@keyframes spotlight-attention {
    0%, 100% {
        box-shadow:
            0 0 0 4px var(--onboard-primary),
            0 0 0 8px rgba(99, 102, 241, 0.3),
            0 0 40px rgba(99, 102, 241, 0.4);
    }
    50% {
        box-shadow:
            0 0 0 6px var(--onboard-primary),
            0 0 0 12px rgba(99, 102, 241, 0.2),
            0 0 60px rgba(99, 102, 241, 0.5);
    }
}

.tour-tooltip {
    position: fixed;
    z-index: 10001;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.98) 0%, rgba(15, 23, 42, 0.98) 100%);
    border: 1px solid rgba(99, 102, 241, 0.4);
    border-radius: 20px;
    padding: 1.75rem;
    max-width: 340px;
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.5),
        0 0 40px rgba(99, 102, 241, 0.2);
    animation: tooltip-entrance 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes tooltip-entrance {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.9);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.tour-tooltip::before {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.98) 0%, rgba(15, 23, 42, 0.98) 100%);
    border: 1px solid rgba(99, 102, 241, 0.4);
    border-right: none;
    border-bottom: none;
    transform: rotate(45deg);
}

.tour-tooltip.position-bottom::before {
    top: -9px;
    left: 50%;
    margin-left: -8px;
}

.tour-tooltip.position-top::before {
    bottom: -9px;
    left: 50%;
    margin-left: -8px;
    transform: rotate(225deg);
}

.tour-tooltip h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tour-tooltip h4::before {
    content: '💡';
    font-size: 1.25rem;
}

.tour-tooltip p {
    font-size: 0.95rem;
    color: rgba(148, 163, 184, 0.9);
    line-height: 1.6;
    margin-bottom: 1.25rem;
}

.tour-tooltip-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tour-progress {
    font-size: 0.8rem;
    color: rgba(99, 102, 241, 0.8);
    font-weight: 500;
}

.tour-tooltip-buttons {
    display: flex;
    gap: 0.75rem;
}

.tour-tooltip-buttons button {
    padding: 0.6rem 1.25rem;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tour-skip-btn {
    background: transparent;
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: rgba(148, 163, 184, 0.8);
}

.tour-skip-btn:hover {
    border-color: rgba(239, 68, 68, 0.5);
    color: #f87171;
}

.tour-next-btn {
    background: linear-gradient(135deg, var(--onboard-primary), var(--onboard-secondary));
    border: none;
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.tour-next-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

/* ============================================
   Responsive Adjustments
   ============================================ */

@media (max-width: 768px) {
    .onboarding-container {
        width: 96%;
        max-height: 96vh;
        border-radius: 20px;
    }

    .onboarding-header {
        padding: 2rem 1.5rem;
    }

    .onboarding-header h1 {
        font-size: 1.75rem;
    }

    .onboarding-content {
        padding: 1.5rem;
    }

    .onboarding-steps {
        flex-wrap: wrap;
        padding: 1rem;
        gap: 0.5rem;
    }

    .step-indicator {
        font-size: 0.8rem;
        padding: 0.5rem 1rem;
    }

    .step-indicator span:not(.step-number) {
        display: none;
    }

    .welcome-features {
        grid-template-columns: 1fr;
    }

    .example-repos {
        grid-template-columns: 1fr;
    }

    .tour-highlights {
        gap: 1rem;
    }

    .tour-highlight-icon {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }

    .onboarding-footer {
        flex-direction: column;
        gap: 1rem;
        padding: 1.25rem;
    }

    .nav-buttons {
        width: 100%;
        justify-content: space-between;
    }

    .next-btn, .start-btn, .prev-btn {
        flex: 1;
        justify-content: center;
    }
}

/* ======================================
   STEP 2: INTERACTIVE DEMO STYLES
   ====================================== */

/* Demo Views */
.demo-selection-view,
.demo-scanning-view,
.demo-results-view {
    animation: fadeIn 0.4s ease;
}

/* Scanning Animation View */
.demo-scanning-view {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 3rem 2rem;
    min-height: 500px;
}

.scanning-animation {
    text-align: center;
    max-width: 500px;
    width: 100%;
}

.scanning-logo {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto 2rem;
}

.scanning-logo svg {
    position: absolute;
    top: 10px;
    left: 10px;
}

.scan-circle {
    animation: rotateScan 2s linear infinite;
    transform-origin: 50% 50%;
}

.scanning-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.5rem;
    animation: pulse 1.5s ease-in-out infinite;
}

.scanning-status {
    font-size: 1.5rem;
    font-weight: 600;
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 2rem;
    min-height: 2rem;
}

.scanning-progress {
    margin-bottom: 2.5rem;
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: rgba(148, 163, 184, 0.1);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #6366f1 0%, #a855f7 50%, #22d3ee 100%);
    border-radius: 10px;
    width: 0%;
    transition: width 0.3s ease;
    position: relative;
    overflow: hidden;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 100%
    );
    animation: shimmer 1.5s infinite;
}

.progress-text {
    font-size: 0.9rem;
    color: rgba(226, 232, 240, 0.8);
    font-weight: 500;
}

.scanning-steps {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    text-align: left;
}

.scan-step {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: rgba(148, 163, 184, 0.05);
    border-radius: 8px;
    border-left: 3px solid rgba(148, 163, 184, 0.2);
    color: rgba(226, 232, 240, 0.6);
    transition: all 0.3s ease;
}

.scan-step.active {
    background: rgba(99, 102, 241, 0.1);
    border-left-color: #6366f1;
    color: rgba(226, 232, 240, 0.9);
    transform: translateX(4px);
}

.scan-step.completed {
    background: rgba(16, 185, 129, 0.05);
    border-left-color: #10b981;
    color: rgba(16, 185, 129, 0.8);
}

.step-icon {
    font-size: 1.25rem;
    min-width: 24px;
}

/* Results View */
.demo-results-view {
    padding: 2rem 1.5rem;
}

.results-header {
    text-align: center;
    margin-bottom: 2rem;
}

.results-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.demo-repo-name {
    font-size: 1rem;
    color: rgba(226, 232, 240, 0.7);
}

.demo-results-grid {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.demo-score-card {
    text-align: center;
}

.demo-score-ring {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 1rem;
}

.demo-score-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.5rem;
    font-weight: 700;
    color: #22d3ee;
}

.demo-score-card h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: rgba(226, 232, 240, 0.9);
}

.demo-score-status {
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    display: inline-block;
}

.demo-score-status.good {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.demo-score-status.warning {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.demo-score-status.critical {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.demo-findings {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.finding-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(148, 163, 184, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.1);
    transition: all 0.3s ease;
}

.finding-item:hover {
    background: rgba(148, 163, 184, 0.08);
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateY(-2px);
}

.finding-icon {
    font-size: 2rem;
    min-width: 40px;
    text-align: center;
}

.finding-item strong {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: rgba(226, 232, 240, 0.95);
    margin-bottom: 0.25rem;
}

.finding-item p {
    font-size: 0.8rem;
    color: rgba(148, 163, 184, 0.7);
    margin: 0;
}

.demo-cta {
    text-align: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(168, 85, 247, 0.05) 100%);
    border-radius: 12px;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.demo-cta p {
    margin: 0;
    font-size: 0.95rem;
    color: rgba(226, 232, 240, 0.85);
    font-weight: 500;
}

/* Animations */
@keyframes rotateScan {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .demo-results-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .demo-findings {
        grid-template-columns: 1fr;
    }

    .scanning-animation {
        padding: 2rem 1rem;
    }

    .results-header h2 {
        font-size: 1.5rem;
    }
}
