/* Modals and per-modal backdrops */
/* MODALS */
.modal{display:none;position:fixed;inset:0;z-index:2000;justify-content:center;align-items:flex-start;overflow-y:auto;padding:20px 0;padding-top:calc(20px + env(safe-area-inset-top));padding-bottom:calc(20px + env(safe-area-inset-bottom));-webkit-overflow-scrolling:touch;}
/* ── Per-modal backdrops ─────────────────────────────────────────────
   Para cambiar un fondo: reemplaza la URL entre url("...") de cada modal
   ─────────────────────────────────────────────────────────────────── */
#inv-modal        { background: url("https://chibi.iitranq.co.uk/vb7gOgHXPKwY.png")  center/cover no-repeat fixed; }
#shop-modal       { background: var(--shop-bg, linear-gradient(#0a2335,#02070c))  center/cover no-repeat fixed; } /* image per aisle: js/data/shop-backdrops.js */
#friends-modal    { background: url("https://picsum.photos/seed/social/1200/800")     center/cover no-repeat fixed; }
#events-modal      { background: url("https://picsum.photos/seed/event/1200/800")      center/cover no-repeat fixed; }
#ranking-modal    { background: url("https://picsum.photos/seed/ranking/1200/800")    center/cover no-repeat fixed; }
#settings-modal   { background: url("https://picsum.photos/seed/settings/1200/800")   center/cover no-repeat fixed; }
#lootbox-modal    { background: url("https://picsum.photos/seed/mystery/1200/800")    center/cover no-repeat fixed; }
#vault-modal      { background: url("https://picsum.photos/seed/vault/1200/800")      center/cover no-repeat fixed; }
#profile-modal    { background: url("https://chibi.iitranq.co.uk/vPMfjBh1xVbX.png")  center/cover no-repeat fixed; }
#daily-modal      { background: url("https://chibi.iitranq.co.uk/oR5HHWNMNgVZ.png")  center/cover no-repeat fixed; }
#missions-modal   { background: url("https://picsum.photos/seed/missions/1200/800")   center/cover no-repeat fixed; }
#challenges-modal { background: url("https://chibi.iitranq.co.uk/j06WZLxRp8gt.png")  center/cover no-repeat fixed; }
#prestige-modal   { background: url("https://picsum.photos/seed/prestige/1200/800")   center/cover no-repeat fixed; }
#berry-tree-modal { background: url("https://chibi.iitranq.co.uk/98G26vsZbdkF.png")  center/cover no-repeat fixed; }
#ach-modal        { background: url("https://picsum.photos/seed/trophy/1200/800")     center/cover no-repeat fixed; }
#snake-modal      { background: url("https://chibi.iitranq.co.uk/6EP3HuN7SCNV.png")  center/cover no-repeat fixed; }
/* overlay oscuro compartido por todos los modales */
#inv-modal::before,#shop-modal::before,#friends-modal::before,#event-modal::before,
#ranking-modal::before,#settings-modal::before,#lootbox-modal::before,#vault-modal::before,
#profile-modal::before,#daily-modal::before,#missions-modal::before,#challenges-modal::before,
#prestige-modal::before,#berry-tree-modal::before,#ach-modal::before,#snake-modal::before{
  content:"";position:fixed;inset:0;background:rgba(0,0,0,0.82);backdrop-filter:blur(8px);z-index:-1;
}

.modal-content{background:#0a0a0a;padding:25px;border-radius:20px;width:620px;text-align:center;border:2px solid white;max-height:88vh;overflow-y:auto;scrollbar-width:thin;scrollbar-color:#333 #0a0a0a;}
.input-field{width:100%;padding:12px;font-size:14px;border-radius:10px;background:#151515;color:white;border:2px solid #333;margin-top:10px;box-sizing:border-box;text-align:center;font-family:sans-serif;outline:none;}
.input-field:focus{border-color:var(--neon-blue);}
.tabs{display:flex;gap:5px;margin-bottom:18px;flex-wrap:wrap;}
.tab-btn{flex:1;padding:9px 5px;background:#111;border:1px solid #444;color:white;cursor:pointer;font-size:8.5px;min-width:65px;font-family:'Arial Black',sans-serif;transition:background 0.2s;}
.tab-btn.active{background:#fff;color:#000;}
.tab-btn:hover:not(.active){background:#222;}
.item-row{background:#141414;padding:12px;margin:6px 0;border-radius:10px;display:flex;align-items:center;border:1px solid #222;text-align:left;transition:border-color 0.2s;}
.item-row:hover{border-color:#444;}
.item-info{flex-grow:1;margin-right:10px;}
.item-title-row{display:flex;align-items:center;gap:6px;flex-wrap:wrap;}
.item-name{font-size:13px;font-weight:bold;}
.item-desc{font-size:10px;color:#888;display:block;margin-top:4px;font-family:sans-serif;line-height:1.3;}
.item-cost{font-size:10px;color:#aaa;display:flex;align-items:center;gap:3px;margin-top:4px;}
.lvl-tag{color:var(--blueberry-blue);font-size:10px;font-weight:bold;margin-top:3px;display:block;}
.spicy-tag{color:var(--hot-sauce);font-size:9px;font-weight:bold;animation:pulse-red 1s infinite;}
.bonus-tag{font-size:10px;color:var(--neon-green);font-weight:bold;background:#001a00;border:1px solid var(--neon-green);border-radius:4px;padding:1px 5px;}
.close-btn{background:#c0392b!important;border-color:#c0392b!important;width:100%;margin-top:18px;padding:13px;}
.btn-owned-gray{border-color:#555!important;color:#555!important;cursor:not-allowed;}
@keyframes pulse-red{0%,100%{opacity:1;}50%{opacity:0.5;}}
