/* Reset básico e configurações globais */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    background-color: #0F052B; /* Cor de fundo MAIS PROFUNDA, no HTML */
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    color: #E0E0E0;
    line-height: 1.6;
    overflow-x: hidden;
    position: relative; /* Cria um contexto de empilhamento para .stars-background com z-index -1 */
}

.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Fundo de Estrelas Animado */
.stars-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1; /* Fica atrás do conteúdo do body, mas acima do fundo do html */
    pointer-events: none;
    overflow: hidden;
}

.star {
    position: absolute;
    background-color: white;
    border-radius: 50%;
    box-shadow: 0 0 4px 1px rgba(255, 255, 255, 0.9), /* Brilho principal */
                0 0 10px 2px rgba(220, 200, 255, 0.6);   /* Halo lilás/roxo suave */
}

@keyframes twinkle {
    0%, 100% {
        opacity: 0.5;
        transform: scale(0.8);
    }
    50% {
        opacity: 1.0;
        transform: scale(1.3);
    }
}

/* Estilos do Header */
header {
    padding: 20px 0;
    position: absolute;
    width: 100%;
    z-index: 10; /* Header bem na frente */
    background-color: rgba(15, 5, 43, 0.4); /* Fundo translúcido um pouco mais sutil */
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

header .header-container {
    display: flex;
    align-items: center;
    justify-content: flex-start; /* Alinha logo e título à esquerda */
    gap: 15px;
}

header .logo {
    height: 50px;
    width: auto;
    flex-shrink: 0;
}

header .header-title {
    font-family: 'Pacifico', cursive;
    font-size: 2.8rem;
    font-weight: 400; /* Pacifico é geralmente 400 */
    color: #FFFFFF;
    line-height: 1;
    text-shadow: 0 2px 6px rgba(30, 0, 70, 0.6), /* Sombra roxa mais definida */
                 0 0 18px rgba(180, 140, 255, 0.5); /* Brilho lilás mais amplo */
    margin: 0;
}

/* Seção Hero */
.hero {
    min-height: 95vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 160px; /* Espaço aumentado para o header com título */
    padding-bottom: 60px;
    position: relative;
    overflow: hidden;
    /* Fundo do Hero (gradiente) - cobrirá as estrelas nesta área */
    background-image: linear-gradient(to bottom, rgba(26, 9, 59, 0.9), rgba(15, 5, 43, 0.98) 70%, #0F052B);
    z-index: 1; /* Acima do .stars-background */
}

/* Conteúdo do Hero (texto, imagem do app, botões) */
.hero .hero-layout-original {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    width: 100%;
    position: relative; /* Para z-index, se necessário para sobrepor o fundo do hero */
    z-index: 2; /* Acima do fundo/gradiente do .hero */
}

.hero-content {
    flex-basis: 55%;
    text-align: left;
}

.hero h1 {
    font-size: 2.9rem;
    font-weight: 700;
    color: #FFFFFF;
    margin-bottom: 20px;
    line-height: 1.25;
    text-shadow: 0 3px 10px rgba(0,0,0,0.3);
}

.hero p {
    font-size: 1.15rem;
    margin-bottom: 40px;
    color: #D0D0F0;
    max-width: 580px;
}

.hero-image-container {
    flex-basis: 40%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-app-image.rotating-logo {
    max-width: 250px;
    width: 100%;
    height: auto;
    border-radius: 50%;
    animation: rotate 25s linear infinite;
    box-shadow: 0 0 35px rgba(190, 150, 255, 0.6),
                0 0 60px rgba(150, 80, 255, 0.5);
}

/* Container dos Cards das Lojas */
.store-cards-container {
    display: flex;
    justify-content: flex-start;
    gap: 20px;
    flex-wrap: wrap;
}

.store-card-link {
    text-decoration: none;
    display: inline-block;
}

.store-card {
    background-color: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 170px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    transition: transform 0.2s ease-in-out, background-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.store-card:hover {
    transform: translateY(-2px) scale(1.03);
    background-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 5px 18px rgba(44, 11, 90, 0.4);
}

.store-badge-img {
    height: 35px;
    width: auto;
}

.store-card-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.store-card-text span {
    font-size: 0.7rem;
    color: #C0C0E0;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.store-card-text strong {
    font-size: 0.95rem;
    color: #FFFFFF;
    font-weight: 600;
    line-height: 1.2;
}

/* Animação do logo */
@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Seção Features */
.features {
    padding: 70px 0;
    background-color: #140433; /* Fundo opaco, cobrirá estrelas nesta seção */
    position: relative;
    z-index: 1; /* Acima do .stars-background */
}

.features h2 {
    text-align: center;
    font-size: 2.2rem;
    color: #FFFFFF;
    margin-bottom: 40px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.feature-item {
    background-color: rgba(255, 255, 255, 0.05);
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(44, 11, 90, 0.5);
}

.feature-icon {
    height: 50px;
    width: auto;
    margin-bottom: 15px;
    filter: drop-shadow(0 2px 3px rgba(0,0,0,0.2));
    filter: invert();
}

.feature-item h3 {
    font-size: 1.4rem;
    color: #FFFFFF;
    margin-bottom: 10px;
}

.feature-item p {
    font-size: 0.95rem;
    color: #B0B0D0;
}

/* Footer */
footer {
    padding: 30px 0;
    text-align: center;
    background-color: #0A031A; /* Fundo opaco, cobrirá estrelas */
    font-size: 0.9rem;
    color: #A0A0C0;
    position: relative;
    z-index: 1; /* Acima do .stars-background */
}

footer a {
    color: #B0B0D0;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
    color: #FFFFFF;
}

/* Responsividade */
@media (max-width: 992px) {
    .hero .hero-layout-original {
        flex-direction: column;
        text-align: center;
    }
    .hero-content {
        text-align: center;
        order: 2;
        flex-basis: auto;
    }
    .hero-image-container {
        order: 1;
        margin-bottom: 30px;
        flex-basis: auto;
    }
    .hero-app-image.rotating-logo {
        max-width: 200px;
    }
    .store-cards-container {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    header {
        padding: 15px 0;
    }
    header .logo {
        height: 40px;
    }
    header .header-title {
        font-size: 2.2rem;
    }
    .hero {
        padding-top: 140px; /* Ajuste para o novo header */
    }
    .hero h1 {
        font-size: 2.3rem;
    }
    .hero p {
        font-size: 1rem;
        margin-bottom: 30px;
    }
    .hero-app-image.rotating-logo {
        max-width: 160px;
    }
    .store-cards-container {
        gap: 15px;
    }
    .store-card {
        min-width: 160px;
        padding: 8px 12px;
    }
    .store-badge-img {
        height: 30px;
    }
    .features h2 {
        font-size: 1.9rem;
    }
}

@media (max-width: 480px) {
    header .header-container {
        /* Por padrão, tentará manter lado a lado, pode centralizar o container se o título for muito grande */
        justify-content: center; /* Centraliza o conjunto logo + título */
        /* flex-direction: column; Descomente se quiser empilhar em telas muito pequenas */
        /* gap: 8px; */
    }
    header .logo {
        height: 35px;
    }
    header .header-title {
        font-size: 1.9rem; /* Título menor */
    }
    .hero {
        padding-top: 130px; /* Ajuste para o novo header */
        min-height: auto; /* Deixa o conteúdo definir a altura */
        padding-bottom: 40px;
    }
    .hero h1 {
        font-size: 1.8rem;
    }
    .hero-app-image.rotating-logo {
        max-width: 120px;
    }
    .store-cards-container {
        flex-direction: column;
        align-items: center;
    }
    .store-card {
        width: 200px;
    }
    .store-badge-img {
        height: 28px;
    }
}

/* --- Estilos do Seletor de Idiomas --- */

/* Container para alinhar */
.language-select-container {
    margin-left: auto; /* Empurra para a direita se estiver usando flexbox */
}

/* O Select em si */
#language-select {
    background-color: rgba(255, 255, 255, 0.1); /* Fundo translúcido */
    color: #FFFFFF;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    padding: 5px 10px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    cursor: pointer;
    outline: none;
    transition: all 0.3s ease;
    
    /* Remove a seta padrão feia em alguns navegadores e adiciona uma customizada (opcional) */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    text-align: center;
    min-width: 80px;
}

#language-select:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.6);
}

/* Estilo das opções (O fundo precisa ser escuro pois o texto é branco) */
#language-select option {
    background-color: #0F052B; /* Mesma cor do fundo do site */
    color: #FFFFFF;
}

/* --- Ajustes de Responsividade para o Header --- */

@media (max-width: 480px) {
    header .header-container {
        flex-direction: row; /* Mantém na mesma linha */
        justify-content: space-between;
        align-items: center;
        padding: 0 20px;
    }

    header .header-title {
        font-size: 1.6rem; /* Reduz um pouco o título no mobile */
    }

    #language-select {
        padding: 5px 5px;
        font-size: 0.8rem;
        min-width: auto;
    }
}