/**
 * Onboarding Setup Modal Styles
 * 
 * Beautiful gradient animations and smooth transitions
 * for first-time user setup experience
 */

/* ========================================
   MODAL OVERLAY
   ======================================== */

.onboarding-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: all;
}

.onboarding-modal-overlay.show {
    opacity: 1;
}

/* ========================================
   MODAL CONTENT
   ======================================== */

.onboarding-modal-content {
    /* RidyFlow gradient: Green to Blue */
    background: linear-gradient(135deg, #10b981 0%, #3b82f6 100%);
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 
                0 0 100px rgba(16, 185, 129, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.onboarding-modal-overlay.show .onboarding-modal-content {
    transform: scale(1);
}

.onboarding-modal-inner {
    padding: 48px 32px;
    text-align: center;
}

/* ========================================
   LOADING STATE
   ======================================== */

.onboarding-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.onboarding-spinner-container {
    position: relative;
    width: 120px;
    height: 120px;
}

.onboarding-spinner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, #e8f5e9 0%, #ffffff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.spinner-gradient {
    position: absolute;
    width: 150%;
    height: 150%;
    background: conic-gradient(
        from 0deg,
        transparent 0deg,
        transparent 270deg,
        #10B981 270deg,
        #3B82F6 360deg
    );
    animation: spin 1.5s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Inner circle to create ring effect */
.onboarding-spinner::after {
    content: '';
    position: absolute;
    width: 90px;
    height: 90px;
    background: white;
    border-radius: 50%;
    z-index: 1;
}

/* Spinner Icon (emoji) */
.spinner-icon {
    position: absolute;
    font-size: 48px;
    z-index: 2;
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.spinner-icon.stage-change {
    transform: scale(1.2);
}

.onboarding-title {
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.onboarding-subtitle {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.95);
    margin: 0;
    line-height: 1.5;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

/* Stage Text */
.onboarding-stage-text {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    line-height: 1.5;
    min-height: 24px;
    transition: opacity 0.3s ease;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.onboarding-stage-text.fade-in {
    animation: fadeIn 0.3s ease;
}

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

/* Progress Bar */
.onboarding-progress-bar {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #10B981 0%, #3B82F6 100%);
    background-size: 200% 100%;
    animation: progressGradient 3s ease infinite;
    border-radius: 4px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

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

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

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

/* Stage Indicator */
.onboarding-stage-indicator {
    font-size: 14px;
    color: #94a3b8;
    margin: 8px 0 0 0;
    font-weight: 500;
}

.stage-current {
    color: #10B981;
    font-weight: 700;
    font-size: 16px;
}

/* Progress Dots (backup, not used in new design) */
.onboarding-progress-dots {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.onboarding-progress-dots .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #e2e8f0;
    transition: all 0.3s ease;
}

.onboarding-progress-dots .dot.active {
    background: #10B981;
    transform: scale(1.3);
}

/* ========================================
   SUCCESS STATE
   ======================================== */

.onboarding-success {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

/* Success Checkmark Animation */
.onboarding-success-icon {
    margin-bottom: 8px;
}

.success-checkmark {
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.success-checkmark.animate {
    opacity: 1;
    transform: scale(1);
}

.checkmark-circle {
    fill: none;
    stroke: #10B981;
    stroke-width: 3;
    stroke-dasharray: 226;
    stroke-dashoffset: 226;
    animation: draw-circle 0.6s ease-out forwards;
}

.checkmark-check {
    fill: none;
    stroke: #10B981;
    stroke-width: 4;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: draw-check 0.4s 0.4s ease-out forwards;
}

@keyframes draw-circle {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes draw-check {
    to {
        stroke-dashoffset: 0;
    }
}

/* Success Text */
.onboarding-success-title {
    font-size: 28px;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), 0 4px 16px rgba(0, 0, 0, 0.2);
}

.onboarding-success-subtitle {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.95);
    margin: 0;
    line-height: 1.5;
    font-weight: 500;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

/* ========================================
   TOKEN CARD (Similar to Settings)
   ======================================== */

.onboarding-token-card {
    background: linear-gradient(135deg, #10B981 0%, #3B82F6 100%);
    background-size: 200% 200%;
    animation: gradientShift 6s ease infinite;
    border-radius: 20px;
    padding: 24px;
    color: white;
    width: 100%;
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.3), 0 0 50px rgba(59, 130, 246, 0.2);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

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

.onboarding-token-card.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.token-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    opacity: 0.9;
}

.token-icon {
    font-size: 20px;
}

.token-label {
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.token-card-amount {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 8px;
    margin-bottom: 8px;
}

.token-value {
    font-size: 48px;
    font-weight: 800;
    line-height: 1;
}

.token-currency {
    font-size: 20px;
    font-weight: 600;
    opacity: 0.9;
}

.token-card-usd {
    font-size: 16px;
    opacity: 0.8;
    margin-bottom: 20px;
}

/* Token Breakdown */
.token-breakdown {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    backdrop-filter: blur(10px);
}

.token-breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.breakdown-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
}

.breakdown-icon {
    font-size: 16px;
}

.breakdown-value {
    font-size: 16px;
    font-weight: 700;
}

.breakdown-value.granted {
    color: rgba(255, 255, 255, 0.95);
}

.breakdown-value.earned {
    color: #fcd34d;
}

/* Referral Badge */
.token-card-badge {
    margin-top: 16px;
    background: rgba(252, 211, 77, 0.2);
    border: 2px solid rgba(252, 211, 77, 0.5);
    border-radius: 12px;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    animation: pulse 2s infinite;
}

.badge-icon {
    font-size: 18px;
}

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

/* ========================================
   CALL TO ACTION BUTTON
   ======================================== */

.onboarding-cta-button {
    background: linear-gradient(135deg, #10B981 0%, #3B82F6 100%);
    background-size: 200% 200%;
    animation: gradientShift 4s ease infinite;
    color: white;
    border: none;
    border-radius: 12px;
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3), 0 0 30px rgba(59, 130, 246, 0.2);
}

.onboarding-cta-button.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.onboarding-cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.onboarding-cta-button:active {
    transform: translateY(0);
}

.button-arrow {
    transition: transform 0.3s ease;
}

.onboarding-cta-button:hover .button-arrow {
    transform: translateX(4px);
}

/* Info Text */
.onboarding-info-text {
    font-size: 13px;
    color: #94a3b8;
    margin: 0;
    line-height: 1.5;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 640px) {
    .onboarding-modal-inner {
        padding: 32px 24px;
    }

    .onboarding-title {
        font-size: 20px;
    }

    .onboarding-success-title {
        font-size: 24px;
    }

    .onboarding-spinner-container {
        width: 100px;
        height: 100px;
    }

    .onboarding-spinner::after {
        width: 75px;
        height: 75px;
    }

    .token-value {
        font-size: 36px;
    }

    .token-currency {
        font-size: 18px;
    }

    .token-breakdown {
        padding: 12px;
    }

    .breakdown-label,
    .breakdown-value {
        font-size: 13px;
    }
}

/* ========================================
   DARK MODE SUPPORT
   ======================================== */

@media (prefers-color-scheme: dark) {
    .onboarding-modal-content {
        background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    }

    .onboarding-title,
    .onboarding-success-title {
        color: #f1f5f9;
    }

    .onboarding-subtitle,
    .onboarding-success-subtitle {
        color: #94a3b8;
    }

    .onboarding-spinner {
        background: linear-gradient(135deg, #1e3a32 0%, #1e293b 100%);
    }

    .onboarding-spinner::after {
        background: #0f172a;
    }
}







