@tailwind base;
@tailwind components;
@tailwind utilities;

/* ========== FONTE ARIAL EM TODA A PÁGINA ========== */
* {
    font-family: Arial, Helvetica, sans-serif !important;
}

/* ========== CORREÇÃO: ISOLAR O CONTEXTO DE RENDERIZAÇÃO ========== */
html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    height: 100%;
}

body {
    font-family: Arial, Helvetica, sans-serif !important;
    image-rendering: pixelated;
    background: #0a1f0a;
    color: #8acc8a;
    padding-top: 74px;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    /* ISOLAR O CONTEXTO PARA O position:fixed FUNCIONAR CORRETAMENTE */
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    will-change: transform;
    /* GARANTIR QUE O BODY NÃO INTERFIRA NO FIXED */
    position: relative;
    overflow-x: hidden;
}

/* ================== CORREÇÃO: MENU FIXO GARANTIDO ================== */
.menu-fixo {
    position: fixed !important;  /* !important GARANTE QUE NADA SOBRESCREVA */
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    z-index: 9999 !important;
    background: rgba(0, 0, 0, 0.95) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    border-bottom: 2px solid #1a4a1a !important;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.5) !important;
    /* GARANTIR QUE O MENU FIQUE ACIMA DE TUDO */
    transform: translateZ(0) !important;
    -webkit-transform: translateZ(0) !important;
    will-change: transform !important;
    /* EVITAR QUE O MENU SEJA CORTADO */
    overflow: visible !important;
}

/* ================== CORREÇÃO: GARANTIR QUE O CONTEÚDO NÃO SOBREPONHA O MENU ================== */
body {
    padding-top: 74px !important;
}

/* ================== SCROLLBAR PERSONALIZADA ================== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #0a1a0a;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #1a4a1a;
    border-radius: 10px;
    border: 1px solid #2a5a2a;
}

::-webkit-scrollbar-thumb:hover {
    background: #2a5a2a;
}

/* ================== MENU LINKS ================== */
.menu-link {
    color: #6aee6a;
    text-decoration: none;
    font-weight: bold;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    letter-spacing: 1px;
    font-family: Arial, Helvetica, sans-serif !important;
}

.menu-link:hover {
    background: rgba(106, 238, 106, 0.1);
    color: #aaffaa;
}

.menu-link-afiliado {
    color: #ffd700;
    text-decoration: none;
    font-weight: bold;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    letter-spacing: 1px;
    font-family: Arial, Helvetica, sans-serif !important;
}

.menu-link-afiliado:hover {
    background: rgba(255, 215, 0, 0.15);
    color: #ffe44d;
}

@media (max-width: 768px) {
    body {
        padding-top: 65px !important;
    }
    .menu-link, .menu-link-afiliado {
        font-size: 0.7rem;
        padding: 6px 10px;
    }
}

@media (max-width: 480px) {
    body {
        padding-top: 58px !important;
    }
    .menu-link, .menu-link-afiliado {
        font-size: 0.6rem;
        padding: 4px 8px;
    }
}

/* ================== ORDEM 6: CARD DOS ARTIGOS CENTRALIZADOS ================== */
.card {
    background: rgba(17, 34, 17, 0.95);
    border: 2px solid #4ade80;
    box-shadow: 0 0 25px rgba(74, 222, 128, 0.4);
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    border-radius: 16px;
    padding: 20px 16px;
    text-decoration: none;
    text-align: center !important;
}

.card:hover {
    box-shadow: 0 0 35px rgba(74, 222, 128, 0.6);
    transform: translateY(-6px);
    border-color: #6aee6a;
}

/* Emoji grande no topo - CENTRALIZADO */
.card .text-7xl {
    font-size: 4.5rem;
    line-height: 1;
    margin-bottom: 12px;
    transition: transform 0.3s ease;
    text-align: center !important;
}

.card:hover .text-7xl {
    transform: scale(1.15);
}

/* Título - CENTRALIZADO */
.card h3 {
    font-size: 1.05rem;
    line-height: 1.2;
    margin-bottom: 8px;
    min-height: 2.6em;
    color: #6aee6a;
    font-weight: bold;
    font-family: Arial, Helvetica, sans-serif !important;
    text-align: center !important;
}

/* Texto - CENTRALIZADO */
.card p {
    flex: 1;
    font-size: 0.8rem;
    line-height: 1.35;
    text-align: center !important;
    color: #a1e3a1;
    font-family: Arial, Helvetica, sans-serif !important;
}

/* ================== BOTÃO MARFIM ================== */
.btn-marfim {
    background: #f5f5dc;
    color: #0a1f0a;
    font-weight: bold;
    padding: 16px 40px;
    border-radius: 16px;
    border: 2px solid #c4c4a0;
    transition: all 0.3s ease;
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 1.2rem;
    letter-spacing: 1px;
    cursor: pointer;
}

.btn-marfim:hover {
    background: #e8e8c8;
    transform: scale(1.03);
    box-shadow: 0 0 30px rgba(245, 245, 220, 0.3);
}

/* ================== BOTÕES FERRAMENTAS (MARFIM) ================== */
.btn-ferramenta {
    background: #f5f5dc;
    color: #0a1f0a;
    font-weight: bold;
    padding: 12px 20px;
    border-radius: 12px;
    border: 2px solid #c4c4a0;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 1.1rem;
    letter-spacing: 1px;
}

.btn-ferramenta:hover {
    background: #e8e8c8;
    transform: scale(1.02);
    box-shadow: 0 0 20px rgba(245, 245, 220, 0.2);
}

.btn-ferramenta:active {
    transform: scale(0.98);
}

/* ================== SEÇÃO AFILIADO MERCADO LIVRE ================== */
.titulo-relevo {
    text-shadow: 2px 2px 0 #1a3a1a, 4px 4px 0 #0a1f0a;
    letter-spacing: 3px;
    font-weight: bold;
    font-family: Arial, Helvetica, sans-serif !important;
}

.card-afiliado {
    background: linear-gradient(145deg, #0d2a0d, #0a1f0a);
    border: 2px solid #2d5a2d;
    border-radius: 20px;
    padding: 20px;
    transition: all 0.3s ease;
}

.card-afiliado:hover {
    transform: scale(1.02);
    border-color: #4a8a4a;
    box-shadow: 0 0 30px rgba(74, 138, 74, 0.2);
}

/* ================== PRODUTOS MERCADO LIVRE ================== */
.produto-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 25px;
    padding: 15px;
    background: rgba(17, 34, 17, 0.5);
    border-radius: 20px;
    border: 1px solid #1a3a1a;
    transition: all 0.3s ease;
}

.produto-container:hover {
    border-color: #2a5a2a;
    background: rgba(17, 34, 17, 0.7);
}

.produto-img {
    width: 100%;
    max-width: 250px;
    height: auto;
    border-radius: 15px;
    border: 2px solid #2d5a2d;
    transition: all 0.3s ease;
}

.produto-img:hover {
    transform: scale(1.05);
    border-color: #4a8a4a;
    box-shadow: 0 0 30px rgba(74, 138, 74, 0.3);
}

.secao-titulo {
    font-size: 1.6rem;
    font-weight: bold;
    color: #f5f5dc;
    text-shadow: 0 0 20px rgba(245, 245, 220, 0.2);
    text-align: center;
    margin-bottom: 12px;
    font-family: Arial, Helvetica, sans-serif !important;
}

.secao-subtitulo {
    font-size: 1.1rem;
    color: #6aee6a;
    text-align: center;
    margin-bottom: 10px;
    font-family: Arial, Helvetica, sans-serif !important;
}

.secao-subtitulo-menor {
    font-size: 0.95rem;
    color: #4aae4a;
    text-align: center;
    margin-bottom: 20px;
    font-family: Arial, Helvetica, sans-serif !important;
}

/* ================== BANCOS DIGITAIS ================== */
.banco-img {
    width: 100%;
    border-radius: 15px;
    border: 2px solid #2d5a2d;
    transition: all 0.3s ease;
    cursor: pointer;
}

.banco-img:hover {
    transform: scale(1.02);
    border-color: #4a8a4a;
    box-shadow: 0 0 25px rgba(74, 138, 74, 0.2);
}

/* ================== FERRAMENTAS ================== */
.ferramenta-input {
    background: #0a1a0a;
    border: 1px solid #1a4a1a;
    border-radius: 12px;
    padding: 12px 16px;
    color: #8acc8a;
    width: 100%;
    margin-bottom: 10px;
    transition: all 0.3s ease;
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 1rem;
}

.ferramenta-input:focus {
    outline: none;
    border-color: #3a8a3a;
    box-shadow: 0 0 20px rgba(58, 138, 58, 0.2);
    background: #0d1f0d;
}

.ferramenta-input::placeholder {
    color: #3a6a3a;
}

.resultado-box {
    background: rgba(0, 0, 0, 0.5);
    padding: 15px;
    border-radius: 12px;
    margin-top: 10px;
    min-height: 60px;
    color: #8acc8a;
    border: 1px solid #1a3a1a;
    transition: all 0.3s ease;
    font-family: Arial, Helvetica, sans-serif !important;
}

.resultado-box:hover {
    border-color: #2a5a2a;
}

/* ================== ORDEM 4: IP PRINCIPAL - CÉLULAS VERTICAIS E CENTRALIZADAS ================== */
#ip-info {
    display: grid;
    grid-template-columns: 1fr !important;
    gap: 16px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

#ip-info > div {
    background: rgba(0, 0, 0, 0.5);
    padding: 20px;
    border-radius: 16px;
    text-align: center;
    border: 1px solid #1a4a1a;
    transition: all 0.3s ease;
    width: 100%;
}

#ip-info > div:hover {
    border-color: #2a5a2a;
    box-shadow: 0 0 20px rgba(74, 222, 128, 0.1);
}

#ip-info p:first-child {
    color: #4aae4a;
    font-size: 0.85rem;
    letter-spacing: 1px;
    margin-bottom: 8px;
    font-family: Arial, Helvetica, sans-serif !important;
}

#ip-info p:last-child {
    font-size: 1.5rem;
    font-weight: bold;
    color: #6aee6a;
    text-shadow: 0 0 15px rgba(106, 238, 106, 0.2);
    word-break: break-word;
    font-family: Arial, Helvetica, sans-serif !important;
}

#ip-endereco {
    font-size: 2rem !important;
}

/* ================== ORDEM 2: +50px DE ESPAÇAMENTO VERTICAL NA COLUNA DIREITA ================== */
.coluna-direita-item {
    margin-top: 50px !important;
    margin-bottom: 50px !important;
}

.coluna-direita-item:first-child {
    margin-top: 0 !important;
}

.coluna-direita-item:last-child {
    margin-bottom: 0 !important;
}

/* ================== CONTADOR ================== */
#contador {
    font-variant-numeric: tabular-nums;
    text-shadow: 0 0 15px #4ade80;
    transition: all 0.3s ease;
    font-size: 3rem;
    font-family: Arial, Helvetica, sans-serif !important;
}

/* ================== RODAPÉ ================== */
.footer-link {
    color: #8acc8a;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: bold;
    font-family: Arial, Helvetica, sans-serif !important;
}

.footer-link:hover {
    color: #aaffaa;
    text-shadow: 0 0 20px rgba(106, 238, 106, 0.2);
}

#climas-brasil,
#horarios-mundo {
    scrollbar-width: thin;
    scrollbar-color: #1a4a1a #0a1a0a;
}

#climas-brasil > div,
#horarios-mundo > div {
    padding: 6px 0;
    border-bottom: 1px solid #0a2a0a;
    transition: all 0.2s ease;
}

#climas-brasil > div:hover,
#horarios-mundo > div:hover {
    background: rgba(26, 74, 26, 0.2);
    padding-left: 8px;
}

#climas-brasil > div span,
#horarios-mundo > div span {
    font-family: Arial, Helvetica, sans-serif !important;
}

/* ================== MAPA ================== */
#map {
    height: 400px;
    border-radius: 20px;
    border: 2px solid #1a4a1a;
    transition: all 0.3s ease;
}

#map:hover {
    border-color: #2a5a2a;
    box-shadow: 0 0 30px rgba(74, 222, 128, 0.1);
}

.leaflet-control-zoom {
    border: 2px solid #1a4a1a !important;
    border-radius: 12px !important;
    overflow: hidden;
}

.leaflet-control-zoom a {
    background: #0a1a0a !important;
    color: #6aee6a !important;
    border-color: #1a4a1a !important;
    transition: all 0.3s ease;
}

.leaflet-control-zoom a:hover {
    background: #1a3a1a !important;
    color: #aaffaa !important;
}

/* ================== QR CODE E ENCURTADOR ================== */
#resultado-qr img {
    border-radius: 12px;
    border: 2px solid #2a5a2a;
    background: white;
    padding: 8px;
    transition: all 0.3s ease;
}

#resultado-qr img:hover {
    transform: scale(1.05);
    border-color: #4a8a4a;
}

/* ================== RESPONSIVIDADE ================== */
@media (max-width: 1024px) {
    .produto-img {
        max-width: 200px;
    }
}

@media (max-width: 768px) {
    /* Cards dos artigos */
    .card .text-7xl {
        font-size: 3.8rem;
    }
    .card h3 {
        font-size: 1rem;
        min-height: 2.2em;
    }
    .card p {
        font-size: 0.75rem;
    }

    /* IP Info - mantém vertical */
    #ip-info {
        grid-template-columns: 1fr !important;
        gap: 12px;
        max-width: 100%;
    }
    
    #ip-info p:last-child {
        font-size: 1.3rem;
    }
    #ip-endereco {
        font-size: 1.6rem !important;
    }

    /* Títulos */
    .secao-titulo {
        font-size: 1.4rem;
    }
    
    .secao-subtitulo {
        font-size: 1rem;
    }
    
    .secao-subtitulo-menor {
        font-size: 0.9rem;
    }

    /* Produtos */
    .produto-img {
        max-width: 180px;
    }

    /* Mapa */
    #map {
        height: 280px;
    }

    /* Contador */
    #contador {
        font-size: 2.2rem;
    }

    /* Rodapé */
    footer .grid {
        gap: 30px;
    }

    /* Botões */
    .btn-ferramenta {
        font-size: 0.95rem;
        padding: 10px 16px;
    }
    .btn-marfim {
        font-size: 1rem;
        padding: 12px 24px;
    }

    /* Espaçamento da coluna direita - reduz em mobile */
    .coluna-direita-item {
        margin-top: 30px !important;
        margin-bottom: 30px !important;
    }
}

@media (max-width: 480px) {
    .card .text-7xl {
        font-size: 3rem;
    }
    .card h3 {
        font-size: 0.9rem;
    }
    
    .secao-titulo {
        font-size: 1.2rem;
    }
    
    .produto-img {
        max-width: 140px;
    }
    
    #ip-info p:last-child {
        font-size: 1.1rem;
    }
    #ip-endereco {
        font-size: 1.3rem !important;
    }
    
    .btn-ferramenta {
        font-size: 0.85rem;
        padding: 8px 14px;
    }
    .btn-marfim {
        font-size: 0.9rem;
        padding: 10px 16px;
    }
    
    .ferramenta-input {
        padding: 10px 12px;
        font-size: 0.85rem;
    }

    #contador {
        font-size: 1.8rem;
    }

    .coluna-direita-item {
        margin-top: 20px !important;
        margin-bottom: 20px !important;
    }
}

/* ================== ANIMAÇÕES ================== */
@keyframes pulse-green {
    0%, 100% {
        box-shadow: 0 0 15px rgba(74, 222, 128, 0.2);
    }
    50% {
        box-shadow: 0 0 30px rgba(74, 222, 128, 0.4);
    }
}

.card {
    animation: pulse-green 3s ease-in-out infinite;
}

.card:hover {
    animation: none;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#artigos .card {
    animation: fadeInUp 0.6s ease forwards;
}

#artigos .card:nth-child(2) { animation-delay: 0.05s; }
#artigos .card:nth-child(3) { animation-delay: 0.1s; }
#artigos .card:nth-child(4) { animation-delay: 0.15s; }
#artigos .card:nth-child(5) { animation-delay: 0.2s; }
#artigos .card:nth-child(6) { animation-delay: 0.25s; }
#artigos .card:nth-child(7) { animation-delay: 0.3s; }
#artigos .card:nth-child(8) { animation-delay: 0.35s; }
#artigos .card:nth-child(9) { animation-delay: 0.4s; }
#artigos .card:nth-child(10) { animation-delay: 0.45s; }
#artigos .card:nth-child(11) { animation-delay: 0.5s; }
#artigos .card:nth-child(12) { animation-delay: 0.55s; }
#artigos .card:nth-child(13) { animation-delay: 0.6s; }
#artigos .card:nth-child(14) { animation-delay: 0.65s; }
#artigos .card:nth-child(15) { animation-delay: 0.7s; }
#artigos .card:nth-child(16) { animation-delay: 0.75s; }
#artigos .card:nth-child(17) { animation-delay: 0.8s; }
#artigos .card:nth-child(18) { animation-delay: 0.85s; }
#artigos .card:nth-child(19) { animation-delay: 0.9s; }
#artigos .card:nth-child(20) { animation-delay: 0.95s; }
#artigos .card:nth-child(21) { animation-delay: 1s; }

/* ================== UTILITÁRIOS ADICIONAIS ================== */
.text-ivory {
    color: #f5f5dc;
}

.border-ivory {
    border-color: #f5f5dc;
}

.bg-green-deep {
    background: #0a1f0a;
}

.bg-green-dark {
    background: #0d2a0d;
}

.shadow-green {
    box-shadow: 0 0 30px rgba(74, 222, 128, 0.15);
}

.shadow-green:hover {
    box-shadow: 0 0 50px rgba(74, 222, 128, 0.3);
}