/* --- TRAVA DE ZOOM IOS (CRUCIAL) --- */
html, body {
    touch-action: manipulation; /* Impede zoom de duplo toque */
    -webkit-text-size-adjust: 100%; /* Impede aumento de fonte automático */
    overflow-x: hidden;
}

/* Garante que botões e inputs não deem zoom ao focar */
button, input, select, textarea, a {
    touch-action: manipulation;
}

:root {
    --bg-deep: #020617;
    --card-navy: #0f172a;
    --accent-blue: #00d2ff;
    --accent-green: #00ff88;
    --accent-green-dark: #059669;
    --accent-orange: #ff9900;
    --accent-purple: #a855f7;
    --text-main: #ffffff;
    --text-dim: #94a3b8;
    --border: rgba(255, 255, 255, 0.08);
}

/* RESET */
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', sans-serif; outline: none; -webkit-tap-highlight-color: transparent; }

body {
    background-color: var(--bg-deep);
    /* Fundo sutil global para a dashboard */
    background-image: radial-gradient(circle at 50% 0%, #172554 0%, var(--bg-deep) 50%);
    background-attachment: fixed;
    color: var(--text-main);
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    padding-bottom: 50px;
    overflow-x: hidden; /* Evita rolagem horizontal */
}

.hidden { display: none !important; }

/* CONTAINER MESTRE */
.container, .dashboard-header .header-content {
    width: 100%; max-width: 550px; margin: 0 auto; padding: 0 25px;
}

/* ============================================================
   LOGIN COM PULSO VIBRACIONAL (Clean & Profissional)
   ============================================================ */
.auth-mode {
    display: flex; align-items: center; justify-content: center;
    min-height: 100vh; /* Ocupa exatamente a altura da tela */
    width: 100%;
    padding: 20px; position: relative; overflow: hidden;
    /* Fundo base escuro */
    background: var(--bg-deep);
}

/* Efeito de Pulso Central (Substitui as ondas) */
.auth-mode::before {
    content: ''; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 100%; height: 100%;
    /* Um gradiente radial que pulsa suavemente */
    background: radial-gradient(circle, rgba(0, 210, 255, 0.1) 0%, rgba(2, 6, 23, 0) 70%);
    animation: pulseVibe 8s infinite ease-in-out alternate;
    z-index: 0; pointer-events: none;
}
@keyframes pulseVibe { 0% { opacity: 0.5; transform: translate(-50%, -50%) scale(0.8); } 100% { opacity: 1; transform: translate(-50%, -50%) scale(1.2); } }

.auth-card {
    position: relative; z-index: 10;
    background: rgba(15, 23, 42, 0.75) !important; /* Um pouco mais escuro para contraste */
    backdrop-filter: blur(25px);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 30px; padding: 50px 30px;
    width: 100%; max-width: 400px; text-align: center;
    box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.8);
}

.auth-card .logo-main { width: 140px; margin: 0 auto 30px; display: block; filter: drop-shadow(0 0 15px rgba(0,210,255,0.3)); }
.auth-card h1 { font-size: 26px; margin-bottom: 10px; font-weight: 800; background: linear-gradient(to bottom, #fff, #cbd5e1); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.auth-card p { color: var(--text-dim); font-size: 14px; margin-bottom: 30px; }

input[type="text"] {
    width: 100%; background: rgba(0, 0, 0, 0.4); border: 1px solid var(--border);
    padding: 18px; border-radius: 16px; color: white; text-align: center; margin-bottom: 20px; font-size: 16px; transition: 0.3s;
}
input[type="text"]:focus { border-color: var(--accent-blue); box-shadow: 0 0 0 4px rgba(0, 210, 255, 0.15); }

/* ============================================================
   HEADER & PROGRESSO
   ============================================================ */
.dashboard-header {
    padding: 30px 0 20px; background: linear-gradient(to bottom, rgba(2,6,23,0.95), transparent);
    margin-bottom: 10px; position: sticky; top: 0; z-index: 100; backdrop-filter: blur(5px);
}
.dashboard-header .brand { display: flex; flex-direction: column; align-items: center; width: 100%; text-align: center; }
.logo-mini { width: 80px; margin-bottom: 10px; }
.brand h2 { font-size: 20px; font-weight: 700; margin-bottom: 5px; }
.brand span { color: var(--text-dim); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; }

.progress-container { width: 100%; margin-top: 15px; }
.progress-info { display: flex; justify-content: center; gap: 10px; font-size: 12px; font-weight: 700; color: var(--text-dim); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 1px; }
.progress-info strong { color: var(--accent-blue); }
.bar-bg { background: rgba(255,255,255,0.08); height: 6px; border-radius: 20px; overflow: hidden; }
.bar-fill { background: linear-gradient(90deg, var(--accent-blue), #3b82f6); height: 100%; box-shadow: 0 0 15px var(--accent-blue); border-radius: 20px; transition: width 1s ease; }

/* ============================================================
   STATS CARDS (GRID FIXED)
   ============================================================ */
.stats-row {
    display: grid; grid-template-columns: 1fr; gap: 15px; margin-bottom: 40px;
}
@media (min-width: 400px) {
    .stats-row { grid-template-columns: repeat(3, 1fr); gap: 10px; }
    .stat-card { flex-direction: column; text-align: center; padding: 15px 10px; gap: 10px; }
}

.stat-card {
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.9), rgba(2, 6, 23, 0.95));
    border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 18px; padding: 15px 20px;
    display: flex; align-items: center; justify-content: flex-start; gap: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.stat-icon {
    width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.05);
}
[data-lucide] { width: 20px; height: 20px; stroke-width: 2.5px; }

.stat-card:nth-child(1) .stat-icon { color: var(--accent-blue); box-shadow: 0 0 15px rgba(0, 210, 255, 0.15); }
.stat-card:nth-child(2) .stat-icon { color: var(--accent-green); box-shadow: 0 0 15px rgba(0, 255, 136, 0.15); }
.stat-card:nth-child(3) .stat-icon { color: var(--accent-orange); box-shadow: 0 0 15px rgba(255, 153, 0, 0.15); }

.stat-data { display: flex; flex-direction: column; align-items: flex-start; }
@media (min-width: 400px) { .stat-data { align-items: center; } }

.stat-data p { font-size: 10px; text-transform: uppercase; font-weight: 700; color: var(--text-dim); margin-bottom: 2px; }
.stat-data strong { font-size: 20px; color: #fff; line-height: 1; }

/* ============================================================
   SEPARAÇÃO & BÔNUS
   ============================================================ */
.section-title-premium {
    font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 3px;
    color: rgba(255, 255, 255, 0.4); margin: 60px 0 25px 0;
    display: flex; align-items: center; gap: 15px;
}
.section-title-premium::before, .section-title-premium::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent); }
.section-title-bonus { color: var(--accent-orange); }

.bonus-grid-layout { display: grid; gap: 20px; margin-bottom: 40px; }

/* ============================================================
   CARDS JORNADA (ALINHAMENTO & OTIMIZAÇÃO)
   ============================================================ */
.frequencies-grid { display: flex; flex-direction: column; gap: 30px; }

.day-card {
    position: relative; width: 100%; height: 260px;
    border-radius: 24px; border: 1px solid rgba(255,255,255,0.08);
    overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end;
    padding: 25px; background: #020617; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    transition: transform 0.3s;
}
.day-card:active { transform: scale(0.98); }

.day-card::before {
    content: ''; position: absolute; inset: 0;
    background-image: var(--card-bg); background-size: cover; background-position: center;
    z-index: 1; transition: 0.3s;
}
.day-card::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(to top, #020617 10%, rgba(2,6,23,0.8) 50%, rgba(2,6,23,0.3) 100%);
    z-index: 2;
}

.card-content-wrapper { position: relative; z-index: 3; width: 100%; }

/* AJUSTE DO NÚMERO DO DIA (Canto Superior Direito) */
.day-number {
    position: absolute; 
    top: 15px; 
    right: 15px; /* Mudou de left para right */
    left: auto;  /* Garante que o left não interfira */
    width: 40px; height: 40px; 
    background: rgba(0,0,0,0.5);
    border-radius: 50%; 
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; 
    border: 2px solid rgba(255,255,255,0.1); 
    z-index: 2;
}

.day-card h3 { font-size: 22px; font-weight: 700; margin: 8px 0 12px; color: #fff; text-shadow: 0 2px 5px rgba(0,0,0,0.8); }
.tag { font-size: 10px; padding: 4px 10px; border-radius: 6px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; border: 1px solid rgba(255,255,255,0.1); display: inline-block;}

.card-footer {
    display: flex; justify-content: space-between; align-items: center;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 12px; margin-top: 5px; 
    font-size: 12px; font-weight: 600; color: var(--text-dim);
}
.card-footer span { display: flex; align-items: center; gap: 6px; }

.day-card.locked::before { filter: grayscale(1) blur(3px); opacity: 0.5; }
.day-card.locked .day-number { background: #1e293b; color: #64748b; border: none; }
.day-card.locked h3, .day-card.locked .tag { opacity: 0.6; }

.day-card.completed-style::before { filter: grayscale(0.8); opacity: 0.3; }
.day-card.completed-style .day-number { background: var(--accent-green); color: #000; border-color: var(--accent-green); }

.start-card-btn {
    background: var(--accent-blue); color: #000; padding: 14px; border-radius: 12px;
    text-align: center; font-weight: 800; font-size: 13px; cursor: pointer;
    box-shadow: 0 0 20px rgba(0, 210, 255, 0.3); border: 1px solid rgba(255,255,255,0.3);
    display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 10px;
}
.btn-bloqueado {
    background: rgba(255,255,255,0.08); width: 100%; border: 1px solid rgba(255,255,255,0.05);
    padding: 14px; border-radius: 12px; font-weight: 700; font-size: 12px; color: var(--text-dim);
    display: flex; align-items: center; justify-content: center; gap: 8px; cursor: not-allowed;
}
.timer-display { font-size: 12px; color: var(--accent-orange); font-weight: 700; margin-bottom: 8px; background: rgba(255, 153, 0, 0.1); padding: 5px 10px; border-radius: 6px; display: inline-flex; align-items: center; gap: 6px; }

/* ============================================================
   MODAIS & UPSELL (ESTILIZAÇÃO PREMIUM)
   ============================================================ */
.modal {
    position: fixed; inset: 0; background: rgba(0,0,0,0.9); z-index: 9999;
    display: flex; align-items: center; justify-content: center; padding: 20px;
    backdrop-filter: blur(10px);
}

.modal-content {
    background: #0f172a; width: 100%; max-width: 480px;
    border-radius: 30px; border: 1px solid rgba(255,255,255,0.1);
    padding: 30px; text-align: center; max-height: 90vh; overflow-y: auto;
    position: relative; box-shadow: 0 0 60px rgba(0,0,0,0.8);
}

#modal-freq-image {
    width: 100%; border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.1); margin-bottom: 20px;
    box-shadow: 0 0 40px rgba(0, 210, 255, 0.15); 
}

.modal-premium-title { font-size: 24px; font-weight: 800; margin-bottom: 10px; color: #fff; line-height: 1.2; }
.storytelling-text { font-size: 15px; line-height: 1.6; color: #cbd5e1; margin-bottom: 25px; text-align: left; padding: 0 5px; }

/* ESTILIZAÇÃO DA TELA DE CELEBRAÇÃO (Sessão Integrada) */
#modal-celebration-view { padding: 20px 0; }
.celebration-icon { color: var(--accent-green); margin-bottom: 20px; filter: drop-shadow(0 0 20px rgba(0,255,136,0.4)); }
.celebration-title { font-size: 28px; font-weight: 900; color: #fff; margin-bottom: 15px; }
.celebration-copy { font-size: 16px; line-height: 1.6; color: #cbd5e1; margin-bottom: 30px; padding: 0 10px; }

.btn-primary {
    background: linear-gradient(135deg, var(--accent-blue), #2563eb);
    color: white; border: none; padding: 18px 25px; border-radius: 16px;
    font-weight: 800; width: 100%; font-size: 15px; cursor: pointer;
    box-shadow: 0 10px 30px -10px rgba(37, 99, 235, 0.5);
    text-transform: uppercase; letter-spacing: 0.5px; margin-top: 10px;
}
.btn-success { /* Botão Verde da Celebração */
    background: linear-gradient(135deg, var(--accent-green), var(--accent-green-dark));
    box-shadow: 0 10px 30px -10px rgba(5, 150, 105, 0.5);
}

/* UPSELL STYLES */
.upsell-layout { text-align: center; padding: 10px; }
.upsell-title { font-size: 22px; font-weight: 900; margin-bottom: 10px; line-height: 1.2; }
.upsell-p { color: var(--text-dim); font-size: 14px; margin-bottom: 20px; line-height: 1.5; }

.upsell-option {
    padding: 16px; border: 1px solid rgba(255,255,255,0.1); border-radius: 14px;
    background: rgba(255,255,255,0.03); display: flex; justify-content: space-between; align-items: center;
    cursor: pointer; transition: 0.2s; margin-bottom: 10px;
}
.upsell-option.selected { background: rgba(255, 153, 0, 0.1); border: 1px solid var(--accent-orange); }
.upsell-option strong { color: #fff; }
.upsell-option.selected strong { color: var(--accent-orange); }

.btn-upsell-action {
    background: linear-gradient(135deg, #15803d, #166534);
    color: #fff; border: 1px solid #22c55e; padding: 18px; border-radius: 14px;
    font-weight: 900; font-size: 15px; width: 100%; cursor: pointer;
    box-shadow: 0 10px 20px -5px rgba(22, 163, 74, 0.4);
    text-transform: uppercase; letter-spacing: 1px; margin: 15px 0 10px;
}
.btn-upsell-action.gold {
    background: linear-gradient(135deg, #7e22ce, #6b21a8);
    border: 1px solid #a855f7;
    box-shadow: 0 10px 20px -5px rgba(126, 34, 206, 0.4);
}
.btn-upsell-close { background: transparent; border: none; color: #64748b; font-size: 12px; font-weight: 600; cursor: pointer; text-decoration: underline; }

.premium-bonus-card {
    position: relative; height: 180px; border-radius: 24px; overflow: hidden;
    background-size: cover; background-position: center;
    border: 1px solid rgba(255, 153, 0, 0.3); 
    display: flex; flex-direction: column; justify-content: flex-end; padding: 25px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.4);
}
.premium-bonus-card::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, #000 10%, transparent 100%); z-index: 1; }
.bonus-content-overlay { position: relative; z-index: 2; width: 100%; }
.bonus-badge {
    position: absolute; top: -110px; right: -10px;
    background: var(--accent-orange); color: #000;
    font-size: 10px; font-weight: 900; padding: 5px 12px; border-radius: 20px;
    text-transform: uppercase; box-shadow: 0 0 15px rgba(255, 153, 0, 0.5);
}
.bonus-title { font-size: 18px; font-weight: 800; color: #fff; margin-bottom: 5px; }
.btn-play-bonus {
    margin-top: 10px; width: 100%; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2);
    backdrop-filter: blur(5px); color: #fff; padding: 10px; border-radius: 12px;
    font-size: 12px; font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px;
}

/* --- ÁREA PREMIUM --- */
.premium-shelf-title {
    font-size: 14px; font-weight: 800; text-transform: uppercase; letter-spacing: 2px;
    color: #ffd700; margin: 40px 0 20px 0; text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
    display: flex; align-items: center; gap: 10px;
}

/* Card Premium (Dourado/Roxo) */
.premium-card {
    background: linear-gradient(145deg, #1a0b2e, #0f0518);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 20px; padding: 20px; position: relative; overflow: hidden;
    transition: transform 0.3s; cursor: pointer;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    display: flex; align-items: center; gap: 20px; margin-bottom: 15px;
}
.premium-card:hover { transform: scale(1.02); border-color: #ffd700; box-shadow: 0 0 20px rgba(255, 215, 0, 0.2); }

.premium-card img { width: 80px; height: 80px; border-radius: 12px; object-fit: cover; border: 1px solid rgba(255,255,255,0.1); }
.premium-info h4 { color: #fff; font-size: 16px; margin-bottom: 5px; }
.premium-info p { color: #aaa; font-size: 12px; }
.premium-badge { 
    position: absolute; top: 10px; right: 10px; background: #ffd700; color: #000; 
    font-size: 9px; font-weight: 900; padding: 3px 8px; border-radius: 4px; text-transform: uppercase;
}

/* --- PLAYER PERSONALIZADO (SEM YOUTUBE) --- */
.custom-player-wrapper {
    position: relative; width: 100%; height: 100%; background: #000;
    display: flex; align-items: center; justify-content: center; overflow: hidden;
    border-radius: 15px;
}
.custom-video { width: 100%; height: 100%; object-fit: contain; }

/* Controles */
.player-controls {
    position: absolute; bottom: 0; left: 0; right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    padding: 20px; 
    display: flex; flex-direction: column; gap: 10px;
    opacity: 0; transition: 0.3s;
    z-index: 10;
}
.custom-player-wrapper:hover .player-controls { opacity: 1; }

/* Botão de Fechar flutuante no player */
.close-player-overlay {
    position: absolute; top: 15px; right: 15px;
    background: rgba(0,0,0,0.5); border: none; color: #fff;
    width: 30px; height: 30px; border-radius: 50%;
    cursor: pointer; z-index: 20; display: flex; align-items: center; justify-content: center;
}

.progress-bar-bg { width: 100%; height: 5px; background: rgba(255,255,255,0.2); border-radius: 5px; cursor: pointer; position: relative; }
.progress-bar-fill { height: 100%; background: #ffd700; width: 0%; border-radius: 5px; position: relative; }
.progress-bar-fill::after { content:''; position: absolute; right: -5px; top: -2.5px; width: 10px; height: 10px; background: #fff; border-radius: 50%; box-shadow: 0 0 10px #ffd700; }

.control-btns { display: flex; justify-content: space-between; align-items: center; color: #fff; }
.btn-play-pause { background: none; border: none; color: #fff; cursor: pointer; }
.btn-play-pause svg { width: 25px; height: 25px; fill: #fff; }

/* --- CARDS PREMIUM IN-FLOW (DENTRO DA JORNADA) --- */
.premium-in-flow-card {
    border-radius: 15px;
    padding: 20px;
    margin: 10px 0 30px 0; /* Espaço entre o dia e o premium */
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
    transition: transform 0.2s, filter 0.2s;
    border: 1px solid rgba(255,255,255,0.1);
}
.premium-in-flow-card:hover { transform: translateY(-3px); filter: brightness(1.1); }

/* Identificador Premium */
.premium-tag-floating {
    position: absolute; top: 0; right: 0;
    background: #ffd700; color: #000;
    font-size: 10px; font-weight: 900;
    padding: 4px 10px;
    border-bottom-left-radius: 10px;
    text-transform: uppercase;
}

/* CORES ÚNICAS PARA CADA UPSELL (Gradientes Exclusivos) */
.style-day-3  { background: linear-gradient(135deg, #2b0a3d, #511378); border-color: #a855f7; } /* Roxo Neon */
.style-day-7  { background: linear-gradient(135deg, #0f172a, #1e3a8a); border-color: #3b82f6; } /* Azul Profundo */
.style-day-14 { background: linear-gradient(135deg, #3a0ca3, #f72585); border-color: #f72585; } /* Cyberpunk Pink */
.style-day-21 { background: linear-gradient(135deg, #14532d, #059669); border-color: #10b981; } /* Esmeralda */
.style-day-30 { background: linear-gradient(135deg, #18181b, #d4af37); border-color: #d4af37; } /* Black & Gold */

.premium-thumb { width: 70px; height: 70px; border-radius: 10px; object-fit: cover; box-shadow: 0 4px 10px rgba(0,0,0,0.3); }
.premium-details h4 { margin: 0; font-size: 16px; color: #fff; text-shadow: 0 2px 4px rgba(0,0,0,0.5); }
.premium-details p { margin: 5px 0 0 0; font-size: 12px; color: rgba(255,255,255,0.8); }

/* --- CORREÇÃO DO PLAYER (Fim das Bordas Pretas) --- */
.custom-player-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
}

.custom-video {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Garante que o vídeo apareça inteiro. Se quiser cortar para preencher, use 'cover' */
    background: #000;
}

/* Ajuste no container do modal para Mobile (Vertical) */
#frequency-video-area {
    position: relative;
    width: 100%;
    flex-grow: 1; /* Ocupa todo espaço disponível */
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 12px;
}

/* Ajuste para Desktop (se o vídeo for horizontal, muda aqui) */
@media (min-width: 768px) {
    #frequency-video-area {
        aspect-ratio: 16/9; /* Proporção TV */
    }
}

/* --- CORREÇÃO DEFINITIVA DO PLAYER (FIM DAS BORDAS PRETAS) --- */

/* Reseta o hack de proporção antigo (YouTube) */
/* --- FORMATOS DE VÍDEO INTELIGENTES --- */

/* PADRÃO GERAL (Frequências - 16:9 Cinema) */
/* --- FORMATO VERTICAL GLOBAL (9:16) --- */

.video-wrapper, 
.video-container, 
#frequency-video-area {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 9/16 !important; /* FORÇA FORMATO TIKTOK/REELS */
    padding-bottom: 0 !important;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    display: flex; align-items: center; justify-content: center;
    
    /* TRUQUE PRO DESKTOP: */
    /* No PC, o vídeo vertical não pode ocupar 100% da largura senão fica gigante de altura */
    max-width: 400px; 
    margin: 0 auto; /* Centraliza */
    box-shadow: 0 10px 30px rgba(0,0,0,0.5); /* Dá um destaque chique */
}

/* O Player interno acompanha */
.custom-player-wrapper {
    width: 100%;
    height: 100%;
    background: #000;
}

.custom-video {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Preenche tudo sem borda preta */
}

/* Ajustes finos do Player */
.control-btns {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0 5px; /* Espacinho nas bordas */
}

/* Botão Fechar Player (Overlay no topo) - Mantém esse, removemos o de baixo */
.close-player-overlay {
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    top: 15px; right: 15px;
    width: 40px; height: 40px;
}
/* Evita zoom acidental em botões no mobile */
button { touch-action: manipulation; }

/* Mobile: Ajuste para não ficar pequeno demais */
@media (max-width: 768px) {
    .video-container, 
    .video-wrapper, 
    #frequency-video-area {
        aspect-ratio: 16/9; /* Ou 9/16 se seus vídeos forem verticais */
        min-height: 250px;
    }
}

/* --- PATCH: PLAYER PERFEITO & FULLSCREEN --- */

/* 1. Trava o site para não "dançar" para os lados (Fix Imagem 1) */
html, body {
    overflow-x: hidden;
    width: 100%;
}

/* 2. Mata a Borda Preta e o Iframe Antigo (Fix Imagem 3 e 8) */
.video-wrapper, 
.video-container, 
#frequency-video-area {
    width: 100% !important;
    height: auto !important; /* Deixa o vídeo definir a altura */
    aspect-ratio: 9/16;      /* Proporção Mobile (Vertical) - Mude para 16/9 se for vídeo deitado */
    padding-bottom: 0 !important;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Ajuste para Desktop (Vídeo fica wide) */
@media (min-width: 768px) {
    .video-wrapper, 
    #frequency-video-area {
        aspect-ratio: 16/9; 
    }
}

/* 3. O Player em si */
.custom-player-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
    background: #000;
}

.custom-video {
    width: 100%;
    height: 100%;
    object-fit: cover; /* ISSO que remove a borda preta (preenche tudo) */
}

/* Estilo do Fullscreen Ativo */
.custom-player-wrapper:fullscreen .custom-video {
    object-fit: contain; /* Em tela cheia, mostra o vídeo todo sem cortar */
}

/* Botões de Controle (Play e Fullscreen) */
.control-btns {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.btn-fullscreen {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 5px;
}
.btn-fullscreen:hover { color: var(--primary); }

/* --- PATCH FINAL: CONTROLES INTELIGENTES & VOLUME --- */

/* 1. Comportamento dos Controles (Desktop & Mobile) */
.player-controls {
    opacity: 0; /* Começa invisível */
    transition: opacity 0.3s ease-in-out;
    pointer-events: none; /* Evita cliques fantasmas quando invisível */
}

/* Desktop: Aparece ao passar o mouse */
.custom-player-wrapper:hover .player-controls {
    opacity: 1;
    pointer-events: auto;
}

/* Mobile: Classe ativada via JS ao tocar */
.custom-player-wrapper.mobile-active .player-controls {
    opacity: 1;
    pointer-events: auto;
}

/* 2. Estilização do Volume */
.volume-control {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-right: 10px;
}

.volume-slider {
    width: 0; /* Escondido por padrão */
    height: 4px;
    background: rgba(255,255,255,0.3);
    border-radius: 2px;
    appearance: none;
    transition: width 0.3s ease;
    cursor: pointer;
}

/* Mostra o slider quando passa o mouse no ícone de volume */
.volume-control:hover .volume-slider,
.volume-slider:hover {
    width: 60px; /* Expande */
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px; height: 12px;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
}

.btn-volume {
    background: none; border: none; color: #fff; cursor: pointer; padding: 5px;
    display: flex; align-items: center;
}

/* Ajuste no container dos botões para caber o volume */
.control-btns-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* --- REMOVEDOR DE X TEIMOSO --- */
.close-internal {
    display: none !important; /* Some com o botão X interno na marra */
}

/* --- CORREÇÃO FINAL (PERFORMANCE & UX) --- */

/* 1. Preload Inteligente de Imagens Upsell
   Isso faz o navegador baixar as imagens dos upsells ANTES de você clicar.
   Resultado: O modal abre instantaneamente, sem travar ou ficar preto por segundos. 
*/
body::after {
    position: absolute; width: 0; height: 0; overflow: hidden; z-index: -1;
    content: url('media/up1.webp') url('media/up2.webp') url('media/up3.webp') url('media/up4.webp') url('media/up5.webp');
}

/* 2. Reforço Anti-Zoom (Garantia Extra)
   Você já tem isso no topo, mas esse reforço garante que em modais e iframes
   o zoom não aconteça de jeito nenhum.
*/
.modal-content, .custom-player-wrapper {
    touch-action: manipulation;
}

/* 3. Correção Visual da Barra de Volume
   Para garantir que o slider de volume fique bonito e alinhado no mobile.
*/
@media (max-width: 768px) {
    .volume-slider {
        width: 60px !important; /* No celular, mostra sempre o volume, sem precisar de hover */
    }
}