/* ===== CASE PAGE ===== */
.case-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 40px;
    position: relative;
}

.case-page::after {
    content: '';
    position: fixed;
    bottom: -80px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 200px;
    border-radius: 50%;
    background: rgba(245, 200, 66, 0.15);
    filter: blur(80px);
    pointer-events: none;
    z-index: -1;
}

/* ===== CASE COUNT SELECTOR ===== */
.case-count {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.case-count__btn {
    width: 48px;
    height: 40px;
    border-radius: 10px;
    background: #1a1a22;
    color: #8a8a9a;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
}

.case-count__btn:hover {
    color: #ffffff;
    background: #22222e;
}

.case-count__btn.active {
    color: #1a1a1a;
    background: linear-gradient(135deg, #f5c842, #ff6b35);
    border-color: transparent;
    box-shadow: 0 0 12px rgba(245, 200, 66, 0.2);
}

/* ===== ROULETTE CONTAINER ===== */
.roulette-container {
    width: 100%;
    max-width: 900px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow-x: hidden;
}

.roulette-container[data-mode="vertical"] {
    flex-direction: row;
    gap: 10px;
    justify-content: center;
}

.roulette-container[data-mode="vertical"] .roulette--vertical {
    flex: 1;
    max-width: 180px;
}

.case-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-bottom: 30px;
}

.case-info__img {
    width: 160px;
    height: auto;
}

.case-info__title {
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
}

.case-info__price {
    font-size: 16px;
    font-weight: 700;
    color: #f5c842;
}

/* ===== BALANCE ===== */
.balance {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
}

.balance__amount {
    font-size: 15px;
    font-weight: 700;
    color: #f5c842;
}

.balance__currency {
    font-size: 15px;
    font-weight: 700;
    color: #f5c842;
}

/* ===== ROULETTE ===== */
.roulette {
    position: relative;
    width: 100%;
    max-width: 900px;
    margin-bottom: 12px;
}

.roulette__pointer {
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: calc(100% + 16px);
    background: #f5c842;
    z-index: 10;
    border-radius: 2px;
    box-shadow: 0 0 12px rgba(245, 200, 66, 0.5);
}

/* Horizontal pointer for vertical mode */
.roulette__pointer--h {
    top: 50%;
    left: -8px;
    transform: translateY(-50%);
    width: calc(100% + 16px);
    height: 4px;
}

.roulette__window {
    overflow: hidden;
    border-radius: 14px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    background: #111118;
    padding: 12px 0;
}

.roulette__window--vertical {
    height: 400px;
    padding: 0 12px;
}

.roulette__track {
    display: flex;
    gap: 12px;
    padding: 0 20px;
    will-change: transform;
}

.roulette__track--vertical {
    flex-direction: column;
    padding: 20px 0;
}

.roulette__item {
    min-width: 160px;
    height: 140px;
    background: #1a1a22;
    border-radius: 10px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    position: relative;
    overflow: hidden;
}

.roulette__item::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--glow-color);
    filter: blur(30px);
    opacity: 0.5;
    pointer-events: none;
}

.roulette__item-img {
    width: 80px;
    height: auto;
    z-index: 1;
    object-fit: contain;
}

.roulette__item-name {
    font-size: 11px;
    font-weight: 600;
    color: #ffffff;
    text-align: center;
    z-index: 1;
    padding: 0 8px;
}

.roulette__item-price {
    font-size: 12px;
    font-weight: 700;
    color: #f5c842;
    z-index: 1;
}

/* Vertical roulette items */
.roulette__item--vertical {
    min-width: unset;
    width: 100%;
    height: 110px;
    min-height: 110px;
    border-top: none;
}

/* ===== CASE ACTIONS ===== */
.case-actions {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.case-actions__btn {
    padding: 14px 48px;
    font-size: 16px;
    border-radius: 12px;
}

.case-actions__btn--fast {
    background: linear-gradient(135deg, #f5c842, #ff6b35);
    box-shadow: 0 4px 20px rgba(245, 200, 66, 0.3);
}

/* ===== LOW BALANCE POPUP ===== */
.popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1100;
    backdrop-filter: blur(6px);
}

.popup-overlay.active {
    display: flex;
}

.popup {
    background: #1a1a24;
    border-radius: 20px;
    padding: 40px 44px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    min-width: 340px;
    max-width: 420px;
    position: relative;
    border: 1px solid rgba(245, 200, 66, 0.15);
    box-shadow: 0 0 40px rgba(245, 200, 66, 0.1), 0 20px 60px rgba(0, 0, 0, 0.5);
    text-align: center;
}

.popup__close {
    position: absolute;
    top: 14px;
    right: 16px;
    background: none;
    border: none;
    color: #8a8a9a;
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
    font-family: inherit;
}

.popup__close:hover {
    color: #ffffff;
}

.popup__title {
    font-size: 20px;
    font-weight: 800;
    color: #f5c842;
    letter-spacing: 0.5px;
}

.popup__text {
    font-size: 15px;
    font-weight: 500;
    color: #b0b0c0;
    line-height: 1.5;
}

.popup__btn {
    padding: 12px 36px;
    font-size: 15px;
    border-radius: 10px;
    margin-top: 4px;
}

/* ===== BACK LINK ===== */
.case-back {
    font-size: 14px;
    color: #8a8a9a;
    transition: color 0.2s;
}

.case-back:hover {
    color: #ffffff;
}

/* ===== RESULT MODAL ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(6px);
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: #1a1a24;
    border-radius: 20px;
    padding: 40px 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    min-width: 340px;
    max-width: 90vw;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.modal--multi .modal__results {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
}

.modal__card {
    background: #111118;
    border-radius: 14px;
    padding: 16px 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 140px;
    max-width: 160px;
    position: relative;
    overflow: hidden;
}

.modal__card .modal__rarity {
    width: 100%;
    height: 3px;
    border-radius: 2px;
}

.modal__card .modal__img {
    width: 90px;
    height: 70px;
    object-fit: contain;
}

.modal__card .modal__name {
    font-size: 13px;
    font-weight: 600;
}

.modal__card .modal__price {
    font-size: 14px;
    font-weight: 700;
}

.modal__total {
    font-size: 20px;
    font-weight: 800;
    color: #f5c842;
}

/* Per-card action buttons */
.modal__card-actions {
    display: flex;
    gap: 6px;
    margin-top: 4px;
    width: 100%;
}

.modal__card-btn {
    flex: 1;
    padding: 6px 4px;
    font-size: 10px;
    font-weight: 700;
    font-family: inherit;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.15s;
    letter-spacing: 0.3px;
}

.modal__card-btn--sell {
    background: linear-gradient(135deg, #f5c842, #ff6b35);
    color: #1a1a1a;
}

.modal__card-btn--keep {
    background: linear-gradient(135deg, #4a4a5a, #3a3a48);
    color: #ffffff;
}

.modal__card-btn:hover {
    transform: translateY(-1px);
}

/* Resolved card states */
.modal__card--resolved {
    opacity: 0.5;
    pointer-events: none;
    transition: opacity 0.3s;
}

.modal__card--sold::after {
    content: 'ПРОДАНО';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(245, 200, 66, 0.15);
    color: #f5c842;
    font-size: 12px;
    font-weight: 800;
    border-radius: 14px;
}

.modal__card--kept::after {
    content: 'ОСТАВЛЕНО';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(100, 100, 120, 0.15);
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    border-radius: 14px;
}

.modal__rarity {
    width: 60px;
    height: 4px;
    border-radius: 2px;
}

.modal__img {
    width: 120px;
    height: auto;
}

.modal__name {
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    text-align: center;
}

.modal__price {
    font-size: 22px;
    font-weight: 800;
    color: #f5c842;
}

.modal__actions {
    display: flex;
    gap: 14px;
    margin-top: 10px;
}

.modal__btn {
    padding: 12px 32px;
    font-size: 14px;
    border-radius: 10px;
}

.modal__btn--keep {
    background: linear-gradient(135deg, #4a4a5a, #3a3a48);
    color: #ffffff;
    box-shadow: 0 0 16px rgba(100, 100, 120, 0.2);
}

.modal__btn--keep:hover {
    box-shadow: 0 0 24px rgba(100, 100, 120, 0.35);
}

/* ===== DROPS GRID ===== */
.drops {
    width: 100%;
    max-width: 900px;
    margin-bottom: 30px;
}

.drops__title {
    font-size: 18px;
    font-weight: 700;
    color: #8a8a9a;
    margin-bottom: 16px;
    text-align: center;
}

.drops__grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
}

.drops__item {
    width: 180px;
    background: #1a1a22;
    border-radius: 12px;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    transition: transform 0.2s, background 0.2s;
    position: relative;
    overflow: hidden;
}

.drops__item::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--glow-color);
    filter: blur(40px);
    opacity: 0.5;
    pointer-events: none;
}

.drops__item:hover {
    transform: translateY(-4px);
    background: #1e1e28;
}

.drops__item-img {
    width: 120px;
    height: 90px;
    object-fit: contain;
    position: relative;
    z-index: 1;
}

.drops__item-name {
    font-size: 13px;
    font-weight: 600;
    color: #ffffff;
    text-align: center;
}

.drops__item-price {
    font-size: 14px;
    font-weight: 700;
    color: #f5c842;
}
