/* Reset e configurações básicas */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Crimson Pro', serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: #f0f0f0;
    overflow-x: hidden;
    position: relative;
}

/* Partículas de fundo */
#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1;
    pointer-events: none;
}

/* Container principal */
.container {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Scroll suave */
html {
    scroll-behavior: smooth;
}

/* Animações básicas */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Estados de loading */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    backdrop-filter: blur(5px);
}

.loading-content {
    text-align: center;
    color: #f0f0f0;
}

.spinner {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #ffd700;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

.loading-content p {
    font-size: 1.1rem;
    color: #c0c0c0;
}

/* Error Messages */
.error-message {
    color: #ff6b6b;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* Skip links para acessibilidade */
.skip-links {
    position: absolute;
    top: -40px;
    left: 6px;
    z-index: 1001;
}

.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #ffd700;
    color: #1a1a2e;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    transition: top 0.3s ease;
}

.skip-link:focus {
    top: 6px;
}

/* Melhorias de performance */
.lazy {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lazy.loaded {
    opacity: 1;
}

/* Estados de foco para acessibilidade */
.keyboard-navigation .consulta-card:focus {
    outline: 2px solid #ffd700;
    outline-offset: 2px;
}

/* Fallback para particles */
.fallback-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 80%, rgba(255, 215, 0, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(255, 215, 0, 0.1) 0%, transparent 50%);
    animation: fallbackParticles 20s ease-in-out infinite;
}

@keyframes fallbackParticles {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

/* Melhorias de contraste */
@media (prefers-contrast: high) {
    .consulta-card {
        border: 2px solid #ffd700;
    }
    
    .nav-menu a {
        font-weight: bold;
    }
}

/* Modo escuro forçado */
@media (prefers-color-scheme: dark) {
    body {
        background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
    }
}
