* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Arial, Helvetica, sans-serif;
    color: #e6e6e6;
    background: radial-gradient(circle at top, #244363 0, #1c2530 42%, #111418 100%);
}

.pagina {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
}

.cartao {
    width: min(900px, 100%);
    background: rgba(31, 39, 49, 0.97);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 24px;
    padding: 28px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.48);
}

.barra-superior {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.btn-pwa {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 16px;
    border: 1px solid rgba(146, 255, 188, 0.45);
    border-radius: 999px;
    background: rgba(146, 255, 188, 0.10);
    color: #92ffbc;
    font-size: 14px;
    font-weight: bold;
    text-transform: none;
    letter-spacing: 0;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease, border-color 0.2s ease;
    white-space: nowrap;
}

.btn-pwa:hover {
    background: rgba(146, 255, 188, 0.22);
    border-color: rgba(146, 255, 188, 0.75);
    transform: translateY(-1px);
}

.btn-pwa svg {
    flex-shrink: 0;
}

.contador-paginas {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 9px 13px;
    border: 1px solid rgba(135, 168, 202, 0.28);
    border-radius: 999px;
    background: rgba(12, 18, 25, 0.38);
    color: #c8d5e2;
    font-size: 14px;
}

.contador-paginas strong {
    color: #92ffbc;
    font-size: 16px;
}

.barra-idioma {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.barra-idioma label {
    color: #c8d5e2;
    font-size: 14px;
    font-weight: bold;
}

.barra-idioma select {
    min-width: 190px;
}

.topo {
    margin-bottom: 22px;
}

.tag {
    display: inline-block;
    margin: 0 0 12px;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(67, 156, 255, 0.18);
    color: #a9d7ff;
    font-size: 13px;
    font-weight: bold;
}

h1, h2, p {
    margin-top: 0;
}

h1 {
    margin-bottom: 10px;
    font-size: clamp(30px, 5vw, 46px);
    letter-spacing: -0.03em;
}

.subtitulo {
    margin-bottom: 10px;
    color: #c9d3dd;
    font-size: 17px;
    line-height: 1.55;
}

.privacidade {
    margin-bottom: 0;
    color: #92ffbc;
    font-size: 14px;
    font-weight: bold;
}

.adsense-area {
    display: grid;
    gap: 12px;
    margin: 22px 0 24px;
}

.adsense-cabecalho {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
}

.adsense-cabecalho h2 {
    margin: 0;
    font-size: 18px;
}

.adsense-cabecalho p {
    margin: 0;
    max-width: 440px;
    color: #aeb9c4;
    font-size: 13px;
    line-height: 1.45;
    text-align: right;
}

.adsense-duplo {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.adsense-slot {
    display: flex;
    min-height: 96px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 6px;
    border: 1px dashed rgba(169, 215, 255, 0.55);
    border-radius: 18px;
    background: rgba(13, 22, 31, 0.45);
    color: #d6eaff;
    text-align: center;
    padding: 16px;
}

.adsense-slot span {
    font-weight: bold;
}

.adsense-slot small {
    margin: 0;
    color: #aeb9c4;
}

.adsense-horizontal {
    min-height: 110px;
}

.formulario {
    display: grid;
    gap: 18px;
}

.linha-campos {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

label span {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #f2f7fb;
}

small {
    display: block;
    margin-top: 7px;
    color: #aeb9c4;
    line-height: 1.35;
}

input, textarea, select {
    width: 100%;
    border: 1px solid #536171;
    border-radius: 14px;
    background: #27313d;
    color: #ffffff;
    padding: 13px 14px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

textarea {
    min-height: 112px;
    resize: vertical;
    line-height: 1.45;
}

input:focus, textarea:focus, select:focus {
    border-color: #77b8ff;
    box-shadow: 0 0 0 4px rgba(67, 156, 255, 0.23);
    background: #2d3947;
}

.acoes {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

button {
    border: 0;
    border-radius: 14px;
    padding: 13px 18px;
    cursor: pointer;
    background: #2f8df4;
    color: white;
    font-weight: bold;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    transition: transform 0.15s ease, background 0.2s ease, opacity 0.2s ease;
}

button:hover {
    transform: translateY(-1px);
    background: #57a6ff;
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.65;
    transform: none;
}

button.secundario {
    background: #27313d;
    border: 1px solid #5f7083;
}

button.secundario:hover {
    background: #344253;
}

.mensagem {
    min-height: 24px;
    margin: 18px 0 6px;
    font-weight: bold;
    line-height: 1.4;
}

.mensagem.sucesso {
    color: #83eaa1;
}

.mensagem.erro {
    color: #ffaaa8;
}

.resultado-area {
    margin-top: 16px;
    background: #171d24;
    border: 1px solid #3f4e5f;
    border-radius: 18px;
    overflow: hidden;
}

.resultado-topo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 15px 18px;
    background: #222b36;
    border-bottom: 1px solid #3f4e5f;
}

.resultado-topo h2 {
    margin: 0;
    font-size: 18px;
}

#contador {
    color: #cfd8e3;
    font-size: 14px;
    white-space: nowrap;
}

.resultado {
    margin: 0;
    min-height: 210px;
    max-height: 380px;
    overflow: auto;
    padding: 18px;
    color: #ffffff;
    font-family: Consolas, Monaco, 'Courier New', monospace;
    font-size: 16px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
}

html[dir="rtl"] body {
    direction: rtl;
}

html[dir="rtl"] .resultado {
    direction: ltr;
    text-align: left;
}

html[dir="rtl"] .adsense-cabecalho p {
    text-align: left;
}

@media (max-width: 760px) {
    .cartao {
        padding: 22px;
    }

    .barra-superior,
    .barra-idioma,
    .adsense-cabecalho {
        align-items: stretch;
        flex-direction: column;
    }

    .btn-pwa {
        justify-content: center;
        border-radius: 16px;
    }

    .contador-paginas {
        justify-content: space-between;
        border-radius: 16px;
    }

    .adsense-cabecalho p {
        max-width: none;
        text-align: left;
    }

    .linha-campos,
    .adsense-duplo {
        grid-template-columns: 1fr;
    }

    .acoes button {
        width: 100%;
    }

    .resultado-topo {
        align-items: flex-start;
        flex-direction: column;
    }
}
