:root {
    --elx-bg: #f5f7fb;
    --elx-surface: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-container {
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.loading-content {
    background: var(--elx-surface);
    border-radius: 20px;
    padding: 60px 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
    max-width: 500px;
    width: 100%;
    animation: fadeInUp 0.6s ease;
}

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

.logo-wrapper {
    margin-bottom: 30px;
}

.loading-logo {
    width: 120px;
    height: auto;
    animation: pulse 2s ease-in-out infinite;
}

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

.loading-title {
    font-size: 28px;
    font-weight: 700;
    color: #2f2f46;
    margin-bottom: 30px;
}

.loading-spinner {
    margin: 30px 0;
    display: flex;
    justify-content: center;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(108, 92, 231, 0.1);
    border-top-color: var(--elx-accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loading-text {
    font-size: 16px;
    color: #6b7280;
    margin-top: 20px;
}

/* Error State */
.loading-content.error .loading-title {
    color: #dc2626;
}

.loading-content.error .spinner {
    display: none;
}

.error-icon {
    font-size: 60px;
    color: #dc2626;
    margin-bottom: 20px;
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.error-message {
    font-size: 18px;
    color: #2f2f46;
    margin: 20px 0;
    font-weight: 500;
}

.error-details {
    font-size: 14px;
    color: #6b7280;
    margin-top: 10px;
}

@media (max-width: 768px) {
    .loading-content {
        padding: 40px 30px;
    }

    .loading-logo {
        width: 100px;
    }

    .loading-title {
        font-size: 24px;
    }
}