/* ============================================
   LOADING SCREEN - SMART ONBOARDING
   ============================================ */

.loading-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    overflow: hidden;
}

.loading-container {
    width: 100%;
    max-width: 500px;
    padding: 40px 20px;
    text-align: center;
    animation: slideUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Logo */
.loading-logo {
    margin-bottom: 40px;
    animation: fadeInScale 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.logo-img {
    max-width: 120px;
    height: auto;
    filter: brightness(0.9);
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Title */
.loading-title {
    font-size: 24px;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 30px 0;
    letter-spacing: 0.3px;
}

/* Progress Bar */
.progress-bar-container {
    margin-bottom: 30px;
    position: relative;
}

.progress-bar {
    height: 6px;
    border-radius: 3px;
    background-color: rgba(255, 255, 255, 0.1) !important;
    margin-bottom: 8px;
}

.progress-bar .mud-linear-progress-bar {
    background: linear-gradient(90deg, #d4b905 0%, #e8d82f 100%) !important;
    border-radius: 3px;
    box-shadow: 0 0 20px rgba(212, 185, 5, 0.3);
    animation: glow 2s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(212, 185, 5, 0.3);
    }
    50% {
        box-shadow: 0 0 30px rgba(212, 185, 5, 0.5);
    }
}

.progress-text {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* Steps */
.steps-container {
    margin: 40px 0;
    text-align: left;
}

.step-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    margin-bottom: 8px;
    background-color: rgba(255, 255, 255, 0.05);
    border-left: 3px solid transparent;
    border-radius: 6px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.6;
}

.step-item.active {
    opacity: 1;
    background-color: rgba(212, 185, 5, 0.08);
    border-left-color: #d4b905;
    transform: translateX(4px);
}

.step-icon {
    font-size: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    animation: bounceIn 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.step-item.active .step-icon {
    animation: pulse 1s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

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

.step-label {
    flex: 1;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

.step-status {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
    min-width: 30px;
    text-align: right;
}

/* Subtítulos */
.subtitle {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    margin: 20px 0 0 0;
    font-style: italic;
}

.subtitle.offline-mode {
    color: #fff3cd;
    background-color: rgba(255, 193, 7, 0.1);
    padding: 10px 12px;
    border-radius: 4px;
    margin: 15px 0 0 0;
}

/* Error Message */
.error-message {
    background-color: rgba(244, 67, 54, 0.1);
    border-left: 3px solid #f44336;
    border-radius: 4px;
    padding: 12px 16px;
    margin-top: 20px;
}

.error-message p {
    margin: 4px 0;
    font-size: 13px;
    color: #ff7b7b;
}

.error-detail {
    color: rgba(255, 255, 255, 0.5) !important;
}

/* Footer */
.loading-footer {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-text {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.6;
    margin: 0;
}

/* Responsive */
@media (max-width: 600px) {
    .loading-container {
        padding: 30px 16px;
    }

    .loading-title {
        font-size: 20px;
        margin-bottom: 25px;
    }

    .steps-container {
        margin: 30px 0;
    }

    .step-item {
        padding: 10px 12px;
        margin-bottom: 6px;
    }

    .step-icon {
        font-size: 16px;
        width: 24px;
        height: 24px;
    }

    .step-label {
        font-size: 13px;
    }

    .loading-footer {
        margin-top: 40px;
        padding-top: 25px;
    }

    .footer-text {
        font-size: 11px;
    }
}

/* Dark mode adjustments */
@media (prefers-color-scheme: dark) {
    .loading-screen {
        background: linear-gradient(135deg, #0f0f0f 0%, #1a1a1a 100%);
    }
}

/* MudBlazor overrides */
.mud-linear-progress {
    background-color: rgba(255, 255, 255, 0.1) !important;
}
