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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow: hidden;
}

.header {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: 30px 20px;
    text-align: center;
}

.header h1 {
    font-size: 1.8rem;
    margin-bottom: 5px;
}

.header h2 {
    font-size: 1.2rem;
    font-weight: normal;
    opacity: 0.9;
    margin-bottom: 10px;
}

.subtitulo {
    font-size: 0.9rem;
    opacity: 0.8;
}

.search-area {
    padding: 30px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
}

.search-box {
    display: flex;
    gap: 10px;
    align-items: center;
    background: white;
    border-radius: 50px;
    padding: 5px 15px;
    border: 2px solid #e0e0e0;
    transition: all 0.3s;
}

.search-box:focus-within {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.2);
}

.search-icon {
    font-size: 1.2rem;
    color: #999;
}

#searchInput {
    flex: 1;
    padding: 15px 0;
    border: none;
    outline: none;
    font-size: 1rem;
    background: transparent;
}

.search-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 40px;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s;
}

.search-btn:hover {
    transform: scale(1.02);
}

.search-info {
    margin-top: 15px;
    text-align: center;
}

#statusMsg {
    font-size: 0.85rem;
    color: #666;
}

/* Loading */
.loading {
    text-align: center;
    padding: 40px;
    background: #f8f9fa;
}

.loading.hidden {
    display: none;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e0e0e0;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

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

/* Barra de progresso */
.progress-bar {
    height: 4px;
    background: #e0e0e0;
    margin: 0 20px;
    border-radius: 2px;
    overflow: hidden;
}

.progress-bar.hidden {
    display: none;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    width: 0%;
    transition: width 0.3s;
}

/* Resultados */
.results-area {
    padding: 20px;
    min-height: 300px;
}

.resultado-item {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    transition: box-shadow 0.2s;
}

.resultado-item:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.resultado-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 10px;
}

.resultado-pagina {
    background: #667eea;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
}

.resultado-score {
    color: #666;
    font-size: 0.75rem;
}

.resultado-conteudo {
    color: #333;
    line-height: 1.5;
    font-size: 0.95rem;
}

.resultado-conteudo mark {
    background: #ffeb3b;
    padding: 0 2px;
    border-radius: 3px;
}

.ver-mais {
    margin-top: 12px;
}

.ver-mais a {
    color: #667eea;
    text-decoration: none;
    font-size: 0.85rem;
}

.ver-mais a:hover {
    text-decoration: underline;
}

/* Sem resultados */
.sem-resultados {
    text-align: center;
    padding: 40px;
    color: #666;
}

.sem-resultados .icone {
    font-size: 3rem;
    margin-bottom: 15px;
}

/* Dicas */
.dicas {
    background: #f0f4ff;
    padding: 20px;
    margin: 0 20px 20px 20px;
    border-radius: 15px;
}

.dicas h3 {
    color: #1e3c72;
    margin-bottom: 10px;
    font-size: 1rem;
}

.dicas ul {
    margin-left: 20px;
    color: #555;
    font-size: 0.85rem;
    line-height: 1.6;
}

/* Footer */
.footer {
    background: #1e3c72;
    color: white;
    text-align: center;
    padding: 20px;
    font-size: 0.8rem;
}

.footer a {
    color: #ffeb3b;
    text-decoration: none;
}

.footer .small {
    font-size: 0.7rem;
    opacity: 0.7;
    margin-top: 10px;
}

/* Responsivo (celular) */
@media (max-width: 600px) {
    body {
        padding: 10px;
    }
    
    .search-box {
        flex-wrap: wrap;
        border-radius: 20px;
        padding: 10px;
    }
    
    #searchInput {
        width: 100%;
        padding: 12px;
    }
    
    .search-btn {
        width: 100%;
        padding: 12px;
    }
    
    .resultado-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .header h1 {
        font-size: 1.4rem;
    }
}
