/**
 * public/potions.css
 * Estilos Glassmorphism Premium para La Mesa del Alquimista y Barra HUD de Pociones.
 */

/* =========================================================================
   1. MODAL LA MESA DEL ALQUIMISTA
   ========================================================================= */

.potions-modal {
    position: fixed;
    inset: 0;
    z-index: 2500;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(3, 7, 18, 0.82);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    opacity: 1;
    transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.potions-modal.hidden {
    display: none !important;
    opacity: 0;
    pointer-events: none;
}

.potions-modal-content {
    position: relative;
    width: 92%;
    max-width: 820px;
    max-height: 90vh;
    overflow-y: auto;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.92) 0%, rgba(15, 23, 42, 0.95) 100%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 24px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65), 0 0 40px rgba(56, 189, 248, 0.12);
    padding: 30px;
    color: #f8fafc;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    animation: modalPopIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPopIn {
    0% {
        transform: scale(0.92) translateY(12px);
        opacity: 0;
    }
    100% {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.potions-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 18px;
    margin-bottom: 22px;
}

.potions-modal-title-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.potions-modal-title {
    margin: 0;
    font-size: 1.55rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, #38bdf8 0%, #818cf8 50%, #c084fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    gap: 10px;
}

.potions-modal-subtitle {
    margin: 0;
    font-size: 0.88rem;
    color: #94a3b8;
}

.potions-modal-close {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #cbd5e1;
    font-size: 1.5rem;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.potions-modal-close:hover {
    background: rgba(239, 68, 68, 0.25);
    border-color: #ef4444;
    color: #f87171;
    transform: rotate(90deg);
}

/* Panel de estado del Cinturón y Cristales */
.potions-belt-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-radius: 16px;
    padding: 16px 22px;
    margin-bottom: 24px;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.3);
}

.potions-belt-left {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.potions-belt-label {
    font-size: 0.92rem;
    font-weight: 700;
    color: #e2e8f0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.potions-belt-count-badge {
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 800;
    background: rgba(56, 189, 248, 0.18);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.4);
}

.potions-belt-count-badge.full {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
    border-color: rgba(245, 158, 11, 0.5);
}

.potions-belt-slots-preview {
    display: flex;
    gap: 10px;
}

.belt-slot-preview {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(30, 41, 59, 0.8);
    border: 1.5px dashed rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    position: relative;
    transition: all 0.2s ease;
}

.belt-slot-preview.filled {
    border-style: solid;
    border-color: rgba(56, 189, 248, 0.6);
    background: radial-gradient(circle, rgba(56, 189, 248, 0.15) 0%, rgba(15, 23, 42, 0.85) 100%);
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.25);
}

.belt-slot-key-tag {
    position: absolute;
    bottom: -6px;
    right: -4px;
    font-size: 9px;
    font-weight: 800;
    color: #94a3b8;
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    padding: 0 4px;
    line-height: 14px;
}

.potions-belt-crystals {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(14, 165, 233, 0.15);
    border: 1px solid rgba(14, 165, 233, 0.4);
    padding: 8px 16px;
    border-radius: 12px;
}

.potions-crystals-val {
    font-size: 1.25rem;
    font-weight: 800;
    color: #38bdf8;
    text-shadow: 0 0 10px rgba(56, 189, 248, 0.5);
}

/* Barra de Filtros y Búsqueda por Rareza / Precio */
.shop-filter-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin: 0 0 16px 0;
    padding: 10px 16px;
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    backdrop-filter: blur(8px);
}

.filter-rarity-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.filter-pill-btn {
    padding: 6px 14px;
    font-size: 0.82rem;
    font-weight: 700;
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    color: #94a3b8;
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    user-select: none;
}

.filter-pill-btn:hover {
    color: #f8fafc;
    background: rgba(56, 189, 248, 0.15);
    border-color: rgba(56, 189, 248, 0.45);
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.25);
    transform: translateY(-1px);
}

.filter-pill-btn.active {
    color: #38bdf8;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.25), rgba(56, 189, 248, 0.18));
    border-color: #38bdf8;
    box-shadow: 0 0 14px rgba(56, 189, 248, 0.35);
}

.shop-sort-select {
    padding: 6px 14px;
    font-size: 0.82rem;
    font-weight: 600;
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    color: #cbd5e1;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: 8px;
    outline: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.shop-sort-select:hover,
.shop-sort-select:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.3);
    color: #f8fafc;
}

.shop-sort-select option {
    background: #0f172a;
    color: #f8fafc;
}

/* Barra de Paginación Interna */
.shop-pagination-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin: 18px 0 8px 0;
    padding: 10px 16px;
}

.pagination-nav-btn {
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 700;
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    color: #e2e8f0;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.pagination-nav-btn:hover:not(:disabled) {
    background: rgba(56, 189, 248, 0.2);
    border-color: #38bdf8;
    color: #38bdf8;
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.3);
    transform: translateY(-1px);
}

.pagination-nav-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    border-color: rgba(255, 255, 255, 0.1);
    color: #64748b;
    box-shadow: none;
    transform: none;
}

.pagination-page-indicator {
    font-size: 0.88rem;
    font-weight: 700;
    color: #94a3b8;
    letter-spacing: 0.5px;
    user-select: none;
}

@media (max-width: 640px) {
    .shop-filter-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .filter-rarity-group {
        justify-content: center;
    }

    .shop-sort-select {
        width: 100%;
        text-align: center;
    }
}

/* Catálogo de Pociones */
.potions-catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}

.potion-card {
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid var(--potion-color, rgba(255, 255, 255, 0.12));
    border-radius: 18px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

.potion-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--potion-color, #38bdf8);
    opacity: 0.8;
}

.potion-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4), 0 0 20px var(--potion-glow, rgba(56, 189, 248, 0.2));
    border-color: var(--potion-color, #38bdf8);
}

.potion-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 12px;
}

.potion-card-icon-wrap {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: rgba(30, 41, 59, 0.8);
    border: 1.5px solid var(--potion-color, rgba(255, 255, 255, 0.2));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
}

.potion-card-title-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.potion-card-name {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: #f1f5f9;
}

.potion-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 2px;
}

.potion-card-duration {
    font-size: 0.78rem;
    color: var(--potion-color, #38bdf8);
    font-weight: 600;
}

.potion-rarity-badge {
    display: inline-flex;
    align-items: center;
    padding: 1px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.potion-rarity-badge.rarity-tag-common {
    background: rgba(148, 163, 184, 0.2);
    color: #94a3b8;
    border: 1px solid rgba(148, 163, 184, 0.35);
}

.potion-rarity-badge.rarity-tag-rare {
    background: rgba(168, 85, 247, 0.2);
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.4);
    box-shadow: 0 0 8px rgba(168, 85, 247, 0.25);
}

.potion-rarity-badge.rarity-tag-epic {
    background: rgba(244, 63, 94, 0.2);
    color: #fb7185;
    border: 1px solid rgba(244, 63, 94, 0.45);
    box-shadow: 0 0 8px rgba(244, 63, 94, 0.3);
}

.potion-card-desc {
    font-size: 0.88rem;
    color: #cbd5e1;
    line-height: 1.45;
    margin: 0 0 16px 0;
    min-height: 48px;
}

.potion-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.potion-card-price-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.potion-card-price {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 1.1rem;
    font-weight: 800;
    color: #f8fafc;
}

.potion-qty-wrapper {
    display: flex;
    align-items: center;
    gap: 4px;
}

.potion-qty-label {
    font-size: 0.72rem;
    color: #94a3b8;
    font-weight: 600;
}

.potion-qty-select {
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(56, 189, 248, 0.4);
    border-radius: 6px;
    color: #38bdf8;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 2px 6px;
    cursor: pointer;
    outline: none;
    font-family: inherit;
}

.potion-qty-select:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 8px rgba(56, 189, 248, 0.4);
}

.potion-buy-btn {
    padding: 9px 20px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    background: linear-gradient(135deg, #0ea5e9 0%, #3b82f6 100%);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(14, 165, 233, 0.35);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.potion-buy-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(14, 165, 233, 0.5);
    background: linear-gradient(135deg, #38bdf8 0%, #60a5fa 100%);
}

.potion-buy-btn:active:not(:disabled) {
    transform: translateY(1px);
}

.potion-buy-btn:disabled {
    background: rgba(71, 85, 105, 0.4);
    color: #94a3b8;
    cursor: not-allowed;
    box-shadow: none;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.potions-modal-footer {
    text-align: center;
    padding-top: 10px;
    font-size: 0.82rem;
    color: #64748b;
}

/* =========================================================================
   2. BARRA HUD FLOTANTE EN COMBATE (#potion-bar)
   ========================================================================= */

.potion-bar-container {
    position: fixed;
    bottom: 76px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 998;
    display: flex;
    align-items: center;
    gap: 10px;
    pointer-events: auto;
    padding: 8px 14px;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(56, 189, 248, 0.15);
    user-select: none;
    transition: transform 0.2s ease, opacity 0.2s ease, bottom 0.2s ease;
}

.potion-bar-container.hidden {
    display: none !important;
}

.potion-hud-slot {
    position: relative;
    width: 50px;
    height: 50px;
    border-radius: 14px;
    background: rgba(30, 41, 59, 0.75);
    border: 2px solid rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.18s ease;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.3);
}

.potion-hud-slot:hover:not(.empty) {
    transform: translateY(-3px) scale(1.04);
    border-color: #38bdf8;
    box-shadow: 0 8px 20px rgba(56, 189, 248, 0.3);
}

.potion-hud-slot:active:not(.empty) {
    transform: scale(0.96);
}

.potion-hud-slot.empty {
    opacity: 0.35;
    border-style: dashed;
    border-color: rgba(255, 255, 255, 0.2);
    cursor: default;
}

.potion-hud-key {
    position: absolute;
    top: 4px;
    left: 5px;
    font-size: 10px;
    font-weight: 800;
    color: #38bdf8;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: 4px;
    padding: 1px 4px;
    line-height: 12px;
    z-index: 2;
}

.potion-hud-icon {
    font-size: 1.85rem;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.5));
    transition: transform 0.2s ease;
    z-index: 1;
}

/* Overlay circular de Cooldown (10s) */
.potion-hud-cooldown-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    font-weight: 900;
    color: #fbbf24;
    z-index: 4;
    transition: opacity 0.1s linear;
}

.potion-hud-cooldown-overlay.hidden {
    display: none !important;
}

/* Efecto visual de bebiendo (cast de 0.5s) */
.potion-hud-slot.drinking {
    border-color: #facc15;
    animation: potionDrinkPulse 0.5s infinite alternate;
}

@keyframes potionDrinkPulse {
    0% {
        box-shadow: 0 0 10px rgba(250, 204, 21, 0.4);
    }
    100% {
        box-shadow: 0 0 24px rgba(250, 204, 21, 0.8);
    }
}

/* Banner de Alerta HUD para Bloqueo Elemental Local */
.element-lock-hud-banner {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(220, 38, 38, 0.9);
    border: 1.5px solid #f87171;
    border-radius: 12px;
    padding: 8px 18px;
    color: #ffffff;
    font-weight: 800;
    font-size: 0.92rem;
    box-shadow: 0 8px 24px rgba(220, 38, 38, 0.45);
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 999;
    animation: lockShake 0.4s ease;
    pointer-events: none;
}

@keyframes lockShake {
    0%, 100% { transform: translateX(-50%); }
    25% { transform: translateX(calc(-50% - 6px)); }
    75% { transform: translateX(calc(-50% + 6px)); }
}

.element-lock-hud-banner.hidden {
    display: none !important;
}

/* Estilo para los botones de elemento bloqueados */
.element-btn-locked {
    opacity: 0.3 !important;
    filter: grayscale(1) !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
}

/* =========================================================================
   3. RESPONSIVE MULTI-DISPOSITIVO PARA BARRA DE POCIONES
   ========================================================================= */

/* Móvil / Tablet Vertical (Portrait) */
@media (max-width: 768px) {
    .potions-modal-content {
        padding: 20px 16px;
        width: 95%;
    }

    .potions-catalog-grid {
        grid-template-columns: 1fr;
    }

    .potions-belt-banner {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    /* En móvil vertical, ubicar la barra de pociones apilada justo encima de la de elementos */
    .potion-bar-container {
        bottom: calc(max(10px, env(safe-area-inset-bottom)) + 50px);
        left: 50%;
        transform: translateX(-50%);
        padding: 4px 8px;
        gap: 6px;
    }

    .potion-hud-slot {
        width: 42px;
        height: 42px;
    }

    .potion-hud-icon {
        font-size: 1.35rem;
    }
}

/* Móvil Horizontal / Landscape (<= 560px de altura) */
@media (max-height: 560px) {
    .potions-modal-content {
        padding: 16px;
        max-height: 94vh;
    }

    /* En landscape, ubicar centrado justo encima de la barra de elementos */
    .potion-bar-container {
        position: fixed;
        bottom: calc(max(6px, env(safe-area-inset-bottom)) + 42px);
        left: 50%;
        transform: translateX(-50%);
        padding: 3px 8px;
        gap: 6px;
        border-radius: 14px;
    }

    /* Barra HUD de pociones activas en landscape: compacta y ubicada sobre el cinturón */
    .potion-active-buffs-bar {
        bottom: calc(max(6px, env(safe-area-inset-bottom)) + 84px) !important;
        padding: 2px 8px !important;
        gap: 5px !important;
    }
    .potion-buff-pill {
        padding: 3px 9px !important;
        font-size: 11px !important;
    }
    .potion-buff-icon {
        font-size: 13px !important;
    }
    .potion-buff-name {
        font-size: 11px !important;
    }
    .potion-buff-timer {
        font-size: 11px !important;
    }

    .potion-hud-slot {
        width: 34px;
        height: 34px;
        border-radius: 10px;
    }

    .potion-hud-icon {
        font-size: 1.15rem;
    }

    .potion-hud-key {
        font-size: 8px;
        padding: 0 2px;
        line-height: 10px;
        top: 2px;
        left: 2px;
    }
}

/* Garantizar que SweetAlert2 se muestre siempre por encima de cualquier modal */
.swal2-container {
    z-index: 999999 !important;
}

/* =========================================================================
   4. SECCIÓN OFERTAS GRATUITAS DEL DÍA (VER VIDEO)
   ========================================================================= */

.shop-daily-ads-section {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.75) 0%, rgba(15, 23, 42, 0.85) 100%);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 18px;
    padding: 18px 20px;
    margin-bottom: 22px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    position: relative;
    overflow: hidden;
}

.shop-daily-ads-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #8b5cf6, #ec4899, #f59e0b);
}

.shop-daily-ads-header {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 14px;
}

.shop-daily-ads-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 0.95rem;
    letter-spacing: 0.6px;
    background: linear-gradient(135deg, #c084fc 0%, #f472b6 50%, #fbbf24 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    gap: 8px;
}

.shop-daily-ads-sub {
    font-size: 0.82rem;
    color: #94a3b8;
}

.shop-daily-ads-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.shop-daily-ad-card {
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 14px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
    transition: all 0.22s ease;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.25);
}

.shop-daily-ad-card:hover {
    border-color: rgba(168, 85, 247, 0.45);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45), inset 0 2px 8px rgba(0, 0, 0, 0.2);
}

.daily-ad-reward-pill {
    font-size: 0.95rem;
    font-weight: 800;
    color: #f8fafc;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.daily-ad-desc {
    font-size: 0.76rem;
    color: #94a3b8;
    margin-bottom: 4px;
}

.daily-ad-watch-btn {
    width: 100%;
    margin-top: 4px;
    padding: 9px 12px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.84rem;
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: linear-gradient(135deg, #8b5cf6 0%, #d946ef 100%);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(139, 92, 246, 0.35);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.daily-ad-watch-btn:hover:not(:disabled) {
    transform: translateY(-1px) scale(1.02);
    box-shadow: 0 6px 18px rgba(139, 92, 246, 0.55);
    background: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
}

.daily-ad-watch-btn:active:not(:disabled) {
    transform: translateY(1px) scale(0.98);
}

.daily-ad-claim-btn:disabled,
.daily-ad-watch-btn:disabled,
.daily-ad-watch-btn.claimed {
    opacity: 0.65 !important;
    cursor: not-allowed !important;
    filter: saturate(0.35);
    background: rgba(51, 65, 85, 0.8) !important;
    border: 1px solid rgba(100, 116, 139, 0.4) !important;
    color: #94a3b8 !important;
    box-shadow: none !important;
    transform: none !important;
}

@media (max-width: 768px) {
    .shop-daily-ads-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .shop-daily-ads-section {
        padding: 14px 12px;
        margin-bottom: 16px;
    }
}

/* =========================================================================
   3. BARRA HUD DE BUFFS ACTIVOS (#potion-active-buffs-bar)
   ========================================================================= */

.potion-active-buffs-bar {
    position: fixed;
    bottom: 175px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 998;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(15, 23, 42, 0.88);
    border: 1px solid rgba(56, 189, 248, 0.35);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 9999px;
    padding: 4px 12px;
    pointer-events: none;
    user-select: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.potion-active-buffs-bar.hidden {
    display: none !important;
}

.potion-buff-pill {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 6px 14px;
    border-radius: 9999px;
    background: rgba(15, 23, 42, 0.88);
    border: 1.5px solid var(--buff-color, #00e5ff);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.55), 0 0 12px var(--buff-color, #00e5ff);
    color: #f8fafc;
    font-size: 0.85rem;
    font-weight: 700;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.potion-buff-icon {
    font-size: 1.15rem;
    line-height: 1;
}

.potion-buff-name {
    font-size: 0.82rem;
    font-weight: 700;
    color: #e2e8f0;
    letter-spacing: 0.3px;
}

.potion-buff-timer {
    font-size: 0.85rem;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    color: var(--buff-color, #38bdf8);
    background: rgba(0, 0, 0, 0.3);
    padding: 1px 6px;
    border-radius: 6px;
}

/* Alerta parpadeante cuando falten <= 3 segundos */
.potion-buff-pill.expiring {
    animation: buffExpiringPulse 0.45s ease-in-out infinite alternate;
}

@keyframes buffExpiringPulse {
    0% {
        transform: scale(1);
        border-color: #f59e0b;
        box-shadow: 0 0 10px rgba(245, 158, 11, 0.6), inset 0 0 4px rgba(245, 158, 11, 0.3);
    }
    100% {
        transform: scale(1.08);
        border-color: #ef4444;
        box-shadow: 0 0 20px rgba(239, 68, 68, 0.9), inset 0 0 8px rgba(239, 68, 68, 0.5);
    }
}

/* =========================================================================
   4. ALMACÉN PERMANENTE DE POCIONES (MOCHILA EN EL MODAL)
   ========================================================================= */

.potions-belt-hint {
    font-size: 0.76rem;
    color: #94a3b8;
    font-weight: 500;
    margin-left: 6px;
}

.potions-warehouse-section {
    margin: 18px 0 22px 0;
    background: rgba(15, 23, 42, 0.62);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    padding: 16px 20px;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.25);
}

.potions-warehouse-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 6px;
}

.potions-warehouse-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: #38bdf8;
    letter-spacing: 0.5px;
}

.potions-warehouse-sub {
    font-size: 0.8rem;
    color: #94a3b8;
}

.potions-warehouse-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
}

.warehouse-potion-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
}

.warehouse-potion-card:hover:not(.all-equipped) {
    transform: translateY(-2px);
    border-color: var(--potion-color, #38bdf8);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4), 0 0 12px var(--potion-color, #38bdf8);
}

.warehouse-potion-card.all-equipped {
    opacity: 0.55;
    filter: grayscale(0.2);
}

.warehouse-potion-header {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-width: 0;
}

.warehouse-potion-icon {
    font-size: 1.8rem;
    line-height: 1;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
    flex-shrink: 0;
}

.warehouse-potion-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.warehouse-potion-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: #f8fafc;
    white-space: normal;
    line-height: 1.2;
    word-break: break-word;
}

.warehouse-potion-sub {
    font-size: 0.72rem;
    color: #94a3b8;
    margin-top: 2px;
}

.warehouse-potion-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
}

.warehouse-potion-count-pill {
    font-size: 0.8rem;
    font-weight: 800;
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.16);
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: 8px;
    padding: 2px 7px;
    white-space: nowrap;
}

.warehouse-equip-btn {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 5px 10px;
    border-radius: 8px;
    border: none;
    background: linear-gradient(135deg, #0284c7 0%, #38bdf8 100%);
    color: #ffffff;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.warehouse-equip-btn:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.4);
}

.warehouse-equip-btn:disabled {
    background: rgba(51, 65, 85, 0.6);
    color: #94a3b8;
    cursor: default;
}

.warehouse-empty-notice {
    grid-column: 1 / -1;
    text-align: center;
    padding: 18px;
    color: #94a3b8;
    font-size: 0.88rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px dashed rgba(255, 255, 255, 0.12);
}

.potions-catalog-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin: 22px 0 12px 0;
    flex-wrap: wrap;
    gap: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 18px;
}

.potions-catalog-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: #c084fc;
    letter-spacing: 0.5px;
}

.potions-catalog-sub {
    font-size: 0.8rem;
    color: #94a3b8;
}

@media (max-width: 640px) {
    .potion-active-buffs-bar {
        bottom: 160px;
        flex-wrap: wrap;
        max-width: 90vw;
    }

    .potions-warehouse-grid {
        grid-template-columns: 1fr;
    }
}

