/* Battle Pass Container - Mirroring Boss Modal */
.battlepass-container {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 100000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
    pointer-events: none;
}

.battlepass-container.active {
    display: flex;
    pointer-events: auto;
}

/* Disable touch controls when battlepass is open */
.battlepass-container.active ~ .touch-controls,
.battlepass-container.active + * .touch-controls,
body .battlepass-container.active ~ .touch-controls {
    pointer-events: none !important;
    z-index: 100 !important;
    opacity: 0.3;
}

.battlepass-container.active * {
    pointer-events: auto;
}

/* Battle Pass Panel - styled like boss-content */
.battlepass-panel {
    background: #111111;
    border: 1px solid #333;
    border-radius: 8px;
    width: min(850px, 95vw);
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 20px rgba(0,0,0,0.8);
    color: #e0e0e0;
    font-family: Arial, sans-serif;
    position: relative;
    overflow: hidden;
}

/* Battle Pass Header - styled like boss-header */
.battlepass-header {
    background: linear-gradient(180deg, #222 0%, #111 100%);
    border-bottom: 1px solid #444;
    padding: 15px;
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.battlepass-header h3 {
    margin: 0;
    color: #fff;
    font-size: 16px;
    font-weight: bold;
}

/* Battle Pass Body - styled like boss-body for vertical side-by-side tabs and content */
.battlepass-body {
    display: flex;
    flex-direction: row;
    padding: 15px;
    gap: 15px;
    height: 65vh; /* Fixed height for independent scrolling */
    min-height: 200px;
    max-height: calc(85vh - 60px); /* Fits inside panel */
    overflow: hidden;
}

/* Battle Pass Tabs - styled like boss-tabs */
.battlepass-tabs {
    display: flex;
    flex-direction: column;
    width: 150px;
    min-width: 150px;
    gap: 5px;
    border-right: 1px solid #333;
    padding-right: 15px;
    overflow-y: auto;
}

.battlepass-tab {
    flex-shrink: 0;
    background: #222;
    border: 1px solid #444;
    color: #ccc;
    padding: 10px;
    text-align: left;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
    font-weight: bold;
    font-size: 13px;
}

.battlepass-tab:hover {
    background: #333;
    color: #fff;
}

.battlepass-tab.active {
    background: #555;
    color: #ff9900;
    border-color: #777;
}

/* Battle Pass Content */
.battlepass-content {
    flex: 1;
    overflow-y: auto;
    padding-right: 5px;
    max-height: 100%;
}

.battlepass-content::-webkit-scrollbar {
    width: 8px;
}

.battlepass-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.battlepass-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.battlepass-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Battle Pass Tab Content */
.battlepass-tab-content {
    display: none;
    background: transparent;
    padding: 0;
}

.battlepass-tab-content.active {
    display: block;
}

.battlepass-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.battlepass-close img {
    width: 20px;
    height: 20px;
}

.battlepass-levels {
    display: flex;
    flex-direction: row;
    gap: 8px;
    align-items: flex-start;
    min-height: 400px;
}

/* Battle Pass Main Container - 3 Column Layout */
.battlepass-main-container {
    display: grid;
    grid-template-columns: 1fr 50px 1fr;
    gap: 8px;
    width: 100%;
    position: relative;
    align-items: flex-start;
}

/* Free Items Column - Left */
.battlepass-free-column {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Premium Items Column - Right */
.battlepass-premium-column {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Vertical Progress Bar - Center */
.battlepass-vertical-progress {
    position: relative;
    width: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 55px 0 0 0;
    min-height: 400px;
    align-self: stretch;
}

.battlepass-vertical-progress-bar {
    position: relative;
    width: 16px;
    height: 100%;
    min-height: 400px;
    background: rgba(100, 100, 100, 0.3);
    border-radius: 8px;
    overflow: visible;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
    margin: 0 auto;
}

.battlepass-vertical-progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    /* Đổi màu thanh exp chính giữa sang style đen */
    background: linear-gradient(180deg, #ff000093 0%, #b60000 100%);
    transition: height 0.5s ease-out;
    border-radius: 10px;
    min-height: 0;
}

.battlepass-vertical-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: shimmer-vertical 2s infinite;
}

@keyframes shimmer-vertical {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(100%); }
}

/* Level Markers on Progress Bar */
.battlepass-level-marker {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 24px;
    background: rgba(40, 40, 40, 0.95);
    border: 2px solid rgba(100, 100, 100, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
    color: #fff;
    z-index: 10;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

.battlepass-level-marker:hover {
    transform: translateX(-50%) scale(1.15);
    border-color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.7);
}

.battlepass-level-marker.completed {
    background: rgba(204, 46, 46, 0.699);
    border-color: #ff1100;
    color: #fff;
    box-shadow: 0 0 10px rgba(46, 204, 113, 0.5);
}

.battlepass-level-marker.current {
    background: rgba(59, 59, 59, 0.95);
    border-color: #414141;
    box-shadow: 0 0 15px rgba(52, 152, 219, 0.7);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: translateX(-50%) scale(1); }
    50% { transform: translateX(-50%) scale(1.1); }
}

/* Battle Pass Level Item */
.battlepass-level-item {
    background: rgba(40, 40, 40, 0.8);
    border: 1px solid rgba(100, 100, 100, 0.3);
    border-radius: 6px;
    padding: 8px;
    transition: all 0.2s;
    min-height: 90px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.battlepass-level-item:hover {
    background: rgba(50, 50, 50, 0.9);
    border-color: rgba(150, 150, 150, 0.5);
}

.battlepass-level-item.completed {
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(46, 204, 113, 0.1);
}

/* Free and Premium Columns */
.battlepass-reward-column {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 8px;
    border-radius: 6px;
    background: rgba(30, 30, 30, 0.5);
    min-height: 80px;
    justify-content: center;
}

.battlepass-reward-column.free {
    border: 1px solid rgba(52, 152, 219, 0.5);
}

.battlepass-reward-column.premium {
    border: 1px solid rgba(241, 196, 15, 0.5);
    background: rgba(241, 196, 15, 0.05);
}

.battlepass-reward-label {
    font-size: 9px;
    font-weight: bold;
    text-transform: uppercase;
    color: #fff;
    text-align: center;
    padding: 3px 6px;
    border-radius: 3px;
    display: inline-block;
    margin-bottom: 6px;
    white-space: nowrap;
}

.battlepass-reward-column.free .battlepass-reward-label {
    background: rgba(52, 152, 219, 0.8);
    color: #fff;
    border: 1px solid rgba(52, 152, 219, 1);
}

.battlepass-reward-column.premium .battlepass-reward-label {
    background: rgba(241, 196, 15, 0.8);
    color: #000;
    border: 1px solid rgba(241, 196, 15, 1);
}

/* Reward Item */
.battlepass-reward-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    background: rgba(20, 20, 20, 0.5);
    border-radius: 4px;
}

.battlepass-reward-item img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    border-radius: 3px;
}

.battlepass-reward-item-info {
    flex: 1;
}

.battlepass-reward-item-name {
    font-size: 10px;
    color: #fff;
    font-weight: 600;
    line-height: 1.2;
}

.battlepass-reward-item-quantity {
    font-size: 9px;
    color: #95a5a6;
}

/* Progress Info Display - Positioned at current level */
.battlepass-progress-info {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 5;
    pointer-events: none;
    color: #fff;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9), 0 0 8px rgba(0, 0, 0, 0.5);
    white-space: nowrap;
    width: 45px;
    margin-left: 22px;
    margin-top: -12px; /* Offset để căn giữa theo chiều dọc */
}

.battlepass-progress-info-main {
    font-size: 10px;
    margin-bottom: 1px;
    line-height: 1.2;
}

.battlepass-progress-info-sub {
    font-size: 8px;
    opacity: 0.9;
    line-height: 1.2;
}

/* Claim Button */
.battlepass-claim-btn {
    padding: 5px 8px;
    background: rgba(46, 204, 113, 0.2);
    border: 1px solid rgba(46, 204, 113, 0.5);
    border-radius: 3px;
    color: #2ecc71;
    font-size: 9px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    margin-top: 4px;
    min-height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Button Spacer - to maintain equal height */
.battlepass-button-spacer {
    min-height: 24px;
    margin-top: 4px;
}

.battlepass-claim-btn:hover:not(:disabled) {
    background: rgba(46, 204, 113, 0.3);
    border-color: #2ecc71;
}

.battlepass-claim-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.battlepass-claim-btn.claimed {
    background: rgba(100, 100, 100, 0.3);
    border-color: rgba(100, 100, 100, 0.5);
    color: #95a5a6;
}

/* Empty State */
.battlepass-empty {
    text-align: center;
    padding: 40px;
    color: #95a5a6;
}

.battlepass-empty-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

/* Loading Message */
.battlepass-loading {
    text-align: center;
    padding: 40px;
    color: #95a5a6;
}

/* Tasks Tab */
.battlepass-tasks {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.battlepass-task-item {
    background: rgba(40, 40, 40, 0.8);
    border: 1px solid rgba(100, 100, 100, 0.3);
    border-radius: 10px;
    padding: 15px;
    transition: all 0.2s;
}

.battlepass-task-item.completed {
    border-color: rgba(46, 204, 113, 0.5);
    background: rgba(46, 204, 113, 0.1);
}

.battlepass-task-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.battlepass-task-level {
    font-size: 16px;
    font-weight: bold;
    color: #fff;
}

.battlepass-task-status {
    font-size: 12px;
    color: #95a5a6;
}

.battlepass-task-status.completed {
    color: #2ecc71;
}

.battlepass-task-description {
    font-size: 14px;
    color: #95a5a6;
    margin-bottom: 10px;
}

.battlepass-task-progress {
    margin-top: 10px;
}

.battlepass-task-progress-bar {
    width: 100%;
    height: 12px;
    background: rgba(100, 100, 100, 0.3);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 5px;
}

.battlepass-task-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3498db, #2ecc71);
    transition: width 0.3s;
    border-radius: 6px;
}

.battlepass-task-item.completed .battlepass-task-progress-fill {
    background: linear-gradient(90deg, #2ecc71, #27ae60);
}

.battlepass-task-progress-text {
    font-size: 12px;
    color: #95a5a6;
    text-align: center;
}

/* Battle Pass Button - Now in dropdown menu, no separate styling needed */

/* Mobile Responsive */
@media (max-width: 768px) {
    .battlepass-panel {
        width: 88%;
        max-width: 100%;
        max-height: 55vh;
    }
    
    .battlepass-header {
        padding: 3px 5px;
    }
    
    .battlepass-header h3 {
        font-size: 14px;
    }
    
    .battlepass-tab {
        padding: 3px 5px;
        font-size: 10px;
    }
    
    .battlepass-close {
        font-size: 16px;
        width: 20px;
        height: 20px;
    }
    
    .battlepass-content {
        padding: 3px;
    }
    
    .battlepass-levels {
        gap: 2px;
        min-height: 130px;
    }
    
    .battlepass-main-container {
        grid-template-columns: 1fr 30px 1fr;
        gap: 3px;
    }
    
    .battlepass-free-column,
    .battlepass-premium-column {
        gap: 2px;
    }
    
    .battlepass-vertical-progress {
        width: 30px;
        padding: 26px 0 0 0;
        min-height: 130px;
    }
    
    .battlepass-vertical-progress-bar {
        width: 10px;
        min-height: 130px;
    }
    
    .battlepass-level-marker {
        width: 16px;
        height: 16px;
        font-size: 8px;
    }
    
    .battlepass-level-item {
        padding: 3px;
        min-height: 42px;
    }
    
    .battlepass-reward-item {
        gap: 3px;
        padding: 2px;
    }
    
    .battlepass-reward-item img {
        width: 20px;
        height: 20px;
    }
    
    .battlepass-reward-item-name {
        font-size: 9px;
    }
    
    .battlepass-reward-item-quantity {
        font-size: 8px;
    }
    
    .battlepass-claim-btn {
        padding: 2px 4px;
        font-size: 8px;
        min-height: 16px;
        margin-top: 1px;
    }
    
    .battlepass-button-spacer {
        min-height: 16px;
        margin-top: 1px;
    }
    
    .battlepass-reward-label {
        font-size: 8px;
        padding: 2px 3px;
        margin-bottom: 1px;
    }
    
    .battlepass-progress-info {
        width: 30px;
        margin-left: 14px;
    }
    
    .battlepass-progress-info-main {
        font-size: 8px;
    }
    
    .battlepass-progress-info-sub {
        font-size: 6px;
    }
}

