/* Reset e configurações gerais */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s ease, color 0.3s ease;
    padding: 20px;
    overflow-x: hidden;
}

/* Tema Light (padrão) */
body.light-theme {
    background: linear-gradient(135deg, #F0EEE9 0%, #e8e6df 100%);
    color: #17184B;
}

/* Tema Dark (preto) */
body.dark-theme {
    background: linear-gradient(135deg, #000000 0%, #1a1a1a 100%);
    color: #F0EEE9;
}

.container {
    text-align: center;
    width: 100%;
    max-width: 480px;
    padding: 40px 25px;
    position: relative;
    z-index: 1;
}

/* Container da Logo */
.logo-container {
    margin-bottom: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Retângulo de fundo */
.logo-background {
    width: 180px;
    height: 180px;
    border-radius: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
    animation: pulseBackground 4s ease-in-out infinite alternate;
}

@keyframes pulseBackground {
    0% {
        transform: scale(1);
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    }
    100% {
        transform: scale(1.05);
        box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
    }
}

.light-theme .logo-background {
    background: linear-gradient(135deg, #273287 0%, #17184B 100%);
}

.dark-theme .logo-background {
    background: linear-gradient(135deg, #D8E63C 0%, #000000 100%);
}

/* Imagem da marca dentro do retângulo */
.mivo-logo {
    width: 110px;
    height: 110px;
    object-fit: contain;
    filter: brightness(1.1) contrast(1.2);
    animation: logoFloat 4s ease-in-out infinite alternate;
}

@keyframes logoFloat {
    0% {
        transform: translateY(0) scale(1);
        filter: brightness(1.1) contrast(1.2) drop-shadow(0 0 15px rgba(255, 255, 255, 0.4));
    }
    100% {
        transform: translateY(-10px) scale(1.08);
        filter: brightness(1.2) contrast(1.3) drop-shadow(0 0 20px rgba(255, 255, 255, 0.6));
    }
}

/* Texto MIVO APP abaixo */
.logo-text {
    color: #D6B4FC;
    letter-spacing: 5px;
    text-transform: uppercase;
    font-size: 1.4em;
    font-weight: 700;
    margin-top: 10px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    animation: textGlow 4s infinite alternate;
}

@keyframes textGlow {
    0% {
        opacity: 0.8;
        text-shadow: 0 0 8px rgba(214, 180, 252, 0.4);
        transform: translateY(0);
    }
    100% {
        opacity: 1;
        text-shadow: 0 0 15px rgba(214, 180, 252, 0.6);
        transform: translateY(-2px);
    }
}

.dark-theme .logo-text {
    color: #D8E63C;
    animation: textGlowDark 4s infinite alternate;
}

@keyframes textGlowDark {
    0% {
        opacity: 0.8;
        text-shadow: 0 0 8px rgba(216, 230, 60, 0.4);
        transform: translateY(0);
    }
    100% {
        opacity: 1;
        text-shadow: 0 0 15px rgba(216, 230, 60, 0.6);
        transform: translateY(-2px);
    }
}

/* Texto Aguarde */
.loading-text {
    font-size: 2em;
    margin-bottom: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    height: 50px;
}

.loading-text .text {
    font-weight: 700;
    color: #273287;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.dark-theme .loading-text .text {
    color: #F0EEE9;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.dots {
    width: 70px;
    text-align: left;
    font-weight: 700;
    color: #D8E63C;
    font-size: 2em;
}

/* Barra de Progresso */
.progress-container {
    width: 100%;
    margin: 0 auto 25px;
    position: relative;
    overflow: hidden;
}

.progress-bar {
    height: 24px;
    width: 100%;
    background: rgba(216, 230, 60, 0.15);
    border-radius: 14px;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 4px 15px rgba(0, 0, 0, 0.15);
    border: 2px solid rgba(0, 0, 0, 0.05);
}

.progress-fill {
    height: 100%;
    width: 0%;
    border-radius: 14px;
    position: absolute;
    top: 0;
    left: 0;
    transition: width 0.3s ease-out;
    overflow: hidden;
}

.light-theme .progress-fill {
    background: linear-gradient(90deg, #273287 0%, #D8E63C 100%);
}

.dark-theme .progress-fill {
    background: linear-gradient(90deg, #D8E63C 0%, #D6B4FC 100%);
}

/* Efeito de shimmer na barra */
.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.5),
        transparent
    );
    animation: shimmer 2.5s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

.progress-label {
    font-size: 1.8em;
    font-weight: 800;
    margin-top: 15px;
    color: #273287;
    transition: color 0.3s ease;
    font-family: 'Courier New', monospace;
    letter-spacing: 3px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.dark-theme .progress-label {
    color: #D8E63C;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Status Text */
.status-text {
    margin: 30px 0 40px;
    padding: 20px;
    border-radius: 20px;
    background: rgba(216, 230, 60, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(216, 230, 60, 0.2);
    animation: fadeIn 1s ease-out;
}

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

.status-text p {
    font-size: 1.1em;
    font-weight: 600;
    color: #273287;
    margin-bottom: 8px;
}

.dark-theme .status-text p {
    color: #F0EEE9;
}

.status-text .subtext {
    font-size: 0.95em;
    opacity: 0.8;
    font-weight: 500;
}

/* Toggle de Tema */
.theme-toggle {
    margin-top: 40px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.theme-btn {
    padding: 14px 28px;
    border: none;
    border-radius: 30px;
    background: rgba(216, 230, 60, 0.15);
    color: #273287;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    min-width: 120px;
    justify-content: center;
    font-size: 1em;
    backdrop-filter: blur(10px);
    border: 2px solid transparent;
}

.theme-btn.active {
    background: #273287;
    color: white;
    box-shadow: 0 6px 20px rgba(39, 50, 135, 0.4);
    border-color: #273287;
}

.dark-theme .theme-btn {
    background: rgba(255, 255, 255, 0.08);
    color: #F0EEE9;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.dark-theme .theme-btn.active {
    background: linear-gradient(135deg, #D8E63C 0%, #D6B4FC 100%);
    color: #000000;
    border: none;
    box-shadow: 0 6px 20px rgba(216, 230, 60, 0.4);
}

.theme-btn svg {
    vertical-align: middle;
}

.theme-btn:hover {
    transform: translateY(-3px) scale(1.05);
}

.theme-btn:active {
    transform: translateY(-1px) scale(1.02);
}

/* Responsivo */
@media (max-width: 480px) {
    .container {
        padding: 30px 20px;
        max-width: 100%;
    }
    
    .logo-background {
        width: 160px;
        height: 160px;
        border-radius: 30px;
    }
    
    .mivo-logo {
        width: 100px;
        height: 100px;
    }
    
    .logo-text {
        font-size: 1.2em;
        letter-spacing: 4px;
    }
    
    .loading-text {
        font-size: 1.8em;
    }
    
    .progress-bar {
        height: 22px;
    }
    
    .progress-label {
        font-size: 1.6em;
    }
    
    .theme-btn {
        padding: 12px 24px;
        min-width: 110px;
        font-size: 0.95em;
    }
}

@media (max-width: 360px) {
    .logo-background {
        width: 140px;
        height: 140px;
    }
    
    .mivo-logo {
        width: 90px;
        height: 90px;
    }
    
    .theme-toggle {
        flex-direction: column;
        gap: 12px;
        align-items: center;
    }
    
    .theme-btn {
        width: 200px;
        max-width: 100%;
    }
}