/* ── Variable de fuente pixel ── */
:root {
    --pixel-font: 'Press Start 2P', monospace;
}

/* ── SITE NAME ── */
.site-name {
    font-size: 20px; 
    font-weight: 400; 
    color: #ffffff;
    font-family: var(--pixel-font);
    letter-spacing: 2px;
    text-shadow: 3px 3px 0px rgb(0 0 0 / 30%);
}
/* ── TOPBAR CON DEGRADADOS DINÁMICOS ── */
.editor-topbar {
    padding: 0 25px;
    padding-bottom: 17px;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    z-index: 10;
    position: relative;
    overflow-y: hidden;
    overflow-x: auto;
    transition: background 0.5s ease, box-shadow 0.4s ease;
}


.editor-topbar.pixaid {
    background: linear-gradient(135deg, #2E00FF, #2E00FF) !important;
}
.editor-topbar.mural          { background: linear-gradient(135deg, #FF2D95, #C026D3); }
.editor-topbar.murales        { background: linear-gradient(135deg, #7E22CE, #A855F7); }
/*.editor-topbar.tienda         { background: linear-gradient(135deg, #06B6D4, #22D3EE); }*/
.editor-topbar.tienda         { background: linear-gradient(135deg, #80C0FD, #80C0FD); }
.editor-topbar.donaciones     { background: linear-gradient(135deg, #57B45A, #57B45A); }
.editor-topbar.casahogar      { background: linear-gradient(135deg, #EA580C, #FB923C); }
.editor-topbar.casashogares   { background: linear-gradient(135deg, #DC2626, #DC2626); }
.editor-topbar.patrocinadores { background: linear-gradient(135deg, #3F51B5, #3F51B5); }
.editor-topbar.usuarios       { background: linear-gradient(135deg, #9D0076, #9D0076); }

/* Color por defecto */
.editor-topbar {
    background: linear-gradient(135deg, #FF2D95, #C026D3); /* fallback */
}

/* ── Strip de cuadritos (checkerboard) ── */
.editor-topbar::after {
    content: '';
    position: absolute;
    bottom: 0; 
    left: 0; 
    right: 0;
    height: 20px;
    background-image: repeating-conic-gradient(
        var(--topbar-color1) 0% 25%, 
        var(--topbar-color2) 0% 50%
    );
    background-size: 20px 20px;
    opacity: 1;                    /* ← importante */
    z-index: 1;
    pointer-events: none;
    mix-blend-mode: normal;        /* opcional */
}


.editor-topbar.pixaid::after {
    --topbar-color1: #2E00FF; 
    --topbar-color2: #E5E0FF; 
}

/* Variables por página - usa rgba con alpha baja */
.editor-topbar.mural::after          { 
    --topbar-color1: #FF2D95; 
    --topbar-color2: rgba(248, 225, 240, 0.75);   /* más transparente */
}

.editor-topbar.murales::after        { 
    --topbar-color1: #7E22CE; 
    --topbar-color2: rgba(233, 213, 255, 0.70); 
}

.editor-topbar.tienda::after         { 
    --topbar-color1: #80C0FD; 
    --topbar-color2: #FFEDDF; 
}

.editor-topbar.donaciones::after     { 
    --topbar-color1: #57B45A; 
    --topbar-color2: #FFEDDF; 
}

.editor-topbar.casahogar::after      { 
    --topbar-color1: #EA580C; 
    --topbar-color2: rgba(255, 237, 213, 0.75); 
}

.jfkk {

    --top: #651877;
    --kpoplm: #198378;
}



.Margin {
    --mlkg: "khdk";
    --kg: 221111111111;
}



.editor-topbar.casashogares::after   { 
    --topbar-color1: #DC2626; 
    --topbar-color2: #FFEDDF; 
}

.editor-topbar.patrocinadores::after { 
    --topbar-color1: #3F51B5; 
    --topbar-color2: #FFEDDF; 
}

.editor-topbar.usuarios::after       { 
    --topbar-color1: #9D0076; 
    --topbar-color2: #FFEDDF; 
}

/* Fallback */
.editor-topbar::after {
    --topbar-color1: #FF2D95;
    --topbar-color2: rgba(255, 237, 223, 0.75);
}


/* ── Hamburger button ── */
.hamburger-btn {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    background: transparent;
    display: flex;
    margin-left: 13px;
    margin-right: 5px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
    padding: 0;
    flex-shrink: 0;
    transition: background .18s, border-color .18s;
}

.hamburger-btn:hover {
    background: rgba(255,255,255,0.28);
    border-color: #fff;
}
.hamburger-btn span {
    display: block;
    width: 25px;
    height: 4px;
    background: #fff;
    border-radius: 10px;
}

/* ── Ajusta el topbar para el strip ── */
.editor-topbar {
    padding-bottom: 17px;
}

.topbar-nav-btns {
    display: none;
}
.editor-topbar::-webkit-scrollbar {
    height: 8px;      
    width: 8px;         
}

.editor-topbar::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 20px;
}

.editor-topbar::-webkit-scrollbar-thumb {
    background-color: #F85898;
    border-radius: 20px;
    min-height: 8px;
}

.editor-topbar::-webkit-scrollbar-thumb {
    background-color: rgba(248, 88, 152, 0.6);
}

.editor-topbar:hover::-webkit-scrollbar-thumb {
    background-color: #F85898;
}

.topbar-left  { display: flex; align-items: center; gap: 10px; }
.topbar-right { display: flex; align-items: center; gap: 8px; }

/* ── LOGO pixel art ── */
.logo-icon {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    grid-template-rows: repeat(9, 1fr);
    border-radius: 6px;
    overflow: hidden;
    border: none;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    border: none;
    transition: all .2s;
    font-family: inherit;
    text-decoration: none;
    color: var(--accent);
}
.btn-primary { background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #000; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(248,88,152,.4); }
.btn-ghost { background: var(--card); color: #000; border: 1.5px solid var(--border); }
.btn-ghost:hover { background: var(--border); border-color: var(--accent); color: var(--accent); }
.btn-outline { background: var(--card); color: var(--accent); border: 2px solid var(--accent); }
.btn-outline:hover { background: var(--accent); color: #fff; }
.btn-sm { padding: 6px 14px; font-size: 12px; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none !important; }
.btn.active { background: #F85898 !important; color: #fff !important; }

/* ── Botón de avatar en el topbar ── */
.avatar-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 2px solid var(--border);
    background: var(--card);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    flex-shrink: 0;
    transition: border-color .18s, box-shadow .18s;
    overflow: hidden;
}

.avatar-btn:hover {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(248,88,152,.15);
}

.avatar-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}
/* ── COIN BADGE ── */
.coin-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(255,215,0,.12);
    border: 1.5px solid var(--gold);
    border-radius: 999px;
    padding: 3px 10px;
    font-size: 12px;
    font-weight: 700;
    color: #92400e;
}

/* ══════════════════════════════════════════
   MODAL — base
   ══════════════════════════════════════════ */
/* ══════════════════════════════════════════
   PIXAID — Modal base (EstiloMenu.css)
   ══════════════════════════════════════════ */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(60, 10, 10, .45);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity .22s ease;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }

.modal {
    background: #FFEDDF;
    border: 2.5px solid #000;
    border-radius: 12px;
    width: 100%;
    max-width: 420px;
    box-shadow: 5px 5px 0 #000;
    overflow: hidden;
    transform: translateY(16px) scale(.97);
    transition: transform .26s cubic-bezier(.34,1.56,.64,1);
}
.modal-overlay.open .modal { transform: translateY(0) scale(1); }

/* ── Header con checkerboard ── */
.modal-header {
    position: relative;
    padding: 13px 16px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--page-color, #9D0076); /* ← cambia solo esta línea */
    overflow: hidden;
}
.modal-header::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 16px;
    background-image: repeating-conic-gradient(
        var(--page-color, #9D0076) 0% 25%,  /* ← y esta */
        #FFEDDF 0% 50%
    );
    background-size: 16px 16px;
    pointer-events: none;
}
.modal-header span,
.modal-header .modal-title {
    font-family: 'Press Start 2P', monospace;
    font-size: 15px;
    color: #fff;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 8px;
    text-shadow: 2px 2px 0 rgba(0,0,0,.35);
    position: relative;
    z-index: 1;
}
.modal-header i { color: #fff; }

.modal-close {
    width: 26px;
    height: 26px;
    border-radius: 5px;
    border: 2px solid rgba(255,255,255,.5);
    background: rgba(255,255,255,.15);
    color: #fff;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    transition: all .15s;
}
.modal-close:hover {
    background: rgba(239,68,68,.65);
    border-color: #fff;
}

/* ── Body ── */
.modal-body {
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 82vh;
    overflow-y: auto;
    background: #FFEDDF;
}

/* ── Divider pixel ── */
.modal-divider {
    height: 2px;
    background: repeating-linear-gradient(
        90deg,
        var(--page-color, #9D0076) 0 8px,
        transparent 8px 14px
    );
    border-radius: 2px;
    margin: 2px 0;
}

/* ── Hero de usuario ── */
.user-profile-hero {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 10px 13px;
    background: #fff;
    border: 2px solid var(--page-color, #9D0076);
    border-radius: 10px;
    box-shadow: 3px 3px 0 rgba(157,0,118,.2);
}
.profile-avatar-big {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--page-color, #9D0076);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Press Start 2P', monospace;
    font-size: 14px;
    color: #fff;
    border: 2px solid #000;
    box-shadow: 2px 2px 0 #000;
    flex-shrink: 0;
}
.profile-name-big {
    font-family: 'Press Start 2P', monospace;
    font-size: 7.5px;
    color: var(--page-color, #9D0076);
    margin-bottom: 4px;
    letter-spacing: .5px;
}
.profile-username {
    font-family: 'Press Start 2P', monospace;
    font-size: 6.5px;
    color: #F85898;
    margin-bottom: 3px;
}
.profile-email {
    font-size: 10px;
    color: #9a7060;
}

/* ── Inputs de perfil ── */
.profile-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.profile-field label {
    font-family: 'Press Start 2P', monospace;
    font-size: 6.5px;
    color: var(--page-color, #9D0076);
    letter-spacing: .6px;
}
.profile-field input[type="text"] {
    background: #fff;
    border: 2px solid rgba(157,0,118,.3);
    border-radius: 7px;
    padding: 8px 11px;
    font-size: 12px;
    color: #3a1a10;
    font-family: inherit;
    width: 100%;
    box-sizing: border-box;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}
.profile-field input[type="text"]:focus {
    border-color: var(--page-color, #9D0076);
    box-shadow: 0 0 0 3px rgba(157,0,118,.12);
}
.profile-field .field-error {
    font-size: 10px;
    color: #ef4444;
    margin-top: -2px;
}

.profile-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

/* ── Toggle checkbox ── */
.pref-toggle {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #fff;
    border: 2px solid rgba(248,88,152,.4);
    border-radius: 10px;
    padding: 12px 14px;
    cursor: pointer;
    transition: border-color .18s;
    user-select: none;
}
.pref-toggle:hover { border-color: var(--page-color, #9D0076); }

.pref-toggle input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px; height: 18px;
    border: 2px solid #000;
    border-radius: 4px;
    background: transparent;
    cursor: pointer;
    flex-shrink: 0;
    margin-top: 1px;
    transition: all .15s;
    position: relative;
    box-shadow: 1px 1px 0 #000;
}
.pref-toggle input[type="checkbox"]:checked {
    background: #F85898;
    border-color: #000;
}
.pref-toggle input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 4px; top: 1px;
    width: 5px; height: 9px;
    border: 2px solid #fff;
    border-top: none;
    border-left: none;
    transform: rotate(45deg);
}
.pref-toggle-text strong {
    display: block;
    font-family: 'Press Start 2P', monospace;
    font-size: 7px;
    color: var(--page-color, #9D0076);
    margin-bottom: 4px;
    letter-spacing: .5px;
}
.pref-toggle-text span {
    font-size: 10px;
    color: #9a7060;
    line-height: 1.45;
}

/* ── Alert éxito ── */
.profile-alert-success {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #dcfce7;
    border: 2px solid #16a34a;
    border-radius: 8px;
    padding: 8px 12px;
    font-family: 'Press Start 2P', monospace;
    font-size: 7px;
    color: #14532d;
    letter-spacing: .5px;
}

/* ══════════════════════════════════════════
   BOTONES — estilo pixel PixAid
   ══════════════════════════════════════════ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 16px;
    border-radius: 7px;
    font-family: 'Press Start 2P', monospace;
    font-size: 7.5px;
    letter-spacing: .5px;
    cursor: pointer;
    border: 2.5px solid #000;
    background: #fff;
    color: var(--page-color, #9D0076);
    box-shadow: 3px 3px 0 #000;
    transition: transform .12s, box-shadow .12s;
    text-decoration: none;
}
.btn:hover  { transform: translateY(-1px); box-shadow: 3px 4px 0 #000; }
.btn:active { transform: translateY(1px);  box-shadow: 1px 1px 0 #000; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none !important; }

.btn-primary {
    background: #fff;
    color: var(--page-color, #9D0076);
    border: 2.5px solid #000;
    box-shadow: 3px 3px 0 #000;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 3px 4px 0 #000; }

.btn-ghost {
    background: #FFEDDF;
    color: var(--page-color, #9D0076);
    border: 2px solid #000;
    box-shadow: 2px 2px 0 #000;
}
.btn-ghost:hover { background: #fff; }
.btn-ghost.active {
    background: #9D0076 !important;
    background: var(--page-color, #9D0076) !important;
    border-color: #000 !important;
}

.btn-outline {
    background: #fff;
    color: var(--page-color, #9D0076);
    border: 2.5px solid #000;
}
.btn-outline:hover { background: var(--page-color, #9D0076); color: #fff; }

.btn-sm { padding: 6px 12px; font-size: 11px; }

/* Botón cerrar sesión */
.btn-logout-px {
    width: 100%;
    padding: 9px;
    border-radius: 7px;
    border: 2px solid #000;
    background: rgba(239,68,68,.1);
    color: #ef4444;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 2px 2px 0 rgba(239,68,68,.4);
    transition: all .15s;
}
.btn-logout-px:hover { background: rgba(239,68,68,.18); }

/* Botón cancelar (sin pixel-art, más suave) */
.btn-cancel {
    flex: 1;
    padding: 9px;
    border-radius: 7px;
    border: 2px solid #c9a898;
    background: #FFD9B8;
    color: #9a7060;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: all .15s;
}
.btn-cancel:hover { 
    border-color: var(--page-color, #9D0076);
    color: var(--page-color, #9D0076);
}
/* Botón eliminar */
.btn-danger-soft {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 16px;
    border-radius: 7px;
    font-family: 'Press Start 2P', monospace;
    font-size: 7.5px;
    letter-spacing: .5px;
    cursor: pointer;
    border: 2.5px solid #000;
    background: #fff;
    color: #ef4444;
    box-shadow: 3px 3px 0 #000;
    transition: transform .12s, box-shadow .12s;
}
.btn-danger-soft:hover { transform: translateY(-1px); box-shadow: 3px 4px 0 #000; background: #ef4444; color: #fff; }

@media (max-width: 600px) {
    .modal {
        width: 90%;
    }
}