:root {
    /* Identidade AutoNorma */
    --azul-marinho: #0F172A;
    --azul-primario: #2563EB;
    --laranja-acao: #F97316;
    --laranja-hover: #EA580C;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background: #f4f7fb; color: #333; padding: 20px; }
.container { max-width: 960px; margin: 0 auto; background: #fff; border-radius: 12px; box-shadow: 0 4px 12px rgba(0,0,0,0.1); padding: 30px; }
h1 { color: #0a2f5a; font-size: 26px; margin-bottom: 5px; }
h2 { color: #1a4a7a; font-size: 20px; margin: 20px 0 10px; }
.subtitle { color: #5a7a9a; margin-bottom: 20px; }
.upload-area { border: 2px dashed #b0c4de; border-radius: 8px; padding: 30px; text-align: center; background: #f8faff; cursor: pointer; transition: border-color 0.3s; }
.upload-area:hover { border-color: #1a4a7a; }
.upload-area input { display: none; }
.upload-label { font-size: 16px; color: #1a4a7a; font-weight: 600; }
.upload-hint { font-size: 13px; color: #7a9ab5; margin-top: 8px; }
.file-name { margin: 12px 0; font-size: 14px; color: #0a2f5a; font-weight: 500; text-align: center; }
.format-section { display: flex; flex-wrap: wrap; gap: 15px; align-items: center; margin: 20px 0; }
.format-section select { flex: 1; min-width: 250px; padding: 10px 14px; border: 1px solid #b0c4de; border-radius: 6px; background: white; font-size: 15px; color: #333; }
/*
.btn { background: #1a4a7a; color: white; border: none; padding: 10px 24px; border-radius: 6px; font-size: 16px; cursor: pointer; transition: background 0.3s; }
.btn:hover { background: #0f3b5e; }
*/
.btn { 
    display: inline-block; /* O SEGREDO: Força o link a ter corpo e empurrar os textos */
    text-decoration: none; /* Garante que o link não fique sublinhado */
    text-align: center;    /* Centraliza o texto no botão */
    
    background: var(--azul-primario); 
    color: white; 
    border: none; 
    padding: 10px 24px; 
    border-radius: 6px; 
    font-size: 16px; 
    cursor: pointer; 
    transition: all 0.3s ease; 
}

.btn:hover { 
    background: var(--azul-marinho); /* Atualizado para o Azul Marinho */
}

.explanation-box { background: #eef4fa; border-left: 4px solid #1a4a7a; padding: 14px 18px; border-radius: 4px; margin: 15px 0; font-size: 14px; line-height: 1.5; color: #1a3a5a; }
.tabs { display: flex; border-bottom: 2px solid #d0dce8; margin-top: 25px; }
.tab-btn { padding: 12px 24px; background: none; border: none; border-bottom: 3px solid transparent; cursor: pointer; font-size: 15px; font-weight: 600; color: #5a7a9a; transition: all 0.3s; }
.tab-btn.active { color: #1a4a7a; border-bottom-color: #1a4a7a; }
.tab-content { display: none; padding: 20px 0; }
.tab-content.active { display: block; }
.form-group { margin-bottom: 15px; }
.form-group label { display: block; margin-bottom: 4px; font-weight: 600; color: #1a3a5a; font-size: 14px; }
.form-group input, .form-group select { width: 100%; padding: 10px 12px; border: 1px solid #b0c4de; border-radius: 6px; font-size: 14px; }
.form-group input:focus, .form-group select:focus { border-color: #1a4a7a; outline: none; box-shadow: 0 0 0 3px rgba(26,74,122,0.1); }
.row { display: flex; gap: 15px; }
.row .form-group { flex: 1; }
.results-area { margin-top: 25px; padding: 20px; background: #f8faff; border-radius: 8px; border: 1px solid #d0dce8; min-height: 60px; }
@media (max-width: 600px) {
  .format-section { flex-direction: column; align-items: stretch; }
  .row { flex-direction: column; gap: 0; }
  .tabs { flex-direction: column; }
  .tab-btn { border-bottom: none; border-left: 3px solid transparent; }
  .tab-btn.active { border-left-color: #1a4a7a; }
}

/* Novos estilos para comportar os anúncios */
.page-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    justify-content: center;
}

.main-content {
    flex: 1;
    min-width: 300px;
    max-width: 960px; /* Mantém o tamanho original do seu formulário */
}

/* Estilo visual dos placeholders do AdSense */
.ad-placeholder {
    /*
    background: #e2e8f0;
    border: 2px dashed #94a3b8;
    color: #64748b;
    */
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    text-align: center;
    border-radius: 8px;
    margin-bottom: 20px;
}

/*
.ad-horizontal {
    width: 100%;
    height: 90px; // Padrão Leaderboard
}

.ad-vertical {
    width: 300px;
    height: 600px; // Padrão Half Page/Skyscraper
    display: none; // Escondido por padrão no mobile
}
*/

@media (min-width: 1024px) {
    .ad-vertical {
        display: flex; /* Aparece apenas em telas grandes */
    }
}

.upload-tip {
    background-color: #eef2f5;
    color: #333;
    padding: 12px 15px;
    border-left: 4px solid #007bff;
    border-radius: 4px;
    font-size: 0.9em;
    margin-top: 15px;
    margin-bottom: 20px;
    line-height: 1.5;
}

/* Estilo Moderno dos Cartões (Cards) */
.ui-card {
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.08);
    padding: 25px;
    margin-bottom: 25px;
    border: 1px solid #edf2f7;
    transition: all 0.3s ease-in-out;
}

/* Classes para ocultar e revelar as etapas suavemente */
.step-hidden {
    display: none;
    opacity: 0;
}

.step-visible {
    display: block;
    animation: slideFadeIn 0.6s forwards;
}

@keyframes slideFadeIn {
    from { 
        opacity: 0; 
        transform: translateY(-15px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

/* =========================================
   RODAPÉ (FOOTER)
   ========================================= */
.app-footer {
    text-align: center; padding: 20px; margin-top: 40px;
    border-top: 1px solid #edf2f7; color: #666; font-size: 0.9em;
}
.cafe-link {
    color: #ff8c00; text-decoration: none; font-weight: bold; transition: color 0.2s;
}
.cafe-link:hover { color: #cc7000; }

/* =========================================
   MODAL DE PROCESSAMENTO
   ========================================= */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6); display: flex; justify-content: center; align-items: center;
    z-index: 9999; backdrop-filter: blur(3px);
}
.modal-overlay.hidden { display: none; }

.modal-content {
    background: #fff; padding: 40px; border-radius: 12px;
    text-align: center; max-width: 420px; width: 90%;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    animation: modalFadeIn 0.3s ease-out forwards;
}
@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.modal-state.hidden { display: none; }

/* ESTADO 1: SPINNER DE CARREGAMENTO */
.spinner {
    border: 4px solid #f3f3f3; border-top: 4px solid #007bff;
    border-radius: 50%; width: 50px; height: 50px;
    animation: spin 1s linear infinite; margin: 0 auto 20px auto;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* ESTADO 2: SUCESSO E DOWNLOAD */
.success-icon { font-size: 48px; margin-bottom: 15px; }
.btn-download {
    display: inline-block; background: #28a745; color: #fff;
    padding: 14px 24px; border-radius: 6px; text-decoration: none;
    font-size: 1.1em; font-weight: bold; margin: 20px 0; width: 100%;
    transition: background 0.2s, transform 0.1s; box-sizing: border-box;
}
.btn-download:hover { background: #218838; transform: translateY(-2px); }

/* FEEDBACK & MONETIZAÇÃO */
.feedback-area { margin-bottom: 25px; color: #555; display: flex; align-items: center; justify-content: center; gap: 10px; }
.thumb-btn { background: none; border: none; font-size: 24px; cursor: pointer; transition: transform 0.2s; }
.thumb-btn:hover { transform: scale(1.3); }

.upsell-box {
    background: #fff8f0; border: 1px dashed #ffc107; padding: 15px;
    border-radius: 8px; margin-bottom: 20px;
}
.upsell-box p { margin: 0 0 10px 0; font-size: 0.9em; color: #333; }
.btn-cafe {
    display: inline-block; background: #ffc107; color: #333;
    padding: 8px 16px; border-radius: 4px; text-decoration: none; font-weight: bold; font-size: 0.9em;
}
.btn-cafe:hover { background: #e0a800; }

.btn-close-text { background: none; border: none; color: #888; text-decoration: underline; cursor: pointer; font-size: 0.9em; }
.btn-close-text:hover { color: #555; }

/* =========================================
   AVISO DE COOKIES (LGPD)
   ========================================= */
.cookie-banner {
    position: fixed; bottom: 0; left: 0; width: 100%;
    background: #1a202c; color: #edf2f7; z-index: 10000;
    box-shadow: 0 -4px 10px rgba(0,0,0,0.2);
    animation: slideUp 0.5s ease-out forwards;
}
.cookie-banner.hidden { display: none; }

.cookie-content {
    max-width: 1200px; margin: 0 auto; padding: 15px 20px;
    display: flex; justify-content: space-between; align-items: center;
    gap: 20px; font-size: 0.9em; line-height: 1.5;
}
.cookie-content p { margin: 0; flex: 1; }
.cookie-link { color: #63b3ed; text-decoration: underline; }
.cookie-link:hover { color: #90cdf4; }

.btn-cookie {
    background: #48bb78; color: white; border: none;
    padding: 10px 24px; border-radius: 6px; font-weight: bold;
    cursor: pointer; transition: background 0.2s; white-space: nowrap;
}
.btn-cookie:hover { background: #38a169; }

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

/* Responsividade para celulares */
@media (max-width: 768px) {
    .cookie-content { flex-direction: column; text-align: center; }
    .btn-cookie { width: 100%; }
}

/* Botão de Ação Final (Download/Sucesso) */
.btn-sucesso {
    background: var(--laranja-acao) !important;
    font-weight: bold;
    margin-top: 15px; /* Empurra qualquer texto que esteja acima dele para não grudar */
    display: inline-block;
}

.btn-sucesso:hover {
    background: var(--laranja-hover) !important;
    transform: scale(1.03);
}