/* --- CORES & VARIÁVEIS --- */
:root {
    --g-blue: #1a73e8;       
    --g-blue-hover: #174ea6; 
    --g-green: #34a853;      
    --g-green-hover: #2e8b46;
    --g-text-main: #202124;  
    --g-text-sec: #5f6368;   
    --g-border: #dadce0;
    --g-bg-btn: #f8f9fa;
}

/* ==========================================================================
   1. ESTRUTURA E CONTAINER
   ========================================================================== */

#pg-overlay {
    display: none;
    position: fixed !important; top: 0; left: 0;
    width: 100vw; height: 100vh;
    background-color: rgba(255, 255, 255, 0.6) !important; 
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    z-index: 2147483640 !important;
}

#pg-hard-loader {
    position: fixed; top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: #ffffff;
    z-index: 2147483647;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
}
.pg-hard-text {
    margin-top: 24px; font-family: 'Roboto', sans-serif;
    color: var(--g-text-main); font-size: 18px; font-weight: 400;
}

/* CONTAINER PRINCIPAL (Padrão P1: Centralizado) */
#pg-container {
    display: flex;
    flex-direction: column;
    width: 90%; max-width: 450px;
    background: #ffffff !important;
    border-radius: 12px;
    font-family: 'Roboto', sans-serif; overflow: hidden;
    z-index: 2147483650 !important;
    height: auto; transition: height 0.3s ease;
    
    /* Centralização Absoluta (Ideal para P1) */
    position: fixed !important;
    top: 50% !important; left: 50% !important;
    transform: translate(-50%, -50%) !important;
    
    box-shadow: 0 10px 30px rgba(0,0,0,0.15) !important;
    line-height: normal; text-align: left; color: var(--g-text-main);
}

/* CONTAINER EM MODO QUIZ (Topo Fixo para não pular) */
#pg-container.pg-quiz-active {
    top: 15vh !important; /* Distância fixa do topo */
    transform: translateX(-50%) !important; /* Remove centralização vertical */
}

/* Override REC (Clean Canvas) */
#pg-clean-wrapper #pg-container {
    /* No template Clean, o posicionamento é relativo ao wrapper */
    position: relative !important;
    top: auto !important; left: auto !important;
    transform: none !important;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08) !important;
}

/* ==========================================================================
   2. ELEMENTOS INTERNOS
   ========================================================================== */

.pg-header-fixed { padding: 32px 32px 0 32px; text-align: center; background: #fff; border: none !important; }
.pg-header-title { margin: 0 0 10px 0 !important; font-size: 22px !important; color: var(--g-text-main) !important; font-weight: 400 !important; line-height: 1.3 !important; }
.pg-header-desc { margin: 0 0 20px 0 !important; font-size: 14px !important; color: var(--g-text-sec) !important; line-height: 1.5 !important; }

.pg-progress-track { width: 100%; height: 6px; background: #f1f3f4; border-radius: 3px; margin-bottom: 0; overflow: hidden; position: relative; }
.pg-progress-fill { height: 100%; background-color: var(--g-blue); width: 0%; transition: width 0.6s cubic-bezier(0.25, 0.8, 0.25, 1); position: relative; overflow: hidden; }
.pg-progress-fill::after { content: ''; position: absolute; top: 0; left: 0; bottom: 0; right: 0; background-image: linear-gradient(90deg, rgba(255,255,255,0) 0, rgba(255,255,255,0.4) 50%, rgba(255,255,255,0) 100%); width: 50%; transform: translateX(-150%); animation: pg-shimmer 1.5s infinite; }
@keyframes pg-shimmer { 0% { transform: translateX(-150%); } 100% { transform: translateX(250%); } }

#pg-body-content { padding: 24px 32px 32px 32px; height: auto; display: flex; flex-direction: column; justify-content: center; }
.pg-question-title { font-size: 18px !important; color: var(--g-text-main) !important; margin-bottom: 24px !important; font-weight: 500 !important; text-align: center; line-height: 1.4 !important; }

.pg-option-btn { display: flex !important; justify-content: space-between !important; align-items: center !important; width: 100% !important; padding: 16px 20px !important; margin: 0 0 12px 0 !important; background-color: var(--g-bg-btn) !important; background-image: none !important; border: 1px solid #cce0f5 !important; border-radius: 8px !important; color: var(--g-text-main) !important; font-size: 15px !important; font-weight: 500 !important; text-align: left !important; text-transform: none !important; cursor: pointer; transition: all 0.2s !important; position: relative; box-shadow: none !important; text-shadow: none !important; }
.pg-option-btn::after { content: '›'; font-size: 24px; line-height: 1; color: var(--g-blue) !important; margin-left: 10px; font-weight: 300; }
.pg-option-btn:hover { background-color: #eef4fc !important; border-color: var(--g-blue) !important; color: var(--g-blue) !important; box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important; transform: none !important; }
.pg-option-btn:active { background-color: #dcebfb !important; transform: scale(0.99) !important; }

.pg-gate-wrapper { padding: 40px 32px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.pg-gate-icon { font-size: 48px; color: var(--g-green); margin-bottom: 20px; }
.pg-gate-title { font-size: 26px !important; color: var(--g-text-main) !important; margin: 0 0 12px 0 !important; font-weight: 500 !important; }
.pg-gate-desc { font-size: 16px !important; color: var(--g-text-sec) !important; line-height: 1.5 !important; margin-bottom: 32px !important; max-width: 300px; }

.pg-btn-continue { display: flex !important; justify-content: space-between !important; align-items: center !important; width: 100% !important; padding: 18px 24px !important; background-color: var(--g-green) !important; background-image: none !important; border: none !important; border-radius: 8px !important; color: #ffffff !important; font-size: 16px !important; font-weight: 600 !important; text-transform: uppercase !important; letter-spacing: 0.5px !important; cursor: pointer; transition: all 0.2s !important; box-shadow: 0 4px 10px rgba(52, 168, 83, 0.3) !important; text-shadow: none !important; }
.pg-btn-continue::after { content: '›'; font-size: 24px; line-height: 1; color: #fff; font-weight: 300; }
.pg-btn-continue:hover { background-color: var(--g-green-hover) !important; background-image: none !important; transform: translateY(-2px) !important; box-shadow: 0 6px 15px rgba(52, 168, 83, 0.4) !important; }

.pg-loading-state { text-align: center; display: flex; flex-direction: column; align-items: center; padding: 30px 0; }
.pg-spinner { width: 40px; height: 40px; border: 3px solid #f3f3f3; border-top: 3px solid var(--g-blue); border-radius: 50%; animation: pg-spin 0.8s linear infinite; margin-bottom: 15px; }
.pg-loading-text { font-size: 15px; color: var(--g-text-sec); }
@keyframes pg-spin { to { transform: rotate(360deg); } }

/* LOGOTIPO DO SITE NO QUIZ */
.pg-site-logo {
    display: block;
    margin: 0 auto 15px auto; 
    max-height: 40px;         
    max-width: 180px;         
    width: auto;
    height: auto;
    object-fit: contain;      
}

/* Ajuste do header para ficar mais compacto */
.pg-header-fixed {
    padding: 25px 32px 0 32px; 
    text-align: center; 
    background: #fff; 
    border: none !important;
}

/* ==========================================================================
   3. ÁREA DE ANÚNCIO (FAKE REWARD)
   ========================================================================== */

#pg-ad-area {
    display: none;
    position: fixed !important; top: 0; left: 0;
    width: 100vw; height: 100vh;
    z-index: 2147483660 !important;
    background-color: rgba(0, 0, 0, 0.95) !important; /* Fundo bem escuro */
    backdrop-filter: blur(5px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#pg-ad-wrapper {
    position: relative;
    /* Remove fundo branco do wrapper para parecer flutuante */
    background: transparent; 
    padding: 0;
    width: auto; max-width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* BOTÃO DE FECHAR / CONTADOR (Discreto no início) */
#pg-timer-btn {
    margin-bottom: 15px;
    font-family: 'Roboto', sans-serif;
    font-size: 12px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.5); /* Cinza discreto */
    background: transparent;
    border: none;
    padding: 5px 10px;
    cursor: default;
    pointer-events: none; /* Travado */
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ESTADO ATIVO (Botão Vermelho) */
#pg-timer-btn.active {
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    background-color: #d32f2f; /* Vermelho */
    border: 1px solid #d32f2f;
    border-radius: 30px;
    padding: 10px 25px;
    cursor: pointer;
    pointer-events: auto; /* Libera clique */
    box-shadow: 0 4px 15px rgba(211, 47, 47, 0.4);
    opacity: 1;
}

#pg-timer-btn.active:hover {
    background-color: #b71c1c;
    transform: scale(1.05);
}

#pg-ad-inner-slot {
    min-width: 300px; min-height: 250px;
    display: flex; justify-content: center; align-items: center;
}