.tg-roulette-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px;
    color: #fff;
}

.tg-roulette-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.tg-roulette-balance strong {
    font-size: 22px;
    margin: 0 6px;
}

.tg-roulette-wrapper {
    margin-bottom: 32px;
}

.tg-roulette-window {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.08);
    background: radial-gradient(circle at top, rgba(122, 133, 255, 0.22), rgb(3 10 29 / 66%));
    padding: 18px 0;
}

.tg-roulette-line {
    display: flex;
    will-change: transform;
    transform: translate3d(0,0,0);
}

.tg-roulette-card {
    width: 120px;
    flex-shrink: 0;
    margin: 0 6px;
    padding: 10px 8px;
    border-radius: 12px;
    background: rgb(10 14 24 / 37%);
    border: 1px solid transparent;
    text-align: center;
    font-size: 13px;
    box-shadow: 0 0 0 rgba(0,0,0,0);
}

.tg-roulette-card__img {
    width: 100%;
    height: 70px;
    margin-bottom: 6px;
}

.tg-roulette-card__img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.tg-roulette-card__title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tg-roulette-card__rarity {
    margin-top: 4px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* редкости */
.tg-rare-common { color: #a3b1c7; }
.tg-rare-rare { color: #4ad2ff; }
.tg-rare-epic { color: #c57cff; }
.tg-rare-legendary { color: #ffd35c; }

/* маркер центра */
.tg-roulette-marker {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 0;
    border-left: 2px solid rgba(255,255,255,0.9);
    transform: translateX(-1px);
    pointer-events: none;
}

.tg-roulette-controls {
    display: flex;
    justify-content: center; /* центрируем кнопку */
    align-items: center;
    gap: 20px; /* расстояние между кнопкой и статусом */
    margin: 20px 0;
}

.tg-btn-primary {
    background: linear-gradient(135deg, #27e0b3, #3ea4ff);
    border-radius: 999px;
    border: none;
    padding: 10px 22px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    color: #02050c;
    box-shadow: 0 0 20px rgba(62, 164, 255, 0.35);
}

.tg-btn-primary:disabled {
    opacity: 0.5;
    cursor: default;
    box-shadow: none;
}

.tg-roulette-status {
    font-size: 13px;
    opacity: 0.85;
}

/* Инвентарь */
.tg-roulette-section {
    margin-top: 32px;
}

.tg-roulette-section__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.tg-muted {
    font-size: 13px;
    opacity: 0.7;
}

.tg-inventory {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tg-inventory-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgb(3 10 29 / 58%);
    border: 1px solid rgba(255,255,255,0.06);
}

.tg-inventory-main {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tg-inventory-img {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    overflow: hidden;
    background: #101e3b;
}

.tg-inventory-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.tg-inventory-title {
    font-size: 14px;
}

.tg-inventory-rarity {
    font-size: 11px;
}

.tg-inventory-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tg-inventory-count-num {
    font-weight: 600;
}

/* Кнопки */
.tg-btn-outline {
    border-radius: 999px;
    padding: 6px 16px;
    font-size: 13px;
    border: 1px solid rgba(255,255,255,0.25);
    background: transparent;
    color: #fff;
    cursor: pointer;
}

/* Таблица выводов */
.tg-withdraws-table {
    font-size: 13px;
}

.tg-withdraws-row {
    display: grid;
    grid-template-columns: 70px 1.3fr 80px 120px 170px 160px;
    gap: 10px;
    padding: 8px 10px;
    align-items: center;
}

.tg-withdraws-row--head {
    font-size: 12px;
    opacity: 0.7;
}

.tg-withdraws-row:not(.tg-withdraws-row--head) {
    background: rgb(59 174 242 / 11%);
    border-radius: 10px;
    margin-top: 4px;
}

.tg-wd-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
    min-width: 100px;
    text-align: center;
}

/* статусы */
.tg-wd-status-0 { background: rgba(255, 204, 0, 0.12); color: #ffd454; }
.tg-wd-status-1 { background: rgba(0, 255, 149, 0.12); color: #5bffbd; }
.tg-wd-status-2 { background: rgba(255, 71, 87, 0.12); color: #ff7d8b; }
.tg-wd-status-3 { background: rgba(102, 153, 255, 0.12); color: #85a8ff; }


/* мобилка */
@media (max-width: 768px) {
    .tg-roulette-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .tg-roulette-card {
        width: 90px;
    }

    .tg-withdraws-row {
        grid-template-columns: 1.2fr 1fr;
        grid-template-rows: auto auto auto;
        gap: 6px 10px;
    }
}


/* 📱 МОБИЛКА: превращаем таблицу в карточки */
@media (max-width: 650px) {

    .tg-withdraws-table {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    /* шапка скрываем */
    .tg-withdraws-row--head {
        display: none !important;
    }

    .tg-withdraws-row {
        display: flex;
        flex-direction: column;
        padding: 14px 12px;
        border-radius: 12px;
        background: rgba(8, 12, 20, 0.85);
        gap: 6px;
        font-size: 14px;
    }

    /* каждая строка внутри карточки */
    .tg-withdraws-row > div {
        display: flex;
        justify-content: space-between;
        width: 100%;
        gap: 12px;
    }

    /* подписи слева */
    .tg-withdraws-row > div::before {
        content: attr(data-label);
        opacity: 0.6;
        font-size: 12px;
    }

    /* статус — справа красивый */
    .tg-wd-status {
        margin-left: auto;
        margin-top: 6px;
    }
}






.tg-win-popup {
    position: fixed;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(6px);
    z-index: 999999;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s ease;
}

.tg-win-popup.active {
    opacity: 1;
    pointer-events: auto;
}

/* Коробка */
.tg-win-box {
    position: relative;
    background: linear-gradient(180deg, #111626, #0b0f19);
    padding: 32px 38px;
    border-radius: 22px;
    width: 320px;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.15);
    box-shadow: 0 0 30px rgba(0,0,0,0.6);
    animation: pop-in .35s ease forwards;
    overflow: hidden;
}

/* Светящееся кольцо */
.tg-win-glow {
    position: absolute;
    inset: -40px;
    background: radial-gradient(circle, rgb(190 88 252 / 44%), #00000000 70%);
    z-index: -1;
    filter: blur(35px);
}

/* Анимация появления */
@keyframes pop-in {
    0% { transform: translateY(20px) scale(.8); opacity: 0; }
    100% { transform: translateY(0) scale(1); opacity: 1; }
}

.tg-win-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 16px;
}

/* Выигрыш */
.tg-win-item-img {
    width: 140px;
    height: 140px;
    margin: 0 auto 12px;
    border-radius: 16px;
    background: rgba(255,255,255,0.03);
    padding: 10px;
    animation: pulse 2s infinite ease-in-out;
}

.tg-win-item-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.tg-win-item-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 22px;
}

/* Кнопка */
.tg-win-close {
    padding: 10px 26px;
    border-radius: 999px;
    font-size: 15px;
    background: linear-gradient(135deg, #27e0b3, #3ea4ff);
    border: none;
    cursor: pointer;
    color: #02050c;
    font-weight: 700;
    transition: .25s ease;
}



/* BLUR на высокой скорости */
.tg-roulette-line.fast {
    filter: blur(2px);
}

/* FLASH при выпадении */
.tg-flash {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.6);
    animation: flash-pop .25s ease forwards;
    pointer-events: none;
}

@keyframes flash-pop {
    0% { opacity: 1; }
    100% { opacity: 0; }
}

/* GLOW цвета редкости */
.rarity-glow-common     { box-shadow: 0 0 25px rgba(150, 150, 150, .5); }
.rarity-glow-uncommon  { box-shadow: 0 0 25px rgba(0,255,150,.75); }
.rarity-glow-rare       { box-shadow: 0 0 25px rgba(0,184,255,.75); }
.rarity-glow-epic       { box-shadow: 0 0 25px rgba(180,0,255,.75); }
.rarity-glow-legendary  { box-shadow: 0 0 40px rgba(255,185,0,.9); }


.tg-roulette-title {
    display: flex;
    align-items: center;
    gap: 10px; /* расстояние между иконкой и текстом */
    font-size: 28px;
    font-weight: 700;
}

.tg-telegram-icon {
    width: 30px;
    height: 30px;
    object-fit: contain;
    display: inline-block;
}


.tg-faq {
    margin-top: 28px;
}

.tg-faq-item {
    margin-bottom: 12px;
    background: rgb(8 16 37 / 70%);
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.08);
}

.tg-faq-q {
    font-weight: 800;
    font-size: 15px;
    margin-bottom: 6px;
}

.tg-faq-a {
    font-size: 13px;
    opacity: 0.85;
    line-height: 1.45;
}

.tg-faq-a p {
    margin: 3px 0;
}


/* === АДАПТИВ FAQ === */
@media (max-width: 768px) {
    .tg-faq-item {
        padding: 12px 14px;
        border-radius: 10px;
    }

    .tg-faq-q {
        font-size: 14px;
        margin-bottom: 4px;
    }

    .tg-faq-a {
        font-size: 12.5px;
        line-height: 1.4;
    }

    .tg-faq-a p {
        margin: 2px 0;
    }

    .tg-roulette-section__head h2 {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .tg-faq-item {
        padding: 10px 12px;
    }

    .tg-faq-q {
        font-size: 13.5px;
    }

    .tg-faq-a {
        font-size: 12px;
    }
}

.tg-empty-box {
    text-align: center;
    padding: 26px 20px;
    border-radius: 14px;
    background: rgb(8 16 37 / 70%);
    border: 1px solid rgba(255,255,255,0.06);
    margin-top: 10px;
}

.tg-empty-text {
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 6px;
}

.tg-empty-sub {
    font-size: 13px;
    opacity: 0.7;
}





.tg-balance-fancy {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 18px;
    border-radius: 16px;
    background: rgba(15, 18, 28, 0.55);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,0.05);
    box-shadow: 0 0 18px rgb(191 89 253 / 45%);
    transition: .25s ease;
}

.tg-balance-icon img {
    width: 38px;
    height: 38px;
    filter: drop-shadow(0 0 10px rgba(0,255,150,0.4));
    animation: tgcoinpulse 2.2s infinite ease-in-out;
}

@keyframes tgcoinpulse {
    0% { transform: scale(1); opacity: .95; }
    50% { transform: scale(1.08); opacity: 1; }
    100% { transform: scale(1); opacity: .95; }
}

.tg-balance-label {
    font-size: 12px;
    opacity: .7;
}

.tg-balance-amount {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-top: 2px;
}

#bonuscoins-count {
    font-size: 26px;
    font-weight: 700;
    color: #30c6d5;
    text-shadow: 0 0 10px rgb(192 91 253 / 59%);
}

.tg-balance-currency {
    font-size: 12px;
    opacity: .7;
}

/* 📱 Мобилка: выравниваем заголовок и баланс в одну линию */
@media (max-width: 650px) {
    .tg-roulette-header {
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 10px;
        flex-wrap: nowrap;
    }

    /* Заголовок ужимаем чтобы не ломался */
    .tg-roulette-title {
        font-size: 20px;
        flex-shrink: 1;
        white-space: nowrap;
    }

    .tg-telegram-icon {
        width: 22px;
        height: 22px;
    }

    /* Блок баланса — компактнее */
    .tg-balance-fancy {
        padding: 6px 12px;
        border-radius: 12px;
        flex-shrink: 0;
        transform: translateY(1px);
    }

    .tg-balance-icon img {
        width: 28px;
        height: 28px;
    }

    .tg-balance-label {
        font-size: 11px;
    }

    .tg-balance-amount span {
        font-size: 14px;
    }
}

.tg-roulette-card__rarity {
    margin-top: 4px;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 2px 6px;
    border-radius: 6px;
    display: inline-block;
    font-weight: 600;
}

/* Цвета и glow */
.tg-rare-common {
    background: rgba(163,177,199,0.12);
    color: #c6cfdd;
    box-shadow: 0 0 6px rgba(163,177,199,0.25);
}

.tg-rare-rare {
    background: rgba(74,210,255,0.12);
    color: #4ad2ff;
    box-shadow: 0 0 8px rgba(74,210,255,0.35);
}

.tg-rare-epic {
    background: rgba(197,124,255,0.12);
    color: #d7a6ff;
    box-shadow: 0 0 8px rgba(197,124,255,0.4);
}

.tg-rare-legendary {
    background: rgba(255,211,92,0.12);
    color: #ffd35c;
    box-shadow: 0 0 10px rgba(255,211,92,0.45);
}


/* ============================
   Rarity badges in inventory
============================ */

/* ============================
   FAQ rarity inline colors
============================ */
.rarity-color-common {
    color: #a3b1c7;
    text-shadow: 0 0 6px rgba(163,177,199,0.4);
}

.rarity-color-rare {
    color: #4ad2ff;
    text-shadow: 0 0 6px rgba(74,210,255,0.5);
}

.rarity-color-epic {
    color: #c57cff;
    text-shadow: 0 0 8px rgba(197,124,255,0.55);
}

.rarity-color-legendary {
    color: #ffd35c;
    text-shadow: 0 0 10px rgba(255,211,92,0.6);
}

#tg-spin-btn.tg-btn-primary:hover {
    color: #000; /* при ховере — чёрный текст */
}

#tg-win-close:hover {
    color: #000; /* при ховере — чёрный текст */
}
    .tg-roulette-section__head h2 {
        font-size: 18px;
    }
.tg-withdraw-btn,
.tg-withdraw-btn:hover,
.tg-withdraw-btn:focus {
    background: transparent !important;
    color: inherit !important;
    border: 1px solid rgba(255,255,255,0.15) !important;
    outline: none !important;
    transform: none !important;
}
