/* ========================================= */
/* 1. Imports e Variáveis Globais (Raiz) 🌎 */
/* ========================================= */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@200;400;600;700;800&display=swap');

:root {
    --font-size: 1rem;
    --primary-color: #1C61FF; /* Azul principal para botões e links ativos */
    --background-dark: #000;
    --card-background: #111;
    --input-background: #1c1e1e;
    --text-light: #fff;
    --text-muted: #bbb;
    --highlight-color: #ADD8E6; /* Azul claro para títulos/destaques */
}

/* Modos de cor (Embora não usados no seu body, mantive as variáveis) */
.light-mode {
    --navbar-color: #222;
    --navbar-bg-color: #F0F0F0;
}
.dark-mode {
    --navbar-color: #FFF;
    --navbar-bg-color: #000;
}

/* ========================================= */
/* 2. Reset e Estilos Base ✍️ */
/* ========================================= */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    outline: none;
}

/* Estilo base do corpo (Unificado) */
body {
    font-family: 'Poppins', sans-serif;
    background: var(--background-dark);
    color: var(--text-light);
    /* padding-bottom é definido para compensar o bottom-nav */
    padding-bottom: 80px;
    min-height: 100vh;
}

/* Remove qualquer texto riscado herdado */
a, button {
    text-decoration: none !important;
}

ul {
    list-style: none;
}

p {
    /* Mantive o text-align: justify; para consistência */
    padding: 0 10px;
    text-align: justify;
}

h2, .h2 {
    font-size: 20px;
}

/* ========================================= */
/* 3. Layout Principal (Formulário/Conteúdo) 📱 */
/* ========================================= */

/* Contém o left-content e right-content */
.container {
    display: flex;
    width: 90%;
    max-width: 960px;
    padding: 10px;
    margin: 0 auto; /* Centraliza o container na página */
}

.left-content {
    flex: 1;
    padding-right: 20px;
}

.right-content {
    flex: 1;
    padding: 20px;
    /* padding-bottom alto para compensar o bottom-nav em telas pequenas */
    padding-bottom: 120px;
    border-radius: 20px;
    background-color: var(--card-background);
}

.important {
    color: var(--highlight-color);
}

/* Títulos */
.bestseller h3,
.section-title {
    text-align: center;
    font-size: 22px;
    margin-top: 95px !important;
    font-weight: 600;
}

.header2 {
    text-align: center;
    width: 100%;
    margin: auto;
    color: var(--text-light);
}

/* ========================================= */
/* 4. Estilos de Formulário 📝 */
/* ========================================= */

label {
    display: block;
    margin-bottom: 5px;
}

input[type="name"],
input[type="email"],
input[type="text"],
input[type="file"],
/* Corrigido para apenas select, pois type="select" não é padrão HTML */
select {
    width: calc(100% - 10px);
    padding: 15px;
    margin-bottom: 8px;
    background-color: var(--input-background);
    color: var(--text-muted);
    border: none;
    border-radius: 10px;
}

input[type="submit"] {
    width: calc(100% - 10px);
    background-color: var(--primary-color);
    color: var(--text-light);
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

/* ========================================= */
/* 5. Cabeçalho e Navegação Fixa (Top/Bottom) ⚓ */
/* ========================================= */

/* LOGO FIXA - FUNDO TRANSLÚCIDO */
.top-logo-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 18px 0;
    background: rgba(0, 0, 0, 0.40);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    display: flex;
    justify-content: center;
    z-index: 9999;
}

.top-logo-wrapper img {
    width: 120px;
    height: auto;
}

/* BOTTOM NAVIGATION */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background: rgba(0, 0, 0, 0.60);
    backdrop-filter: blur(10px);
    border-top: none;
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 9999;
}

.bottom-nav__link {
    color: var(--text-muted);
    font-size: 23px;
    transition: 0.3s;
}

.bottom-nav__link.active,
.bottom-nav__link:hover {
    color: var(--primary-color);
}

/* ========================================= */
/* 6. Pop-up Overlay (Feedback de Formulário) 💡 */
/* ========================================= */

.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000; /* Alto z-index para garantir visibilidade */
}

.popup-content {
    background-color: #222;
    color: #eee;
    padding: 25px; /* Aumentei um pouco o padding */
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    max-width: 90%;
}

.popup-content h2 {
    color: var(--highlight-color);
}

.popup-content p {
    margin: 15px 0;
    padding: 0; /* Remove padding herdado de 'p' */
}

.popup-content button {
    background-color: #007bff;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.popup-content button:hover {
    background-color: #0056b3;
}

/* ========================================= */
/* 7. Grid de Aplicativos e Botões Gerais 🖼️ */
/* ========================================= */

.search-container {
    position: relative;
    width: 90%;
    max-width: 450px;
    margin: 25px auto 10px;
}

.search-container input {
    width: 100%;
    padding: 12px 45px 12px 18px;
    border-radius: 25px;
    border: none;
    background: var(--card-background);
    color: var(--text-light);
    font-size: 16px;
}

.search-container .search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
    margin-top: 25px;
    justify-items: center;
}

.app-card {
    background: var(--card-background);
    border-radius: 30px;
    width: 220px;
    padding: 15px;
    text-align: center;
    color: white;
    transition: 0.3s;
}

.app-card:hover {
    transform: scale(1.05);
}

.app-image {
    width: 100%;
    border-radius: 100px;
}

.app-title {
    margin-top: 10px;
    font-size: 18px;
    font-weight: 600;
}

.download-btn {
    margin-top: 10px;
    display: inline-block;
    background: var(--primary-color);
    color: var(--text-light);
    padding: 8px 20px;
    border-radius: 30px;
    font-weight: 600 !important;
    letter-spacing: 0.2px;
}

.load-more {
    display: flex;
    justify-content: center;
    margin: 25px 0;
}

.load-more button {
    padding: 12px 30px;
    font-size: 18px;
    cursor: pointer;
    border: none;
    border-radius: 50px;
    color: var(--text-light);
    background: var(--primary-color);
    transition: 0.3s;
    font-weight: 800 !important;
    letter-spacing: 0.2px;
}

.load-more button:hover {
    background: #0e3fbd;
    transform: scale(1.05);
}

/* ========================================= */
/* 8. Estilos de Navbar Hamburguer (Desktop/Mobile) 🍔 */
/* ========================================= */

#menu {
    z-index: 2;
    position: fixed;
    right: 0;
    left: 0;
    top: 0;
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    font-size: 1.1rem;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(20px);
    color: var(--navbar-color, var(--text-light));
}

.logo {
    float: right;
    display: flex;
    justify-content: flex-end; /* Corrigido para flex-end */
    align-items: center;
    font-size: 24px;
    text-transform: uppercase;
    letter-spacing: 4px;
}

.logo img {
    height: 40px;
    width: auto;
    cursor: pointer;
}

.navbar__links {
    display: flex;
}

.navbar__link > a {
    color: var(--navbar-color, var(--text-light));
    text-decoration: none;
}

.taphover {
    transition: all 0.3s;
}

.taphover:hover,
.taphover:active {
    transform: scale(1.05);
}

.burger {
    /* Escondido por padrão, só aparece em telas pequenas */
    display: none;
}


/* ========================================= */
/* 9. Media Queries (Responsividade) 📐 */
/* ========================================= */

/* Mobile Grid Fix (Menor que 600px) */
@media (max-width: 600px) {
    .apps-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .app-card {
        width: 95%;
        padding: 12px;
    }
}

/* Ajustes Responsivos para Formulário (Menor que 768px) */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }

    .left-content,
    .right-content {
        flex: 1;
        padding: 10px;
    }
    
    /* Footer */
    footer h1 {
        font-size: 2.5vw;
    }

    /* Esconde o menu desktop e mostra o burger (Navbar Mobile) */
    .navbar__links {
        overflow: hidden;
        display: flex;
        flex-direction: column;
        width: 0;
        height: calc(100vh - 65px);
        position: absolute;
        top: 65px;
        right: 0;
        transform: translateX(110%);
        transition: all 0.5s ease-in-out;
        background: var(--navbar-bg-color, var(--background-dark));
    }
    
    .show-nav .navbar__links {
        width: 100vw;
        transform: translateX(0);
    }

    /* Estilos do Botão Hamburguer */
    .burger {
        display: block;
        position: relative;
        padding: 0;
        width: 30px;
        height: 45px;
        border: none;
        background: transparent;
        cursor: pointer;
    }
    
    .bar {
        display: block;
        width: 30px;
        height: 4px;
        border-radius: 3px;
        background: var(--navbar-color, var(--text-light));
        transition: all 0.5s ease-in-out;
    }

    .bar::before, .bar::after {
        content: "";
        width: 30px;
        height: 4px;
        position: absolute;
        left: 0;
        background: var(--navbar-color, var(--text-light));
        border-radius: 3px;
        transition: all 0.5s ease-in-out;
    }

    .bar::before {
        transform: translateY(-12px);
    }
    
    .bar::after {
        transform: translateY(12px);
    }
    
    .show-nav .bar {
        width: 0;
        background: transparent;
    }
    
    .show-nav .bar::before {
        transform: rotate(45deg);
    }
    
    .show-nav .bar::after {
        transform: rotate(-45deg);
    }
    
    /* Estilos de link no Menu Aberto */
    .navbar__link > a {
        display: block;
        padding: 1rem;
        font-size: 1.6rem;
        color: var(--navbar-color, var(--text-light));
        transition: all 0.4s ease-in-out;
    }
}

/* Esconde Bottom Nav no Desktop (Maior que 768px) */
@media (min-width: 768px) {
    .bottom-nav {
        display: none;
    }
    
    /* Reseta o menu desktop para linha */
    .navbar__links {
        display: flex !important;
        flex-direction: row !important;
        width: auto !important;
        height: auto !important;
        position: static !important;
        transform: none !important;
    }
    
    /* Efeito underline no desktop */
    .navbar__link > a::after {
        display: block;
        content: "";
        width: 0;
        height: 1px;
        background: var(--navbar-color, var(--text-light));
        transition: width 0.4s;
    }
    
    .navbar__link:hover > a::after {
        width: 100%;
    }
}

/* Ajustes para telas muito grandes (2000px ou mais) */
@media screen and (min-width: 2000px) {
    .logo {
        margin-left: 12%;
    }
}