* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f0f2f5;
    color: #333;
    padding: 20px;
    line-height: 1.6;
}

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

header {
    text-align: center;
    margin-bottom: 30px;
}

h1 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 2.5rem;
}

.description {
    color: #7f8c8d;
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto 20px;
}

.search-container {
    max-width: 600px;
    margin: 0 auto 30px;
    position: relative;
}

#search-box {
    width: 100%;
    padding: 16px 50px 16px 20px;
    font-size: 1.1rem;
    border: 2px solid #ddd;
    border-radius: 50px;
    outline: none;
    transition: all 0.3s ease;
    background-color: white;
}

#search-box:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.search-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #7f8c8d;
    font-size: 1.2rem;
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

.tag {
    background-color: white;
    border-radius: 12px;
    padding: 22px 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    font-size: 1.3rem;
    font-weight: 600;
    color: #2c3e50;
    transition: all 0.3s ease;
    text-align: center;
    min-width: 250px;
    border: 1px solid #eaeaea;
}

.tag:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    border-color: #3498db;
}

.tag.hidden {
    display: none;
}

footer {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    color: #7f8c8d;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .tag {
        padding: 18px 25px;
        font-size: 1.2rem;
        min-width: 200px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .tags-container {
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .tag {
        width: 100%;
        min-width: unset;
    }
}

/* Botão fixo no canto superior direito */
.btn-voltar-inicio {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #2c3e50 0%, #4a6491 100%);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 12px 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(44, 62, 80, 0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    z-index: 1000;
    white-space: nowrap;
    min-width: auto; /* Permite que diminua */
}

.btn-voltar-inicio:hover {
    background: linear-gradient(135deg, #3498db 0%, #2c3e50 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(44, 62, 80, 0.4);
}

.btn-voltar-inicio:active {
    transform: translateY(0);
}

/* O texto dentro do botão */
.btn-text {
    display: inline-block; /* Permite controlar a visibilidade */
}

/* Em telas médias (tablets) */
@media (max-width: 768px) {
    .btn-voltar-inicio {
        top: 15px;
        right: 15px;
        padding: 12px 20px;
        font-size: 0.95rem;
    }
}

/* Em telas pequenas (celulares) - Remove o texto */
@media (max-width: 576px) {
    .btn-voltar-inicio {
        width: 50px; /* Tamanho fixo quadrado */
        height: 50px;
        padding: 0;
        border-radius: 50%; /* Fica redondo */
        justify-content: center;
    }
    
    .btn-voltar-inicio .btn-text {
        display: none; /* Esconde o texto "Início" */
    }
    
    .btn-voltar-inicio i {
        font-size: 1.3rem;
        margin: 0; /* Remove margem do ícone */
    }
    
    /* Tooltip para mostrar o texto ao passar o mouse */
    .btn-voltar-inicio:hover::after {
        content: 'Início';
        position: absolute;
        top: -40px;
        right: 0;
        background: #2c3e50;
        color: white;
        padding: 6px 12px;
        border-radius: 6px;
        font-size: 0.9rem;
        white-space: nowrap;
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
        z-index: 1001;
    }
}

/* Em telas muito pequenas */
@media (max-width: 360px) {
    .btn-voltar-inicio {
        width: 45px;
        height: 45px;
        top: 10px;
        right: 10px;
    }
    
    .btn-voltar-inicio i {
        font-size: 1.2rem;
    }
}

/* Ajuste para não sobrepor conteúdo */
.container {
    position: relative;
    padding-top: 70px; /* Espaço extra para o botão fixo */
}

@media (max-width: 576px) {
    .container {
        padding-top: 65px; /* Menos espaço quando o botão é menor */
    }
}

/* Classe para ícone apenas (controlada por JS) */
.btn-voltar-inicio.icon-only {
    width: 50px;
    height: 50px;
    padding: 0;
    border-radius: 50%;
    justify-content: center;
}

.btn-voltar-inicio.icon-only .btn-text {
    display: none;
}

.btn-voltar-inicio.icon-only i {
    font-size: 1.3rem;
    margin: 0;
}

/* Tooltip para a versão ícone */
.btn-voltar-inicio.icon-only:hover::after {
    content: 'Voltar para Início';
    position: absolute;
    top: -40px;
    right: 0;
    background: #2c3e50;
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.9rem;
    white-space: nowrap;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

/* BOTÃO VOLTAR - SOLUÇÃO GARANTIDA */
.btn-voltar-inicio {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #2c3e50;
    color: white;
    border: none;
    border-radius: 50px;
    padding: 12px 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

/* O texto do botão */
.texto-botao {
    display: inline-block;
}

/* IMPORTANTE: O !important força a sobrescrita */
@media screen and (max-width: 576px) {
    .btn-voltar-inicio {
        width: 50px !important;
        height: 50px !important;
        padding: 0 !important;
        border-radius: 50% !important;
        justify-content: center !important;
    }
    
    .texto-botao {
        display: none !important; /* Isso vai esconder o texto */
        visibility: hidden !important;
        opacity: 0 !important;
        width: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
        position: absolute !important;
    }
    
    .btn-voltar-inicio i {
        font-size: 1.3rem !important;
        margin: 0 !important;
    }
}

/* Para telas muito pequenas */
@media screen and (max-width: 360px) {
    .btn-voltar-inicio {
        width: 45px !important;
        height: 45px !important;
        top: 10px !important;
        right: 10px !important;
    }
}