/* DayZ Case Opening CSS Styles */

/* Case Opening Animation */
.case-opening-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.case-opening-container {
    width: 100%;
    max-width: 800px;
    padding: 20px;
}

.spinner-container {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    margin-bottom: 20px;
    border-radius: 8px;
    background: linear-gradient(to right, rgba(26, 31, 41, 0) 0%, rgba(26, 31, 41, 1) 40%, rgba(26, 31, 41, 1) 60%, rgba(26, 31, 41, 0) 100%);
}

.items-reel {
    display: flex;
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
}

.spin-item {
    flex: 0 0 160px;
    height: 180px;
    margin-right: 10px;
    background: #1A1F29;
    border-radius: 8px;
    border: 2px solid #333;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.item-inner {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.item-image {
    width: 80px;
    height: 80px;
    background: #0D1117;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 10px;
    overflow: hidden;
}

.item-image img {
    max-width: 100%;
    max-height: 100%;
}

.item-name {
    font-size: 12px;
    text-align: center;
    font-weight: bold;
    color: #fff;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.zombies-reward {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.zombies-amount {
    font-size: 24px;
    font-weight: bold;
    color: #E22345;
    margin-bottom: 8px;
}

.zombies-icon {
    color: #E22345;
    width: 48px;
    height: 48px;
}

.spin-marker {
    position: absolute;
    left: 50%;
    top: 0;
    height: 100%;
    width: 4px;
    background-color: #E22345;
    z-index: 100;
    transform: translateX(-50%);
    box-shadow: 0 0 15px rgba(226, 35, 69, 0.7);
}

.spin-marker::before, .spin-marker::after {
    content: '';
    position: absolute;
    left: -8px;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
}

.spin-marker::before {
    top: 0;
    border-top: 12px solid #E22345;
}

.spin-marker::after {
    bottom: 0;
    border-bottom: 12px solid #E22345;
}

.winning-item {
    border-color: #E22345;
}

.glow-effect {
    animation: item-glow 1s ease-in-out infinite;
    border-width: 3px;
}

@keyframes item-glow {
    0% { box-shadow: 0 0 5px rgba(226, 35, 69, 0.5); }
    50% { box-shadow: 0 0 20px rgba(226, 35, 69, 0.8); }
    100% { box-shadow: 0 0 5px rgba(226, 35, 69, 0.5); }
}

.rarity-legendary {
    border-color: #FFD700;
}

.rarity-rare {
    border-color: #8847ff;
}

.rarity-uncommon {
    border-color: #4b69ff;
}

.rarity-common {
    border-color: #8a8a8a;
}

.rarity-zombies {
    border-color: #E22345;
}

.win-result-container {
    background: #1A1F29;
    border-radius: 8px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 2px solid #E22345;
    box-shadow: 0 0 30px rgba(226, 35, 69, 0.3);
}

.win-zombie-result {
    text-align: center;
}

.win-zombie-amount {
    font-size: 48px;
    font-weight: bold;
    color: #E22345;
    margin-bottom: 10px;
    text-shadow: 0 0 10px rgba(226, 35, 69, 0.5);
}

.win-zombie-text {
    font-size: 20px;
    margin-bottom: 15px;
}

.win-zombie-icon {
    color: #E22345;
    margin: 0 auto;
}

.win-item-result {
    text-align: center;
}

.win-item-image {
    background: #0D1117;
    width: 120px;
    height: 120px;
    margin: 0 auto;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Rarity color indicators */
.text-legendary {
    color: #FFD700;
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
}

.text-rare {
    color: #8847ff;
    text-shadow: 0 0 5px rgba(136, 71, 255, 0.5);
}

.text-uncommon {
    color: #4b69ff;
    text-shadow: 0 0 5px rgba(75, 105, 255, 0.5);
}

.text-common {
    color: #b0b0b0;
}

.text-zombies {
    color: #E22345;
    text-shadow: 0 0 5px rgba(226, 35, 69, 0.5);
}

/* Case opening button styling */
.open-case-btn {
    transition: all 0.2s ease;
}

.open-case-btn:not([disabled]):hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(226, 35, 69, 0.3);
}

.open-case-btn:not([disabled]):active {
    transform: translateY(0);
}

/* Market Modal Styles */
.market-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.market-modal.active {
    opacity: 1;
    visibility: visible;
}

.market-modal-container {
    background-color: #1A1F29;
    border-radius: 0.75rem;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.market-modal.active .market-modal-container {
    transform: translateY(0);
}

.price-chart-container {
    width: 100%;
    height: 200px;
    margin-top: 1rem;
    margin-bottom: 1rem;
    background-color: rgba(13, 17, 23, 0.5);
    border-radius: 0.5rem;
    padding: 1rem;
    position: relative;
}

.price-tag {
    position: absolute;
    top: 0;
    right: 0;
    background-color: #E22345;
    color: white;
    padding: 4px 8px;
    border-radius: 0 0 0 0.5rem;
    font-size: 0.75rem;
    font-weight: bold;
    z-index: 1;
}

.market-price-badge {
    position: absolute;
    top: 0;
    right: 0;
    background-color: #E22345;
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 0 0 0 6px;
}
