/* Importa as fontes do Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* Variáveis CSS para cores e espaçamentos */
:root {
    --primary: #0066cc;
    --primary-hover: #0052a3;
    --secondary: #6366f1;
    --accent: #06b6d4;
    --dark: #1e293b;
    --light: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-600: #475569;
    --gray-800: #1e293b;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --border-radius: 12px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --gradient-bg: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Reset básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Estilização do corpo */
body {
    font-family: 'Inter', sans-serif;
    background: var(--gradient-bg);
    min-height: 100vh;
    color: var(--dark);
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
}

/* Animação de fundo */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-bg);
    z-index: -1;
}

.background-animation::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { transform: translateX(-100%); }
    50% { transform: translateX(100%); }
}

/* Container principal */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Hero section */
.hero {
    text-align: center;
    padding: 60px 20px 40px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    margin-bottom: 40px;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 16px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 1s ease-out;
}

.hero p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 600px;
    margin: 0 auto;
    animation: fadeInUp 1s ease-out 0.2s both;
}

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

/* Container de pesquisa */
.search-container {
    background: white;
    border-radius: var(--border-radius);
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-lg);
    animation: fadeInUp 1s ease-out 0.4s both;
}

/* Caixa de pesquisa */
.search-box {
    position: relative;
    margin-bottom: 20px;
}

.search-input {
    width: 100%;
    padding: 16px 60px 16px 20px;
    font-size: 1.1rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius);
    outline: none;
    transition: all 0.3s ease;
    background: var(--light);
    font-family: inherit;
}

.search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
    background: white;
}

.search-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.search-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-50%) scale(1.05);
}

/* Estatísticas de pesquisa */
.search-stats {
    text-align: center;
    color: var(--gray-600);
    margin-bottom: 20px;
    font-size: 0.9rem;
}

/* Filtros rápidos */
.quick-filters {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-label {
    font-weight: 500;
    color: var(--gray-600);
    margin-right: 10px;
}

.filter-btn {
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    color: var(--gray-600);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-family: inherit;
}

.filter-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Resultados da pesquisa */
.resultados-pesquisa {
    max-height: 60vh;
    overflow-y: auto;
    padding: 10px;
    border-radius: var(--border-radius);
}

/* Scrollbar personalizada */
.resultados-pesquisa::-webkit-scrollbar {
    width: 8px;
}

.resultados-pesquisa::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: 4px;
}

.resultados-pesquisa::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 4px;
}

.resultados-pesquisa::-webkit-scrollbar-thumb:hover {
    background: var(--gray-600);
}

/* Mensagem de boas-vindas */
.welcome-message {
    background: white;
    padding: 40px;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow);
}

.welcome-message i {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 20px;
}

.welcome-message h3 {
    color: var(--dark);
    margin-bottom: 16px;
    font-size: 1.5rem;
}

.welcome-message p {
    color: var(--gray-600);
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.examples h4 {
    color: var(--dark);
    margin-bottom: 16px;
    font-size: 1.1rem;
}

.example-tag {
    display: inline-block;
    background: var(--gray-100);
    color: var(--gray-600);
    padding: 8px 16px;
    margin: 4px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Courier New', monospace;
    font-weight: 500;
}

.example-tag:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

/* Item de resultado */
.item-resultado {
    background: white;
    border-radius: var(--border-radius);
    padding: 24px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border-left: 4px solid var(--primary);
    animation: slideInLeft 0.5s ease-out;
}

.item-resultado:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.item-resultado h2 {
    font-size: 1.4rem;
    color: var(--dark);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.item-resultado h2::before {
    content: '>';
    background: var(--primary);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

.item-resultado a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

.item-resultado a:hover {
    color: var(--primary);
}

.descricao-meta {
    color: var(--gray-600);
    margin-bottom: 16px;
    line-height: 1.6;
}

.item-resultado .link-oficial {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.item-resultado .link-oficial:hover {
    color: var(--primary-hover);
    transform: translateX(4px);
}

/* Footer */
footer {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: white;
    text-align: center;
    padding: 30px 20px;
    margin-top: 60px;
}

footer p {
    margin-bottom: 15px;
    font-size: 1rem;
}

.social-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.social-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    font-weight: 500;
}

.social-links a:hover {
    color: white;
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.social-links i {
    font-size: 1.1rem;
}

/* Estados de carregamento */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: var(--gray-600);
}

.loading::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid var(--gray-200);
    border-top: 2px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsividade para tablets */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .search-container {
        padding: 20px;
    }
    
    .search-input {
        padding: 14px 55px 14px 16px;
        font-size: 1rem;
    }
    
    .quick-filters {
        justify-content: flex-start;
    }
    
    .item-resultado {
        padding: 20px;
    }
    
    .item-resultado h2 {
        font-size: 1.2rem;
    }
    
    .welcome-message {
        padding: 30px 20px;
    }
}

/* Responsividade para celulares */
@media (max-width: 480px) {
    .container {
        padding: 15px;
    }
    
    .hero {
        padding: 40px 15px 30px;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 0.9rem;
    }
    
    .search-container {
        padding: 15px;
    }
    
    .search-input {
        padding: 12px 50px 12px 12px;
        font-size: 0.9rem;
    }
    
    .search-btn {
        padding: 10px;
        right: 6px;
    }
    
    .quick-filters {
        justify-content: center;
        gap: 8px;
    }
    
    .filter-btn {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    
    .item-resultado {
        padding: 16px;
    }
    
    .item-resultado h2 {
        font-size: 1.1rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .welcome-message {
        padding: 20px 15px;
    }
    
    .welcome-message i {
        font-size: 2rem;
    }
    
    .welcome-message h3 {
        font-size: 1.3rem;
    }
    
    footer p {
        margin-bottom: 10px;
        font-size: 0.9rem;
    }
    
    .social-links {
        flex-direction: column;
        gap: 12px;
    }
    
    .social-links a {
        font-size: 0.85rem;
        padding: 6px 12px;
    }
}
