@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,400;1,600;1,700&display=swap');
/**
 * MU Online 0.97k - Mystery Box (Hộp Mù May Mắn CS:GO Style)
 * Authentic Roulette Reel, Sound & Animation Styles
 */

.mysterybox-section {
    background: radial-gradient(circle at 50% 0%, #1e1b4b 0%, #0f172a 70%, #080c16 100%);
    border: 1px solid rgba(245, 158, 11, 0.35);
    border-radius: 16px;
    padding: 1.75rem 1.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6), inset 0 0 30px rgba(245, 158, 11, 0.05);
    position: relative;
    overflow: hidden;
}

.mysterybox-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, #3b82f6, #a855f7, #ec4899, #f59e0b, #ec4899, #3b82f6);
    background-size: 200% auto;
    animation: rainbowGlow 4s linear infinite;
}

@keyframes rainbowGlow {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

.mysterybox-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.mysterybox-title-box h2 {
    font-size: 1.6rem;
    color: #f59e0b;
    margin: 0;
    font-weight: 800;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-shadow: 0 0 15px rgba(245, 158, 11, 0.4);
}

.mysterybox-title-box p {
    font-size: 0.88rem;
    color: #94a3b8;
    margin-top: 0.25rem;
}

.mysterybox-price-pill {
    background: linear-gradient(135deg, #b45309 0%, #d97706 100%);
    color: #fff;
    padding: 0.5rem 1.25rem;
    border-radius: 30px;
    font-weight: 800;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(217, 119, 6, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Rarity Legend Bar */
.mysterybox-rarity-bar {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
    justify-content: center;
}

.rarity-pill {
    padding: 0.35rem 0.85rem;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    border: 1px solid transparent;
}

.rarity-pill.common {
    background: rgba(148, 163, 184, 0.15);
    color: #cbd5e1;
    border-color: rgba(148, 163, 184, 0.4);
}

.rarity-pill.blue {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border-color: rgba(59, 130, 246, 0.4);
}

.rarity-pill.purple {
    background: rgba(168, 85, 247, 0.15);
    color: #c084fc;
    border-color: rgba(168, 85, 247, 0.4);
}

.rarity-pill.pink {
    background: rgba(236, 72, 153, 0.15);
    color: #f472b6;
    border-color: rgba(236, 72, 153, 0.4);
}

.rarity-pill.gold {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
    border-color: rgba(245, 158, 11, 0.6);
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
}

/* ==================== CS:GO ROULETTE REEL ==================== */
.csgo-roulette-container {
    position: relative;
    width: 100%;
    height: 215px;
    background: #090e1a;
    border: 2px solid #1e293b;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: inset 0 0 35px rgba(0, 0, 0, 0.9), 0 8px 25px rgba(0,0,0,0.5);
    margin-bottom: 1.5rem;
}

/* Center Pointer Needle */
.csgo-center-line {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 4px;
    background: #ef4444;
    transform: translateX(-50%);
    z-index: 30;
    box-shadow: 0 0 10px #ef4444, 0 0 20px rgba(239, 68, 68, 0.8);
    pointer-events: none;
}

.csgo-pointer-top {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-top: 16px solid #ef4444;
    z-index: 31;
    filter: drop-shadow(0 2px 8px rgba(239,68,68,0.9));
    pointer-events: none;
}

.csgo-pointer-bottom {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-bottom: 16px solid #ef4444;
    z-index: 31;
    filter: drop-shadow(0 -2px 8px rgba(239,68,68,0.9));
    pointer-events: none;
}

/* Vignette Shadows */
.csgo-shadow-left,
.csgo-shadow-right {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 140px;
    z-index: 20;
    pointer-events: none;
}

.csgo-shadow-left {
    left: 0;
    background: linear-gradient(to right, #090e1a 15%, transparent 100%);
}

.csgo-shadow-right {
    right: 0;
    background: linear-gradient(to left, #090e1a 15%, transparent 100%);
}

/* The Sliding Track */
.csgo-track {
    position: absolute;
    top: 12px;
    left: 0;
    display: flex;
    gap: 14px;
    will-change: transform;
    padding: 0 20px;
}

/* Card item inside CS:GO Reel */
.csgo-card {
    width: 146px;
    height: 188px;
    background: linear-gradient(180deg, #131b2e 0%, #0c121e 100%);
    border: 2px solid #334155;
    border-radius: 10px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 10px 8px 8px;
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    transition: transform 0.15s ease;
}

.csgo-card-tag {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 6px;
    border-radius: 4px;
    align-self: flex-start;
}

.csgo-card-img-wrap {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.csgo-card-img-wrap::before {
    content: '';
    position: absolute;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    opacity: 0.25;
    filter: blur(8px);
}

.csgo-card img {
    max-width: 68px;
    max-height: 68px;
    image-rendering: pixelated;
    filter: drop-shadow(0 0 6px rgba(255,255,255,0.3));
    z-index: 2;
}

.csgo-card-info {
    width: 100%;
    text-align: center;
}

.csgo-card-name {
    font-size: 0.78rem;
    font-weight: 700;
    color: #e2e8f0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    margin-bottom: 6px;
}

.csgo-card-bar {
    width: 100%;
    height: 4px;
    border-radius: 2px;
}

/* Card Rarity Variants */
.csgo-card.rarity-common {
    border-color: #64748b;
    box-shadow: 0 0 10px rgba(100, 116, 139, 0.2);
}
.csgo-card.rarity-common .csgo-card-tag { background: rgba(148, 163, 184, 0.2); color: #cbd5e1; }
.csgo-card.rarity-common .csgo-card-bar { background: #94a3b8; }
.csgo-card.rarity-common .csgo-card-img-wrap::before { background: #94a3b8; opacity: 0.2; }

.csgo-card.rarity-blue {
    border-color: #3b82f6;
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.25);
}
.csgo-card.rarity-blue .csgo-card-tag { background: rgba(59, 130, 246, 0.2); color: #60a5fa; }
.csgo-card.rarity-blue .csgo-card-bar { background: #3b82f6; }
.csgo-card.rarity-blue .csgo-card-img-wrap::before { background: #3b82f6; }

.csgo-card.rarity-purple {
    border-color: #a855f7;
    box-shadow: 0 0 16px rgba(168, 85, 247, 0.3);
}
.csgo-card.rarity-purple .csgo-card-tag { background: rgba(168, 85, 247, 0.2); color: #c084fc; }
.csgo-card.rarity-purple .csgo-card-bar { background: #a855f7; }
.csgo-card.rarity-purple .csgo-card-img-wrap::before { background: #a855f7; }

.csgo-card.rarity-pink {
    border-color: #ec4899;
    box-shadow: 0 0 20px rgba(236, 72, 153, 0.4);
}
.csgo-card.rarity-pink .csgo-card-tag { background: rgba(236, 72, 153, 0.2); color: #f472b6; }
.csgo-card.rarity-pink .csgo-card-bar { background: #ec4899; }
.csgo-card.rarity-pink .csgo-card-img-wrap::before { background: #ec4899; }

.csgo-card.rarity-gold {
    border-color: #f59e0b;
    box-shadow: 0 0 25px rgba(245, 158, 11, 0.6);
    background: linear-gradient(180deg, #241d08 0%, #120e03 100%);
    animation: goldPulse 2s infinite ease-in-out;
}
.csgo-card.rarity-gold .csgo-card-tag { background: #f59e0b; color: #000; font-weight: 900; }
.csgo-card.rarity-gold .csgo-card-bar { background: #f59e0b; box-shadow: 0 0 8px #f59e0b; }
.csgo-card.rarity-gold .csgo-card-img-wrap::before { background: #f59e0b; opacity: 0.5; filter: blur(12px); }

@keyframes goldPulse {
    0%, 100% { box-shadow: 0 0 20px rgba(245, 158, 11, 0.5); }
    50% { box-shadow: 0 0 35px rgba(245, 158, 11, 0.9); }
}

/* ==================== ACTION AREA ==================== */
.mysterybox-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.85rem;
}

.btn-open-mystery {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 50%, #b45309 100%);
    color: #070b13;
    font-size: 1.15rem;
    font-weight: 800;
    padding: 0.85rem 2.8rem;
    border: 2px solid #fbbf24;
    border-radius: 40px;
    cursor: pointer;
    box-shadow: 0 6px 25px rgba(245, 158, 11, 0.45);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    transition: all 0.2s cubic-bezier(0.18, 0.89, 0.32, 1.28);
    letter-spacing: 0.3px;
}

.btn-open-mystery:hover:not(:disabled) {
    transform: scale(1.04);
    box-shadow: 0 8px 35px rgba(245, 158, 11, 0.7);
    color: #000;
}

.btn-open-mystery:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    filter: grayscale(0.5);
}

.mysterybox-user-balance {
    font-size: 0.88rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mysterybox-user-balance strong {
    color: #f59e0b;
}

.mysterybox-notice {
    font-size: 0.8rem;
    color: #64748b;
    text-align: center;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

/* ==================== WINNER MODAL ==================== */
.box-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(8px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.box-modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.box-modal-card {
    background: radial-gradient(circle at center, #1e293b 0%, #0b1120 100%);
    border: 2px solid #f59e0b;
    border-radius: 16px;
    max-width: 520px;
    width: 100%;
    padding: 2rem 1.75rem;
    text-align: center;
    box-shadow: 0 0 60px rgba(245, 158, 11, 0.35);
    position: relative;
    transform: scale(0.85);
    transition: transform 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

.box-modal-overlay.active .box-modal-card {
    transform: scale(1);
}

.box-modal-sunburst {
    position: absolute;
    top: 50%; left: 50%;
    width: 380px; height: 380px;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(245, 158, 11, 0.2) 0%, transparent 70%);
    pointer-events: none;
    animation: rotateSunburst 20s linear infinite;
    z-index: 1;
}

@keyframes rotateSunburst {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

.box-modal-content {
    position: relative;
    z-index: 2;
}

.box-modal-badge {
    display: inline-block;
    padding: 0.35rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
}

.box-modal-icon-wrap {
    width: 120px;
    height: 120px;
    margin: 0 auto 1.25rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.box-modal-icon-wrap img {
    max-width: 95px;
    max-height: 95px;
    image-rendering: pixelated;
    filter: drop-shadow(0 0 12px rgba(255,255,255,0.5));
    animation: itemBounce 2s ease-in-out infinite;
}

@keyframes itemBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.box-modal-title {
    font-size: 1.45rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: #4ade80;
    text-shadow: 0 0 10px rgba(74, 222, 128, 0.5);
}

.box-modal-subtitle {
    font-size: 0.9rem;
    color: #cbd5e1;
    margin-bottom: 1rem;
}

.box-modal-exl-list {
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(74, 222, 128, 0.25);
    border-radius: 10px;
    padding: 0.85rem 1rem;
    text-align: left;
    margin-bottom: 1.25rem;
    max-height: 140px;
    overflow-y: auto;
}

.box-modal-exl-item {
    font-size: 0.82rem;
    color: #a3e635;
    margin-bottom: 0.3rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.box-modal-warehouse-alert {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid #10b981;
    color: #6ee7b7;
    font-size: 0.82rem;
    padding: 0.65rem 1rem;
    border-radius: 8px;
    margin-bottom: 1.25rem;
    font-weight: 600;
}

.box-modal-btn-row {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-modal-open-more {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #000;
    font-weight: 800;
    padding: 0.75rem 1.75rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    transition: transform 0.15s;
}

.btn-modal-open-more:hover {
    transform: scale(1.03);
}

.btn-modal-close {
    background: #1e293b;
    color: #e2e8f0;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    border: 1px solid #334155;
    cursor: pointer;
    font-size: 0.95rem;
}

.btn-modal-close:hover {
    background: #334155;
}

.mysterybox-section,
.mysterybox-section *,
.btn-open-mystery,
.mysterybox-title-box h2,
.mysterybox-price-pill,
.rarity-pill,
.history-item-name,
.box-modal-content * {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}
