﻿:root {
    --primary-blue: #004fd3;
    --accent-blue: #004ecc;
    --primary-green: #4cb350;
    --tag-green: #22c55e;
    --accent-yellow: #ffc107;
    --bg-color: #f8fafc;
    --white: #ffffff;
    --radius-card: 12px;
    --radius-btn: 8px;

    /* Upsell palette */
    --upsell-primary-blue: #1d4ed8;
    --upsell-primary-green: #22c55e;
    --upsell-hover-green: #16a34a;
    --upsell-light-green-bg: #f0fdf4;
    --upsell-accent-yellow: #ffc107;
    --upsell-neon-red: #ef4444;
    --upsell-cta-blue-top: #00c6ff;
    --upsell-cta-blue-bottom: #0072ff;
    --upsell-cta-blue-glow: rgba(0, 114, 255, 0.4);

    --dark-text: #1e293b;
    --gray-text: #64748b;

    /* Evita que navegadores forcem modo escuro e pintem transparências de preto */
    color-scheme: light;
}

* { box-sizing: border-box; }

html {
    background-color: var(--bg-color);
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-color);
    color: var(--dark-text);
    margin: 0;
    padding: 0;
}

img { max-width: 100%; display: block; }
button { font-family: inherit; }

a { color: inherit; text-decoration: none; }

/* GLOBAL COMPONENTS */
.top-dynamic-bar {
    width: 100%;
    background-color: var(--primary-blue);
    color: var(--white);
    padding: 8px 10px;
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(0, 79, 211, 0.2);
    position: relative;
    z-index: 1000;
}

.top-dynamic-bar i { font-size: 1rem; color: var(--accent-yellow); }

.winners-feed { width: 100%; margin: 15px 0; display: flex; flex-direction: column; gap: 10px; }
.winner-feed-item { background: #fff; padding: 10px; border-radius: 10px; display: flex; align-items: center; gap: 12px; border: 1px solid #e2e8f0; box-shadow: 0 2px 8px rgba(0,0,0,0.04); animation: slideInDown 0.5s ease-out; text-align: left; }
.winner-feed-item.removing { opacity: 0; transform: translateX(20px); transition: 0.5s; }
.winner-prize-img { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; }
.winner-info { display: flex; flex-direction: column; line-height: 1.2; }
.winner-name { font-size: 0.85rem; font-weight: 700; color: var(--primary-blue); display: flex; align-items: center; gap: 4px; }
.winner-prize-name { font-size: 0.75rem; color: #64748b; }
.verified-icon { color: #00a2ff; font-size: 0.8rem; }

@keyframes slideInDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes spin { to { transform: rotate(360deg); } }

.spinner-border {
    display: inline-block;
    width: 1.5rem;
    height: 1.5rem;
    border: 0.2em solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spin .75s linear infinite;
}

/* Fundo claro para imagens com transparência (evita manchas pretas) */
.banner-card img,
.footer-image,
.main-logo,
.cartela-image,
.winner-prize-img {
    background-color: #ffffff;
}

/* Refino específico do upsell para garantir fundo claro mesmo com caches/mode escuro */
.cartela-image-wrapper {
    background-color: #ffffff;
}

body[data-page="up"] .main-logo,
body[data-page="up"] .cartela-image {
    background-color: #ffffff !important;
}

/* BEGIN PAGE */
body[data-page="begin"] {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: var(--bg-color);
    min-height: 100vh;
}

.checkout-container {
    width: 100%;
    max-width: 450px;
    text-align: center;
    padding: 15px;
}

.banner-wrapper { position: relative; width: 100%; margin-bottom: 0; }
.banner-card { width: 100%; background-color: var(--white); border-radius: var(--radius-card) var(--radius-card) 0 0; overflow: hidden; border: 1px solid #e2e8f0; border-bottom: none; display: block; }
.banner-card img { width: 100%; height: auto; display: block; }
.price-tag-banner { position: absolute; top: 12px; right: 12px; background-color: var(--primary-blue); color: var(--white); padding: 5px 12px; border-radius: 8px; font-weight: 800; font-size: 1rem; display: flex; align-items: center; gap: 6px; z-index: 5; box-shadow: 0 0 12px var(--primary-blue); animation: pulseGlowTag 2s infinite alternate; }
@keyframes pulseGlowTag { from { box-shadow: 0 0 8px rgba(0, 79, 211, 0.5); } to { box-shadow: 0 0 18px rgba(0, 79, 211, 0.9); } }

.countdown-card { background-color: var(--primary-blue); color: var(--white); padding: 8px 12px; border-radius: 0 0 var(--radius-card) var(--radius-card); font-weight: 700; font-size: 0.85rem; text-transform: uppercase; margin-top: -1px; margin-bottom: 25px; position: relative; z-index: 1; box-shadow: 0 5px 15px rgba(0, 79, 211, 0.3); animation: slideUpFade 1s ease-out forwards; }
.tag-dias { background: var(--accent-yellow); color: #000; padding: 2px 8px; border-radius: 4px; margin: 0 4px; font-weight: 800; display: inline-block; box-shadow: 0 0 5px var(--accent-yellow); animation: pulseYellowDays 1.5s infinite alternate; }
@keyframes pulseYellowDays { from { box-shadow: 0 0 2px var(--accent-yellow), 0 0 5px var(--accent-yellow); } to { box-shadow: 0 0 8px var(--accent-yellow), 0 0 15px var(--accent-yellow); } }
@keyframes slideUpFade { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

.cotas-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 20px; }
.cota-card { background-color: var(--accent-blue); border: 2px solid transparent; border-radius: var(--radius-card); padding: 12px 8px; color: var(--white); cursor: pointer; transition: all 0.2s ease; position: relative; display: flex; flex-direction: column; align-items: center; box-shadow: 0 4px 6px rgba(0, 78, 204, 0.2); }
.cota-card:active { transform: translateY(2px); }
.cota-qtd { font-size: 1.2rem; font-weight: 900; margin-bottom: 0; line-height: 1; }
.cota-preco { font-size: 0.75rem; font-weight: 600; color: rgba(255,255,255,0.8); margin-top: 4px; margin-bottom: 6px; }
.cota-btn-label { background-color: #ffffff; color: var(--accent-blue); width: 100%; padding: 4px 0; border-radius: 4px; font-size: 0.6rem; font-weight: 800; text-transform: uppercase; border: none; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
.cota-card.selected { background-color: var(--primary-green); border-color: var(--primary-green); color: var(--white); box-shadow: 0 6px 15px rgba(76, 179, 80, 0.4); transform: translateY(-2px); }
.cota-card.selected .cota-preco { color: rgba(255,255,255,0.9); }
.cota-card.selected .cota-btn-label { background-color: #ffffff; color: var(--primary-green); }

.action-row { display: flex; gap: 12px; align-items: center; width: 100%; margin-bottom: 20px; }
.counter-display { background-color: #f8fafc; border: 1px solid #cbd5e1; border-radius: var(--radius-btn); display: flex; flex-direction: column; align-items: center; justify-content: center; width: 90px; height: 52px; flex-shrink: 0; box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02); }
.counter-input { background-color: transparent; border: none; width: 100%; text-align: center; font-family: 'Poppins', sans-serif; font-size: 0.85rem; font-weight: 600; color: var(--primary-blue); pointer-events: none; }
.counter-label { font-size: 0.85rem; font-weight: 400; color: #64748b; }

.btn-comprar { flex: 1; height: 52px; background-color: var(--primary-green); color: var(--white); border: none; border-radius: var(--radius-btn); font-size: 0.95rem; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 10px; cursor: pointer; box-shadow: 0 4px 12px rgba(76, 179, 80, 0.3); transition: all 0.2s ease; }
.btn-comprar:active { transform: scale(0.98); }

.footer-image { width: 100%; height: auto; border-radius: var(--radius-card); box-shadow: 0 4px 10px rgba(0,0,0,0.06); display: block; margin-bottom: 15px; }

.btn-esgotado {
    width: 100%;
    background-color: rgba(239, 68, 68, 0.85);
    color: var(--white);
    border: none;
    padding: 10px 15px;
    border-radius: var(--radius-btn);
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 4px 0 15px 0;
    cursor: not-allowed;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
}

/* VSL PAGE */
body[data-page="vsl"] {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
}

body[data-page="up"] {
    background-color: var(--bg-color);
    min-height: 100vh;
}

.main-container { width: 100%; max-width: 600px; padding: 1rem; text-align: center; }
.main-logo { width: 100%; height: auto; max-width: 600px; margin-bottom: 1.5rem; border-radius: 8px; filter: drop-shadow(0 4px 12px rgba(0,0,0,0.12)); }
.vsl-headline { font-size: clamp(1.2rem, 6vw, 1.6rem); font-weight: 900; line-height: 1.2; margin-bottom: 1.5rem; text-transform: uppercase; padding: 0 10px; color: var(--dark-text); }
.vsl-card { background: var(--white); border-radius: var(--radius-card); overflow: hidden; border: 1px solid #e2e8f0; box-shadow: 0 10px 30px rgba(0,0,0,0.1); width: 100%; max-width: 400px; margin: 0 auto; }
.video-wrapper { width: 100%; background: #000; position: relative; aspect-ratio: 4 / 5; pointer-events: none; }
.video-wrapper video { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-action-area { padding: 0; background: var(--primary-blue); }
.upsell-bar { background-color: var(--primary-green); padding: 12px 15px; display: flex; align-items: center; justify-content: space-between; cursor: pointer; transition: transform 0.2s ease; opacity: 0; animation: fadeUpExtraLarge 1.8s cubic-bezier(0.23, 1, 0.32, 1) 10s forwards; }
.upsell-content { display: flex; align-items: center; gap: 12px; text-align: left; color: #fff; }
.upsell-content i { font-size: 1.8rem; }
.upsell-text { color: #fff; font-size: 0.85rem; font-weight: 500; line-height: 1.2; max-width: 180px; }
.btn-sim { background: #fff; color: var(--primary-green); border: none; padding: 8px 25px; border-radius: 8px; font-weight: 600; font-size: 0.95rem; display: flex; align-items: center; gap: 8px; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
.security-footer { padding: 12px; font-size: 0.75rem; color: rgba(255, 255, 255, 0.9); display: flex; align-items: center; justify-content: center; gap: 6px; }

@keyframes fadeUpExtraLarge { 0% { opacity: 0; transform: translateY(150px); } 100% { opacity: 1; transform: translateY(0); } }

/* UPSELL PAGE */
.cartelas-section { padding: 1.5rem 0 0 0; }
.cartelas-container { max-width: 950px; margin: 0 auto; padding: 0 1.5rem; }
.page-header { text-align: center; margin-bottom: 1.5rem; padding: 0.5rem 0; }
.page-subtitle { font-size: 1.15rem; color: var(--gray-text); max-width: 800px; margin: 0 auto; font-weight: 500; line-height: 1.5; }
.page-subtitle b { color: var(--dark-text); font-weight: 800; }
.cartelas-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 2.5rem; margin-bottom: 3rem; margin-top: 1rem; }
.cartela-card { background: var(--white); border-radius: 20px; overflow: hidden; transition: all 0.3s ease; box-shadow: 0 8px 25px rgba(0,0,0,0.06); border: 1px solid #e2e8f0; position: relative; display: flex; flex-direction: column; }
.cartela-card:hover { transform: translateY(-5px); box-shadow: 0 15px 35px rgba(0,0,0,0.12); border-color: #cbd5e1; }
.cartela-image-wrapper { position: relative; width: 100%; height: 220px; overflow: hidden; border-bottom: 4px solid var(--upsell-primary-green); }
.cartela-image { width: 100%; height: 100%; object-fit: cover; object-position: center; transition: transform 0.5s ease; }
.cartela-card:hover .cartela-image { transform: scale(1.05); }
.badge-receba-hora { position: absolute; top: 12px; left: 12px; background: var(--upsell-accent-yellow); color: #fff; font-size: 0.95rem; font-weight: 800; padding: 4px 10px; border-radius: 6px; box-shadow: 0 4px 10px rgba(255, 193, 7, 0.4); z-index: 10; text-transform: uppercase; display: inline-flex; align-items: center; gap: 4px; letter-spacing: 0.5px; animation: neonPulseYellowTag 1.5s infinite alternate; }
@keyframes neonPulseYellowTag { from { box-shadow: 0 0 5px var(--upsell-accent-yellow), 0 0 10px var(--upsell-accent-yellow); opacity: 0.9; } to { box-shadow: 0 0 10px var(--upsell-accent-yellow), 0 0 20px var(--upsell-accent-yellow); opacity: 1; } }
.price-badge-neon-green { position: absolute; top: 12px; right: 12px; background: var(--upsell-primary-green); color: #fff; padding: 4px 10px; border-radius: 6px; font-weight: 800; font-size: 0.95rem; z-index: 2; display: flex; align-items: center; gap: 4px; animation: neonPulseGreen 1.5s infinite alternate; }
@keyframes neonPulseGreen { from { box-shadow: 0 0 5px var(--upsell-primary-green), 0 0 10px var(--upsell-primary-green); opacity: 0.9; } to { box-shadow: 0 0 10px var(--upsell-primary-green), 0 0 20px var(--upsell-primary-green); opacity: 1; } }
.cartela-content { padding: 1.5rem; flex-grow: 1; display: flex; flex-direction: column; }
.prize-info-box { border-radius: 12px; padding: 12px; text-align: center; margin-bottom: 25px; position: relative; }
.prize-gold { background-color: #fffbeb; border: 2px dashed #f59e0b; }
.prize-gold .prize-label { color: #b45309; font-size: 0.8rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 2px; }
.prize-gold .prize-value { color: #d97706; font-weight: 900; font-size: 1.8rem; line-height: 1; }
.prize-bronze { background-color: #fdf5eb; border: 2px dashed #cd7f32; }
.prize-bronze .prize-label { color: #8b5a2b; font-size: 0.8rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 2px; }
.prize-bronze .prize-value { color: #cd7f32; font-weight: 900; font-size: 1.8rem; line-height: 1; }

.buy-buttons-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: auto; }
.btn-buy { border-radius: 10px; padding: 12px 5px; font-family: 'Poppins', sans-serif; font-weight: 800; font-size: 0.95rem; cursor: pointer; transition: all 0.2s ease; position: relative; line-height: 1.2; display: flex; flex-direction: column; align-items: center; justify-content: center; border: none; }
.btn-buy span { font-weight: 600; font-size: 0.8rem; margin-top: 2px; }
.btn-buy:active { transform: translateY(2px); }
.btn-1 { grid-column: 1; background: #ffffff; border: 2px solid #cbd5e1; color: var(--dark-text); }
.btn-1:hover { background: #f1f5f9; border-color: #94a3b8; }
.btn-1 span { color: var(--gray-text); }
.btn-3 { grid-column: 2; background: #dcfce7; border: 2px solid #86efac; color: #166534; }
.btn-3:hover { background: #bbf7d0; }
.btn-3 span { color: #15803d; }
.btn-5 { grid-column: 1 / span 2; background: linear-gradient(180deg, var(--upsell-cta-blue-top) 0%, var(--upsell-cta-blue-bottom) 100%); color: white; font-size: 1.1rem; padding: 14px; box-shadow: 0 6px 0 #0056b3, 0 10px 20px var(--upsell-cta-blue-glow); animation: glowingBlueBtn 2s infinite; }
.btn-5:active { box-shadow: 0 2px 0 #0056b3; transform: translateY(4px); animation: none; }
.btn-5 span { color: #e0f2fe; }
@keyframes glowingBlueBtn { 0%, 100% { box-shadow: 0 6px 0 #0056b3, 0 0 10px var(--upsell-cta-blue-glow); } 50% { box-shadow: 0 6px 0 #0056b3, 0 0 25px var(--upsell-cta-blue-glow); } }
.discount-badge { position: absolute; top: -14px; right: -10px; background: var(--accent-yellow); color: #000; font-size: 0.75rem; font-weight: 900; padding: 5px 12px; border-radius: 50px; box-shadow: 0 4px 10px rgba(0,0,0,0.25); z-index: 2; text-transform: uppercase; }
.best-seller-badge { background: var(--upsell-neon-red); color: #ffffff; border: 2px solid var(--accent-yellow); box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4); }
.pulse-anim { animation: pulseDiscount 2s infinite; }
@keyframes pulseDiscount { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
.footer-winners-section { max-width: 550px; margin: 0 auto 3rem auto; padding: 0 1.5rem; }
.footer-winners-title { font-size: 1.2rem; font-weight: 900; color: var(--dark-text); text-align: center; margin-bottom: 1.5rem; text-transform: uppercase; display: flex; align-items: center; justify-content: center; gap: 8px; }
.winners-feed-list { display: flex; flex-direction: column; gap: 12px; overflow: hidden; }

@keyframes pulseText { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.12); } }

@keyframes slideDownFade { from { opacity: 0; transform: translateY(-30px) scale(0.95); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes fadeOutUp { from { opacity: 1; transform: scale(1); } to { opacity: 0; transform: scale(0.95); } }

/* Responsive tweaks */
@media (max-width: 480px) {
    .cartelas-grid { grid-template-columns: 1fr; gap: 2rem; }
    .cartela-image-wrapper { height: 190px; }
    .prize-gold .prize-value, .prize-bronze .prize-value { font-size: 1.6rem; }
    .badge-receba-hora { font-size: 0.8rem; padding: 4px 8px; left: 8px; top: 8px; }
    .price-badge-neon-green { font-size: 0.8rem; padding: 4px 8px; right: 8px; top: 8px; }
    .main-container { padding: 0.5rem; }
    .vsl-headline { font-size: 1.2rem; }
}
