/* --- RESET E VARIÁVEIS --- */
:root {
    --primary-bg: #E4EEF0;
    --dark-bg: #16232A;
    --accent: #FF5B04;
    --secondary: #075056;
    --text-white: #FFFFFF;
    --text-dark: #16232A;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

html { scroll-behavior: smooth; height: 100%; }

body {
    background-color: var(--primary-bg);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
}
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* --- HEADER --- */
header {
    background: var(--dark-bg);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

header #logo h1 {
    font-family: 'Just Another Hand', cursive;
    font-size: 3rem;
    color: var(--text-white);
    text-align: center;
    text-decoration: none;
}

header b { color: var(--accent); }

/* --- HERO SECTION --- */
.hero {
    min-height: 90vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    padding: 4rem 0;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    align-items: center;
}

.hero-text h1 {
    font-size: 2.5rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.hero-text h1 span { color: var(--secondary); }

.hero-text p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-btns {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-primary, .btn-secondary {
    padding: 0.8rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.btn-primary {
    background: var(--accent);
    color: white;
}

.btn-secondary {
    border: 2px solid var(--secondary);
    color: var(--secondary);
}

.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(255,91,4,0.2); }

/* --- HERO SECTION --- */
.hero { 
    min-height: 100vh; /* Ocupa a tela cheia para dar impacto de SaaS */
    display: flex; 
    align-items: center; 
    padding: 60px 0; 
    position: relative;
    overflow: hidden; /* Evita que SVGs gigantes criem barra de rolagem lateral */
}

.hero-grid { 
    display: grid; 
    grid-template-columns: 1fr; 
    gap: 12px; 
    align-items: center;
}

/* HERO VISUAL - COMPOSIÇÃO E TAMANHO DOS SVGS */
.hero-visual { 
    position: relative; 
    height: 750px; /* Aumentado para comportar elementos maiores */
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.svg-element { 
    position: absolute; 
    transition: all 0.5s ease-in-out;
}

/* 1. SOMBRA: Por trás de tudo (z-index: 1) */
.img-sombra { 
    width: 150%; /* Estravasa o container para preencher o fundo */
    max-width: 1200px; 
    z-index: 1; 
    bottom: -40%;
    opacity: 0.6;
    filter: blur(10px); /* Suaviza a sombra para profundidade */
}

/* 2. LIXO: Elemento principal (z-index: 2) */
.img-lixo { 
    width: 120%; 
    max-width: 550px; 
    z-index: 2; 
    animation: float-main 3s infinite ease-in-out;
}

/* 3. ELEMENTOS FLUTUANTES: Por cima da lixeira (z-index: 3) */
.img-smile { 
    width: 150px; /* Aumentado */
    z-index: 2; 
    top: 40%; 
    left: 0; 
    animation: float-alt 5s infinite ease-in-out;
}

.img-binoculos { 
    width: 200px; /* Aumentado */
    z-index: 3; 
    bottom: 5%; 
    right: 0; 
    animation: float-alt 7s infinite ease-in-out reverse;
}

/* --- MODAL STYLES --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(22, 35, 42, 0.9); /* var(--dark-bg) com transparência */
    display: none; /* Escondido por padrão */
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(8px);
    padding: 20px;
}

/* Estado ativo do modal */
.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: var(--secondary);
    width: 100%;
    max-width: 500px;
    border-radius: 20px;
    padding: 2rem;
    position: relative;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.1);
    animation: modalAppear 0.4s ease-out;
}

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

.modal-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.icon-check {
    display: inline-block;
    width: 60px;
    height: 60px;
    background: var(--accent);
    color: white;
    font-size: 2rem;
    line-height: 60px;
    border-radius: 50%;
    margin-bottom: 1rem;
}

.modal-header h3 {
    font-family: 'Just Another Hand', cursive;
    font-size: 3rem;
    color: var(--accent);
    line-height: 1;
}

.modal-body p {
    color: white;
    text-align: center;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

/* Container do link/slug */
.slug-container {
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    display: flex;
    padding: 5px;
    gap: 5px;
    border: 1px solid rgba(255,255,255,0.2);
}

.slug-container input {
    flex: 1;
    background: transparent;
    border: none;
    color: white;
    padding: 0.8rem;
    font-size: 0.8rem;
    font-family: monospace;
    outline: none;
}

#copy-btn {
    background: var(--dark-bg);
    border: none;
    padding: 0 1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
}

#copy-btn:hover { background: var(--accent); }

.modal-footer {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
}

#close-modal {
    width: 100%;
    border: none;
    cursor: pointer;
}


/* Desktop Adjustment */
@media (min-width: 768px) {
    .modal-content {
        padding: 3rem;
    }
    .modal-body p {
        font-size: 1rem;
    }
}

/* --- ANIMAÇÕES PARA INTERATIVIDADE --- */
@keyframes float-main {
    0%, 100% { transform: translateY(0) rotate(0); }
    50% { transform: translateY(-30px) rotate(2deg); }
}

@keyframes float-alt {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-20px, -20px) scale(1.1); }
}

/* --- RESPONSIVIDADE (DESKTOP) --- */
@media (min-width: 768px) {
    .hero-grid { 
        grid-template-columns: 1fr 1fr; 
    }

    .hero-visual {
        height: 650px;
    }

    /* Aumentando ainda mais no Desktop */
    .img-lixo { width: 650px; }
    .img-sombra { width: 1000px; bottom: -20%; }
    .img-smile { width: 220px; top: -10%; left: -5%; }
    .img-binoculos { width: 280px; bottom: 0; right: -5%; }
}

/* AJUSTE DO FORMULÁRIO (Para o botão não fugir) */
.denuncia {
    position: relative;
    z-index: 10;
    padding: 80px 0;
    /* Removido height fixo para o botão não sair do container */
}

#botao-denuncia {
    width: 100%;
    margin-top: 20px;
    /* Garante que o botão se comporte no grid */
}

/* --- FORMULÁRIO --- */
.denuncia {
    background: var(--secondary);
    padding: 6rem 0;
    color: white;
    border-radius: 50px 50px 0 0;
}

.denuncia h2 {
    font-family: 'Just Another Hand', cursive;
    font-size: 4rem;
    color: var(--accent);
    text-align: center;
    margin-bottom: 3rem;
}

.form-wrapper {
    background: rgba(255,255,255,0.05);
    padding: 3rem;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

#denuncia-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.campo { display: flex; flex-direction: column; }
.campo.full-width { grid-column: span 2; }

.campo label { margin-bottom: 0.5rem; font-weight: 300; }

.campo input, .campo select, .campo textarea {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.2);
    padding: 1rem;
    color: white;
    border-radius: 8px;
}

#botao-denuncia {
    grid-column: span 2;
    background: var(--accent);
    color: white;
    border: none;
    padding: 1.2rem;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 1rem;
}

/* --- RANKING --- */
.ranking { padding: 6rem 0; text-align: center; }
.ranking h2 { font-family: 'Just Another Hand', cursive; font-size: 3.5rem; margin-bottom: 1rem; }
.table-container { margin-top: 3rem; overflow-x: auto; }

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

th { background: var(--dark-bg); color: white; padding: 1.5rem; }
td { padding: 1.5rem; border-bottom: 1px solid #eee; }

.ranking-action {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 1rem;
}

#ranking-button {
    width: 50%;
    margin-top: 1rem;
    /* Garante que o botão se comporte no grid */
}

#ranking-button {
    grid-column: span 2;
    background: var(--accent);
    color: white;
    border: none;
    padding: 1.2rem;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 3rem;
    text-decoration: none;
}

/*--- TELA DE RANKING ---*/
/* Badge de status dentro da tabela */
.badge {
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    background: var(--primary-bg);
    color: var(--secondary);
}

tr:nth-child(1) .badge {
    background: #ffebeb;
    color: #d93025; /* Vermelho para o primeiro lugar (Crítico) */
}

/* Centralizando o título da página de ranking */
.ranking-header {
    margin-bottom: 4rem;
}

.ranking-header h2 {
    color: var(--secondary);
}

/* Efeito de destaque na linha ao passar o mouse */
tbody tr:hover {
    background-color: #f8fbfc;
    transition: var(--transition);
}


/* --- FOOTER --- */
footer { background: var(--dark-bg); color: white; padding: 2rem; text-align: center; font-size: 0.9rem; }

/* Ajuste para telas pequenas na tabela */
@media (max-width: 768px) {
    .table-container {
        padding: 0 10px;
    }
    
    th, td {
        padding: 1rem 0.5rem;
        font-size: 0.9rem;
    }
}


/* --- MEDIA QUERIES --- */
@media (min-width: 768px) {
    .hero-grid { grid-template-columns: 1fr 1fr; }
    .hero-text h1 { font-size: 4rem; }
    .img-lixo { width: 450px; }
    .img-sombra { width: 480px; }
}

@media (max-width: 600px) {
    #denuncia-form { grid-template-columns: 1fr; }
    .campo.full-width { grid-column: span 1; }
    #botao-denuncia { grid-column: span 1; }
    #ranking-button { grid-column: span 1; width: 100%; font-size: 1rem; padding: 1rem; }
    .hero-text h1 { font-size: 2.2rem; }
}