/* Sửa lỗi che UI của Demo Inventory */
#world-chat-modal,
#npc-teleport-modal,
#quantity-modal {
    z-index: 200000 !important;
}

#demo-inventory-screen * {
    -webkit-tap-highlight-color: transparent !important;
}

/* Demo Header Tabs styles */
.demo-tab-btn {
    background: transparent;
    border: none;
    padding: 3px 5px;
    cursor: pointer;
    transition: all 0.2s ease;
    filter: grayscale(0.7);
    opacity: 0.5;
    position: relative; /* Position relative for the red dot */
}

/* Red notification dot for tab buttons */
.demo-tab-btn.has-notification::after {
    content: '';
    position: absolute;
    top: 5px;
    right: 5px;
    width: 8px;
    height: 8px;
    background: #e74c3c;
    border-radius: 50%;
    border: 1.5px solid rgba(0, 0, 0, 0.9);
    box-shadow: 0 0 6px rgba(231, 76, 60, 1), 0 0 12px rgba(231, 76, 60, 0.6);
    z-index: 10;
    pointer-events: none;
}

.demo-tab-btn:hover {
    transform: translateY(-2px);
    filter: grayscale(0.2);
    opacity: 0.8;
}

.demo-tab-btn:active {
    transform: scale(0.95);
}

.demo-tab-btn.active {
    filter: grayscale(0) drop-shadow(0 0 8px rgba(255, 255, 255, 0.3));
    opacity: 1;
    border: none;
    background: transparent;
    transform: scale(1.1);
    box-shadow: none;
}

.demo-tab-btn img {
    width: auto;
    height: 42px;
    padding: 7px;
    object-fit: contain;
    pointer-events: none;
}

/* Demo Character Tab */
#demo-character-tab {
    width: 100%;
    height: calc(100% - 60px);
    /* Account for header */
    padding: 10px;
    box-sizing: border-box;
    display: none;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    position: relative;
    overflow-y: auto;
    overflow-x: hidden;
}

.demo-slot {
    cursor: pointer;
    touch-action: manipulation;
}

.demo-gear-slot {
    width: 55px;
    height: 55px;
    background: url('../assets/icon/inventorynew/otrangbi.webp') center/contain no-repeat;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    cursor: pointer;
    touch-action: manipulation;
}

.gear-layout-top {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 100px;
    position: relative;
    margin-bottom: 8px;
    width: 100%;
}

.gear-col {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
}

.demo-pagination-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
}

.demo-dot {
    width: 8px;
    height: 8px;
    background: #666;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s;
}

.demo-dot.active {
    background: #FFD700;
}

/* Enhancement Effects CSS */
.demo-enhancement-effect {
    position: absolute;
    top: 40%;
    left: 52%;
    transform: translate(-50%, -50%);
    width: 120%;
    height: 120%;
    pointer-events: none;
    z-index: 10;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
}

.demo-cuonghoa-3 {
    animation: demo-ch-3 1s infinite step-end;
}

@keyframes demo-ch-3 {
    0% {
        background-image: url('../assets/icon/inventorynew/cuonghoa3/1.webp');
    }

    11% {
        background-image: url('../assets/icon/inventorynew/cuonghoa3/2.webp');
    }

    22% {
        background-image: url('../assets/icon/inventorynew/cuonghoa3/3.webp');
    }

    33% {
        background-image: url('../assets/icon/inventorynew/cuonghoa3/4.webp');
    }

    44% {
        background-image: url('../assets/icon/inventorynew/cuonghoa3/5.webp');
    }

    55% {
        background-image: url('../assets/icon/inventorynew/cuonghoa3/6.webp');
    }

    66% {
        background-image: url('../assets/icon/inventorynew/cuonghoa3/7.webp');
    }

    77% {
        background-image: url('../assets/icon/inventorynew/cuonghoa3/8.webp');
    }

    88% {
        background-image: url('../assets/icon/inventorynew/cuonghoa3/9.webp');
    }

    100% {
        background-image: url('../assets/icon/inventorynew/cuonghoa3/1.webp');
    }
}

.demo-cuonghoa-8 {
    animation: demo-ch-8 1s infinite step-end;
}

@keyframes demo-ch-8 {
    0% {
        background-image: url('../assets/icon/inventorynew/cuonghoa8/1.webp');
    }

    11% {
        background-image: url('../assets/icon/inventorynew/cuonghoa8/2.webp');
    }

    22% {
        background-image: url('../assets/icon/inventorynew/cuonghoa8/3.webp');
    }

    33% {
        background-image: url('../assets/icon/inventorynew/cuonghoa8/4.webp');
    }

    44% {
        background-image: url('../assets/icon/inventorynew/cuonghoa8/5.webp');
    }

    55% {
        background-image: url('../assets/icon/inventorynew/cuonghoa8/6.webp');
    }

    66% {
        background-image: url('../assets/icon/inventorynew/cuonghoa8/7.webp');
    }

    77% {
        background-image: url('../assets/icon/inventorynew/cuonghoa8/8.webp');
    }

    88% {
        background-image: url('../assets/icon/inventorynew/cuonghoa8/9.webp');
    }

    100% {
        background-image: url('../assets/icon/inventorynew/cuonghoa8/1.webp');
    }
}

.demo-cuonghoa-15 {
    animation: demo-ch-15 1s infinite step-end;
}

@keyframes demo-ch-15 {
    0% {
        background-image: url('../assets/icon/inventorynew/cuonghoa15/1.webp');
    }

    11% {
        background-image: url('../assets/icon/inventorynew/cuonghoa15/2.webp');
    }

    22% {
        background-image: url('../assets/icon/inventorynew/cuonghoa15/3.webp');
    }

    33% {
        background-image: url('../assets/icon/inventorynew/cuonghoa15/4.webp');
    }

    44% {
        background-image: url('../assets/icon/inventorynew/cuonghoa15/5.webp');
    }

    55% {
        background-image: url('../assets/icon/inventorynew/cuonghoa15/6.webp');
    }

    66% {
        background-image: url('../assets/icon/inventorynew/cuonghoa15/7.webp');
    }

    77% {
        background-image: url('../assets/icon/inventorynew/cuonghoa15/8.webp');
    }

    88% {
        background-image: url('../assets/icon/inventorynew/cuonghoa15/9.webp');
    }

    100% {
        background-image: url('../assets/icon/inventorynew/cuonghoa15/1.webp');
    }
}

.demo-cuonghoa-20 {
    animation: demo-ch-20 1s infinite step-end;
}

@keyframes demo-ch-20 {
    0% {
        background-image: url('../assets/icon/inventorynew/cuonghoa20/1.webp');
    }

    11% {
        background-image: url('../assets/icon/inventorynew/cuonghoa20/2.webp');
    }

    22% {
        background-image: url('../assets/icon/inventorynew/cuonghoa20/3.webp');
    }

    33% {
        background-image: url('../assets/icon/inventorynew/cuonghoa20/4.webp');
    }

    44% {
        background-image: url('../assets/icon/inventorynew/cuonghoa20/5.webp');
    }

    55% {
        background-image: url('../assets/icon/inventorynew/cuonghoa20/6.webp');
    }

    66% {
        background-image: url('../assets/icon/inventorynew/cuonghoa20/7.webp');
    }

    77% {
        background-image: url('../assets/icon/inventorynew/cuonghoa20/8.webp');
    }

    88% {
        background-image: url('../assets/icon/inventorynew/cuonghoa20/9.webp');
    }

    100% {
        background-image: url('../assets/icon/inventorynew/cuonghoa20/1.webp');
    }
}

/* Swiping Container Classes */
.demo-swipe-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    touch-action: pan-y;
}

.demo-inventory-slots {
    transition: transform 0.3s ease;
    will-change: transform;
}

.gear-row-bottom {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 12px;
}

.demo-character-sprite {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 90px;
    height: 120px;
    pointer-events: none;
    z-index: 10;
}

#demo-chamhoi-btn:active {
    transform: scale(0.85);
    filter: brightness(1.2);
}

#demo-chamhoi-btn:hover {
    transform: scale(1.1);
}

.demo-char-info {
    position: absolute;
    left: 80px;
    top: 13px;
    z-index: 9999 !important;
    pointer-events: none;
    transform-origin: left center;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
    transform: scaleX(0);
    opacity: 0;
}

.demo-char-info.show {
    transform: scaleX(1);
    opacity: 1;
    pointer-events: auto;
}

.demo-premium-stat-panel {
    background: linear-gradient(90deg, rgba(12, 16, 24, 0.85) 0%, rgba(12, 16, 24, 0.5) 60%, transparent 100%);
    border-left: 3px solid #555555;
    padding: 12px 35px 12px 12px;
    border-radius: 4px;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(2px);
}

.demo-stat-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 5px;
    gap: 20px;
}

.demo-stat-row.exp-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    margin-bottom: 10px;
}

.demo-stat-divider {
    height: 1px;
    width: 70%;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.15) 0%, transparent 100%);
    margin: 8px 0;
}

.demo-stat-label {
    color: #aeb6bf;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.9);
}

.demo-stat-value {
    color: #ecf0f1;
    font-size: 13px;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.9);
    font-family: 'Space Grotesk', Arial, sans-serif;
    text-align: right;
}

.demo-stat-value.name-glow {
    color: #f1c40f;
    text-shadow: 0 0 6px rgba(241, 196, 15, 0.6);
    font-size: 14px;
}

.demo-stat-value.level-glow {
    color: #e74c3c;
    text-shadow: 0 0 5px rgba(231, 76, 60, 0.4);
}

.demo-stat-value.hp-glow {
    color: #2ecc71;
    text-shadow: 0 0 4px rgba(46, 204, 113, 0.4);
    font-size: 12px;
}

.demo-stat-value.speed-glow {
    color: #3498db;
}

.demo-stat-value.crit-glow {
    color: #e67e22;
}

.demo-stat-value.dodge-glow {
    color: #9b59b6;
}

.demo-stat-value.khi-glow {
    color: #f39c12;
    text-shadow: 0 0 5px rgba(243, 156, 18, 0.3);
}

.mini-exp-bar {
    width: 140px !important;
    height: 12px !important;
    margin-left: 0 !important;
    border-color: rgba(241, 196, 15, 0.3) !important;
    border-radius: 2px !important;
}

.demo-exp-bar-container {
    flex: 1;
    height: 14px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    margin-left: 10px;
    position: relative;
    /* overflow: hidden; */
    /* Removing to ensure text spans correctly visually */
    display: inline-block;
    vertical-align: middle;
    max-width: 200px;
}

.demo-exp-fill {
    height: 100%;
    background: linear-gradient(90deg, #2ecc71, #27ae60);
    width: 0%;
    transition: width 0.3s ease;
}

.demo-exp-text {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: white;
    text-shadow: 1px 1px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000;
    font-weight: bold;
    white-space: nowrap;
}

@media (min-width: 768px) {
    .demo-gear-slot {
        width: 65px !important;
        height: 65px !important;
    }

    .demo-character-sprite {
        width: 110px !important;
        height: 140px !important;
    }

    .gear-layout-top {
        gap: 130px !important;
        margin-top: 0 !important;
    }

    .gear-col {
        gap: 12px !important;
    }

    .gear-row-bottom {
        gap: 12px !important;
    }
}

/* Character panel specific enhancement effect rescaling */
.demo-gear-slot .demo-enhancement-effect {
    top: 50%;
    left: 52%;
    width: 155%;
    height: 155%;
}

/* =========================================
   NEW KỸ NĂNG TAB - SPLIT GRID UI
   ========================================= */
.demo-skill-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: rgba(10, 10, 15, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 10px;
}

.demo-skill-column h4 {
    text-align: center;
    color: #fff;
    font-size: 14px;
    text-transform: uppercase;
    border-bottom: 2px solid rgba(255, 152, 0, 0.3);
    padding-bottom: 10px;
    margin: 0 0 12px 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.demo-skill-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-right: 5px;
}

/* Custom Webkit scrollbar for list */
.demo-skill-list::-webkit-scrollbar {
    width: 4px;
}

.demo-skill-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

/* Premium Card */
.demo-premium-card {
    background: linear-gradient(145deg, rgba(30, 30, 40, 0.9), rgba(15, 15, 20, 0.9));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 12px;
    display: flex;
    gap: 12px;
    align-items: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
    transition: transform 0.2s, border-color 0.2s;
    flex-shrink: 0;
}

.demo-premium-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 152, 0, 0.5);
}

.demo-premium-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: #5f5f5f;
}

.demo-premium-card.active-card::before {
    background: #2ecc71;
}

.demo-premium-card.locked-card {
    opacity: 0.6;
    filter: grayscale(50%);
}

.demo-premium-card.locked-card::before {
    background: #555;
}

/* Icon Box */
.demo-premium-icon {
    width: 46px;
    height: 46px;
    border-radius: 8px;
    background: #000;
    padding: 3px;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
}

.demo-premium-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.active-card .demo-premium-icon {
    border-color: #2ecc71;
}

/* Info box */
.demo-premium-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.demo-premium-name {
    color: #fff;
    font-weight: bold;
    font-size: 13px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.demo-premium-desc {
    color: #bbb;
    font-size: 10px;
    line-height: 1.3;
}

.demo-premium-stats {
    display: flex;
    gap: 6px;
    margin-top: 2px;
    font-size: 10px;
    flex-wrap: wrap;
}

.demo-stat-badge {
    padding: 2px 6px;
    border-radius: 12px;
    font-weight: bold;
}

.demo-stat-dmg {
    background: rgba(231, 76, 60, 0.2);
    color: #ff6b6b;
    border: 1px solid rgba(231, 76, 60, 0.3);
}

.demo-stat-cd {
    background: rgba(52, 152, 219, 0.2);
    color: #74b9ff;
    border: 1px solid rgba(52, 152, 219, 0.3);
}

.demo-stat-key {
    background: #333;
    color: #ffd700;
    padding: 1px 5px;
    border-radius: 4px;
    font-weight: bold;
    border: 1px solid #555;
}

/* Minimal Toggle */
.demo-minimal-toggle {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
    flex-shrink: 0;
}

.demo-minimal-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.demo-minimal-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #555;
    transition: .4s;
    border-radius: 20px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
}

.demo-minimal-slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.demo-minimal-toggle input:checked+.demo-minimal-slider {
    background-color: #2ecc71;
    border: 1px solid #2ecc71;
}

.demo-minimal-toggle input:focus+.demo-minimal-slider {
    box-shadow: 0 0 1px #2ecc71;
}

.demo-minimal-toggle input:checked+.demo-minimal-slider:before {
    transform: translateX(16px);
}

.demo-minimal-toggle input:disabled+.demo-minimal-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Vertical Title Card (Replaces Square Card) */
.demo-title-card {
    background: rgba(26, 28, 35, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
    height: 230px;
    justify-content: space-between;
}

.demo-title-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
}

.demo-title-card.active-card {
    border-color: rgba(92, 124, 250, 0.4);
    box-shadow: 0 0 15px rgba(59, 89, 152, 0.3);
}

.demo-title-card.active-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 8px;
    border: 2px solid rgba(92, 124, 250, 0.6);
    pointer-events: none;
}

.demo-title-card-rarity {
    position: absolute;
    top: 5px;
    right: 5px;
    padding: 2px 4px;
    border-radius: 3px;
    font-size: 7px;
    font-weight: bold;
    text-transform: uppercase;
    z-index: 2;
    background: rgba(0, 0, 0, 0.6);
}

.demo-title-card-rarity.common {
    color: #aaaaaa;
}

.demo-title-card-rarity.uncommon {
    color: #2ecc71;
}

.demo-title-card-rarity.rare {
    color: #3498db;
}

.demo-title-card-rarity.epic {
    color: #9b59b6;
}

.demo-title-card-rarity.legendary {
    color: #f1c40f;
}

.demo-title-card-rarity.mythic {
    color: #e74c3c;
}

.demo-title-card-img-wrapper {
    height: 55px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 6px;
    margin-top: 8px;
    width: 100%;
}

.demo-title-card-img-wrapper img {
    height: 100%;
    object-fit: contain;
    transform: scale(1.3);
    image-rendering: pixelated;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.5));
}

.demo-title-card-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    width: 100%;
    flex-grow: 1;
}

.demo-title-card-name {
    color: #fff;
    font-size: 11px;
    font-weight: bolder;
    margin-bottom: 2px;
    text-shadow: 1px 1px 3px #000;
}

.demo-title-card-desc {
    color: #999;
    font-size: 9px;
    line-height: 1.3;
    margin-bottom: 10px;
}

.demo-title-card-progress-container {
    width: 100%;
    margin-bottom: 15px;
}

.demo-title-card-progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 6px;
}

.demo-title-card-progress-fill {
    height: 100%;
    background: #5c7cfa;
    border-radius: 3px;
    transition: width 0.3s ease;
}

.demo-title-card-progress-text {
    font-size: 10px;
    color: #777;
}

.demo-title-card-btn {
    width: 100%;
    padding: 6px 0;
    border: none;
    border-radius: 4px;
    font-size: 10px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    background: rgba(255, 255, 255, 0.03);
    color: #555;
    flex-shrink: 0;
    margin-top: auto;
}

.demo-title-card-btn.btn-unlocked {
    background: rgba(46, 204, 113, 0.15);
    color: #2ecc71;
    border: 1px solid rgba(46, 204, 113, 0.3);
}

.demo-title-card-btn.btn-active {
    background: rgba(59, 89, 152, 0.3);
    color: #5c7cfa;
    border: 1px solid rgba(92, 124, 250, 0.5);
}

.demo-title-card-btn.btn-unlocked:hover,
.demo-title-card-btn.btn-active:hover {
    filter: brightness(1.2);
}

/* ============================================================ */
/* DEMO GUILD OVERRIDES                                         */
/* ============================================================ */
#demo-banghoi-tab .demo-guild-wrapper {
    background: transparent;
    padding: 0;
}

#demo-banghoi-tab .guild-sub-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
    border-bottom: none;
}

#demo-banghoi-tab .guild-sub-tab {
    background-image: url('../assets/icon/inventorynew/buttonbanghoi.webp');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    -webkit-tap-highlight-color: transparent !important;
    border: none;
    outline: none;
    color: #fff;
    padding: 6px 12px;
    border-radius: 0;
    cursor: pointer;
    font-size: 11px;
    font-family: 'Rajdhani', sans-serif;
    text-transform: uppercase;
    font-weight: 600;
    transition: filter 0.15s ease;
    text-shadow: 1px 1px 2px #000;
    min-width: 70px;
    position: relative; /* Position relative for the red dot */
}

/* Red notification dot for guild sub-tabs */
#demo-banghoi-tab .guild-sub-tab.has-notification::after {
    content: '';
    position: absolute;
    top: -2px;
    right: -2px;
    width: 8px;
    height: 8px;
    background: #e74c3c;
    border-radius: 50%;
    border: 1.5px solid rgba(0, 0, 0, 0.9);
    box-shadow: 0 0 6px rgba(231, 76, 60, 1);
    z-index: 10;
    pointer-events: none;
}

#demo-banghoi-tab .guild-sub-tab:hover,
#demo-banghoi-tab .guild-sub-tab:active,
#demo-banghoi-tab .guild-sub-tab.active {
    filter: brightness(0.65);
    color: #fff;
}

#demo-banghoi-tab .guild-sub-tab:focus,
#demo-banghoi-tab .guild-sub-tab:focus-visible {
    outline: none;
    box-shadow: none;
}

#demo-banghoi-tab .guild-panel {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    backdrop-filter: blur(10px);
}

#demo-banghoi-tab .guild-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 15px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#demo-banghoi-tab .guild-header-text h4 {
    color: #fff;
    font-size: 20px;
    margin-bottom: 5px;
    text-transform: uppercase;
}

#demo-banghoi-tab .guild-gold-text {
    color: #aaa;
    font-size: 13px;
}

#demo-banghoi-tab .guild-gold-amount,
#demo-banghoi-tab #guild-gold-amount,
#demo-banghoi-tab #guild-create-cost {
    color: #f1c40f;
    font-weight: bold;
}

#demo-banghoi-tab .guild-primary-btn,
#demo-banghoi-tab .guild-secondary-btn,
#demo-banghoi-tab .guild-action-btn,
#demo-banghoi-tab .guild-submit-btn,
#demo-banghoi-tab .guild-card-action,
#demo-banghoi-tab button[id^="guild-"] {
    background-image: url('../assets/icon/inventorynew/buttonbang1.webp') !important;
    background-size: 100% 100% !important;
    background-repeat: no-repeat !important;
    background-color: transparent !important;
    border: none !important;
    outline: none;
    color: #fff !important;
    padding: 8px 16px;
    border-radius: 0;
    cursor: pointer;
    font-size: 13px;
    font-weight: bold;
    text-shadow: 1px 1px 2px #000;
    transition: filter 0.15s ease;
    min-width: 80px;
}

#demo-banghoi-tab .guild-card-action {
    flex: none !important;
    max-width: 140px;
    margin: 0 auto;
}

#demo-banghoi-tab .guild-primary-btn:hover,
#demo-banghoi-tab .guild-secondary-btn:hover,
#demo-banghoi-tab .guild-action-btn:hover,
#demo-banghoi-tab .guild-submit-btn:hover,
#demo-banghoi-tab .guild-card-action:hover,
#demo-banghoi-tab button[id^="guild-"]:not(:disabled):hover,
#demo-banghoi-tab .guild-primary-btn:active,
#demo-banghoi-tab .guild-secondary-btn:active,
#demo-banghoi-tab .guild-action-btn:active,
#demo-banghoi-tab .guild-submit-btn:active,
#demo-banghoi-tab .guild-card-action:active,
#demo-banghoi-tab button[id^="guild-"]:active {
    filter: brightness(0.7);
    transform: none;
    box-shadow: none;
}

#demo-banghoi-tab .guild-primary-btn:focus,
#demo-banghoi-tab .guild-secondary-btn:focus,
#demo-banghoi-tab .guild-action-btn:focus,
#demo-banghoi-tab .guild-submit-btn:focus,
#demo-banghoi-tab .guild-card-action:focus,
#demo-banghoi-tab button[id^="guild-"]:focus,
#demo-banghoi-tab .guild-primary-btn:focus-visible,
#demo-banghoi-tab .guild-secondary-btn:focus-visible,
#demo-banghoi-tab .guild-card-action:focus-visible,
#demo-banghoi-tab button[id^="guild-"]:focus-visible {
    outline: none;
    box-shadow: none;
}

/* Fix any inner nested containers replacing flat backgrounds */
#demo-banghoi-tab .guild-list-item,
#demo-banghoi-tab .guild-member-item,
#demo-banghoi-tab .guild-contribution-item,
#demo-banghoi-tab .guild-card,
#demo-banghoi-tab .guild-upgrade-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    margin-bottom: 10px;
    padding: 15px;
    transition: all 0.2s;
}

#demo-banghoi-tab .guild-list-item:hover,
#demo-banghoi-tab .guild-member-item:hover,
#demo-banghoi-tab .guild-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

#demo-banghoi-tab input[type="text"],
#demo-banghoi-tab input[type="number"],
#demo-banghoi-tab select,
#demo-banghoi-tab textarea {
    background: rgba(0, 0, 0, 0.5) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
    border-radius: 6px;
    padding: 10px;
}

#demo-banghoi-tab input:focus,
#demo-banghoi-tab select:focus,
#demo-banghoi-tab textarea:focus {
    border-color: rgba(46, 204, 113, 0.5) !important;
    outline: none;
    box-shadow: 0 0 8px rgba(46, 204, 113, 0.2);
}

#demo-banghoi-tab .guild-empty {
    color: #aaa;
    font-size: 14px;
    text-align: center;
    padding: 30px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    border: 1px dashed rgba(255, 255, 255, 0.1);
}

#demo-banghoi-tab .guild-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 10px;
}

#demo-banghoi-tab .guild-card-title {
    font-size: 18px;
    color: #fff;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 10px;
}

#demo-banghoi-tab .guild-card-logo {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.5);
    object-fit: contain;
}

#demo-banghoi-tab .guild-badges {
    display: flex;
    gap: 5px;
}

#demo-banghoi-tab .guild-badge {
    background: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    border: 1px solid rgba(46, 204, 113, 0.3);
}

#demo-banghoi-tab .guild-card-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    margin-bottom: 15px;
}

#demo-banghoi-tab .guild-stat {
    background: rgba(0, 0, 0, 0.4);
    padding: 10px;
    border-radius: 6px;
    text-align: center;
}

#demo-banghoi-tab .guild-stat-label {
    font-size: 11px;
    color: #888;
    margin-bottom: 4px;
    text-transform: uppercase;
}

#demo-banghoi-tab .guild-stat-value {
    font-size: 14px;
    color: #fff;
    font-weight: bold;
}

#demo-banghoi-tab .guild-card-desc {
    font-size: 13px;
    color: #aaa;
    font-style: italic;
    background: rgba(0, 0, 0, 0.2);
    padding: 12px;
    border-radius: 6px;
}

/* =========================================
   MOBILE COMPRESSION OPTIMIZATIONS (GENERAL MOBILE)
   ========================================= */
@media (max-width: 768px) {

    /* Compress Equipment Tab Component Layouts */
    #demo-character-tab .demo-gear-slot {
        width: 55px !important;
        height: 55px !important;
    }

    #demo-character-tab .gear-layout-top {
        gap: 110px !important;
        margin-top: 5px !important;
    }

    #demo-character-tab .demo-character-sprite {
        width: 80px !important;
        height: 100px !important;
    }

    #demo-character-tab .gear-col {
        gap: 6px !important;
    }

    #demo-character-tab .gear-row-bottom {
        gap: 10px !important;
        margin-top: 10px !important;
    }

    /* Compress Stats Tab Vertically without breaking column flow */
    #demo-chiso-tab .demo-stats-card,
    #demo-chiso-tab .demo-attributes-card {
        margin-bottom: 8px !important;
        padding: 10px !important;
    }

    #demo-chiso-tab .demo-stat-list {
        gap: 4px !important;
    }

    #demo-chiso-tab .demo-stat-row {
        padding: 4px 6px !important;
        margin-bottom: 2px !important;
    }

    #demo-chiso-tab .demo-stat-divider {
        margin: 6px 0 !important;
    }

    #demo-swipe-wrapper {
        margin-top: 5px !important;
    }
}

/* =========================================
   MOBILE LANDSCAPE OPTIMIZATIONS
   ========================================= */
@media (max-height: 500px) and (orientation: landscape) {

    /* Super Compress Equipment for Landscape Heights */
    #demo-character-tab .demo-gear-slot {
        width: 40px !important;
        height: 40px !important;
    }

    #demo-character-tab .gear-layout-top {
        gap: 80px !important;
        margin-top: 2px !important;
    }

    #demo-character-tab .demo-character-sprite {
        width: 60px !important;
        height: 80px !important;
    }

    #demo-character-tab .gear-col {
        gap: 4px !important;
        padding-top: 0px !important;
    }

    #demo-character-tab .gear-row-bottom {
        gap: 8px !important;
        margin-top: 2px !important;
    }

    /* Transition Stats Layout minimizing vertical scrolling completely */
    #demo-chiso-tab {
        padding: 5px !important;
        gap: 2px !important;
    }

    #demo-chiso-tab>div {
        padding: 6px 10px !important;
        margin-bottom: 4px !important;
        width: 95% !important;
        text-align: center !important;
    }

    #demo-chiso-tab>div:first-child {
        margin-bottom: 6px !important;
        font-size: 14px !important;
    }

    #demo-chiso-tab button.allocate-multi-btn {
        height: 28px !important;
        font-size: 11px !important;
        padding: 0 6px !important;
    }

    #demo-chiso-tab button.allocate-btn {
        width: 28px !important;
        height: 28px !important;
        font-size: 16px !important;
    }

    /* Enhance swipe container on short heights */
    #demo-swipe-wrapper {
        margin-top: 2px !important;
    }
}

/* Custom styling for compact character info stats layout on low height/landscape screens */
@media screen and (max-height: 540px) {
    .demo-char-info {
        top: 5px !important;
        left: 80px !important;
        max-height: calc(100vh - 80px) !important;
        overflow-y: auto !important;
        scrollbar-width: thin !important;
        scrollbar-color: rgba(241, 196, 15, 0.6) rgba(0, 0, 0, 0.4) !important;
    }

    .demo-char-info::-webkit-scrollbar {
        width: 4px !important;
    }

    .demo-char-info::-webkit-scrollbar-track {
        background: rgba(0, 0, 0, 0.4) !important;
        border-radius: 4px !important;
    }

    .demo-char-info::-webkit-scrollbar-thumb {
        background: rgba(241, 196, 15, 0.6) !important;
        border-radius: 4px !important;
        border: 1px solid rgba(0, 0, 0, 0.2) !important;
    }

    .demo-char-info .demo-premium-stat-panel {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(130px, 1fr)) !important;
        gap: 4px 16px !important;
        padding: 8px 12px !important;
        background: rgba(12, 16, 24, 0.95) !important;
        border: 1px solid rgba(255, 255, 255, 0.15) !important;
        border-left: 3px solid #f1c40f !important;
        border-radius: 6px !important;
        min-width: 280px !important;
    }

    .demo-char-info .demo-stat-row.exp-row {
        grid-column: span 2 !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 10px !important;
        margin-bottom: 2px !important;
    }

    .demo-char-info .demo-stat-divider {
        grid-column: span 2 !important;
        width: 100% !important;
        margin: 4px 0 !important;
    }

    .demo-char-info .demo-stat-row {
        margin-bottom: 0 !important;
        gap: 10px !important;
    }

    .demo-char-info .demo-stat-label {
        font-size: 10px !important;
        letter-spacing: 0.2px !important;
    }

    .demo-char-info .demo-stat-value {
        font-size: 12px !important;
    }
}

/* Dragonball summon styling */
#dragonball-summon-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 999999;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Space Grotesk', sans-serif;
}

.summon-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(10, 10, 20, 0.95) 0%, rgba(0, 0, 0, 0.99) 100%);
    animation: summon-darken 2s forwards;
}

@keyframes summon-darken {
    from { background-color: rgba(0, 0, 0, 0); }
    to { background-color: rgba(0, 0, 0, 0.95); }
}

.summon-balls-container {
    position: relative;
    width: 200px;
    height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: summon-spin 5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.summon-ball {
    position: absolute;
    width: 48px;
    height: 48px;
    transform-origin: center center;
    filter: drop-shadow(0 0 10px rgba(241, 196, 15, 0.8));
    animation: summon-glow 1.5s infinite alternate;
}

.summon-ball img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.summon-ball.ball-1 { transform: rotate(0deg) translateY(-80px) rotate(0deg); }
.summon-ball.ball-2 { transform: rotate(51.4deg) translateY(-80px) rotate(-51.4deg); }
.summon-ball.ball-3 { transform: rotate(102.8deg) translateY(-80px) rotate(-102.8deg); }
.summon-ball.ball-4 { transform: rotate(154.2deg) translateY(-80px) rotate(-154.2deg); }
.summon-ball.ball-5 { transform: rotate(205.6deg) translateY(-80px) rotate(-205.6deg); }
.summon-ball.ball-6 { transform: rotate(257deg) translateY(-80px) rotate(-257deg); }
.summon-ball.ball-7 { transform: rotate(308.4deg) translateY(-80px) rotate(-308.4deg); }

@keyframes summon-spin {
    0% { transform: rotate(0deg) scale(1); }
    70% { transform: rotate(1080deg) scale(0.6); }
    100% { transform: rotate(2160deg) scale(0.1); opacity: 0; }
}

@keyframes summon-glow {
    from { filter: drop-shadow(0 0 5px rgba(241, 196, 15, 0.6)); }
    to { filter: drop-shadow(0 0 15px rgba(241, 196, 15, 1)) brightness(1.2); }
}

.summon-flash {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    opacity: 0;
    pointer-events: none;
    z-index: 10;
}

.summon-flash.active {
    animation: flash-animation 1s ease-out forwards;
}

@keyframes flash-animation {
    0% { opacity: 0; }
    15% { opacity: 1; }
    100% { opacity: 0; }
}

.summon-wish-choices {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    box-sizing: border-box;
    z-index: 20;
}

.summon-wish-btn {
    background: url('/public/assets/icon/ui/button.webp') center/100% 100% no-repeat !important;
    border: none !important;
    width: 240px;
    height: 75px;
    color: #fff;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-shadow: 1px 1px 2px #000;
    transition: transform 0.2s, filter 0.2s;
    font-family: 'Space Grotesk', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

.summon-wish-btn:hover:not(:disabled) {
    transform: scale(1.08);
    filter: brightness(1.15);
}

.summon-wish-btn:active:not(:disabled) {
    transform: scale(0.95);
}

.summon-wish-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    filter: grayscale(1);
}

.summon-wish-btn .wish-title {
    color: #f1c40f;
    font-size: 15px;
    font-weight: bold;
    text-shadow: 1px 1px 2px #000;
}

.summon-wish-btn .wish-desc {
    color: #bdc3c7;
    font-size: 10px;
    margin-top: 2px;
}

@media (max-width: 768px) {
    .summon-wish-choices {
        gap: 20px;
    }
    .summon-wish-btn {
        width: 160px;
        height: 50px;
    }
    .summon-wish-btn .wish-title {
        font-size: 11px;
    }
    .summon-wish-btn .wish-desc {
        font-size: 8px;
    }
}