/* ============================================================================
   🎨 WPS SELECTOR PRO - STYLESHEET v5.0 (COMPLETO & OPTIMIZADO)
   ============================================================================ */

:root {
    --bg-dark: #1a1a2e;
    --bg-card: #16213e;
    --primary: #e94560;
    --accent: #0f3460;
    --success: #00d9ff;
    --warning: #fca311;
    --error: #ff4d4d;
    --text: #ffffff;
    --muted: #a0a0a0;
    --input-bg: #0f172a;
    --input-border: #334155;
    --radius: 6px;
    --shadow: 0 4px 12px rgba(0,0,0,0.3);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ============================================================================
   🍔 NAV PROFESIONAL
   ============================================================================ */
#global-nav {
    width: 100%;
    margin-bottom: 20px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.98) 0%, rgba(10, 15, 30, 0.98) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0;
}
#global-nav::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    opacity: 0.6;
}

/* Desktop Nav (>768px) */
@media (min-width: 769px) {
    .nav-brand, .hamburger-btn, .nav-overlay { display: none !important; }
    #global-nav .nav-menu { display: flex !important; justify-content: center; align-items: center; gap: 15px; padding: 0.8rem 10px; flex-wrap: wrap; width: 100%; max-width: 900px; margin: 0 auto; }
    .nav-item { display: inline-flex; align-items: center; gap: 6px; color: #94a3b8; text-decoration: none; font-size: 0.9rem; font-weight: 600; padding: 8px 16px; border-radius: 8px; border: 1px solid transparent; background: transparent; cursor: pointer; transition: all 0.3s ease; }
    .nav-item:hover { color: #ffffff; background: rgba(255, 255, 255, 0.05); border-color: rgba(255, 255, 255, 0.1); transform: translateY(-1px); }
    .nav-item.active { color: #ffffff; background: rgba(233, 69, 96, 0.15); border-color: rgba(233, 69, 96, 0.3); box-shadow: 0 0 10px rgba(233, 69, 96, 0.1); }
    .nav-dropdown { position: relative; }
    .dropdown-menu { display: none; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); background: #1e293b; border: 1px solid #334155; border-radius: 8px; padding: 5px; min-width: 200px; box-shadow: 0 10px 30px rgba(0,0,0,0.5); z-index: 2000; margin-top: 10px; animation: fadeInDown 0.2s ease; }
    .nav-dropdown:hover .dropdown-menu { display: block; }
    .dropdown-item { display: block; padding: 10px 15px; color: #cbd5e1; text-decoration: none; font-size: 0.85rem; border-radius: 5px; transition: all 0.2s; }
    .dropdown-item:hover { background: rgba(233, 69, 96, 0.1); color: #e94560; padding-left: 20px; }
}
@keyframes fadeInDown { from { opacity: 0; transform: translate(-50%, -10px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* Mobile Nav (<=768px) */
@media (max-width: 768px) {
    #global-nav { padding: 0; position: relative; overflow: visible; }
    .nav-brand { display: block; position: absolute; left: 15px; top: 50%; transform: translateY(-50%); z-index: 10; }
    .nav-logo { color: #ffffff; text-decoration: none; font-weight: 700; font-size: 1rem; display: flex; align-items: center; gap: 6px; }
    .nav-logo span { background: linear-gradient(90deg, #ffffff, var(--primary)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
    .hamburger-btn { display: flex; flex-direction: column; justify-content: center; align-items: center; width: 44px; height: 44px; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 8px; cursor: pointer; position: absolute; right: 15px; top: 50%; transform: translateY(-50%); z-index: 1001; transition: all 0.3s ease; gap: 5px; }
    .hamburger-btn:hover { background: rgba(233, 69, 96, 0.2); border-color: rgba(233, 69, 96, 0.4); }
    .hamburger-line { display: block; width: 22px; height: 2px; background: #ffffff; border-radius: 2px; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); transform-origin: center; }
    .hamburger-btn.active .hamburger-line:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .hamburger-btn.active .hamburger-line:nth-child(2) { opacity: 0; transform: scaleX(0); }
    .hamburger-btn.active .hamburger-line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
    #global-nav .nav-menu { position: fixed; top: 0; right: 0; width: 280px; height: 100vh; background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%); padding: 80px 20px 20px; box-shadow: -5px 0 30px rgba(0, 0, 0, 0.5); z-index: 999; display: flex; flex-direction: column; gap: 5px; transform: translateX(100%); transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
    #global-nav .nav-menu.active { transform: translateX(0); }
    .nav-menu .nav-item { width: 100%; justify-content: flex-start; padding: 12px 16px; font-size: 1rem; border-radius: 10px; margin-bottom: 4px; }
    .nav-menu .nav-item:hover { background: rgba(233, 69, 96, 0.1); transform: none; }
    .nav-menu .nav-item.active { background: rgba(233, 69, 96, 0.2); border-color: rgba(233, 69, 96, 0.4); }
    .nav-menu .nav-dropdown { width: 100%; }
    .nav-menu .dropdown-trigger { width: 100%; justify-content: space-between; }
    .nav-menu .dropdown-menu { position: static; transform: none; margin-top: 5px; background: rgba(0, 0, 0, 0.2); border: 1px solid rgba(255, 255, 255, 0.05); box-shadow: none; display: none; animation: none; }
    .nav-dropdown.mobile-open .dropdown-menu { display: block; animation: slideDown 0.2s ease; }
    @keyframes slideDown { from { opacity: 0; max-height: 0; } to { opacity: 1; max-height: 200px; } }
    .nav-menu .dropdown-item { padding-left: 20px; font-size: 0.9rem; }
    .nav-overlay { display: none; position: fixed; inset: 0; background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(3px); z-index: 998; opacity: 0; transition: opacity 0.3s ease; }
    .nav-overlay.active { display: block; opacity: 1; }
}
 /* 🔥 CORRECCIÓN: Visibilidad de botones SELECTOR / PRO */
    .nav-tabs {
        margin-top: 35px; /* Empuja los botones hacia abajo para separarlos del header */
        margin-bottom: 30px;
        display: flex;
        justify-content: center;
        gap: 12px;
        position: relative;
        z-index: 20;
    }

/* ============================================================================
   BODY & LAYOUT PRINCIPAL
   ============================================================================ */
body {
    font-family: 'Segoe UI', system-ui, sans-serif;
    background: var(--bg-dark);
    color: var(--text);
    padding: 20px 15px 140px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
}
body.pro-active { padding-bottom: 20px; }
.container { width: 100%; max-width: 900px; position: relative; margin: 0 auto; padding: 0 15px; }
.app-layout { width: 100%; max-width: 1000px; margin: 0 auto; }

/* TABS */
.nav-tabs { display: flex; gap: 8px; margin-bottom: 16px; background: var(--bg-card); padding: 6px; border-radius: 8px; box-shadow: var(--shadow); }
.nav-tab { flex: 1; padding: 9px; background: transparent; border: none; color: var(--muted); font-weight: 600; cursor: pointer; border-radius: var(--radius); }
.nav-tab.active { background: var(--primary); color: white; box-shadow: 0 2px 8px rgba(233, 69, 96, 0.4); }

/* FORMS */
.form-group { margin-bottom: 12px; }
label { display: block; margin-bottom: 4px; color: var(--success); font-weight: 600; font-size: 0.7rem; text-transform: uppercase; }
select, input[type="number"], input[type="text"], .license-input {
    width: 100%; padding: 11px; background: var(--input-bg); border: 1px solid var(--input-border); color: white;
    border-radius: var(--radius); font-size: 0.95rem;
}
select:focus, input:focus { outline: none; border-color: var(--success); box-shadow: 0 0 0 3px rgba(0, 217, 255, 0.15); }

/* BOTONES */
.btn { width: 100%; padding: 12px; border: none; border-radius: var(--radius); font-size: 0.9rem; font-weight: 700; cursor: pointer; margin-top: 8px; display: flex; align-items: center; justify-content: center; gap: 6px; transition: 0.2s; }
.btn-search { background: var(--primary); color: white; }
.btn-back { background: var(--accent); color: white; }
.btn-action { background: transparent; border: 2px solid var(--success); color: var(--success); }
.btn-pro { background: linear-gradient(135deg, var(--warning), #f59e0b); color: #000; }
.btn-danger { background: var(--error); color: white; }
.btn-cancel { background: transparent; color: var(--muted); border: 1px solid var(--input-border); padding: 9px; border-radius: var(--radius); cursor: pointer; }
.btn:hover { opacity: 0.9; transform: translateY(-1px); }

/* SCREENS */
.screen { display: none; animation: fadeIn 0.3s ease; }
.screen.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

/* CONDITIONAL SECTIONS & TITLES */
.conditional-section { display: none; animation: fadeIn 0.3s; background: rgba(15, 52, 96, 0.4); padding: 12px; border-radius: 8px; border-left: 3px solid var(--accent); margin-bottom: 12px; }
.section-title { font-size: 0.75rem; color: var(--muted); margin-bottom: 8px; text-transform: uppercase; font-weight: 700; border-bottom: 1px solid var(--input-border); padding-bottom: 4px; }
.gap-warning { color: var(--warning); font-size: 0.65rem; display: none; margin-top: 3px; }
input.warning-input { border-color: var(--warning); }
.checkbox-group { display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,0.05); padding: 8px; border-radius: var(--radius); margin-top: 8px; cursor: pointer; }

/* RESULTS */
.result-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; border-bottom: 1px solid var(--input-border); padding-bottom: 8px; }
.wps-id { font-size: 1.1rem; font-weight: 800; color: var(--warning); font-family: 'Courier New', monospace; min-height: 1.2em; }
.wps-id::after { content: '|'; animation: blink 1s infinite; color: var(--warning); margin-left: 2px; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
.joint-illustration-container { text-align: center; margin-bottom: 10px; min-height: 100px; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,0.2); border-radius: 8px; padding: 10px; }
.joint-img { max-width: 150px; max-height: 100px; object-fit: contain; }
.badge { font-size: 0.65rem; padding: 3px 7px; border-radius: 20px; background: #2d3748; color: var(--success); border: 1px solid var(--success); font-weight: 600; }
.param-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.param-grid.config { grid-template-columns: repeat(3, 1fr); }
.param-grid.three-col { grid-template-columns: 1fr 1fr 1fr; }
.param-box { background: rgba(255,255,255,0.06); padding: 7px; border-radius: var(--radius); transition: background 0.2s; }
.param-box:hover { background: rgba(255,255,255,0.1); }
.param-label { font-size: 0.55rem; color: var(--muted); text-transform: uppercase; }
.param-value { font-size: 0.9rem; font-weight: 700; margin-top: 2px; font-family: 'Courier New', monospace; }
.param-value.highlight { color: var(--success); }
.param-value.warning { color: var(--warning); }

/* Tips & Checklist */
.tech-tips { background: rgba(0, 217, 255, 0.08); border-left: 3px solid var(--success); padding: 10px; border-radius: var(--radius); font-size: 0.75rem; color: var(--text); margin-bottom: 10px; }
.tech-tips ul { padding-left: 20px; margin-top: 5px; }
.tech-tips li { margin-bottom: 4px; }
.checklist-items { display: flex; flex-direction: column; gap: 8px; }
.check-item { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; cursor: pointer; }
.disclaimer-box { background: rgba(255,255,255,0.03); border-radius: 6px; padding: 10px; margin-bottom: 15px; cursor: pointer; }
.disclaimer-box summary { font-size: 0.8rem; color: var(--muted); }

/* Footer & Ads */
#app-footer { position: fixed !important; bottom: 0 !important; left: 0 !important; width: 100% !important; height: 100px !important; background: var(--bg-dark) !important; border-top: 1px solid var(--input-border) !important; z-index: 9999 !important; display: flex !important; justify-content: center !important; align-items: center !important; }
#ad-container { width: 100% !important; max-width: 500px !important; height: 90px !important; margin: 0 auto !important; overflow: hidden !important; position: relative !important; }
.ad-link { display: block !important; width: 100% !important; height: 100% !important; }
.ad-image { width: 100% !important; height: 100% !important; object-fit: contain !important; }
.ad-label { position: absolute !important; top: 4px !important; right: 6px !important; background: rgba(0,0,0,0.7) !important; color: #fff !important; font-size: 0.55rem !important; padding: 2px 5px !important; border-radius: 3px !important; }

/* ============================================================================
   🔧 INTERSTITIAL AD OVERLAY - FIXED v5.0
   ============================================================================ */
#pre-result-ad-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(10, 12, 20, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 10001;
    justify-content: center;
    align-items: center;
    padding: 16px;
    opacity: 0;
    transition: opacity 0.3s ease;
}
#pre-result-ad-overlay[style*="flex"] { opacity: 1; }
.interstitial-content {
    background: var(--bg-card);
    border: 1px solid var(--input-border);
    border-radius: 16px;
    padding: 24px;
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
    transform: scale(0.95);
    animation: popIn 0.3s ease forwards;
}
@keyframes popIn { to { transform: scale(1); opacity: 1; } }
.interstitial-header { font-size: 0.7rem; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 16px; width: 100%; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 8px; }
.interstitial-ad-content { width: 100%; min-height: 160px; display: flex; align-items: center; justify-content: center; background: linear-gradient(145deg, #0f172a, #1e293b); border-radius: 12px; margin-bottom: 20px; border: 1px dashed rgba(0, 217, 255, 0.3); }
.interstitial-timer { font-size: 1.4rem; font-weight: 800; color: var(--warning); margin-bottom: 16px; font-variant-numeric: tabular-nums; }
.btn-interstitial { width: 100%; padding: 16px; border: none; border-radius: 12px; font-size: 1rem; font-weight: 700; cursor: pointer; background: linear-gradient(135deg, var(--success), #00b4d8); color: #000; transition: all 0.2s ease; box-shadow: 0 4px 12px rgba(0, 217, 255, 0.25); }
.btn-interstitial:disabled { background: #334155; color: #64748b; cursor: not-allowed; box-shadow: none; transform: none; }
.btn-interstitial:not(:disabled):hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0, 217, 255, 0.35); }
.interstitial-note { margin-top: 12px; font-size: 0.7rem; color: var(--muted); }

/* Modals */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.88); z-index: 2000; justify-content: center; align-items: center; padding: 20px; backdrop-filter: blur(5px); }
.modal-content { background: var(--bg-card); border: 2px solid var(--warning); border-radius: 10px; padding: 20px; max-width: 340px; width: 100%; text-align: center; animation: slideIn 0.25s ease; }
@keyframes slideIn { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal-icon { font-size: 2.5rem; margin-bottom: 10px; }
.modal-title { color: var(--warning); font-size: 1.1rem; font-weight: bold; margin-bottom: 8px; }
.modal-text { color: var(--muted); font-size: 0.85rem; line-height: 1.4; margin-bottom: 15px; }
.modal-buttons { display: flex; gap: 8px; flex-direction: column; }
.code-display { background: #0b1120; padding: 12px; border-radius: var(--radius); font-family: monospace; font-size: 1rem; text-align: center; margin: 12px 0; border: 2px dashed var(--warning); color: var(--warning); }
.device-id-box { margin-top: 12px; padding: 8px; background: rgba(0,0,0,0.3); border-radius: var(--radius); font-size: 0.75rem; color: var(--muted); }
.device-id-box code { color: var(--success); font-family: monospace; font-weight: bold; cursor: pointer; padding: 2px 5px; background: rgba(0,0,0,0.4); border-radius: 3px; }

/* Floating Buttons & Offline Badge */
.floating-btn { position: fixed; z-index: 850; border: none; border-radius: 50%; width: 54px; height: 54px; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; box-shadow: 0 6px 16px rgba(0,0,0,0.4); cursor: pointer; transition: transform 0.2s, opacity 0.3s; opacity: 0; pointer-events: none; }
.floating-btn.visible { opacity: 1; pointer-events: auto; animation: fadeInUp 0.4s ease forwards; }
@keyframes fadeInUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.coffee-btn { bottom: 180px; right: 18px; background: #6f4e37; color: #fff; }
.community-btn { bottom: 180px; left: 18px; background: var(--accent); color: white; }
.offline-badge { position: fixed; bottom: 120px; right: 15px; background: var(--bg-card); border: 1px solid var(--success); color: var(--success); padding: 5px 8px; border-radius: 16px; font-size: 0.65rem; display: flex; align-items: center; gap: 5px; box-shadow: 0 4px 12px rgba(0,0,0,0.4); z-index: 100; }
.dot { width: 6px; height: 6px; background: var(--success); border-radius: 50%; animation: pulse 2s infinite; }
@keyframes pulse { 0% { opacity: 1; transform: scale(1); } 50% { opacity: 0.5; transform: scale(1.2); } 100% { opacity: 1; transform: scale(1); } }

/* Toast Container */
#toast-container { position: fixed; top: 20px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.toast { background: var(--bg-card); color: white; padding: 16px 24px; border-radius: 12px; box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4); border-left: 4px solid var(--primary); display: flex; align-items: center; gap: 12px; min-width: 300px; max-width: 450px; pointer-events: all; animation: slideInRight 0.4s ease-out; backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, 0.1); }
.toast.success { border-left-color: var(--success); }
.toast.warning { border-left-color: var(--warning); }
.toast.error { border-left-color: var(--error); }
.toast-icon { font-size: 1.5rem; }
.toast-close { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 1.2rem; margin-left: auto; }
@keyframes slideInRight { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
.toast.hiding { animation: slideOutRight 0.4s ease-out forwards; }
@keyframes slideOutRight { from { transform: translateX(0); opacity: 1; } to { transform: translateX(100%); opacity: 0; } }

/* PRO Mode Overrides */
body.pro-active #app-footer { display: none !important; }
body.pro-active #pro-footer { display: block !important; position: fixed; bottom: 0; left: 0; right: 0; background: rgba(26, 26, 46, 0.9); padding: 5px; font-size: 0.6rem; text-align: center; z-index: 9999; color: rgba(255,255,255,0.6); }
body.pro-active #ad-container { display: none !important; }

/* Print Styles */
@media print {
    @page { size: A4 portrait; margin: 0; }
    body { background: #fff !important; color: #000 !important; padding: 0 !important; margin: 0 !important; }
    #global-nav, #app-footer, .offline-badge, .floating-btn, .modal-overlay, .nav-tabs, header, .btn, .checkbox-group, .gap-warning, .disclaimer-box, #ad-container { display: none !important; }
    .container { max-width: 100%; padding: 0; margin: 0; }
    .app-layout { display: block !important; }
    #form-screen, #activation-screen { display: none !important; }
    #result-screen { display: block !important; position: static !important; width: 100% !important; margin: 0 !important; padding: 15mm !important; }
    .result-header { border-bottom: 2px solid #000 !important; padding-bottom: 5px !important; margin-bottom: 10px !important; }
    .wps-id { color: #000 !important; font-size: 1.4rem !important; }
    .wps-id::after { display: none; }
    .badge { border: 1px solid #000 !important; color: #000 !important; background: transparent !important; }
    .section-title { color: #000 !important; border-bottom: 1.5px solid #333 !important; font-size: 0.9rem !important; margin: 10px 0 5px !important; }
    .param-grid { display: grid !important; grid-template-columns: repeat(4, 1fr) !important; gap: 4mm !important; margin-bottom: 6px !important; page-break-inside: avoid; }
    .param-box { background: #f4f4f4 !important; border: 1px solid #ccc !important; padding: 5px !important; border-radius: 3px !important; }
    .param-label { color: #555 !important; font-size: 0.65rem !important; }
    .param-value { color: #000 !important; font-size: 0.85rem !important; }
    .tech-tips { color: #333 !important; border-left: 2px solid #000 !important; background: transparent !important; padding: 6px !important; margin-top: 8px !important; }
}

/* ============================================================================
   📐 LAYOUT RESPONSIVO (DUAL COLUMN EN ESCRITORIO)
   ============================================================================ */
@media (min-width: 1024px) {
    .app-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: start; }
    .screen { display: block !important; opacity: 1 !important; position: static !important; }
    #form-screen { order: 1; }
    #result-screen { order: 2; border: 2px solid var(--primary); border-radius: 12px; padding: 20px; background: rgba(22, 33, 62, 0.5); min-height: 600px; }
    .result-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; padding-top: 15px; border-top: 1px solid var(--input-border); }
    .nav-tabs { display: none; }
    .coffee-btn { bottom: 30px; right: 30px; }
    .community-btn { bottom: 30px; left: 30px; }
}
@media (max-width: 1023px) {
    .app-layout { display: block; }
    .screen { display: none; }
    .screen.active { display: block; }
    .nav-tabs { display: flex; }
    .result-actions { display: flex; }
}

/* ============================================================================
   🎨 WPS SELECTOR PRO - STYLESHEET v5.0 (COMPLETO & OPTIMIZADO)
   ============================================================================ */

:root {
    --bg-dark: #1a1a2e;
    --bg-card: #16213e;
    --primary: #e94560;
    --accent: #0f3460;
    --success: #00d9ff;
    --warning: #fca311;
    --error: #ff4d4d;
    --text: #ffffff;
    --muted: #a0a0a0;
    --input-bg: #0f172a;
    --input-border: #334155;
    --radius: 6px;
    --shadow: 0 4px 12px rgba(0,0,0,0.3);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ============================================================================
   🍔 NAV PROFESIONAL
   ============================================================================ */
#global-nav {
    width: 100%;
    margin-bottom: 20px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.98) 0%, rgba(10, 15, 30, 0.98) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0;
}
#global-nav::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    opacity: 0.6;
}

/* Desktop Nav (>768px) */
@media (min-width: 769px) {
    .nav-brand, .hamburger-btn, .nav-overlay { display: none !important; }
    #global-nav .nav-menu { display: flex !important; justify-content: center; align-items: center; gap: 15px; padding: 0.8rem 10px; flex-wrap: wrap; width: 100%; max-width: 900px; margin: 0 auto; }
    .nav-item { display: inline-flex; align-items: center; gap: 6px; color: #94a3b8; text-decoration: none; font-size: 0.9rem; font-weight: 600; padding: 8px 16px; border-radius: 8px; border: 1px solid transparent; background: transparent; cursor: pointer; transition: all 0.3s ease; }
    .nav-item:hover { color: #ffffff; background: rgba(255, 255, 255, 0.05); border-color: rgba(255, 255, 255, 0.1); transform: translateY(-1px); }
    .nav-item.active { color: #ffffff; background: rgba(233, 69, 96, 0.15); border-color: rgba(233, 69, 96, 0.3); box-shadow: 0 0 10px rgba(233, 69, 96, 0.1); }
    .nav-dropdown { position: relative; }
    .dropdown-menu { display: none; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); background: #1e293b; border: 1px solid #334155; border-radius: 8px; padding: 5px; min-width: 200px; box-shadow: 0 10px 30px rgba(0,0,0,0.5); z-index: 2000; margin-top: 10px; animation: fadeInDown 0.2s ease; }
    .nav-dropdown:hover .dropdown-menu { display: block; }
    .dropdown-item { display: block; padding: 10px 15px; color: #cbd5e1; text-decoration: none; font-size: 0.85rem; border-radius: 5px; transition: all 0.2s; }
    .dropdown-item:hover { background: rgba(233, 69, 96, 0.1); color: #e94560; padding-left: 20px; }
}
@keyframes fadeInDown { from { opacity: 0; transform: translate(-50%, -10px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* Mobile Nav (<=768px) */
@media (max-width: 768px) {
    #global-nav { padding: 0; position: relative; overflow: visible; }
    .nav-brand { display: block; position: absolute; left: 15px; top: 50%; transform: translateY(-50%); z-index: 10; }
    .nav-logo { color: #ffffff; text-decoration: none; font-weight: 700; font-size: 1rem; display: flex; align-items: center; gap: 6px; }
    .nav-logo span { background: linear-gradient(90deg, #ffffff, var(--primary)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
    .hamburger-btn { display: flex; flex-direction: column; justify-content: center; align-items: center; width: 44px; height: 44px; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 8px; cursor: pointer; position: absolute; right: 15px; top: 50%; transform: translateY(-50%); z-index: 1001; transition: all 0.3s ease; gap: 5px; }
    .hamburger-btn:hover { background: rgba(233, 69, 96, 0.2); border-color: rgba(233, 69, 96, 0.4); }
    .hamburger-line { display: block; width: 22px; height: 2px; background: #ffffff; border-radius: 2px; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); transform-origin: center; }
    .hamburger-btn.active .hamburger-line:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .hamburger-btn.active .hamburger-line:nth-child(2) { opacity: 0; transform: scaleX(0); }
    .hamburger-btn.active .hamburger-line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
    #global-nav .nav-menu { position: fixed; top: 0; right: 0; width: 280px; height: 100vh; background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%); padding: 80px 20px 20px; box-shadow: -5px 0 30px rgba(0, 0, 0, 0.5); z-index: 999; display: flex; flex-direction: column; gap: 5px; transform: translateX(100%); transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
    #global-nav .nav-menu.active { transform: translateX(0); }
    .nav-menu .nav-item { width: 100%; justify-content: flex-start; padding: 12px 16px; font-size: 1rem; border-radius: 10px; margin-bottom: 4px; }
    .nav-menu .nav-item:hover { background: rgba(233, 69, 96, 0.1); transform: none; }
    .nav-menu .nav-item.active { background: rgba(233, 69, 96, 0.2); border-color: rgba(233, 69, 96, 0.4); }
    .nav-menu .nav-dropdown { width: 100%; }
    .nav-menu .dropdown-trigger { width: 100%; justify-content: space-between; }
    .nav-menu .dropdown-menu { position: static; transform: none; margin-top: 5px; background: rgba(0, 0, 0, 0.2); border: 1px solid rgba(255, 255, 255, 0.05); box-shadow: none; display: none; animation: none; }
    .nav-dropdown.mobile-open .dropdown-menu { display: block; animation: slideDown 0.2s ease; }
    @keyframes slideDown { from { opacity: 0; max-height: 0; } to { opacity: 1; max-height: 200px; } }
    .nav-menu .dropdown-item { padding-left: 20px; font-size: 0.9rem; }
    .nav-overlay { display: none; position: fixed; inset: 0; background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(3px); z-index: 998; opacity: 0; transition: opacity 0.3s ease; }
    .nav-overlay.active { display: block; opacity: 1; }
}

/* ============================================================================
   BODY & LAYOUT PRINCIPAL
   ============================================================================ */
body {
    font-family: 'Segoe UI', system-ui, sans-serif;
    background: var(--bg-dark);
    color: var(--text);
    padding: 20px 15px 140px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
}
body.pro-active { padding-bottom: 20px; }
.container { width: 100%; max-width: 900px; position: relative; margin: 0 auto; padding: 0 15px; }
.app-layout { width: 100%; max-width: 1000px; margin: 0 auto; }

/* TABS */
.nav-tabs { display: flex; gap: 8px; margin-bottom: 16px; background: var(--bg-card); padding: 6px; border-radius: 8px; box-shadow: var(--shadow); }
.nav-tab { flex: 1; padding: 9px; background: transparent; border: none; color: var(--muted); font-weight: 600; cursor: pointer; border-radius: var(--radius); }
.nav-tab.active { background: var(--primary); color: white; box-shadow: 0 2px 8px rgba(233, 69, 96, 0.4); }

/* FORMS */
.form-group { margin-bottom: 12px; }
label { display: block; margin-bottom: 4px; color: var(--success); font-weight: 600; font-size: 0.7rem; text-transform: uppercase; }
select, input[type="number"], input[type="text"], .license-input {
    width: 100%; padding: 11px; background: var(--input-bg); border: 1px solid var(--input-border); color: white;
    border-radius: var(--radius); font-size: 0.95rem;
}
select:focus, input:focus { outline: none; border-color: var(--success); box-shadow: 0 0 0 3px rgba(0, 217, 255, 0.15); }

/* BOTONES */
.btn { width: 100%; padding: 12px; border: none; border-radius: var(--radius); font-size: 0.9rem; font-weight: 700; cursor: pointer; margin-top: 8px; display: flex; align-items: center; justify-content: center; gap: 6px; transition: 0.2s; }
.btn-search { background: var(--primary); color: white; }
.btn-back { background: var(--accent); color: white; }
.btn-action { background: transparent; border: 2px solid var(--success); color: var(--success); }
.btn-pro { background: linear-gradient(135deg, var(--warning), #f59e0b); color: #000; }
.btn-danger { background: var(--error); color: white; }
.btn-cancel { background: transparent; color: var(--muted); border: 1px solid var(--input-border); padding: 9px; border-radius: var(--radius); cursor: pointer; }
.btn:hover { opacity: 0.9; transform: translateY(-1px); }

/* SCREENS */
.screen { display: none; animation: fadeIn 0.3s ease; }
.screen.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

/* CONDITIONAL SECTIONS & TITLES */
.conditional-section { display: none; animation: fadeIn 0.3s; background: rgba(15, 52, 96, 0.4); padding: 12px; border-radius: 8px; border-left: 3px solid var(--accent); margin-bottom: 12px; }
.section-title { font-size: 0.75rem; color: var(--muted); margin-bottom: 8px; text-transform: uppercase; font-weight: 700; border-bottom: 1px solid var(--input-border); padding-bottom: 4px; }
.gap-warning { color: var(--warning); font-size: 0.65rem; display: none; margin-top: 3px; }
input.warning-input { border-color: var(--warning); }
.checkbox-group { display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,0.05); padding: 8px; border-radius: var(--radius); margin-top: 8px; cursor: pointer; }

/* RESULTS */
.result-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; border-bottom: 1px solid var(--input-border); padding-bottom: 8px; }
.wps-id { font-size: 1.1rem; font-weight: 800; color: var(--warning); font-family: 'Courier New', monospace; min-height: 1.2em; }
.wps-id::after { content: '|'; animation: blink 1s infinite; color: var(--warning); margin-left: 2px; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
.joint-illustration-container { text-align: center; margin-bottom: 10px; min-height: 100px; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,0.2); border-radius: 8px; padding: 10px; }
.joint-img { max-width: 150px; max-height: 100px; object-fit: contain; }
.badge { font-size: 0.65rem; padding: 3px 7px; border-radius: 20px; background: #2d3748; color: var(--success); border: 1px solid var(--success); font-weight: 600; }
.param-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.param-grid.config { grid-template-columns: repeat(3, 1fr); }
.param-grid.three-col { grid-template-columns: 1fr 1fr 1fr; }
.param-box { background: rgba(255,255,255,0.06); padding: 7px; border-radius: var(--radius); transition: background 0.2s; }
.param-box:hover { background: rgba(255,255,255,0.1); }
.param-label { font-size: 0.55rem; color: var(--muted); text-transform: uppercase; }
.param-value { font-size: 0.9rem; font-weight: 700; margin-top: 2px; font-family: 'Courier New', monospace; }
.param-value.highlight { color: var(--success); }
.param-value.warning { color: var(--warning); }

/* Tips & Checklist */
.tech-tips { background: rgba(0, 217, 255, 0.08); border-left: 3px solid var(--success); padding: 10px; border-radius: var(--radius); font-size: 0.75rem; color: var(--text); margin-bottom: 10px; }
.tech-tips ul { padding-left: 20px; margin-top: 5px; }
.tech-tips li { margin-bottom: 4px; }
.checklist-items { display: flex; flex-direction: column; gap: 8px; }
.check-item { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; cursor: pointer; }
.disclaimer-box { background: rgba(255,255,255,0.03); border-radius: 6px; padding: 10px; margin-bottom: 15px; cursor: pointer; }
.disclaimer-box summary { font-size: 0.8rem; color: var(--muted); }

/* Footer & Ads */
#app-footer { position: fixed !important; bottom: 0 !important; left: 0 !important; width: 100% !important; height: 100px !important; background: var(--bg-dark) !important; border-top: 1px solid var(--input-border) !important; z-index: 9999 !important; display: flex !important; justify-content: center !important; align-items: center !important; }
#ad-container { width: 100% !important; max-width: 500px !important; height: 90px !important; margin: 0 auto !important; overflow: hidden !important; position: relative !important; }
.ad-link { display: block !important; width: 100% !important; height: 100% !important; }
.ad-image { width: 100% !important; height: 100% !important; object-fit: contain !important; }
.ad-label { position: absolute !important; top: 4px !important; right: 6px !important; background: rgba(0,0,0,0.7) !important; color: #fff !important; font-size: 0.55rem !important; padding: 2px 5px !important; border-radius: 3px !important; }

/* ============================================================================
   🔧 INTERSTITIAL AD OVERLAY - FIXED v5.0
   ============================================================================ */
#pre-result-ad-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(10, 12, 20, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 10001;
    justify-content: center;
    align-items: center;
    padding: 16px;
    opacity: 0;
    transition: opacity 0.3s ease;
}
#pre-result-ad-overlay[style*="flex"] { opacity: 1; }
.interstitial-content {
    background: var(--bg-card);
    border: 1px solid var(--input-border);
    border-radius: 16px;
    padding: 24px;
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
    transform: scale(0.95);
    animation: popIn 0.3s ease forwards;
}
@keyframes popIn { to { transform: scale(1); opacity: 1; } }
.interstitial-header { font-size: 0.7rem; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 16px; width: 100%; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 8px; }
.interstitial-ad-content { width: 100%; min-height: 160px; display: flex; align-items: center; justify-content: center; background: linear-gradient(145deg, #0f172a, #1e293b); border-radius: 12px; margin-bottom: 20px; border: 1px dashed rgba(0, 217, 255, 0.3); }
.interstitial-timer { font-size: 1.4rem; font-weight: 800; color: var(--warning); margin-bottom: 16px; font-variant-numeric: tabular-nums; }
.btn-interstitial { width: 100%; padding: 16px; border: none; border-radius: 12px; font-size: 1rem; font-weight: 700; cursor: pointer; background: linear-gradient(135deg, var(--success), #00b4d8); color: #000; transition: all 0.2s ease; box-shadow: 0 4px 12px rgba(0, 217, 255, 0.25); }
.btn-interstitial:disabled { background: #334155; color: #64748b; cursor: not-allowed; box-shadow: none; transform: none; }
.btn-interstitial:not(:disabled):hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0, 217, 255, 0.35); }
.interstitial-note { margin-top: 12px; font-size: 0.7rem; color: var(--muted); }

/* Modals */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.88); z-index: 2000; justify-content: center; align-items: center; padding: 20px; backdrop-filter: blur(5px); }
.modal-content { background: var(--bg-card); border: 2px solid var(--warning); border-radius: 10px; padding: 20px; max-width: 340px; width: 100%; text-align: center; animation: slideIn 0.25s ease; }
@keyframes slideIn { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal-icon { font-size: 2.5rem; margin-bottom: 10px; }
.modal-title { color: var(--warning); font-size: 1.1rem; font-weight: bold; margin-bottom: 8px; }
.modal-text { color: var(--muted); font-size: 0.85rem; line-height: 1.4; margin-bottom: 15px; }
.modal-buttons { display: flex; gap: 8px; flex-direction: column; }
.code-display { background: #0b1120; padding: 12px; border-radius: var(--radius); font-family: monospace; font-size: 1rem; text-align: center; margin: 12px 0; border: 2px dashed var(--warning); color: var(--warning); }
.device-id-box { margin-top: 12px; padding: 8px; background: rgba(0,0,0,0.3); border-radius: var(--radius); font-size: 0.75rem; color: var(--muted); }
.device-id-box code { color: var(--success); font-family: monospace; font-weight: bold; cursor: pointer; padding: 2px 5px; background: rgba(0,0,0,0.4); border-radius: 3px; }

/* Floating Buttons & Offline Badge */
.floating-btn { position: fixed; z-index: 850; border: none; border-radius: 50%; width: 54px; height: 54px; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; box-shadow: 0 6px 16px rgba(0,0,0,0.4); cursor: pointer; transition: transform 0.2s, opacity 0.3s; opacity: 0; pointer-events: none; }
.floating-btn.visible { opacity: 1; pointer-events: auto; animation: fadeInUp 0.4s ease forwards; }
@keyframes fadeInUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.coffee-btn { bottom: 180px; right: 18px; background: #6f4e37; color: #fff; }
.community-btn { bottom: 180px; left: 18px; background: var(--accent); color: white; }
.offline-badge { position: fixed; bottom: 120px; right: 15px; background: var(--bg-card); border: 1px solid var(--success); color: var(--success); padding: 5px 8px; border-radius: 16px; font-size: 0.65rem; display: flex; align-items: center; gap: 5px; box-shadow: 0 4px 12px rgba(0,0,0,0.4); z-index: 100; }
.dot { width: 6px; height: 6px; background: var(--success); border-radius: 50%; animation: pulse 2s infinite; }
@keyframes pulse { 0% { opacity: 1; transform: scale(1); } 50% { opacity: 0.5; transform: scale(1.2); } 100% { opacity: 1; transform: scale(1); } }

/* Toast Container */
#toast-container { position: fixed; top: 20px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.toast { background: var(--bg-card); color: white; padding: 16px 24px; border-radius: 12px; box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4); border-left: 4px solid var(--primary); display: flex; align-items: center; gap: 12px; min-width: 300px; max-width: 450px; pointer-events: all; animation: slideInRight 0.4s ease-out; backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, 0.1); }
.toast.success { border-left-color: var(--success); }
.toast.warning { border-left-color: var(--warning); }
.toast.error { border-left-color: var(--error); }
.toast-icon { font-size: 1.5rem; }
.toast-close { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 1.2rem; margin-left: auto; }
@keyframes slideInRight { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
.toast.hiding { animation: slideOutRight 0.4s ease-out forwards; }
@keyframes slideOutRight { from { transform: translateX(0); opacity: 1; } to { transform: translateX(100%); opacity: 0; } }

/* PRO Mode Overrides */
body.pro-active #app-footer { display: none !important; }
body.pro-active #pro-footer { display: block !important; position: fixed; bottom: 0; left: 0; right: 0; background: rgba(26, 26, 46, 0.9); padding: 5px; font-size: 0.6rem; text-align: center; z-index: 9999; color: rgba(255,255,255,0.6); }
body.pro-active #ad-container { display: none !important; }

/* Print Styles */
@media print {
    @page { size: A4 portrait; margin: 0; }
    body { background: #fff !important; color: #000 !important; padding: 0 !important; margin: 0 !important; }
    #global-nav, #app-footer, .offline-badge, .floating-btn, .modal-overlay, .nav-tabs, header, .btn, .checkbox-group, .gap-warning, .disclaimer-box, #ad-container { display: none !important; }
    .container { max-width: 100%; padding: 0; margin: 0; }
    .app-layout { display: block !important; }
    #form-screen, #activation-screen { display: none !important; }
    #result-screen { display: block !important; position: static !important; width: 100% !important; margin: 0 !important; padding: 15mm !important; }
    .result-header { border-bottom: 2px solid #000 !important; padding-bottom: 5px !important; margin-bottom: 10px !important; }
    .wps-id { color: #000 !important; font-size: 1.4rem !important; }
    .wps-id::after { display: none; }
    .badge { border: 1px solid #000 !important; color: #000 !important; background: transparent !important; }
    .section-title { color: #000 !important; border-bottom: 1.5px solid #333 !important; font-size: 0.9rem !important; margin: 10px 0 5px !important; }
    .param-grid { display: grid !important; grid-template-columns: repeat(4, 1fr) !important; gap: 4mm !important; margin-bottom: 6px !important; page-break-inside: avoid; }
    .param-box { background: #f4f4f4 !important; border: 1px solid #ccc !important; padding: 5px !important; border-radius: 3px !important; }
    .param-label { color: #555 !important; font-size: 0.65rem !important; }
    .param-value { color: #000 !important; font-size: 0.85rem !important; }
    .tech-tips { color: #333 !important; border-left: 2px solid #000 !important; background: transparent !important; padding: 6px !important; margin-top: 8px !important; }
}

/* ============================================================================
   📐 LAYOUT RESPONSIVO (DUAL COLUMN EN ESCRITORIO)
   ============================================================================ */
@media (min-width: 1024px) {
    .app-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: start; }
    .screen { display: block !important; opacity: 1 !important; position: static !important; }
    #form-screen { order: 1; }
    #result-screen { order: 2; border: 2px solid var(--primary); border-radius: 12px; padding: 20px; background: rgba(22, 33, 62, 0.5); min-height: 600px; }
    .result-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; padding-top: 15px; border-top: 1px solid var(--input-border); }
    .nav-tabs { display: none; }
    .coffee-btn { bottom: 30px; right: 30px; }
    .community-btn { bottom: 30px; left: 30px; }
}
@media (max-width: 1023px) {
    .app-layout { display: block; }
    .screen { display: none; }
    .screen.active { display: block; }
    .nav-tabs { display: flex; }
    .result-actions { display: flex; }
}


/* ============================================================================
   ✨ PRO MODE VISUAL INDICATORS
   ============================================================================ */

/* Badge PRO en navegación */
.pro-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, #fca311, #f59e0b);
    color: #000;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 20px;
    margin-left: 6px;
    box-shadow: 0 2px 8px rgba(252, 163, 17, 0.4);
    animation: pulsePro 2s infinite;
}
@keyframes pulsePro {
    0%, 100% { box-shadow: 0 2px 8px rgba(252, 163, 17, 0.4); }
    50% { box-shadow: 0 2px 16px rgba(252, 163, 17, 0.7); }
}

/* Bordes dorados en inputs cuando es PRO */
body.pro-active select:focus,
body.pro-active input:focus {
    border-color: #fca311 !important;
    box-shadow: 0 0 0 3px rgba(252, 163, 17, 0.25) !important;
}

/* Indicador sutil en header del formulario */
.pro-welcome {
    display: none;
    background: linear-gradient(135deg, rgba(252, 163, 17, 0.15), rgba(245, 158, 11, 0.1));
    border: 1px solid rgba(252, 163, 17, 0.3);
    border-radius: 8px;
    padding: 8px 12px;
    margin-bottom: 12px;
    font-size: 0.8rem;
    color: #fca311;
    text-align: center;
    font-weight: 600;
}
body.pro-active .pro-welcome { display: block; }

/* Ocultar anuncios visualmente (refuerzo) */
body.pro-active #ad-container,
body.pro-active #pre-result-ad-overlay {
    display: none !important;
}

/* Efecto hover mejorado para selects PRO */
body.pro-active select:hover,
body.pro-active input:hover {
    border-color: rgba(252, 163, 17, 0.5);
    transition: border-color 0.2s ease;
}

/* ============================================================================
   📱 RESPONSIVE: MENÚ MÓVIL (max-width: 768px)
   ============================================================================ */
@media (max-width: 768px) {
    /* Contenedor principal del nav */
    #global-nav {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 60px;
        background: var(--bg-panel, #1e293b);
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 15px;
        z-index: 1000;
        box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    }

    /* Logo */
    .nav-brand {
        font-size: 1.2rem;
        font-weight: 700;
        color: var(--text-main, #f1f5f9);
        text-decoration: none;
    }

    /* Botón hamburguesa */
    .hamburger-btn {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 8px;
        z-index: 1002;
    }
    .hamburger-line {
        width: 26px;
        height: 3px;
        background: var(--text-main, #fff);
        border-radius: 2px;
        transition: all 0.3s ease;
    }

    /* Menú lateral móvil */
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 85%;
        max-width: 320px;
        height: 100vh;
        background: var(--bg-panel, #1e293b);
        flex-direction: column;
        padding: 80px 20px 20px;
        transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: -5px 0 20px rgba(0,0,0,0.5);
        z-index: 1001;
        overflow-y: auto;
    }
    .nav-menu.active { right: 0; }

    /* Overlay oscuro */
    .nav-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.6);
        backdrop-filter: blur(2px);
        z-index: 1000;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
    }
    .nav-overlay.active {
        opacity: 1;
        pointer-events: auto;
    }

    /* Items del menú */
    .nav-item {
        display: block;
        padding: 16px 12px;
        color: var(--text-main, #f1f5f9);
        text-decoration: none;
        font-size: 1.05rem;
        border-bottom: 1px solid var(--border, #334155);
        transition: background 0.2s;
    }
    .nav-item:hover, .nav-item.active {
        background: rgba(255,255,255,0.05);
        color: var(--primary, #3b82f6);
    }

    /* Dropdown en móvil - Comportamiento tipo acordeón */
.nav-dropdown { 
    position: relative; 
    width: 100%;
}
.dropdown-trigger {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    text-align: left;
    cursor: pointer;
    background: transparent;
    border: none;
    color: inherit;
    font: inherit;
    padding: 0;
}
.dropdown-menu {
    display: none; /* Oculto por defecto en móvil */
    position: static;
    background: rgba(0,0,0,0.15);
    border-radius: 8px;
    padding: 5px 0 5px 15px;
    margin-top: 5px;
    box-shadow: none;
    border: none;
    width: 100%;
}
.dropdown-menu.show {
    display: block; /* Se muestra al hacer clic */
}
.dropdown-item {
    display: block;
    padding: 10px 0;
    font-size: 0.95rem;
    color: var(--text-muted, #94a3b8);
    text-decoration: none;
}
.dropdown-item:hover {
    color: var(--primary, #3b82f6);
}

    /* Ajuste de contenido principal para no quedar tapado por el nav fijo */
    .app-layout, .screen, #form-screen, #result-screen {
        padding-top: 70px;
    }
}

/* Ads estáticos en fila */
.ad-container-static {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.ad-card {
    background: var(--bg-card);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s;
}

.ad-card:hover {
    transform: translateY(-3px);
}

.ad-card img {
    width: 100%;
    height: auto;
    display: block;
}

/* Footer minimalista */
.footer-minimal {
    background: var(--bg-panel);
    border-top: 1px solid var(--border);
    padding: 20px;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 30px;
}

.footer-minimal p {
    margin: 5px 0;
}

/* Responsive */
@media (max-width: 768px) {
    .ad-container-static {
        grid-template-columns: 1fr;
        padding: 15px;
    }
    
    .footer-minimal {
        padding: 15px;
        font-size: 0.75rem;
    }
}

/* ============================================================================
   📢 MODAL INTERSTICIAL - TAMAÑO AJUSTADO
   ============================================================================ */

.interstitial-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.95); /* Fondo oscuro semi-transparente */
    backdrop-filter: blur(8px);
    z-index: 9998;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.interstitial-content {
    background: var(--bg-panel, #1e293b);
    border-radius: 16px;
    padding: 30px;
    max-width: 450px; /* Ancho máximo razonable */
    width: 90%;
    text-align: center;
    border: 1px solid var(--border, #334155);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.interstitial-header {
    font-size: 0.85rem;
    color: var(--text-muted, #94a3b8);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border, #334155);
}

/* Contenedor de anuncios en el modal */
.modal-ads-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 20px 0;
    max-height: 400px;
    overflow-y: auto;
}

.modal-ad-item {
    background: var(--bg-card, #1e293b);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border, #334155);
    transition: transform 0.2s;
}

.modal-ad-item:hover {
    transform: scale(1.02);
}

.modal-ad-item img {
    width: 100%;
    height: auto;
    display: block;
    max-height: 200px; /* Limitar altura de cada anuncio */
    object-fit: contain;
}

.modal-ad-item a {
    display: block;
}

/* Timer y botón */
.interstitial-timer {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--warning, #f59e0b);
    margin: 15px 0;
}

.btn-interstitial {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 10px;
}

.btn-interstitial:disabled {
    background: var(--bg-hover, #334155);
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-interstitial:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(6, 182, 212, 0.4);
}

.interstitial-note {
    font-size: 0.75rem;
    color: var(--text-muted, #94a3b8);
    margin-top: 10px;
}

/* Responsive para móviles */
@media (max-width: 768px) {
    .interstitial-content {
        padding: 20px;
        max-width: 95%;
    }
    
    .modal-ad-item img {
        max-height: 150px;
    }
}

/* Animación fade para rotación */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-ad-item {
    animation: fadeIn 0.3s ease;
}
/* Animación suave sin parpadeo */
.modal-ad-item {
    animation: fadeInSmooth 0.5s ease;
    position: relative;
}

@keyframes fadeInSmooth {
    from { 
        opacity: 0; 
        transform: translateY(10px);
    }
    to { 
        opacity: 1; 
        transform: translateY(0);
    }
}

/* Imágenes más grandes */
.modal-ad-item img {
    width: 100%;
    height: auto;
    display: block;
    max-height: 350px; /* Aumentado de 200px a 350px */
    object-fit: contain;
    border-radius: 8px;
}

/* Contenedor más alto */
#interstitial-ads-container {
    min-height: 370px; /* Espacio reservado para evitar saltos */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Responsive */
@media (max-width: 768px) {
    .modal-ad-item img {
        max-height: 280px;
    }
    
    #interstitial-ads-container {
        min-height: 300px;
    }
}
