* {
    font-family: 'Ubuntu', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background-color: #f2fbff;
    /* Cuadrícula icónica idéntica a Agar.io */
    background-image: 
        linear-gradient(to right, rgba(0, 0, 0, 0.06) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(0, 0, 0, 0.06) 1px, transparent 1px);
    background-size: 32px 32px;
}

div {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Burbujas / Células decorativas flotantes en el fondo estilo Agar.io */
.bg-decorations {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.bg-bubble {
    position: absolute;
    border-radius: 50%;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.06));
    animation: floatBubble 14s infinite ease-in-out alternate;
}

.b1 { width: 90px; height: 90px; background: rgba(255, 87, 34, 0.75); top: 12%; left: 8%; animation-duration: 12s; }
.b2 { width: 140px; height: 140px; background: rgba(76, 175, 80, 0.65); top: 60%; left: 4%; animation-duration: 16s; }
.b3 { width: 50px; height: 50px; background: rgba(33, 150, 243, 0.8); top: 25%; right: 12%; animation-duration: 10s; }
.b4 { width: 120px; height: 120px; background: rgba(156, 39, 176, 0.6); top: 70%; right: 7%; animation-duration: 18s; }
.b5 { width: 35px; height: 35px; background: rgba(255, 235, 59, 0.9); top: 8%; right: 28%; }
.b6 { width: 45px; height: 45px; background: rgba(0, 188, 212, 0.8); bottom: 15%; left: 32%; }
.b7 { width: 28px; height: 28px; background: rgba(233, 30, 99, 0.85); top: 45%; left: 22%; }
.b8 { width: 32px; height: 32px; background: rgba(139, 195, 74, 0.85); bottom: 25%; right: 26%; }

@keyframes floatBubble {
    0% { transform: translateY(0px) translateX(0px) scale(1); }
    50% { transform: translateY(-25px) translateX(15px) scale(1.05); }
    100% { transform: translateY(15px) translateX(-20px) scale(0.98); }
}

/* Área de Juego y Canvas */
#gameAreaWrapper {
    position: absolute !important;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    z-index: 5;
    transition: opacity 0.4s ease;
}

canvas {
    width: 100%;
    height: 100%;
    display: block;
    background: #f2fbff;
}

/* HUD del Juego */
#status {
    position: absolute;
    padding: 10px 14px;
    background: rgba(0, 0, 0, 0.5);
    color: #FFF;
    font-size: 14px;
    top: 15px;
    right: 15px;
    font-weight: bold;
    text-align: center;
    border-radius: 6px;
    pointer-events: none;
    z-index: 10;
}

#status .title {
    font-size: 20px;
    display: block;
    margin-bottom: 4px;
}

.chatbox {
    position: absolute;
    width: 300px;
    height: 300px;
    background: rgba(20, 20, 20, 0.75);
    bottom: 10px;
    left: 10px;
    border-radius: 8px;
    pointer-events: none;
    z-index: 10;
    display: none; /* Oculto por defecto para limpiar la interfaz estilo Agar.io */
}

.chatbox .chat-list {
    padding: 8px;
    margin: 0;
    list-style: none;
    height: 255px;
    overflow: hidden;
    font-size: 13px;
    color: #fff;
}

.chatbox .chat-input {
    pointer-events: all;
    width: 100%;
    padding: 8px 10px;
    background: rgba(0, 0, 0, 0.4);
    border: none;
    border-top: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    outline: none;
    font-size: 13px;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

#mobile {
    position: absolute;
    bottom: 15px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    padding: 0 15px;
    pointer-events: none;
    z-index: 10;
}

#split, #feed {
    width: 75px;
    height: 75px;
    pointer-events: all;
    opacity: 0.85;
}

/* Contenedor del Menú Principal */
#startMenuWrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 15px 30px 15px;
    transition: opacity 0.5s ease, max-height 0.8s ease;
}

/* Barra Superior */
.top-nav-bar {
    width: 100%;
    max-width: 1140px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.brand-badge {
    font-weight: 900;
    font-size: 16px;
    letter-spacing: 1px;
    color: #27ae60;
    background: #e8f8f0;
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid #b7ebcf;
}

.lang-select-box {
    display: flex;
    align-items: center;
}

.lang-dropdown {
    background: #ffffff;
    border: 1.5px solid #cbd5e0;
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    color: #2d3748;
    cursor: pointer;
    outline: none;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.lang-dropdown:focus, .lang-dropdown:hover {
    border-color: #2ecc71;
    box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.2);
}

/* Estructura 3 Columnas */
.layout-three-columns {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 20px;
    width: 100%;
    max-width: 1140px;
}

/* Espacios de Publicidad Simulados (Skyscrapers) */
.ad-slot {
    position: relative;
    border: 2px dashed #b0bec5;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.04);
}

.ad-skyscraper {
    width: 280px;
    min-width: 280px;
    height: 580px;
}

.ad-badge {
    position: absolute;
    top: 6px;
    right: 8px;
    font-size: 9px;
    font-weight: bold;
    color: #78909c;
    background: rgba(207, 216, 220, 0.5);
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

.ad-placeholder-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 20px;
}

.ad-icon {
    font-size: 26px;
    opacity: 0.7;
}

.ad-text-main {
    font-size: 13px;
    font-weight: 600;
    color: #546e7a;
}

.ad-text-dim {
    font-size: 11px;
    color: #90a4ae;
}

/* Banner Inferior */
.ad-banner-bottom {
    width: 100%;
    max-width: 1140px;
    height: 90px;
    margin-top: 18px;
}

.ad-placeholder-horizontal {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
}

/* Panel Central del Juego */
#startMenu {
    position: relative;
    width: 380px;
    max-width: 100%;
    background: #ffffff;
    border-radius: 12px;
    padding: 22px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(0, 0, 0, 0.06);
    text-align: center;
}

.game-title {
    margin: 0;
    padding: 0;
    font-size: 32px;
    font-weight: 900;
    letter-spacing: -0.5px;
    color: #1a1a1a;
}

.game-tagline {
    margin: 3px 0 14px 0;
    font-size: 12px;
    color: #718096;
}

.input-group {
    position: relative;
    margin-bottom: 12px;
}

#playerNameInput {
    width: 100%;
    text-align: center;
    padding: 12px 14px;
    font-size: 15px;
    font-weight: 500;
    border: 1.5px solid #cbd5e0;
    border-radius: 8px;
    outline: none;
    transition: all 0.25s ease;
    background: #f8fafc;
}

#playerNameInput:focus {
    border-color: #2ecc71;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.2);
}

.input-error {
    display: block;
    color: #e53e3e;
    font-size: 11px;
    margin-top: 4px;
    opacity: 0;
    transition: opacity 0.2s;
}

/* Botones de Acción */
.action-buttons {
    margin-bottom: 14px;
}

#startButton {
    width: 100%;
    height: 46px;
    font-size: 18px;
    font-weight: 800;
    color: #fff;
    background: #2ecc71;
    border: none;
    border-bottom: 4px solid #27ae60;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.1s, background-color 0.2s;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

#startButton:hover {
    background: #27ae60;
}

#startButton:active {
    transform: translateY(2px);
    border-bottom-width: 2px;
}

.button-row {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

#spectateButton, #settingsButton {
    flex: 1;
    height: 36px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: opacity 0.2s;
}

#spectateButton {
    background: #3498db;
    border-bottom: 3px solid #2980b9;
}

#spectateButton:hover {
    background: #2980b9;
}

#settingsButton {
    background: #718096;
    border-bottom: 3px solid #4a5568;
}

#settingsButton:hover {
    background: #4a5568;
}

/* Módulo de Compartir con Amigos */
.share-box {
    margin: 14px 0 12px 0;
    padding: 10px 12px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #edf2f7;
}

.share-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: #4a5568;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.share-btn-group {
    display: flex;
    gap: 6px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-share {
    padding: 5px 10px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s, opacity 0.15s;
}

.btn-share:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn-share.wa { background: #25D366; }
.btn-share.x-twitter { background: #111111; }
.btn-share.fb { background: #1877F2; }
.btn-share.copy { background: #4a5568; }

/* Menú de Ajustes */
#settings {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    text-align: left;
    margin-top: 8px;
}

#settings h3 {
    margin: 6px 0 4px 0;
    font-size: 13px;
    font-weight: 700;
    color: #2d3748;
}

#settings ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

#settings label {
    display: block;
    font-size: 11px;
    color: #4a5568;
    margin-bottom: 4px;
    cursor: pointer;
}

/* Instrucciones de Juego */
#instructions {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #edf2f7;
    text-align: left;
}

#instructions h3 {
    margin: 0 0 6px 0;
    font-size: 12px;
    font-weight: 700;
    color: #2d3748;
}

#instructions ul {
    margin: 0;
    padding-left: 16px;
    font-size: 11px;
    color: #4a5568;
    line-height: 1.45;
}

#instructions li {
    margin-bottom: 3px;
}

/* Bloque SEO */
.seo-section {
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px solid #edf2f7;
    text-align: left;
}

.seo-section h2 {
    font-size: 11px;
    font-weight: 700;
    color: #4a5568;
    margin: 0 0 4px 0;
}

.seo-section p {
    font-size: 10.5px;
    font-weight: 400;
    line-height: 1.45;
    color: #718096;
    margin: 0;
}

/* Responsive / Ocultar Publicidad lateral en móviles y tablets */
@media (max-width: 1080px) {
    .ad-skyscraper {
        display: none !important;
    }
    .layout-three-columns {
        justify-content: center;
    }
}

@media (max-width: 800px) {
    .ad-banner-bottom {
        display: none !important;
    }
    #startMenuWrapper {
        padding: 10px 8px 20px 8px;
    }
    #startMenu {
        width: 100%;
        padding: 18px 14px;
    }
}

@media only screen and (min-width: 1224px) {
    #mobile { display: none; }
}

@media only screen and (max-width: 1224px) {
    #chatbox { display: none; }
}

/* Widget de Puntuación (Score) estilo Agar.io en esquina inferior izquierda */
.score-widget {
    position: absolute;
    bottom: 22px;
    left: 22px;
    background: rgba(0, 0, 0, 0.42);
    color: #ffffff;
    padding: 6px 16px;
    border-radius: 6px;
    font-family: 'Ubuntu', sans-serif;
    font-weight: 700;
    font-size: 16px;
    letter-spacing: 0.5px;
    pointer-events: none;
    z-index: 10;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    user-select: none;
}

/* Modal de Estadísticas de Fin de Partida (Game Over) */
.game-over-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    height: 100dvh;
    background: rgba(10, 15, 25, 0.78);
    /* no-blur */
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 8px 10px;
    box-sizing: border-box;
}

.game-over-card {
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.35);
    width: 100%;
    max-width: 460px;
    max-height: calc(100vh - 16px);
    max-height: calc(100dvh - 16px);
    overflow-y: auto;
    padding: 12px 14px;
    text-align: center;
    box-sizing: border-box;
    animation: popIn 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
    0% { transform: scale(0.85); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.game-over-card h2 {
    margin: 0 0 8px 0;
    font-size: 18px;
    color: #2d3748;
    font-weight: 800;
}

.stats-chart-wrapper {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 7px;
    padding: 5px 6px;
    margin-bottom: 8px;
}

.stats-chart-wrapper canvas {
    width: 100%;
    height: 86px;
    display: block;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin-bottom: 8px;
}

.stat-item {
    background: #edf2f7;
    border-radius: 6px;
    padding: 6px 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-label {
    font-size: 9.5px;
    color: #718096;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2px;
    margin-bottom: 2px;
    line-height: 1.15;
}

.stat-value {
    font-size: 15px;
    font-weight: 800;
    color: #2b6cb0;
}

.game-over-actions {
    display: flex;
    justify-content: center;
}

.btn-play-again {
    background: linear-gradient(135deg, #00b06f 0%, #00965e 100%);
    color: #ffffff;
    border: none;
    border-radius: 7px;
    font-size: 14px;
    font-weight: 700;
    padding: 8px 28px;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(0, 176, 111, 0.3);
    transition: all 0.2s ease;
}

.btn-play-again:hover {
    background: linear-gradient(135deg, #00c77d 0%, #00a86b 100%);
    transform: translateY(-1px);
    box-shadow: 0 5px 14px rgba(0, 176, 111, 0.4);
}

/* Botones de Compartir Logro */
.share-achievement-box {
    margin-bottom: 8px;
    padding: 7px 8px;
    background: #f7fafc;
    border: 1px dashed #cbd5e0;
    border-radius: 7px;
}

.share-title {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: #4a5568;
    margin-bottom: 5px;
}

.share-buttons-row {
    display: flex;
    gap: 5px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-share {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 9px;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    color: #fff;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.btn-share:hover {
    transform: translateY(-1px);
    opacity: 0.92;
}

.btn-share-wa { background: #25d366; }
.btn-share-tw { background: #000000; }
.btn-share-fb { background: #1877f2; }
.btn-share-copy { background: #4a5568; }

.share-copy-feedback {
    margin-top: 4px;
    font-size: 11px;
    font-weight: 700;
    color: #00b06f;
    animation: fadeIn 0.2s ease;
}

/* Tarjeta Promocional LienzoHost con Cupón */
.lienzohost-promo-card {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 8px 10px;
    margin-bottom: 8px;
    text-align: left;
    color: #f8fafc;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}

.promo-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3px;
}

.promo-badge {
    font-size: 9.5px;
    font-weight: 800;
    background: rgba(56, 189, 248, 0.2);
    color: #38bdf8;
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 0.4px;
}

.promo-discount {
    font-size: 10px;
    font-weight: 800;
    background: #e11d48;
    color: #fff;
    padding: 2px 5px;
    border-radius: 4px;
}

.promo-text {
    font-size: 11px;
    color: #cbd5e1;
    margin: 2px 0 6px 0;
    line-height: 1.3;
}

.promo-code {
    background: #38bdf8;
    color: #0f172a;
    padding: 1px 5px;
    border-radius: 3px;
    font-weight: 900;
    letter-spacing: 0.4px;
}

.btn-claim-promo {
    display: block;
    text-align: center;
    background: #0284c7;
    color: #fff;
    text-decoration: none;
    font-size: 11.5px;
    font-weight: 700;
    padding: 5px 10px;
    border-radius: 5px;
    transition: background 0.15s ease;
}

.btn-claim-promo:hover {
    background: #0369a1;
    color: #fff;
}

/* Píldora Promocional en Navbar Superior */
.top-promo-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(2, 132, 199, 0.12);
    border: 1px solid rgba(2, 132, 199, 0.35);
    color: #0284c7;
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 20px;
    transition: all 0.2s ease;
}

.top-promo-pill:hover {
    background: #0284c7;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.3);
}

.top-promo-pill span.pill-code {
    background: #0284c7;
    color: #fff;
    padding: 1px 5px;
    border-radius: 10px;
    font-size: 10px;
}

.top-promo-pill:hover span.pill-code {
    background: #fff;
    color: #0284c7;
}

/* Botones de Navegación de Autenticación */
.top-nav-right-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-nav-auth, .btn-nav-history, .btn-nav-logout {
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-nav-auth {
    background: #2b6cb0;
    color: #fff;
}
.btn-nav-auth:hover { background: #2c5282; }

.btn-nav-history {
    background: #edf2f7;
    color: #2d3748;
}
.btn-nav-history:hover { background: #e2e8f0; }

.btn-nav-logout {
    background: #fed7d7;
    color: #9b2c2c;
}
.btn-nav-logout:hover { background: #feb2b2; }

.nav-user-badge {
    font-size: 12px;
    font-weight: 700;
    color: #2b6cb0;
    background: #ebf8ff;
    padding: 4px 8px;
    border-radius: 4px;
}

/* Modales de Autenticación e Historial */
.custom-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.7);
    /* no-blur */
    z-index: 120;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px;
}

.custom-modal-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    width: 100%;
    max-width: 440px;
    padding: 24px;
    position: relative;
    animation: popIn 0.25s ease;
}

.custom-modal-card.wide-card {
    max-width: 620px;
}

.modal-close-btn {
    position: absolute;
    top: 14px;
    right: 14px;
    background: #f2fbff;
    border: none;
    font-size: 20px;
    color: #94a3b8;
    cursor: pointer;
}
.modal-close-btn:hover { color: #334155; }

.modal-tabs {
    display: flex;
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 18px;
}

.modal-tab-btn {
    flex: 1;
    background: #f2fbff;
    border: none;
    padding: 10px;
    font-size: 14px;
    font-weight: 700;
    color: #64748b;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}

.modal-tab-btn.active {
    color: #0284c7;
    border-bottom-color: #0284c7;
}

.form-group {
    margin-bottom: 14px;
    text-align: left;
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #334155;
    margin-bottom: 4px;
}

.form-group input, .form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 13.5px;
    box-sizing: border-box;
}

.form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: #0284c7;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.btn-form-submit {
    width: 100%;
    background: #0284c7;
    color: #ffffff;
    border: none;
    padding: 12px;
    font-size: 15px;
    font-weight: 700;
    border-radius: 6px;
    cursor: pointer;
    margin-top: 6px;
}
.btn-form-submit:hover { background: #0369a1; }

.form-alert {
    padding: 10px;
    border-radius: 6px;
    font-size: 12.5px;
    font-weight: 600;
    margin-bottom: 12px;
    display: none;
}
.form-alert.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}
.form-alert.alert-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

/* Tabla de Historial */
.history-table-wrapper {
    max-height: 280px;
    overflow-y: auto;
    margin-top: 14px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12.5px;
    text-align: left;
}

.history-table th {
    background: #f8fafc;
    padding: 8px 10px;
    font-weight: 700;
    color: #475569;
    border-bottom: 1px solid #e2e8f0;
}

.history-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
}


.btn-play-again:hover {
    background: linear-gradient(135deg, #00c87e 0%, #00a86b 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 176, 111, 0.4);
}

/* ==========================================================================
   PARTY MODE (SALA PRIVADA / MULTIJUGADOR CON AMIGOS)
   ========================================================================== */
.party-mode-box {
    margin-top: 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 12px;
    text-align: left;
}

.party-header-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
}

.party-heading {
    font-size: 13px;
    font-weight: 700;
    color: #1e293b;
}

.party-active-pill {
    background: #ecfdf5;
    border: 1px solid #10b981;
    color: #065f46;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-party-leave {
    background: #ef4444;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 11px;
    cursor: pointer;
    font-weight: 700;
}

.party-control-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.btn-create-party {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 7px 12px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.15s;
}

.btn-create-party:hover {
    opacity: 0.9;
}

.party-input-wrap {
    display: flex;
    flex: 1;
    gap: 4px;
}

.party-input-wrap input {
    width: 100%;
    padding: 6px 8px;
    font-size: 12px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    outline: none;
    text-transform: uppercase;
}

.btn-join-party {
    background: #0f172a;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 6px 10px;
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
}

.party-link-share {
    margin-top: 8px;
    display: flex;
    gap: 6px;
}

.party-link-share input {
    flex: 1;
    font-size: 11.5px;
    padding: 6px 8px;
    background: #fff;
    border: 1px solid #94a3b8;
    border-radius: 4px;
    color: #0f172a;
    font-weight: 600;
}

.btn-copy-party {
    background: #00b06f;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 6px 10px;
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

/* Party Mode en el Modal de Game Over (Estilo Agar.io Oficial) */
.game-over-party-card {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 7px;
    padding: 7px 10px;
    margin-bottom: 8px;
    text-align: left;
}

.game-over-party-header {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 2px;
}

.game-over-party-desc {
    font-size: 11px;
    color: #64748b;
    margin: 0 0 5px 0;
}

.game-over-party-row {
    display: flex;
    gap: 5px;
}

.game-over-party-row input {
    flex: 1;
    min-width: 0;
    font-size: 11px;
    padding: 5px 8px;
    background: #fff;
    border: 1px solid #94a3b8;
    border-radius: 5px;
    color: #0f172a;
    font-weight: 600;
}

.btn-goparty-copy {
    background: #0284c7;
    color: #fff;
    border: none;
    border-radius: 5px;
    padding: 5px 10px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.btn-goparty-play {
    background: #00b06f;
    color: #fff;
    border: none;
    border-radius: 5px;
    padding: 5px 12px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

/* In-Game Party Widgets (Estilo Agar.io Oficial) */
.friend-counter-widget {
    pointer-events: none;
    position: fixed;
    top: 15px;
    right: 220px;
    background: rgba(15, 23, 42, 0.78);
    /* no-blur */
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 15;
    user-select: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

.ingame-party-badge {
    position: fixed;
    top: 15px;
    left: 15px;
    background: rgba(15, 23, 42, 0.82);
    /* no-blur */
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 8px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 15;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.ingame-party-title {
    font-size: 11px;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ingame-party-row {
    display: flex;
    gap: 4px;
    align-items: center;
}

.ingame-party-row input {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #38bdf8;
    font-size: 11.5px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 4px;
    width: 180px;
    outline: none;
}

.ingame-party-row button {
    background: #0ea5e9;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s;
}

.ingame-party-row button:hover {
    background: #0284c7;
}

.ingame-party-feedback {
    font-size: 11px;
    color: #10b981;
    font-weight: 700;
}

/* Ajustes integrales para Móviles: todo dentro del margen visible sin desbordes */
@media (max-width: 768px) {
    .top-nav-bar {
        flex-wrap: wrap;
        gap: 6px;
        justify-content: center;
        margin-bottom: 8px;
    }
    .top-promo-pill {
        font-size: 10.5px;
        padding: 4px 8px;
        order: 3;
        width: 100%;
        justify-content: center;
    }
    .top-nav-right-group {
        gap: 6px;
        flex-wrap: wrap;
        justify-content: center;
    }
    #startMenu {
        padding: 14px 12px;
    }
    .game-title {
        font-size: 26px;
    }
    .party-control-row {
        flex-wrap: wrap;
    }
    .btn-create-party {
        width: 100%;
    }
    #status {
        top: 8px;
        right: 8px;
        padding: 6px 8px;
        font-size: 11px;
        max-width: 44vw;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    #status .title {
        font-size: 13px;
        margin-bottom: 2px;
    }
    .ingame-party-badge {
        top: 8px;
        left: 8px;
        padding: 5px 7px;
        max-width: 50vw;
    }
    .ingame-party-title {
        font-size: 9px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .ingame-party-row input {
        width: 100px;
        min-width: 0;
        font-size: 10px;
        padding: 3px 5px;
    }
    .ingame-party-row button {
        padding: 3px 7px;
        font-size: 10px;
    }
    .friend-counter-widget {
        top: 62px;
        left: 8px;
        right: auto;
        padding: 3px 9px;
        font-size: 11px;
    }
    .score-widget {
        bottom: 92px;
        left: 12px;
        font-size: 13px;
        padding: 4px 10px;
    }
    #mobile {
        bottom: 12px;
        padding: 0 12px;
    }
    #split, #feed {
        width: 64px;
        height: 64px;
    }
    .game-over-modal {
        padding: 6px;
    }
    .game-over-card {
        padding: 10px 10px;
        max-height: calc(100dvh - 12px);
    }
    .game-over-card h2 {
        font-size: 16px;
        margin-bottom: 6px;
    }
    .stats-chart-wrapper {
        padding: 4px;
        margin-bottom: 6px;
    }
    .stats-chart-wrapper canvas {
        height: 72px;
    }
    .stats-grid {
        gap: 4px;
        margin-bottom: 6px;
    }
    .stat-item {
        padding: 4px 2px;
    }
    .stat-label {
        font-size: 8.5px;
    }
    .stat-value {
        font-size: 13px;
    }
    .share-achievement-box,
    .game-over-party-card,
    .lienzohost-promo-card {
        padding: 6px 8px;
        margin-bottom: 6px;
    }
    .custom-modal-overlay {
        padding: 8px;
    }
    .custom-modal-card {
        padding: 16px 14px;
        max-height: calc(100dvh - 16px);
        overflow-y: auto;
    }
}

/* ==========================================================================
   TIENDA OFICIAL EDGARIO × LIENZOPAY PROXY
   ========================================================================== */
.btn-nav-store {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #ffffff;
    border: none;
    border-radius: 6px;
    padding: 6px 13px;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.35);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-nav-store:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.5);
}

.btn-store-gameover {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #fff;
    border: none;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 800;
    padding: 8px 18px;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(245, 158, 11, 0.3);
}

.menu-store-banner {
    margin-top: 12px;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border: 1.5px solid #f59e0b;
    border-radius: 9px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.2);
}
.menu-store-banner:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(245, 158, 11, 0.28);
}
.menu-store-left {
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
}
.menu-equipped-cvs {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    flex-shrink: 0;
}
.menu-store-texts {
    display: flex;
    flex-direction: column;
}
.menu-store-title {
    font-size: 12.5px;
    font-weight: 800;
    color: #fbbf24;
}
.menu-store-sub {
    font-size: 11px;
    color: #cbd5e1;
}
.menu-store-cta {
    background: #f59e0b;
    color: #0f172a;
    font-size: 11px;
    font-weight: 800;
    padding: 5px 10px;
    border-radius: 6px;
    white-space: nowrap;
}

/* Modal de la Tienda */
.store-modal-card {
    max-width: 780px;
    max-height: calc(100dvh - 24px);
    overflow-y: auto;
    padding: 18px 20px;
    text-align: left;
}

.store-header {
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 10px;
    margin-bottom: 12px;
}

.store-title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
    padding-right: 28px;
}

.store-main-title {
    margin: 0;
    font-size: 19px;
    font-weight: 800;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.lienzopay-badge {
    background: #0284c7;
    color: #fff;
    font-size: 10.5px;
    padding: 2px 7px;
    border-radius: 12px;
    font-weight: 800;
}

.store-subtitle {
    margin: 3px 0 0 0;
    font-size: 12px;
    color: #64748b;
}

.store-country-box {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.store-country-box label {
    font-size: 10.5px;
    font-weight: 700;
    color: #475569;
}
.store-country-box select {
    padding: 5px 9px;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    font-size: 12px;
    font-weight: 700;
    color: #0f172a;
    background: #f8fafc;
    cursor: pointer;
}

.store-methods-banner {
    margin-top: 8px;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    color: #0369a1;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 11.5px;
}

.store-products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.store-product-card {
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    position: relative;
}
.store-product-card:hover {
    border-color: #94a3b8;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}
.store-product-card.card-equipped {
    border-color: #10b981;
    background: #f0fdf4;
}

.store-bot-pill {
    display: inline-block;
    align-self: flex-start;
    font-size: 10px;
    font-weight: 800;
    background: #f1f5f9;
    color: #334155;
    padding: 2px 7px;
    border-radius: 10px;
    margin-bottom: 6px;
}

.store-card-top {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.store-item-canvas {
    width: 72px;
    height: 72px;
    flex-shrink: 0;
    background: radial-gradient(circle, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 50%;
    border: 1px solid #cbd5e1;
}

.store-card-info {
    flex: 1;
    min-width: 0;
}

.store-item-title {
    margin: 0 0 3px 0;
    font-size: 13.5px;
    font-weight: 800;
    color: #0f172a;
}

.store-item-desc {
    margin: 0;
    font-size: 11px;
    color: #64748b;
    line-height: 1.35;
}

.store-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #f1f5f9;
    padding-top: 8px;
    gap: 8px;
}

.store-price-col {
    display: flex;
    flex-direction: column;
}

.store-price-local {
    font-size: 14px;
    font-weight: 800;
    color: #0f172a;
}

.store-price-usd {
    font-size: 10px;
    color: #94a3b8;
    font-weight: 600;
}

.btn-store-item {
    border: none;
    border-radius: 6px;
    padding: 7px 12px;
    font-size: 11.5px;
    font-weight: 800;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.15s, transform 0.15s;
}
.btn-store-item:hover {
    opacity: 0.92;
    transform: translateY(-1px);
}
.btn-item-buy {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: #fff;
}
.btn-item-equip {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #fff;
}
.btn-item-equipped {
    background: #10b981;
    color: #fff;
}

/* Vista de Checkout */
.btn-store-back {
    background: #f1f5f9;
    color: #334155;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 5px 11px;
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
    margin-bottom: 10px;
}
.btn-store-back:hover { background: #e2e8f0; }

.checkout-selected-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f8fafc;
    border: 1.5px solid #cbd5e1;
    border-radius: 9px;
    padding: 10px 12px;
    margin-bottom: 12px;
}

.checkout-preview-cvs {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #cbd5e1;
    flex-shrink: 0;
}

.checkout-selected-info {
    flex: 1;
    min-width: 0;
}
.checkout-item-cat {
    font-size: 10px;
    font-weight: 800;
    color: #0284c7;
}
.checkout-selected-info h4 {
    margin: 2px 0;
    font-size: 15px;
    color: #0f172a;
}
.checkout-selected-info p {
    margin: 0;
    font-size: 11.5px;
    color: #64748b;
}

.checkout-selected-price {
    text-align: right;
    display: flex;
    flex-direction: column;
}
.chk-price-local {
    font-size: 17px;
    font-weight: 900;
    color: #0f172a;
}
.chk-price-usd {
    font-size: 11px;
    color: #64748b;
}

.chk-logged-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #ecfdf5;
    border: 1px solid #10b981;
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 12px;
}
.chk-logged-icon {
    font-size: 20px;
}
.chk-logged-title {
    font-size: 13px;
    color: #065f46;
}
.chk-logged-sub {
    font-size: 11.5px;
    color: #047857;
}

.chk-guest-box {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 12px;
}
.chk-guest-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 12.5px;
    font-weight: 800;
    color: #92400e;
    margin-bottom: 4px;
}
.btn-inline-login {
    background: transparent;
    border: 1px solid #d97706;
    color: #b45309;
    border-radius: 4px;
    padding: 2px 7px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
}
.chk-guest-desc {
    margin: 0 0 8px 0;
    font-size: 11.5px;
    color: #78350f;
}
.chk-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}
.chk-form-grid .form-group {
    margin-bottom: 0;
}
.chk-form-grid .form-group input {
    padding: 8px 10px;
    font-size: 12.5px;
}

.chk-pay-label {
    font-size: 12px;
    font-weight: 800;
    color: #334155;
    margin-bottom: 8px;
}

.chk-pay-buttons-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.btn-pay-method {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 11px 14px;
    border-radius: 8px;
    border: 1.5px solid transparent;
    cursor: pointer;
    text-align: left;
    transition: transform 0.15s, box-shadow 0.15s;
}
.btn-pay-method:hover {
    transform: translateY(-1px);
}
.pay-method-icon {
    font-size: 22px;
    flex-shrink: 0;
}
.pay-method-text {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.pay-method-text strong {
    font-size: 13.5px;
}
.pay-method-text small {
    font-size: 11px;
    opacity: 0.9;
}
.pay-method-arrow {
    font-size: 16px;
    font-weight: 900;
}

.btn-pay-mp {
    background: linear-gradient(135deg, #009ee3 0%, #007eb5 100%);
    color: #ffffff;
    box-shadow: 0 3px 10px rgba(0, 158, 227, 0.25);
}
.btn-pay-oxxo {
    background: linear-gradient(135deg, #e11d48 0%, #be123c 100%);
    color: #ffffff;
    box-shadow: 0 3px 10px rgba(225, 29, 72, 0.25);
}
.btn-pay-spei {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: #ffffff;
    box-shadow: 0 3px 10px rgba(5, 150, 105, 0.25);
}
.btn-pay-stripe {
    background: linear-gradient(135deg, #4f46e5 0%, #3730a3 100%);
    color: #ffffff;
    box-shadow: 0 3px 10px rgba(79, 70, 229, 0.25);
}

/* Ficha de Pago OXXO / SPEI */
.voucher-card {
    background: #f8fafc;
    border: 2px solid #cbd5e1;
    border-radius: 10px;
    padding: 12px 14px;
    margin-top: 8px;
}
.voucher-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}
.voucher-badge-oxxo {
    background: #e11d48;
    color: #fff;
    font-weight: 800;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 4px;
}
.voucher-badge-spei {
    background: #059669;
    color: #fff;
    font-weight: 800;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 4px;
}
.voucher-ref {
    font-size: 12px;
    color: #334155;
}
.voucher-card h4 {
    margin: 0 0 4px 0;
    font-size: 15px;
    color: #0f172a;
}
.voucher-desc {
    margin: 0 0 10px 0;
    font-size: 11.5px;
    color: #475569;
}
.voucher-data-grid {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 7px;
    padding: 8px 10px;
    margin-bottom: 10px;
}
.voucher-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    border-bottom: 1px dashed #e2e8f0;
    font-size: 12px;
    gap: 8px;
    flex-wrap: wrap;
}
.voucher-row:last-child {
    border-bottom: none;
}
.voucher-mono {
    font-family: monospace;
    font-size: 14px;
    background: #fef3c7;
    color: #92400e;
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 0.5px;
}
.voucher-amount {
    font-size: 14px;
    color: #047857;
}
.voucher-confirm-area label {
    display: block;
    font-size: 11.5px;
    font-weight: 700;
    color: #334155;
    margin-bottom: 4px;
}
.voucher-confirm-area input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 12.5px;
    margin-bottom: 8px;
    box-sizing: border-box;
}
.voucher-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.btn-voucher-confirm {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}
.btn-voucher-back {
    background: transparent;
    color: #64748b;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 6px;
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
}

@media (max-width: 768px) {
    .store-products-grid {
        grid-template-columns: 1fr;
    }
    .chk-form-grid {
        grid-template-columns: 1fr;
    }
    .checkout-selected-bar {
        flex-wrap: wrap;
    }
    .store-modal-card {
        padding: 12px;
    }
}

/* =========================================================================
   MOTOR HÍBRIDO DE PUBLICIDAD Y MONETIZACIÓN (EdgarioAdEngine)
   ========================================================================= */
.ad-slot-active {
    border: 1px solid rgba(148, 163, 184, 0.35) !important;
    background: #0f172a !important;
    padding: 0 !important;
    overflow: hidden;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.22) !important;
}
.ad-slot-active .ad-badge {
    z-index: 5;
    background: rgba(15, 23, 42, 0.85);
    color: #94a3b8;
    border: 1px solid rgba(148, 163, 184, 0.25);
    font-size: 8.5px;
    letter-spacing: 0.6px;
}
.ad-external-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.ad-external-container-horiz {
    width: 100%;
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.ad-house-card {
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    padding: 22px 16px 18px 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    color: #f8fafc;
}
.ad-house-lienzohost {
    background: radial-gradient(circle at 50% 0%, #0f2942 0%, #091326 65%, #060d1a 100%);
}
.ad-lh-top-pill {
    background: rgba(16, 185, 129, 0.16);
    border: 1px solid rgba(16, 185, 129, 0.45);
    color: #34d399;
    font-size: 10px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 20px;
    margin-top: 8px;
}
.ad-lh-logo {
    font-size: 25px;
    font-weight: 900;
    letter-spacing: -0.5px;
    color: #ffffff;
}
.ad-lh-logo span {
    color: #38bdf8;
}
.ad-lh-headline {
    font-size: 14px;
    font-weight: 800;
    line-height: 1.35;
    color: #e2e8f0;
    margin: 0;
}
.ad-lh-features {
    list-style: none;
    padding: 0;
    margin: 4px 0;
    text-align: left;
    width: 100%;
    font-size: 12px;
    color: #cbd5e1;
}
.ad-lh-features li {
    padding: 7px 9px;
    margin-bottom: 6px;
    background: rgba(30, 41, 59, 0.65);
    border: 1px solid rgba(51, 65, 85, 0.7);
    border-radius: 7px;
    line-height: 1.3;
}
.ad-lh-coupon-box {
    width: 100%;
    background: rgba(14, 165, 233, 0.12);
    border: 1.5px dashed #38bdf8;
    border-radius: 8px;
    padding: 8px;
}
.ad-lh-coupon-label {
    display: block;
    font-size: 9.5px;
    font-weight: 700;
    color: #94a3b8;
    margin-bottom: 3px;
}
.ad-lh-coupon-code {
    font-size: 16px;
    font-weight: 900;
    color: #38bdf8;
    letter-spacing: 0.5px;
}
.ad-lh-coupon-code span {
    color: #34d399;
    font-size: 12px;
}
.ad-lh-cta-btn {
    display: block;
    width: 100%;
    box-sizing: border-box;
    background: linear-gradient(135deg, #10b981 0%, #0284c7 100%);
    color: #ffffff !important;
    text-decoration: none !important;
    font-weight: 800;
    font-size: 13.5px;
    padding: 12px 10px;
    border-radius: 8px;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.ad-lh-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(14, 165, 233, 0.5);
}

/* Skyscraper Derecho: Tienda Oficial de Skins */
.ad-house-store {
    background: radial-gradient(circle at 50% 15%, #2e1065 0%, #111827 65%, #090d16 100%);
}
.ad-st-top-pill {
    background: rgba(245, 158, 11, 0.18);
    border: 1px solid rgba(245, 158, 11, 0.5);
    color: #fbbf24;
    font-size: 10px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 20px;
    margin-top: 8px;
}
.ad-st-title {
    font-size: 16px;
    font-weight: 900;
    color: #ffffff;
    margin: 0;
    line-height: 1.25;
}
.ad-st-canvas-wrap {
    width: 100%;
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(139, 92, 246, 0.38);
    border-radius: 12px;
    padding: 12px 8px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: border-color 0.2s ease, transform 0.2s ease;
}
.ad-st-canvas-wrap:hover {
    border-color: #fbbf24;
    transform: scale(1.02);
}
.ad-st-skin-name {
    font-size: 13.5px;
    font-weight: 800;
    color: #fde68a;
    margin-top: 6px;
}
.ad-st-skin-bonus {
    font-size: 11px;
    color: #cbd5e1;
    margin-top: 3px;
}
.ad-st-pay-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px;
}
.ad-st-pay-badges span {
    font-size: 10.5px;
    font-weight: 700;
    background: rgba(30, 41, 59, 0.85);
    border: 1px solid rgba(71, 85, 105, 0.7);
    color: #e2e8f0;
    padding: 3px 7px;
    border-radius: 6px;
}
.ad-st-price-tag {
    font-size: 13px;
    color: #94a3b8;
}
.ad-st-price-tag strong {
    font-size: 19px;
    color: #34d399;
    font-weight: 900;
}
.ad-st-cta-btn {
    width: 100%;
    border: none;
    background: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%);
    color: #ffffff;
    font-weight: 800;
    font-size: 13.5px;
    padding: 12px 10px;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
    transition: transform 0.15s ease;
}
.ad-st-cta-btn:hover {
    transform: translateY(-2px);
}

/* Leaderboard Inferior 728x90 */
.ad-house-horiz {
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    padding: 10px 20px;
    background: linear-gradient(90deg, #091526 0%, #0f2942 55%, #091526 100%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    color: #f8fafc;
}
.ad-hh-left {
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
}
.ad-hh-badge {
    background: rgba(56, 189, 248, 0.16);
    border: 1px solid rgba(56, 189, 248, 0.45);
    color: #38bdf8;
    font-size: 10.5px;
    font-weight: 900;
    padding: 5px 10px;
    border-radius: 6px;
    white-space: nowrap;
}
.ad-hh-texts {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.ad-hh-texts strong {
    font-size: 14px;
    color: #ffffff;
}
.ad-hh-texts span {
    font-size: 11.5px;
    color: #cbd5e1;
}
.ad-hh-texts span b {
    color: #34d399;
}
.ad-hh-btn-primary {
    background: linear-gradient(135deg, #0ea5e9 0%, #10b981 100%);
    color: #ffffff !important;
    text-decoration: none !important;
    font-size: 12.5px;
    font-weight: 800;
    padding: 9px 16px;
    border-radius: 7px;
    white-space: nowrap;
    box-shadow: 0 3px 10px rgba(14, 165, 233, 0.35);
}
@media (max-width: 768px) {
    .ad-house-horiz {
        flex-direction: column;
        padding: 10px 12px;
        text-align: center;
    }
    .ad-hh-left {
        flex-direction: column;
        text-align: center;
        gap: 6px;
    }
}





/* =========================================================================
   MEJORAS PRO ESPORTS: PING & FPS HUD + CONTROLES TÁCTILES 0MS
   ========================================================================= */
.ping-fps-widget {
    position: absolute;
    bottom: 22px;
    right: 22px;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: #e2e8f0;
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-family: 'Ubuntu', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    pointer-events: none;
    z-index: 9;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    user-select: none;
    -webkit-user-select: none;
}
.ping-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
    transition: background-color 0.2s ease;
}
.ping-dot.ping-warn {
    background: #f59e0b;
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.6);
}
.ping-dot.ping-bad {
    background: #ef4444;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.6);
}
.hud-sep {
    color: #64748b;
    font-size: 11px;
}

@media only screen and (max-width: 768px) {
    .ping-fps-widget {
        bottom: auto;
        top: 14px;
        left: 14px;
        font-size: 11px;
        padding: 4px 8px;
    }
}

/* Optimización móvil: Feedback táctil instantáneo y eliminación de retardos */
#split, #feed {
    touch-action: manipulation !important;
    user-select: none !important;
    -webkit-user-select: none !important;
    -webkit-touch-callout: none !important;
    cursor: pointer;
    transition: transform 0.08s ease, opacity 0.08s ease;
}
#split:active, #feed:active {
    transform: scale(0.91);
    opacity: 1 !important;
}

/* =========================================================================
   PERKS Y HABILIDADES TÁCTICAS EN TIENDA (ESTILO AGAR.IO PRO)
   ========================================================================= */
.store-perks-box {
    display: flex;
    flex-direction: column;
    gap: 3.5px;
    margin-top: 7px;
    padding-top: 6px;
    border-top: 1px dashed #e2e8f0;
}
.store-perk-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.25;
}
.store-perk-item .perk-ico {
    font-size: 11.5px;
    flex-shrink: 0;
}

/* Tarjeta Comparativa estilo Agar.io Pro */
.store-comparison-card {
    margin-top: 14px;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    padding: 14px 16px;
}
.store-compare-header {
    margin-bottom: 10px;
}
.compare-badge {
    display: inline-block;
    font-size: 9.5px;
    font-weight: 800;
    background: #dbeafe;
    color: #1d4ed8;
    padding: 2.5px 8px;
    border-radius: 10px;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}
.store-compare-header h4 {
    margin: 3px 0 3px 0;
    font-size: 14px;
    font-weight: 800;
    color: #0f172a;
}
.store-compare-header p {
    margin: 0;
    font-size: 11.5px;
    color: #64748b;
}
.store-compare-table-wrap {
    overflow-x: auto;
    margin-top: 8px;
}
.store-compare-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11.5px;
    text-align: left;
}
.store-compare-table th {
    background: #e2e8f0;
    color: #334155;
    padding: 8px 10px;
    font-weight: 800;
    border: 1px solid #cbd5e1;
}
.store-compare-table td {
    padding: 7px 10px;
    border: 1px solid #e2e8f0;
    color: #475569;
}
.store-compare-table tr:nth-child(even) td {
    background: #ffffff;
}
.cmp-highlight {
    color: #059669;
    font-weight: 800;
    background: #ecfdf5;
    padding: 2px 7px;
    border-radius: 4px;
    display: inline-block;
}

/* ==========================================================================
   EDGARIO VIP ZERO-ADS & REWARDED VIDEO STYLES
   ========================================================================== */
.btn-rewarded-revive {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 12px 18px;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.4);
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: 100%;
    box-sizing: border-box;
}
.btn-rewarded-revive:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(245, 158, 11, 0.55);
    background: linear-gradient(135deg, #fbbf24 0%, #f97316 100%);
}
.btn-rewarded-revive:active {
    transform: translateY(0);
}
.revive-icon {
    font-size: 16px;
    line-height: 1;
}

.rewarded-modal-card {
    background: #0f172a;
    border: 1px solid rgba(245, 158, 11, 0.35);
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
    max-width: 480px;
    width: 90%;
    padding: 24px;
    color: #f8fafc;
    box-sizing: border-box;
    position: relative;
    animation: modalPopIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes modalPopIn {
    from { transform: scale(0.92); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
.rewarded-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.rewarded-pill {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.3);
    padding: 4px 10px;
    border-radius: 20px;
}
.rewarded-timer-badge {
    font-size: 12px;
    font-weight: 700;
    color: #94a3b8;
    background: rgba(148, 163, 184, 0.1);
    padding: 4px 10px;
    border-radius: 8px;
}
.rewarded-ad-area {
    margin-bottom: 20px;
}
.rewarded-sponsor-box {
    background: linear-gradient(145deg, #1e293b, #0f172a);
    border: 1px solid rgba(59, 130, 246, 0.25);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.sponsor-tag {
    font-size: 10px;
    font-weight: 800;
    color: #38bdf8;
    letter-spacing: 1px;
    display: inline-block;
    margin-bottom: 8px;
}
.sponsor-title {
    font-size: 18px;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 8px 0;
}
.sponsor-desc {
    font-size: 13px;
    line-height: 1.5;
    color: #cbd5e1;
    margin: 0 0 16px 0;
}
.sponsor-desc strong {
    color: #f59e0b;
}
.rewarded-progress-track {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}
.rewarded-progress-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #f59e0b, #10b981);
    transition: width 0.3s ease;
    border-radius: 4px;
}
.rewarded-footer {
    display: flex;
    justify-content: center;
}
.btn-claim-revive {
    width: 100%;
    padding: 14px 20px;
    font-size: 14px;
    font-weight: 800;
    border-radius: 10px;
    border: none;
    background: #334155;
    color: #94a3b8;
    cursor: not-allowed;
    transition: all 0.2s ease;
}
.btn-claim-ready {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    color: #ffffff !important;
    cursor: pointer !important;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.45);
    animation: pulseReady 1.5s infinite;
}
@keyframes pulseReady {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6); }
    70% { box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.layout-three-columns.vip-no-ads {
    justify-content: center;
    max-width: 580px;
}
.layout-three-columns.vip-no-ads .ad-skyscraper {
    display: none !important;
}

.vip-adfree-badge {
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    font-weight: 800;
    color: #10b981;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.35);
    border-radius: 20px;
    padding: 4px 10px;
    margin-left: 8px;
    letter-spacing: 0.5px;
}

.store-vip-perk-banner {
    margin-top: 10px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(5, 150, 105, 0.15));
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: #10b981;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 700;
    text-align: center;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.15);
}
.store-vip-perk-banner strong {
    color: #34d399;
}
