:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #dbeafe;
    --secondary: #3b82f6;
    --accent: #4f46e5;
    --light: #f8fafc;
    --dark: #1e293b;
    --text: #334155;
    --success: #15803d;
    --warning: #b45309;
    --danger: #b91c1c;
    --gray: #94a3b8;
    --card-bg: #ffffff;
    --transition: all 0.3s ease;
    --topoHeight: 75px;
    --rodapeHeight: 75px;
    --pageMainHeaderHeight: 75px;
}

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

@media only screen and (max-width: 500px) {
    :root {
        --rodapeHeight: 48px;
    }
}

body {
    margin: 0;
    height: 100%;
    width: 100%;
    font-family: 'Roboto', 'Google Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

html {
    font-family: 'Roboto', 'Google Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

#loadingInitial {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(135deg, #1a2a6c, #b21f1f, #002644);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 9999;
    overflow: hidden;
    perspective: 1000px;
}

.loading-screen-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 20, 40, 0.85);
    backdrop-filter: blur(5px);
    z-index: 1;
    transform: translateZ(0);
}

.loading-screen-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 600px;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    will-change: transform;
    transform-style: preserve-3d;
}

.loading-screen-logo-container {
    margin-bottom: 30px;
    position: relative;
    width: 180px;
    height: 180px;
}

.loading-screen-logo {
    width: 100%;
    height: 100%;
    background: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    position: absolute;
    overflow: hidden;
    border: 4px solid #002644;
    top: 0;
    left: 0;
}

.loading-screen-logo::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg,
            rgba(0, 38, 68, 0) 0%,
            rgba(0, 38, 68, 0.8) 50%,
            rgba(0, 38, 68, 0) 100%);
    animation: loading-shine 4s infinite linear;
    z-index: 1;
}

.loading-screen-logo-inner {
    width: 140px;
    height: 140px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    z-index: 2;
    background: white;
    box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.1);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.loading-screen-logo-inner img {
    width: 80%;
    height: auto;
    transform: none !important;
}

.loading-screen-title {
    color: white;
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    letter-spacing: 1px;
    background: linear-gradient(45deg, #009688, #002644);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    min-height: 3.5rem;
    width: 100%;
    text-align: center;
}

.loading-screen-progress-container {
    width: 300px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50px;
    height: 32px;
    overflow: hidden;
    position: relative;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transform: translateZ(0);
}

.loading-screen-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #d2b1cb, #2e0018);
    width: 0%;
    border-radius: 50px;
    transition: width 0.4s ease;
    position: relative;
    will-change: width;
}

.loading-screen-subtitle {
    color: white;
    font-size: 1.2rem;
    margin-bottom: 40px;
    max-width: 500px;
    width: 100%;
    text-align: center;
    /* para alinhar verticalmente o ícone e texto */
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    /* espaço entre ícone e texto */
    min-height: 1.5rem;
}

#progressText {
    overflow: hidden;
    width: 85%;
    max-width: 500px;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex-grow: 1;
    /* faz o texto ocupar o restante do espaço */
    min-width: 0;
    /* necessário para que ellipsis funcione em flex item */
}

.loading-screen-progress-text {
    color: white;
    font-size: 1rem;
    margin-top: 15px;
    font-weight: 500;
    text-align: center;
    /* remove inline-flex */
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    min-height: 1.5rem;
}

.loading-screen-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 40px;
    color: rgba(255, 255, 255, 0.8);
    width: 100%;
    min-height: 3.5rem;
}

.loading-screen-stat-item {
    text-align: center;
    min-width: 80px;
}

.loading-screen-stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #009688;
    margin-bottom: 5px;
    text-shadow: 0 0 10px rgba(0, 150, 136, 0.5);
    display: inline-block;
    width: 100%;
}

.loading-screen-stat-label {
    font-size: 0.9rem;
    display: inline-block;
    width: 100%;
}


@media (max-width: 768px) {
    .loading-screen-title {
        font-size: 2.2rem;
        min-height: 3rem;
    }

    .loading-screen-logo-container {
        width: 150px;
        height: 150px;
    }

    .loading-screen-logo-inner {
        width: 120px;
        height: 120px;
    }

    .loading-screen-stats {
        gap: 15px;
        min-height: 3rem;
    }

    .loading-screen-stat-item {
        min-width: 70px;
    }
}

.loading-icon {
    display: inline-block;
    animation: spin-step 2.5s linear infinite;
    transform-origin: 50% 50%;
    font-size: 1.5rem;
    /* tamanho do ícone */
    flex-shrink: 0;
    /* evita que o ícone encolha */
}

@keyframes spin-step {
    0% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(100deg);
    }

    50% {
        transform: rotate(200deg);
    }

    75% {
        transform: rotate(300deg);
    }

    100% {
        transform: rotate(400deg);
    }
}