/* ==========================================================================
   NEXODRWEBTOONS.COM — Hoja de Estilos Ligera Optimizada para Celulares y Tablets
   ========================================================================== */
:root {
    --bg-dark: #0f0f13;
    --bg-card: #17171f;
    --bg-elevated: #21212d;
    --bg-input: #121218;
    --accent-red: #e11d48;
    --accent-red-hover: #be123c;
    --accent-amber: #f59e0b;
    --accent-paypal: #0070ba;
    --accent-paypal-gold: #ffc439;
    --accent-emerald: #10b981;
    --accent-blue: #3b82f6;
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --border: #2a2a38;
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    padding-bottom: calc(76px + var(--safe-bottom));
    overflow-x: hidden;
}

a, button, select, input {
    touch-action: manipulation;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Cabecera Superior Ligera y Adaptable */
.top-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(15, 15, 19, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    max-width: 1080px;
    margin: 0 auto;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

.brand {
    font-size: 1.08rem;
    font-weight: 900;
    color: #fff;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    letter-spacing: -0.02em;
}

.brand-badge {
    background: linear-gradient(135deg, var(--accent-red), var(--accent-amber));
    color: #fff;
    padding: 3px 7px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.04em;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.coin-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    padding: 6px 11px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 800;
    color: #fde68a;
    text-decoration: none;
    min-height: 36px;
}

.vip-badge {
    background: linear-gradient(135deg, #f59e0b, #e11d48);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 900;
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 0.04em;
}

.btn-recharge {
    background: var(--accent-amber);
    color: #0f0f13;
    text-decoration: none;
    font-size: 0.78rem;
    font-weight: 800;
    padding: 7px 11px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    min-height: 36px;
}

.btn-admin {
    background: rgba(225, 29, 72, 0.15);
    border: 1px solid rgba(225, 29, 72, 0.45);
    color: #fda4af;
    text-decoration: none;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 6px 11px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    min-height: 36px;
}

.btn-auth {
    background: var(--accent-red);
    color: #fff;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 800;
    padding: 7px 12px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    min-height: 36px;
}

.btn-logout {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 6px 8px;
}

/* Contenedor Responsivo (Celular, Tablet y Escritorio) */
.container {
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    padding: 16px 14px;
}

@media (min-width: 640px) {
    .container { padding: 20px 20px; }
    .brand { font-size: 1.18rem; }
}

/* Barra Inferior Táctil para Celulares y Tablets */
.mobile-bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(15, 15, 19, 0.97);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-around;
    padding: 8px 6px calc(8px + var(--safe-bottom));
    z-index: 100;
}

.bottom-item {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.73rem;
    font-weight: 700;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-width: 64px;
    min-height: 44px;
    border-radius: 8px;
}

.bottom-item.active {
    color: var(--accent-red);
}

/* Alertas y Notificaciones */
.alert {
    padding: 12px 15px;
    border-radius: 11px;
    margin-bottom: 16px;
    font-size: 0.88rem;
    font-weight: 600;
}

.alert-success {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.45);
    color: #6ee7b7;
}

.alert-error {
    background: rgba(225, 29, 72, 0.15);
    border: 1px solid rgba(225, 29, 72, 0.45);
    color: #fda4af;
}

/* Botones de Doble Modalidad (Anuncio Gratis vs PayPal / Monedas) */
.btn-ad-watch {
    width: 100%;
    background: linear-gradient(135deg, #10b981, #059669);
    color: #042f2e;
    border: none;
    border-radius: 11px;
    padding: 13px 16px;
    font-size: 0.95rem;
    font-weight: 900;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    text-decoration: none;
}

.btn-paypal {
    width: 100%;
    background: var(--accent-paypal-gold);
    color: #003087;
    border: 1px solid #f5b400;
    border-radius: 10px;
    padding: 11px 14px;
    font-size: 0.88rem;
    font-weight: 900;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 44px;
    text-decoration: none;
}

.btn-paypal:hover {
    filter: brightness(1.04);
}

/* Modal de Anuncio Recompensado (15s) y Checkout PayPal */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(5, 5, 9, 0.88);
    backdrop-filter: blur(6px);
    z-index: 999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.modal-backdrop.open {
    display: flex;
}

.modal-sheet {
    width: 100%;
    max-width: 440px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 22px 18px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.75);
}

.ad-progress-track {
    width: 100%;
    height: 10px;
    background: #111118;
    border-radius: 999px;
    overflow: hidden;
    margin: 14px 0;
    border: 1px solid var(--border);
}

.ad-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #10b981, #f59e0b);
    transition: width 0.3s linear;
}

/* Tablas Responsivas para Móviles y Tablets */
.table-scroll {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Botones Oficiales de Inicio de Sesión Social (Google y Facebook) */
.social-auth-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

.btn-social {
    width: 100%;
    min-height: 46px;
    padding: 11px 14px;
    border-radius: 11px;
    font-size: 0.92rem;
    font-weight: 800;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition: transform 0.12s ease, filter 0.15s ease, border-color 0.15s ease;
}

.btn-social:active {
    transform: scale(0.99);
}

.btn-social svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.btn-google {
    background: #ffffff;
    color: #1f2937;
    border: 1px solid #d1d5db;
}

.btn-google:hover {
    background: #f9fafb;
    filter: brightness(0.98);
}

.btn-facebook {
    background: #1877F2;
    color: #ffffff;
    border: 1px solid #1877F2;
}

.btn-facebook:hover {
    background: #166fe5;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 16px 0;
    color: var(--text-muted);
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* ==========================================================================
   Pie de Página Legal, Copyright y Verificación de Edad (+18 / Según País)
   ========================================================================== */
.legal-footer {
    max-width: 1080px;
    margin: 28px auto 12px;
    padding: 18px 14px;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.78rem;
    text-align: center;
    line-height: 1.55;
}

.legal-footer-badges {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.age-badge-18 {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(225, 29, 72, 0.2);
    border: 1px solid rgba(225, 29, 72, 0.55);
    color: #fda4af;
    font-size: 0.72rem;
    font-weight: 900;
    padding: 3px 9px;
    border-radius: 999px;
    letter-spacing: 0.03em;
}

.legal-footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 8px;
}

.legal-footer-links a {
    color: var(--accent-amber);
    text-decoration: none;
    font-weight: 700;
}

.legal-footer-links a:hover {
    text-decoration: underline;
}

.age-gate-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(6, 6, 10, 0.94);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.age-gate-backdrop.open {
    display: flex;
}

.age-gate-card {
    width: 100%;
    max-width: 460px;
    background: var(--bg-card);
    border: 2px solid rgba(225, 29, 72, 0.65);
    border-radius: 18px;
    padding: 24px 20px;
    text-align: center;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85);
}

/* ==========================================================================
   Google AdSense — Bloques de Anuncio y Fallbacks Visuales
   ========================================================================== */
.adsense-block-container {
    margin: 18px 0;
    width: 100%;
    text-align: center;
    border-radius: 12px;
    overflow: hidden;
}

.adsense-notice-bar {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    text-transform: uppercase;
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.adsense-slot-inner {
    padding: 10px 0;
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #111117;
}

.adsense-fallback-banner {
    background: linear-gradient(135deg, rgba(30, 27, 75, 0.4), rgba(49, 16, 47, 0.4));
    border: 1px dashed rgba(245, 158, 11, 0.4);
    border-radius: 12px;
    padding: 16px 14px;
    margin: 6px auto;
    max-width: 680px;
}

.fallback-pill {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 900;
    color: #fde68a;
    background: rgba(245, 158, 11, 0.2);
    border: 1px solid rgba(245, 158, 11, 0.4);
    border-radius: 999px;
    padding: 2px 8px;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.fallback-banner-text {
    font-size: 0.8rem;
    color: #e5e7eb;
    margin-bottom: 8px;
    line-height: 1.4;
}

.fallback-banner-text code {
    background: rgba(0, 0, 0, 0.5);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--accent-amber);
    font-size: 0.78rem;
}

.btn-fallback-link {
    display: inline-block;
    color: var(--accent-amber);
    font-size: 0.76rem;
    font-weight: 800;
    text-decoration: none;
}

.btn-fallback-link:hover {
    text-decoration: underline;
}

.adsense-fallback-card {
    background: linear-gradient(135deg, #18152e, #291125);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 12px;
    padding: 16px 14px;
    text-align: center;
}

.fallback-icon {
    font-size: 1.8rem;
    margin-bottom: 4px;
}

.fallback-title {
    font-size: 0.95rem;
    font-weight: 900;
    color: #fde68a;
    margin-bottom: 4px;
}

.fallback-text {
    font-size: 0.8rem;
    color: #e5e7eb;
    margin-bottom: 12px;
    line-height: 1.35;
}

.btn-fallback-vip {
    display: inline-block;
    background: linear-gradient(135deg, var(--accent-amber), #ea580c);
    color: #000;
    font-size: 0.8rem;
    font-weight: 900;
    text-decoration: none;
    padding: 8px 18px;
    border-radius: 999px;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}
