/* ==========================================================================
   Gerador de Frases Viral – CSS v2.0 (Vivid & Readable)
   Melhoria: Imagens mais vivas + Texto com alto contraste
   ========================================================================== */

/* --- FONTES --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Playfair+Display:ital,wght@0,600;0,700;1,600&display=swap');

:root {
    --gold: #D4AF37;
    --gold-dim: rgba(212, 175, 55, 0.2);
    --green-whatsapp: #25D366;
    --green-dark: #128C7E;
    --bg-dark: #0a0a0a;
    --bg-card: #141414;
    --text-white: #ffffff;
    --text-muted: #a0a0a0;
    --border: rgba(255,255,255,0.1);
    --radius: 16px;
}

/* --- RESET & BASE --- */
* { box-sizing: border-box; margin: 0; padding: 0; outline: none; -webkit-tap-highlight-color: transparent; }

body {
    background-color: var(--bg-dark);
    font-family: 'Inter', sans-serif;
    color: var(--text-white);
    overflow-x: hidden; 
    padding-bottom: 40px;
}

.container {
    width: 100%;
    max-width: 600px; 
    margin: 0 auto;
    padding: 20px 16px;
}

/* --- HEADER --- */
header { text-align: center; margin-bottom: 24px; }
header h1 {
    font-family: 'Playfair Display', serif;
    color: var(--gold);
    font-size: 1.8rem;
    margin-bottom: 4px;
}
header p { color: var(--text-muted); font-size: 0.9rem; }

/* --- PREVIEW AREA --- */
.preview-area { margin-bottom: 24px; }

.preview-wrapper {
    width: 100%;
    aspect-ratio: 1 / 1; 
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border: 1px solid var(--border);
    position: relative;
}

.post-card {
    width: 100%; height: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 30px;
    background-color: #000;
    background-size: cover;
    background-position: center;
}

/* --- CORREÇÃO DO OVERLAY E TEXTO (AQUI ESTÁ O SEGREDO) --- */

/* 1. Overlay Mais Suave (Vinheta) */
.overlay-dark {
    position: absolute; inset: 0;
    /* Em vez de cobrir tudo de preto, escurece só as bordas e deixa o centro (imagem) brilhar */
    background: radial-gradient(circle, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.6) 90%);
    z-index: 1;
}

.post-content {
    z-index: 2;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

/* 2. Símbolo com Sombra */
.quote-symbol {
    font-family: 'Playfair Display', serif;
    font-size: 4rem;
    line-height: 1;
    color: var(--gold);
    opacity: 0.9;
    margin-bottom: 10px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.8); /* Sombra para destacar */
}

/* 3. Texto Blindado (Legível em qualquer fundo) */
.frase-texto {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-style: italic;
    color: #fff;
    line-height: 1.3;
    
    /* Sombra Dupla: Uma fina preta (contorno) + Uma esfumaçada (destaque) */
    text-shadow: 
        0 2px 4px rgba(0,0,0, 1),      /* Contorno nítido */
        0 0 20px rgba(0,0,0, 0.9);     /* Glow preto atrás */
}

.frase-categoria-tag {
    margin-top: 15px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    background: rgba(0,0,0,0.4); /* Fundo um pouco mais escuro na tag */
    padding: 4px 10px;
    border-radius: 20px;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,0.2);
    text-shadow: 0 2px 4px rgba(0,0,0,1);
    color: #ddd;
}

.post-footer {
    z-index: 2;
    margin-top: auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding-top: 15px;
    /* Removemos a borda para ficar mais limpo na imagem */
    /* border-top: 1px solid rgba(255,255,255,0.15); */
}

.criado-por span {
    font-weight: 600;
    color: var(--gold);
    font-size: 1rem;
    /* Sombra pesada para garantir leitura no rodapé */
    text-shadow: 0 2px 4px rgba(0,0,0,1), 0 0 10px rgba(0,0,0,0.8);
}

.site-url {
    font-size: 0.75rem;
    color: #fff;
    font-family: monospace;
    letter-spacing: 0.5px;
    opacity: 0.9;
    text-shadow: 0 2px 4px rgba(0,0,0,1); /* Garante leitura da URL */
}

.preview-note {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 10px;
}

/* --- CONTROLES --- */
.controls-area { display: flex; flex-direction: column; gap: 16px; }

.control-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
}

label {
    display: block;
    color: var(--gold);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

/* Temas */
.theme-scroll {
    display: flex; gap: 10px; overflow-x: auto; padding-bottom: 5px;
    scrollbar-width: none;
}
.theme-scroll::-webkit-scrollbar { display: none; }

.theme-opt {
    flex: 0 0 60px; height: 60px;
    border-radius: 12px;
    background-size: cover; background-position: center;
    border: 2px solid transparent;
    opacity: 0.6; transition: 0.2s;
}
.theme-opt.active {
    opacity: 1; border-color: var(--gold); transform: scale(1.05);
}

/* Inputs & Selects */
.input-group, .cascata-wrapper { position: relative; margin-bottom: 10px; }
.input-group i { position: absolute; left: 14px; top: 14px; color: var(--gold); }
.cascata-wrapper i.setinha { position: absolute; right: 14px; top: 14px; color: #fff; pointer-events: none; }

input, select {
    width: 100%;
    background: #000;
    border: 1px solid var(--border);
    color: #fff;
    padding: 14px;
    border-radius: 10px;
    font-size: 1rem;
}
input { padding-left: 40px; }
input:focus, select:focus { border-color: var(--gold); }
.disabled { opacity: 0.5; pointer-events: none; }

/* Botões */
.label-flex { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.label-flex label { margin-bottom: 0; }

.btn-random {
    background: rgba(255,255,255,0.1);
    border: none; color: #fff;
    padding: 6px 12px; border-radius: 20px;
    font-size: 0.8rem; cursor: pointer;
    display: flex; align-items: center; gap: 5px;
    transition: 0.2s;
}
.btn-random:active { transform: scale(0.95); background: rgba(255,255,255,0.2); }

.btn-gerar {
    width: 100%;
    background: linear-gradient(135deg, var(--green-whatsapp), var(--green-dark));
    color: #fff;
    border: none;
    padding: 18px;
    border-radius: 50px;
    font-size: 1.1rem; font-weight: 700;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(37, 211, 102, 0.3);
    display: flex; justify-content: center; align-items: center; gap: 10px;
    transition: transform 0.2s;
}
.btn-gerar:active { transform: scale(0.98); }

.legenda-botao {
    text-align: center; font-size: 0.75rem; color: var(--text-muted); margin-top: 8px;
}

/* Animação */
.pulse { animation: pulse-green 2s infinite; }
@keyframes pulse-green {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5); }
    70% { box-shadow: 0 0 0 10px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* Toast & Loading */
.loading-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.9); z-index: 9999;
    display: none; flex-direction: column; align-items: center; justify-content: center;
}
.spinner {
    width: 50px; height: 50px; border: 4px solid rgba(255,255,255,0.1);
    border-top-color: var(--gold); border-radius: 50%;
    animation: spin 1s infinite linear; margin-bottom: 15px;
}
@keyframes spin { to { transform: rotate(360deg); } }
#loading-text { color: var(--gold); font-family: 'Playfair Display', serif; }

.toast {
    position: fixed; top: 20px; left: 50%; transform: translateX(-50%);
    background: #333; color: #fff;
    padding: 12px 20px; border-radius: 30px;
    display: flex; align-items: center; gap: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.5);
    z-index: 10000; transition: opacity 0.3s, top 0.3s;
    border: 1px solid var(--green-whatsapp);
}
.toast i { color: var(--green-whatsapp); }
.toast.hidden { opacity: 0; pointer-events: none; top: -50px; }
.toast.visible { opacity: 1; top: 20px; }

/* Ads & SEO */
.ads-box { margin-top: 30px; text-align: center; background: var(--bg-card); padding: 10px; border-radius: var(--radius); }
.seo-content-area { text-align: center; margin-top: 30px; font-size: 0.85rem; color: var(--text-muted); padding: 0 20px; }
.seo-content-area h3 { color: var(--gold); margin-bottom: 8px; font-family: 'Playfair Display', serif; }

/* IMAGENS DE FUNDO */
.tema-trigo { background-image: url('https://images.unsplash.com/photo-1500382017468-9049fed747ef?auto=format&fit=crop&w=1080&q=80'); }
.tema-ceu { background-image: url('https://images.unsplash.com/photo-1534447677768-be436bb09401?auto=format&fit=crop&w=1080&q=80'); }
.tema-biblia { background-image: url('https://images.unsplash.com/photo-1491841550275-ad7854e35ca6?auto=format&fit=crop&w=1080&q=80'); }
.tema-luz { background-image: url('https://images.unsplash.com/photo-1507692049790-de58293a4697?auto=format&fit=crop&w=1080&q=80'); }
.tema-cruz { background-image: url('https://images.unsplash.com/photo-1504052434569-70ad5836ab65?auto=format&fit=crop&w=1080&q=80'); }
.tema-maos { background-image: url('https://images.unsplash.com/photo-1463171379577-08b0632cd6f0?auto=format&fit=crop&w=1080&q=80'); }

/* MODO SCREENSHOT (Limpa a tela) */
body.screenshot-mode { background: transparent !important; }
body.screenshot-mode header,
body.screenshot-mode .controls-area,
body.screenshot-mode .ads-box,
body.screenshot-mode .preview-note,
body.screenshot-mode .toast,
body.screenshot-mode .seo-content-area { display: none !important; }

/* Se precisar garantir que o overlay não escureça demais no print, forçamos aqui: */
body.screenshot-mode .overlay-dark {
    /* Garante que fique bem suave no print final */
    background:
    radial-gradient(circle at 50% 30%, rgba(0,0,0,.02), transparent 45%),
    linear-gradient(180deg, rgba(0,0,0,.05), rgba(0,0,0,.18)) !important;
  opacity: .80 !important;
}
/* --- ESTILOS SEO (Conteúdo Rico) --- */
.seo-content-area {
    margin-top: 40px;
    padding: 30px 20px;
    background: #111;
    border-top: 1px solid var(--border);
    text-align: center;
    color: #ccc;
}

.seo-content-area h2 {
    font-family: 'Playfair Display', serif;
    color: var(--gold);
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.seo-content-area h3 {
    font-family: 'Inter', sans-serif;
    color: #fff;
    font-size: 1.1rem;
    margin-top: 25px;
    margin-bottom: 10px;
}

.seo-content-area p {
    line-height: 1.6;
    margin-bottom: 15px;
    font-size: 0.95rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.seo-text-box {
    background: rgba(255,255,255,0.05);
    padding: 20px;
    border-radius: 10px;
    border-left: 3px solid var(--gold);
    margin: 20px auto;
    max-width: 600px;
    text-align: left;
}

.seo-text-box p {
    margin-bottom: 10px;
    font-family: 'Playfair Display', serif;
    font-style: italic;
    color: #fff;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 10px;
}
.seo-text-box p:last-child { border-bottom: none; margin-bottom: 0; }
/* =============================================================
   🔥 BLOCOS SEO DE ALTO CPC (DARK MODE ADAPTED)
   ============================================================= */

/* Container Geral dos Blocos */
.seo-block-protecao,
.seo-block-emocional,
.seo-block-financas,
.seo-block-pets {
    background-color: #161616; /* Fundo escuro para combinar com o site */
    padding: 25px;
    margin-top: 30px;
    margin-bottom: 30px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05); /* Borda sutil */
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #ccc; /* Texto cinza claro para leitura confortável */
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Efeito Hover */
.seo-block-protecao:hover,
.seo-block-emocional:hover,
.seo-block-financas:hover,
.seo-block-pets:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* Títulos dos Blocos */
.seo-block-protecao h2,
.seo-block-emocional h2,
.seo-block-financas h2,
.seo-block-pets h2 {
    font-family: 'Playfair Display', serif; /* Mantendo a fonte elegante do site */
    font-size: 1.4rem;
    margin-top: 0;
    margin-bottom: 15px;
    font-weight: 700;
}

/* Texto interno */
.seo-block-protecao p,
.seo-block-emocional p,
.seo-block-financas p,
.seo-block-pets p {
    margin-bottom: 15px;
    font-size: 0.95rem;
    color: #b0b0b0;
}

/* Negritos dentro dos textos (Palavras-chave) */
.seo-block-protecao strong,
.seo-block-emocional strong,
.seo-block-financas strong,
.seo-block-pets strong {
    color: #fff;
    font-weight: 600;
}

/* --- CORES ESPECÍFICAS POR TEMA (Bordas e Títulos) --- */

/* 1. Proteção (Azul - Segurança) */
.seo-block-protecao {
    border-left: 4px solid #3498db;
    background: linear-gradient(90deg, rgba(52, 152, 219, 0.05) 0%, rgba(22, 22, 22, 1) 100%);
}
.seo-block-protecao h2 { color: #3498db; }

/* 2. Emocional (Roxo - Mente/Calma) */
.seo-block-emocional {
    border-left: 4px solid #9b59b6;
    background: linear-gradient(90deg, rgba(155, 89, 182, 0.05) 0%, rgba(22, 22, 22, 1) 100%);
}
.seo-block-emocional h2 { color: #9b59b6; }

/* 3. Finanças (Verde - Dinheiro) */
.seo-block-financas {
    border-left: 4px solid #2ecc71;
    background: linear-gradient(90deg, rgba(46, 204, 113, 0.05) 0%, rgba(22, 22, 22, 1) 100%);
}
.seo-block-financas h2 { color: #2ecc71; }

/* 4. Pets (Laranja - Energia/Criação) */
.seo-block-pets {
    border-left: 4px solid #e67e22;
    background: linear-gradient(90deg, rgba(230, 126, 34, 0.05) 0%, rgba(22, 22, 22, 1) 100%);
}
.seo-block-pets h2 { color: #e67e22; }