/* =========================================
   ONBOARDING FLOW STYLES
   ========================================= */

.onboarding-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    z-index: 9998;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    transition: opacity var(--transition-normal), visibility var(--transition-normal);
}

.onboarding-container.hidden {
    opacity: 0;
    visibility: hidden;
}

/* Step Container */
.onboarding-step {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: var(--spacing-xl) var(--spacing-md);
    color: white;
    text-align: center;
}

/* =========================================
   SPLASH SCREEN (Step 0)
   ========================================= */

.splash-screen {
    background: linear-gradient(135deg, #FF6B35 0%, #2481cc 100%);
}

.splash-logo-img {
    width: 200px;
    height: 200px;
    margin-bottom: var(--spacing-lg);
    object-fit: contain;
    border-radius: 50%;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    display: block;
    background: white;
    padding: 15px;
}

.splash-logo {
    font-size: 80px;
    margin-bottom: var(--spacing-lg);
}

.splash-title {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: var(--spacing-sm);
    letter-spacing: 1px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.splash-subtitle {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: var(--spacing-xl);
    opacity: 0.9;
    letter-spacing: 0.5px;
}

.splash-motto {
    max-width: 600px;
    margin: 0 auto var(--spacing-xl);
    padding: 0 var(--spacing-md);
}

.features-container {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    margin-bottom: var(--spacing-md);
}

.features-secondary {
    margin-top: var(--spacing-md);
}

.feature-box {
    flex: 1;
    background: rgba(255, 255, 255, 0.08);
    /* backdrop-filter removed */
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg) var(--spacing-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    opacity: 0;
    animation: fadeInUp 0.6s ease-out forwards;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-height: 140px;
}

.features-container:first-child .feature-box:nth-child(1) { animation-delay: 0.1s; }
.features-container:first-child .feature-box:nth-child(2) { animation-delay: 0.2s; }
.features-container:first-child .feature-box:nth-child(3) { animation-delay: 0.3s; }

.features-secondary .feature-box:nth-child(1) { animation-delay: 0.5s; }
.features-secondary .feature-box:nth-child(2) { animation-delay: 0.6s; }
.features-secondary .feature-box:nth-child(3) { animation-delay: 0.7s; }

.feature-box:hover {
    transform: translateY(-6px);
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.3);
}

.feature-icon-large,
.feature-icon-small {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.05));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: white;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    transition: all 0.4s ease;
}

.feature-box:hover .feature-icon-large,
.feature-box:hover .feature-icon-small {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.feature-title,
.feature-title-small {
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    line-height: 1.3;
    letter-spacing: 0.3px;
    margin: 0;
}

/* Animations removed for performance */

/* =========================================
   LANGUAGE SELECTION (Step 1)
   ========================================= */

.language-selection {
    max-width: 400px;
}

.language-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: var(--spacing-xl);
}

.language-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
}

.language-option {
    background: rgba(255, 255, 255, 0.15);
    /* backdrop-filter removed */
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-sm);
}

.language-option:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-4px);
}

.language-option.selected {
    background: rgba(255, 255, 255, 0.3);
    border-color: white;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

.language-option .flag {
    font-size: 48px;
}

.language-option .name {
    font-size: 18px;
    font-weight: 600;
}

/* =========================================
   EXCHANGE SELECTION (Step 2)
   ========================================= */

.exchange-selection {
    max-width: 500px;
}

.exchange-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
}

.exchange-subtitle {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: var(--spacing-xl);
}

.exchange-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
}

.exchange-option {
    background: rgba(255, 255, 255, 0.15);
    /* backdrop-filter removed */
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 80px;
}

.exchange-option:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

.exchange-option.selected {
    background: rgba(255, 255, 255, 0.3);
    border-color: white;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

.exchange-option .name {
    font-size: 15px;
    font-weight: 600;
    margin-top: var(--spacing-sm);
}

/* =========================================
   RISK MANAGEMENT INTRO (Step 3)
   ========================================= */

.risk-intro {
    max-width: 450px;
}

.risk-icon {
    font-size: 64px;
    margin-bottom: var(--spacing-lg);
}

.risk-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
}

.risk-subtitle {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: var(--spacing-lg);
    opacity: 0.95;
}

.risk-description {
    font-size: 15px;
    line-height: 1.7;
    opacity: 0.9;
    margin-bottom: var(--spacing-xl);
}

/* =========================================
   RISK STEPS (Balance, Leverage, Position, Mode)
   ========================================= */

.risk-step {
    max-width: 450px;
}

.risk-step-icon {
    font-size: 56px;
    margin-bottom: var(--spacing-lg);
}

.risk-step-title {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
}

.risk-step-description {
    font-size: 15px;
    line-height: 1.7;
    opacity: 0.9;
    margin-bottom: var(--spacing-xl);
}

.risk-step-description .emphasis {
    display: block;
    font-weight: 700;
    font-size: 16px;
    margin-bottom: var(--spacing-sm);
}

/* Balance Input */
.balance-info {
    background: rgba(255, 255, 255, 0.1);
    /* backdrop-filter removed */
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
    text-align: left;
}

.balance-info-label {
    font-size: 14px;
    opacity: 0.8;
    margin-bottom: var(--spacing-xs);
}

.balance-info-value {
    font-size: 20px;
    font-weight: 700;
}

.balance-input-group {
    position: relative;
    margin-bottom: var(--spacing-xl);
}

.balance-input {
    width: 100%;
    padding: 16px 20px;
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    background: rgba(255, 255, 255, 0.2);
    /* backdrop-filter removed */
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-lg);
    color: white;
    outline: none;
    transition: all var(--transition-fast);
    -webkit-user-select: text;
    user-select: text;
}

.balance-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.balance-input:focus {
    border-color: white;
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 4px 16px rgba(255, 255, 255, 0.2);
}

.input-suffix {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    font-weight: 600;
    opacity: 0.7;
}

/* Leverage Options */
.leverage-options {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
}

.leverage-option {
    background: rgba(255, 255, 255, 0.15);
    /* backdrop-filter removed */
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-md);
    padding: 12px 8px;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: center;
    font-weight: 700;
    font-size: 16px;
}

.leverage-option:hover {
    background: rgba(255, 255, 255, 0.25);
}

.leverage-option.selected {
    background: white;
    color: var(--primary-color);
    border-color: white;
}

.leverage-custom {
    margin-top: var(--spacing-md);
}

.leverage-custom-label {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: var(--spacing-sm);
}

/* Position Options */
.position-options {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
}

.position-option {
    background: rgba(255, 255, 255, 0.15);
    /* backdrop-filter removed */
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-md);
    padding: 12px 8px;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: center;
    font-weight: 700;
    font-size: 16px;
}

.position-option:hover {
    background: rgba(255, 255, 255, 0.25);
}

.position-option.selected {
    background: white;
    color: var(--primary-color);
    border-color: white;
}

/* Risk Mode Selection */
.risk-modes {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
}

.risk-mode-option {
    background: rgba(255, 255, 255, 0.15);
    /* backdrop-filter removed */
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-md);
    padding: var(--spacing-lg);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: left;
}

.risk-mode-option:hover {
    background: rgba(255, 255, 255, 0.2);
}

.risk-mode-option.selected {
    background: rgba(255, 255, 255, 0.3);
    border-color: white;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

.risk-mode-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
}

.risk-mode-icon {
    font-size: 24px;
}

.risk-mode-name {
    font-size: 18px;
    font-weight: 700;
}

.risk-mode-recommended {
    margin-left: auto;
    background: rgba(255, 255, 255, 0.3);
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
}

.risk-mode-description {
    font-size: 14px;
    opacity: 0.9;
    line-height: 1.5;
}

/* =========================================
   COMPLETION SCREEN (Final Step)
   ========================================= */

.completion-screen {
    max-width: 450px;
}

.completion-icon {
    font-size: 72px;
    margin-bottom: var(--spacing-lg);
}

.completion-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
}

.completion-subtitle {
    font-size: 16px;
    opacity: 0.9;
    margin-bottom: var(--spacing-xl);
}

.completion-summary {
    background: rgba(255, 255, 255, 0.15);
    /* backdrop-filter removed */
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
    text-align: left;
}

.completion-summary-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    text-align: center;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-sm) 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.summary-item:last-child {
    border-bottom: none;
}

.summary-label {
    font-size: 14px;
    opacity: 0.8;
}

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

.completion-note {
    font-size: 13px;
    opacity: 0.8;
    margin-top: var(--spacing-lg);
}

/* =========================================
   NAVIGATION BUTTONS
   ========================================= */

.onboarding-actions {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    width: 100%;
    max-width: 400px;
}

.btn-onboarding {
    width: 100%;
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 700;
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
}

.btn-onboarding-primary {
    background: white;
    color: var(--primary-color);
}

.btn-onboarding-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.btn-onboarding-secondary {
    background: rgba(255, 255, 255, 0.2);
    /* backdrop-filter removed */
    border: 2px solid rgba(255, 255, 255, 0.5);
    color: white;
}

.btn-onboarding-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
}

.btn-onboarding:active {
    transform: scale(0.98);
}

.btn-onboarding:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Progress Indicator */
.onboarding-progress {
    position: absolute;
    top: var(--spacing-lg);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: var(--spacing-sm);
}

.progress-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transition: all var(--transition-fast);
}

.progress-dot.active {
    background: white;
    width: 24px;
    border-radius: 4px;
}

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

@media (max-width: 480px) {
    .splash-logo {
        font-size: 64px;
    }

    .splash-logo-img {
        width: 150px;
        height: 150px;
    }

    .splash-title {
        font-size: 28px;
    }

    .splash-subtitle {
        font-size: 11px;
        padding: 0 var(--spacing-md);
    }

    .features-container {
        flex-direction: column;
        gap: var(--spacing-sm);
    }

    .feature-box {
        min-height: auto;
        padding: var(--spacing-md);
    }

    .feature-icon-large,
    .feature-icon-small {
        width: 60px;
        height: 60px;
        font-size: 26px;
    }

    .feature-title,
    .feature-title-small {
        font-size: 13px;
    }

    .exchange-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .leverage-options,
    .position-options {
        grid-template-columns: repeat(3, 1fr);
    }
}
