/* ==================== COMPONENTS.CSS ПОЛНЫЙ ==================== */

/* Модальное колесо */
.wheel-modal-overlay {
    position: fixed; top: 0; left: 50%; transform: translate(-50%, 0);
    width: 100%; max-width: 450px; height: 100vh;
    z-index: 50; display: flex; justify-content: center; align-items: center;
    pointer-events: none; opacity: 0; transition: opacity 0.35s ease;
}
.wheel-modal-overlay.show { opacity: 1; pointer-events: all; }
.wheel-modal-content { display: flex; flex-direction: column; align-items: center; gap: 0; }

.wheel-container-modal {
    position: relative; width: 240px; height: 240px; flex-shrink: 0;
    filter: drop-shadow(0 0 35px rgba(100, 140, 255, 0.25));
}
.wheel-canvas-modal { width: 100%; height: 100%; }

.spark-canvas-modal {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 300px; height: 300px; pointer-events: none; z-index: 5;
}

.wheel-modal-chance {
    font-size: 32px; font-weight: 800; color: #ffd700;
    text-shadow: 0 0 24px rgba(255, 215, 0, 0.6), 0 0 48px rgba(255, 215, 0, 0.3);
    animation: chance-pop-in 0.4s ease-out;
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    z-index: 4; pointer-events: none;
}
@keyframes chance-pop-in {
    0% { transform: translate(-50%, -50%) scale(0.5); opacity: 0; }
    60% { transform: translate(-50%, -50%) scale(1.15); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

.wheel-modal-chance-label {
    font-size: 11px; font-weight: 600; color: #ffffff;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.3); letter-spacing: 3px;
    position: absolute; top: calc(50% + 28px); left: 50%;
    transform: translateX(-50%); z-index: 4; pointer-events: none;
    opacity: 0.7; transition: opacity 0.3s ease;
}

.center-result-modal {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    text-align: center; pointer-events: none; z-index: 6;
    opacity: 0; transition: opacity 0.3s ease;
}
.center-result-modal.show { opacity: 1; }
.center-result-text-modal {
    font-size: 22px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase;
    animation: result-pop 0.4s ease-out;
}
@keyframes result-pop {
    0% { transform: scale(0.3); opacity: 0; }
    60% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}
.center-result-chance-modal { font-size: 14px; font-weight: 600; margin-top: 4px; opacity: 0.9; }

/* Магазин */
.shop-overlay {
    position: fixed; top: 0; left: 50%; transform: translate(-50%, 0);
    width: 100%; max-width: 450px; height: 100vh; background: #08090d;
    z-index: 150; opacity: 0; pointer-events: none; transition: opacity 0.2s;
    display: flex; flex-direction: column;
}
.shop-overlay.show { opacity: 1; pointer-events: all; }
.shop-header {
    padding: 16px; display: flex; justify-content: space-between; align-items: center;
    background: #08090d; border-bottom: none; flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.04);
}
.shop-title { color: #d0daf0; font-size: 18px; font-weight: 600; text-shadow: 0 0 10px rgba(200, 210, 255, 0.2); }
.close-btn { background: none; border: none; color: #6b7daa; font-size: 22px; cursor: pointer; padding: 4px 8px; text-shadow: 0 0 8px rgba(100, 140, 255, 0.3); }

.shop-search-row {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 12px; background: #08090d;
    border-bottom: none; flex-shrink: 0;
}
.shop-search-input-wrapper {
    flex: 1;
    min-width: 0;
}
.shop-search-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: none;
    border-radius: 8px;
    padding: 9px 12px;
    color: #d0daf0;
    font-size: 13px;
    outline: none;
    transition: all 0.2s;
    box-sizing: border-box;
}
.shop-search-input:focus { background: rgba(255, 255, 255, 0.06); box-shadow: 0 0 10px rgba(255, 215, 0, 0.1); }
.shop-search-input::placeholder { color: #5a6070; }
.shop-sort-btns { display: flex; gap: 4px; }
.shop-sort-btn {
    background: transparent; border: none; color: #ffffff;
    width: 32px; height: 32px; border-radius: 6px; cursor: pointer;
    font-size: 16px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
}
.shop-sort-btn:active { background: rgba(255, 255, 255, 0.06); color: #ffd700; }
.shop-sort-btn.active { color: #ffd700; text-shadow: 0 0 10px rgba(255, 215, 0, 0.5); }

.shop-items {
    flex: 1; overflow-y: auto; padding: 10px;
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
}
.shop-item {
    background: transparent; border: none; border-radius: 10px;
    padding: 10px 6px; display: flex; flex-direction: column; align-items: center;
    gap: 6px; cursor: pointer; transition: all 0.2s;
}
.shop-item:active { background: rgba(255, 255, 255, 0.03); }
.shop-item-icon { width: 44px; height: 44px; object-fit: contain; filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.25)); }
.shop-item-name {
    color: #d0daf0; font-size: 11px; text-align: center; line-height: 1.2;
    text-shadow: 0 0 5px rgba(200, 210, 255, 0.2);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden; word-break: break-word;
}
.shop-item-price {
    color: #ffffff !important;
    font-weight: 600;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

/* Модалка покупки */
.buy-modal-overlay {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 450px;
    height: 100vh;
    height: 100dvh;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 175;
    display: none;
    justify-content: center;
    align-items: flex-end;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.buy-modal-overlay.show {
    display: flex;
    opacity: 1;
}

.buy-modal-card {
    width: 100%;
    max-width: 450px;
    background: rgba(10, 12, 18, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px 20px 0 0;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-bottom: none;
    padding: 24px 20px 32px 20px;
    text-align: center;
    box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.5);
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1);
    will-change: transform;
}
.buy-modal-overlay.show .buy-modal-card {
    transform: translateY(0);
}
.buy-modal-icon { width: 64px; height: 64px; object-fit: contain; filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.4)); }
.buy-modal-name { color: #d0daf0; font-size: 18px; margin: 10px 0 6px; text-shadow: 0 0 8px rgba(200, 210, 255, 0.2); }
.buy-modal-price {
    color: #ffffff !important;
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.buy-modal-price .star-icon-small {
    display: inline-block;
    width: 20px;
    height: 20px;
    position: relative;
    vertical-align: middle;
    flex-shrink: 0;
}
.buy-modal-price .star-icon-small::before {
    width: 20px;
    height: 20px;
    filter: drop-shadow(0 0 3px #ffd700) drop-shadow(0 0 6px #ffaa00);
}
.buy-modal-buttons { display: flex; gap: 10px; }
.buy-modal-confirm {
    flex: 1; padding: 12px; border-radius: 10px; font-weight: 700; font-size: 14px;
    border: none; cursor: pointer; text-transform: uppercase; letter-spacing: 1px;
    background: linear-gradient(135deg, #f0883e, #f5c842, #ffd700);
    color: #0a0f1a; border: 1px solid #f5c84260; transition: all 0.25s;
    box-shadow: 0 0 20px rgba(240, 136, 62, 0.3);
}
.buy-modal-confirm:active { transform: scale(0.98); box-shadow: 0 0 30px rgba(255, 215, 0, 0.5); }
.buy-modal-confirm:disabled { opacity: 0.4; cursor: not-allowed; box-shadow: none; }
.buy-modal-cancel {
    flex: 1; background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08); color: #a0b4e0;
    padding: 12px; border-radius: 10px; font-weight: 600; cursor: pointer; font-size: 13px;
    transition: all 0.2s;
}
.buy-modal-cancel:active { background: rgba(255, 255, 255, 0.08); }

/* Пополнение баланса */
.balance-topup-overlay {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 450px;
    height: 100vh;
    height: 100dvh;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 160;
    display: none;
    justify-content: center;
    align-items: flex-end;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.balance-topup-overlay.show {
    display: flex;
    opacity: 1;
}
.topup-card {
    width: 100%;
    max-width: 450px;
    max-height: 85vh;
    background: rgba(10, 12, 18, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px 20px 0 0;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-bottom: none;
    padding: 24px 20px 32px 20px;
    text-align: center;
    box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.5);
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1);
    overflow-y: auto;
    will-change: transform;
}
.topup-card h3 {
    color: #ffffff;
    margin-bottom: 20px;
    font-size: 18px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}
.balance-topup-overlay.show .topup-card {
    transform: translateY(0);
}
.topup-custom-select {
    position: relative;
    margin-bottom: 16px;
    z-index: 100;
}
.topup-select-header {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 12px 14px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    z-index: 101;
}
.topup-select-header:active {
    background: rgba(255, 255, 255, 0.06);
}
.topup-select-header .topup-select-icon {
    width: 22px;
    height: 22px;
    object-fit: contain;
    flex-shrink: 0;
}

.topup-select-header .topup-select-text {
    flex: 1;
    color: #d0daf0;
    font-size: 14px;
    font-weight: 600;
    text-align: left;
}

.topup-select-header .topup-select-arrow {
    color: #ffd700;
    font-size: 10px;
    transition: transform 0.2s;
    flex-shrink: 0;
}

.topup-custom-select.open .topup-select-arrow {
    transform: rotate(180deg);
}

.topup-select-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
     background: rgba(13, 17, 31, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-8px);
    transition: all 0.2s ease;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    z-index: 102;
}
.topup-custom-select.open .topup-select-dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}
.topup-select-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    color: #d0daf0;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}
.topup-select-option:hover,
.topup-select-option:active {
    background: rgba(255, 255, 255, 0.06);
    color: #ffd700;
}
.topup-select-option img {
    width: 22px;
    height: 22px;
    object-fit: contain;
}
.topup-confirm-btn {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 15px;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 2px;
    background: linear-gradient(135deg, #f0883e, #f5c842, #ffd700);
    color: #0a0f1a;
    margin-bottom: 10px;
    transition: all 0.25s;
    box-shadow: 0 0 25px rgba(240, 136, 62, 0.4), 0 0 50px rgba(255, 215, 0, 0.2);
    -webkit-tap-highlight-color: transparent;
}
.topup-confirm-btn:active {
    transform: scale(0.98);
    box-shadow: 0 0 40px rgba(255, 215, 0, 0.6);
}
.topup-cancel-btn {
    width: 100%; padding: 12px; border-radius: 10px; font-weight: 600; font-size: 13px;
    cursor: pointer; background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08); color: #a0b4e0;
    transition: all 0.2s;
}
.topup-cancel-btn:active { background: rgba(255, 255, 255, 0.08); }
/* ==================== ПОЛЕ ВВОДА С ИКОНКОЙ ==================== */

.topup-amount-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 20px;
    min-height: 60px;
}

.topup-amount-input {
    width: 140px;
    background: transparent;
    border: none;
    padding: 8px 4px;
    color: #ffffff;
    font-size: 40px;
    font-weight: 700;
    text-align: center;
    outline: none;
}

.topup-amount-input::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

.topup-currency-icon {
    width: 36px;
    height: 36px;
    object-fit: contain;
    flex-shrink: 0;
}

.topup-amount-row.hiding {
    opacity: 0;
    transform: translateY(-8px);
}
.topup-amount-input::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

.topup-amount-input:focus { background: rgba(255, 255, 255, 0.06); box-shadow: 0 0 15px rgba(255, 215, 0, 0.15); }
.topup-quick-amounts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.topup-quick-btn {
    background: #111827; border: 1px solid #2a3a5c; color: #ffd700;
    padding: 8px 6px; border-radius: 8px; font-weight: 600; font-size: 11px;
    cursor: pointer; transition: all 0.2s; box-shadow: 0 0 8px rgba(0, 0, 0, 0.3);
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.3);
}
.topup-quick-btn:active { background: #1a2540; box-shadow: 0 0 15px rgba(255, 215, 0, 0.3); }
.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    border: none;
    flex-shrink: 0;
    /* Убрать: margin-right: 0; margin-left: auto; order: 3; */
}
.avatar-img { width: 100%; height: 100%; object-fit: cover; }

/* Продажа */
.sell-overlay {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 450px;
    height: 100vh;
    height: 100dvh;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 170;
    display: none;
    justify-content: center;
    align-items: flex-end;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.sell-overlay.show {
    display: flex;
    opacity: 1;
}
.sell-card {
    width: 100%;
    max-width: 450px;
    background: rgba(10, 12, 18, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px 20px 0 0;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-bottom: none;
    padding: 24px 20px 32px 20px;
    text-align: center;
    box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.5);
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1);
    will-change: transform;
}
.sell-overlay.show .sell-card {
    transform: translateY(0);
}

.sell-icon { width: 56px; height: 56px; object-fit: contain; filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.4)); }
.sell-card h3 { color: #d0daf0; font-size: 18px; margin-bottom: 6px; margin-top: 8px; text-shadow: 0 0 8px rgba(200, 210, 255, 0.2); }
.sell-card .sell-price { 
    color: #ffd700; font-size: 20px; font-weight: bold; margin-bottom: 16px; 
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
    display: flex; align-items: center; justify-content: center; gap: 6px;
}
.sell-card .sell-price .star-icon-small { display: inline-block; width: 20px; height: 20px; position: relative; vertical-align: middle; flex-shrink: 0; }
.sell-card .sell-price .star-icon-small::before {
    width: 20px; height: 20px;
    filter: drop-shadow(0 0 3px #ffd700) drop-shadow(0 0 6px #ffaa00);
}
.sell-buttons { display: flex; gap: 10px; }
.sell-btn-confirm {
    flex: 1; background: linear-gradient(135deg, #5a1a1a, #c0392b); border: 1px solid #e74c3c60;
    color: white; padding: 10px; border-radius: 8px; font-weight: 600; font-size: 13px;
    box-shadow: 0 0 12px rgba(231, 76, 60, 0.2); transition: all 0.2s;
}
.sell-btn-confirm:active { box-shadow: 0 0 22px rgba(231, 76, 60, 0.5); }
.sell-btn-cancel {
    flex: 1; background: #111827; border: 1px solid #2a3a5c; color: #a0b4e0;
    padding: 10px; border-radius: 8px; font-weight: 600; cursor: pointer; font-size: 13px;
}

/* Звёзды */
.star-icon {
    display: inline-block; width: 18px; height: 18px; position: relative; vertical-align: middle;
}
.star-icon::before {
    content: ''; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 18px; height: 18px; background: #ffd700;
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
    filter: drop-shadow(0 0 4px #ffd700) drop-shadow(0 0 8px #ffaa00);
}
.star-icon-small {
    display: inline-block; width: 10px; height: 10px; position: relative; vertical-align: middle;
}
.star-icon-small::before {
    content: ''; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 10px; height: 10px; background: #ffd700;
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
    filter: drop-shadow(0 0 3px #ffd700) drop-shadow(0 0 6px #ffaa00);
}
.balance-star-icon { width: 18px; height: 18px; object-fit: contain; flex-shrink: 0; }
.gift-price-outside .star-icon-small { display: inline-block; width: 14px; height: 14px; position: relative; vertical-align: middle; flex-shrink: 0; }
.gift-price-outside .star-icon-small::before { width: 14px; height: 14px; filter: drop-shadow(0 0 3px #ffd700) drop-shadow(0 0 6px #ffaa00); }

/* ==================== ИНСТРУКЦИЯ ДЛЯ ПОДАРКОВ ==================== */

.topup-gift-instructions {
    display: none;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 20px;
    padding: 0;
    background: transparent;
    border: none;
    min-height: 60px;
}

.topup-gift-instructions.visible {
    display: flex !important;
}

.topup-instruction-item {
    display: flex;
    align-items: center;
    gap: 14px;
    text-align: left;
}

.topup-instruction-icon {
    width: 28px;
    height: 28px;
    object-fit: contain;
    flex-shrink: 0;
}

.topup-instruction-item span {
    color: #a0b4e0;
    font-size: 15px;
    line-height: 1.5;
    text-align: left;
}

.topup-instruction-link {
    color: #ffd700;
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    text-shadow: 0 0 6px rgba(255, 215, 0, 0.3);
}

.topup-instruction-link:active {
    color: #f5c842;
}
/* Профиль */
.profile-overlay {
    position: fixed; top: 0; left: 50%; transform: translate(-50%, 0);
    width: 100%; max-width: 450px; height: 100vh;
    background: rgba(8, 9, 13, 0.95); backdrop-filter: blur(8px);
    display: flex; justify-content: center; align-items: center;
    z-index: 200; opacity: 0; pointer-events: none; transition: opacity 0.2s;
}
.profile-overlay.show { opacity: 1; pointer-events: all; }
.profile-card {
    background: #08090d; border-radius: 16px; padding: 20px;
    max-width: 320px; width: 90%; border: 1px solid #1e2a45;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.4);
}
.profile-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.profile-title { color: #ffd700; font-size: 18px; font-weight: 700; }
.profile-content { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.profile-avatar-large {
    width: 120px;  /* было 80px */
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    border: none;
    flex-shrink: 0;
}

.profile-avatar-img { width: 100%; height: 100%; object-fit: cover; }
.profile-fullname { color: #ffffff; font-size: 20px; font-weight: 700; text-shadow: 0 0 10px rgba(255, 255, 255, 0.2); }
.profile-rank-section { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.profile-rank-icon {
    width: 96px;  /* было 48px */
    height: 96px;
    object-fit: contain;
    filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.4));
}
.profile-value-gold {
    color: #ffd700;
    font-size: 16px;
    font-weight: 600;
}
.profile-rank-name { color: #ffd700; font-size: 14px; font-weight: 700; text-shadow: 0 0 8px rgba(255, 215, 0, 0.3); }
.profile-exp-bar-container {
    width: 100%;
    height: 14px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 7px;
    overflow: visible;
    position: relative;
    box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.4);
    margin-bottom: 2px;
}
.profile-exp-bar-fill {
    height: 100%;
    border-radius: 7px;
    background: linear-gradient(90deg, rgba(240, 136, 62, 0.6), rgba(245, 200, 66, 0.6), rgba(255, 215, 0, 0.6));
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.15);
    transition: width 0.5s ease;
    width: 0%;
    position: relative;
}
.profile-username {
    color: #ffffff;  /* было отсутствовало */
    font-size: 14px;
    font-weight: 500;
    margin-top: -8px;
}
.profile-exp-text {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 10px;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
    white-space: nowrap;
    z-index: 2;
    pointer-events: none;
}
.profile-rank-bonuses { width: 100%; display: flex; flex-direction: column; gap: 10px; }
.profile-bonus-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    background: rgba(240, 136, 62, 0.06);
    border-radius: 12px;
    border: 1px solid rgba(240, 136, 62, 0.15);
}
.profile-bonus-label {
    color: #a0b4e0;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.profile-bonus-value {
    color: #ffd700;
    font-size: 16px;
    font-weight: 700;
    text-shadow: 0 0 6px rgba(255, 215, 0, 0.3);
}
.profile-info { width: 100%; display: flex; flex-direction: column; gap: 10px; }
.profile-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: none;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}
.profile-label {
    color: #8a9bb5;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.profile-value {
    color: #d0daf0;
    font-size: 16px;
    font-weight: 600;
}
.profile-close-btn {
    width: 100%; margin-top: 16px; padding: 12px;
    border-radius: 10px; font-weight: 700; font-size: 14px;
    border: none; cursor: pointer; text-transform: uppercase; letter-spacing: 1px;
    background: linear-gradient(135deg, #f0883e, #f5c842, #ffd700);
    color: #0a0f1a; border: 1px solid #f5c84260;
    box-shadow: 0 0 20px rgba(240, 136, 62, 0.3); transition: all 0.25s;
}
.profile-close-btn:active { transform: scale(0.98); box-shadow: 0 0 30px rgba(255, 215, 0, 0.5); }

/* История транзакций */
.transactions-section { width: 100%; display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.transactions-title {
    color: #6b7daa; font-size: 14px; text-transform: uppercase; letter-spacing: 2px;
    text-align: center; font-weight: 800; text-shadow: 0 0 5px rgba(160, 180, 224, 0.2);
}
.transactions-list { display: flex; flex-direction: column; gap: 8px; }
.transaction-placeholder { color: #5a6070; font-size: 13px; text-align: center; padding: 16px; }
.transactions-spinner {
    width: 30px; height: 30px; margin: 0 auto 12px;
    border: 2px solid #1e2a45; border-top-color: #f5c842;
    border-radius: 50%; animation: spin 0.8s linear infinite;
}

.transaction-amount.ton-withdraw {
    color: #44A3DD !important;
    text-shadow: 0 0 6px rgba(68, 163, 221, 0.3) !important;
}
@keyframes spin { to { transform: rotate(360deg); } }
.transaction-card {
    background: rgba(255, 255, 255, 0.03); border-radius: 12px;
    padding: 20px 16px; display: flex; align-items: center; gap: 12px;
    position: relative; box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    min-height: 80px; border: 1px solid transparent;
}
.transaction-card.status-completed { border-color: rgba(0, 186, 0, 0.3); }
.transaction-card.status-pending { border-color: rgba(56, 184, 244, 0.3); }
.transaction-card.status-cancelled { border-color: rgba(226, 27, 27, 0.3); }
.transaction-icon { width: 28px; height: 28px; object-fit: contain; flex-shrink: 0; }
.transaction-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.transaction-status { color: #ffffff; font-size: 15px; font-weight: 700; }
.transaction-time { color: #6b7daa; font-size: 12px; background: transparent; border-radius: 0; padding: 0; white-space: nowrap; flex-shrink: 0; align-self: flex-start; }
.transaction-gift-icon { width: 36px; height: 36px; object-fit: contain; filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.3)); flex-shrink: 0; }
.transaction-amount { color: #ffd700; font-size: 14px; font-weight: 700; position: absolute; top: 20px; right: 16px; text-shadow: 0 0 6px rgba(255, 215, 0, 0.3); }
.transaction-card.status-bonus { border-color: rgba(187, 72, 62, 0.3); }

/* Рефералы */
.referral-stats-title {
    color: #6b7daa; font-size: 14px; text-transform: uppercase; letter-spacing: 2px;
    text-align: center; font-weight: 800; text-shadow: 0 0 5px rgba(160, 180, 224, 0.2);
}
.referral-stats-row { display: flex; justify-content: space-around; gap: 10px; width: 100%; }
.referral-stat-item { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px 18px; border-radius: 12px; flex: 1; position: relative; border: 1px solid transparent; background-clip: padding-box; }
.referral-stat-item::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; border-radius: 12px; padding: 1px;
    background: linear-gradient(45deg, #232228, #232228, #232228, #232228, #1890ff);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor; mask-composite: exclude; z-index: -1;
}
.referral-stat-item.earned { background: radial-gradient(ellipse at right top, rgba(240, 136, 62, 0.25) 0%, #151419 47%, #151419 100%); }
.referral-stat-item.earned::before { background: linear-gradient(45deg, #232228, #232228, #232228, #232228, #f0883e, #f5c842, #ffd700); }
.referral-stat-item.referrals { background: radial-gradient(ellipse at right top, rgba(46, 234, 157, 0.2) 0%, #151419 47%, #151419 100%); }
.referral-stat-item.referrals::before { background: linear-gradient(45deg, #232228, #232228, #232228, #232228, #2eea9d); }
.referral-stat-label { color: #6b7daa; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; }
.referral-stat-value { color: #ffffff; font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 4px; }
.referral-star-icon { width: 14px; height: 14px; object-fit: contain; }
.referral-info-block { background: rgba(255, 255, 255, 0.03); border-radius: 12px; padding: 16px; text-align: center; width: 100%; }
.referral-info-title { color: #ffffff; font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.referral-info-desc { color: #a0b4e0; font-size: 13px; line-height: 1.6; margin-bottom: 12px; }
.referral-info-desc p { margin-bottom: 4px; }
.referral-link-row { display: flex; gap: 8px; margin-top: 12px; }
.referral-link-input {
    flex: 1; background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px; padding: 8px 12px; color: #6b7daa; font-size: 11px; outline: none;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.referral-copy-btn {
    padding: 8px 14px; border-radius: 8px; font-weight: 600; font-size: 12px;
    border: none; cursor: pointer; background: linear-gradient(135deg, #f0883e, #f5c842);
    color: #0a0f1a; white-space: nowrap; flex-shrink: 0;
}

/* Switch */
.settings-switch-group { display: flex; flex-direction: column; gap: 0; }
.settings-switch-row { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.04); }
.settings-switch-info { display: flex; flex-direction: column; gap: 3px; }
.settings-switch-label { color: #d0daf0; font-size: 16px; }
.settings-switch-desc { color: #6b7daa; font-size: 12px; }
.switch { position: relative; display: inline-block; width: 48px; height: 26px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch-slider {
    position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(255, 255, 255, 0.1); transition: 0.3s; border-radius: 26px;
}
.switch-slider:before {
    position: absolute; content: ""; height: 20px; width: 20px; left: 3px; bottom: 3px;
    background-color: #6b7daa; transition: 0.3s; border-radius: 50%;
}
.switch input:checked + .switch-slider { background: linear-gradient(135deg, #f0883e, #f5c842, #ffd700); box-shadow: 0 0 10px rgba(255, 215, 0, 0.3); }
.switch input:checked + .switch-slider:before { transform: translateX(22px); background-color: #0a0f1a; }

/* Правила */
.rules-btn {
    width: 80%; margin-top: 16px; padding: 14px; border-radius: 24px;
    font-weight: 700; font-size: 14px; border: none; cursor: pointer;
    text-transform: uppercase; letter-spacing: 1px; background: #142D29; color: #00FCE0; transition: all 0.25s;
}
.rules-btn:active { transform: scale(0.98); opacity: 0.9; }
.rules-modal-overlay {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 450px;
    height: 100vh;
    height: 100dvh;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 190;
    display: none;
    justify-content: center;
    align-items: flex-end;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.rules-modal-overlay.show {
    display: flex;
    opacity: 1;
}
.rules-modal-card {
    width: 100%;
    max-width: 450px;
    max-height: 85vh;
    background: rgba(10, 12, 18, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px 20px 0 0;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-bottom: none;
    padding: 24px 20px 32px 20px;
    box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.5);
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1);
    overflow-y: auto;
}
.rules-modal-overlay.show .rules-modal-card {
    transform: translateY(0);
}
.rules-modal-title { color: #ffffff; font-size: 20px; font-weight: 700; margin-bottom: 20px; text-align: center; }
.rules-modal-text h4 { color: #ffffff; font-size: 15px; font-weight: 700; margin-top: 18px; margin-bottom: 8px; }
.rules-modal-text h4:first-child { margin-top: 0; }
.rules-modal-text p { color: #a0b4e0; font-size: 13px; line-height: 1.7; margin-bottom: 8px; }
.rules-modal-text strong { color: #ffffff; font-weight: 600; }
.rules-modal-close-btn {
    width: 100%; margin-top: 20px; padding: 14px; border-radius: 12px;
    font-weight: 700; font-size: 14px; border: none; cursor: pointer;
    text-transform: uppercase; letter-spacing: 1px;
    background: linear-gradient(135deg, #f0883e, #f5c842, #ffd700); color: #0a0f1a;
    border: 1px solid #f5c84260; box-shadow: 0 0 20px rgba(240, 136, 62, 0.3); transition: all 0.25s;
}
.rules-modal-close-btn:active { transform: scale(0.98); box-shadow: 0 0 30px rgba(255, 215, 0, 0.5); }

/* Бонус */
.bonus-modal-overlay {
    position: fixed; top: 0; left: 50%; transform: translate(-50%, 0);
    width: 100%; max-width: 450px; height: 100vh;
    background: rgba(8, 9, 13, 0.95); backdrop-filter: blur(8px);
    display: flex; justify-content: center; align-items: center;
    z-index: 210; opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
.bonus-modal-overlay.show { opacity: 1; pointer-events: all; }
.bonus-modal-card {
    background: linear-gradient(135deg, #0d111f, #1a1f35); border-radius: 20px;
    padding: 30px 24px; text-align: center; max-width: 300px; width: 90%;
    border: 1px solid rgba(255, 215, 0, 0.2); box-shadow: 0 0 40px rgba(255, 215, 0, 0.15); position: relative;
}
.bonus-modal-close { position: absolute; top: 10px; left: 14px; background: none; border: none; color: #6b7daa; font-size: 20px; cursor: pointer; }
.bonus-modal-title { color: #ffd700; font-size: 22px; font-weight: 700; margin-bottom: 12px; text-shadow: 0 0 10px rgba(255, 215, 0, 0.3); }
.bonus-modal-text { color: #ffffff; font-size: 15px; line-height: 1.6; white-space: pre-line; }

/* Кастомный alert */
.custom-alert-overlay {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 450px;
    height: 100vh;
    height: 100dvh;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 220;
    display: none;
    justify-content: center;
    align-items: flex-end;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.custom-alert-overlay.show {
    display: flex;
    opacity: 1;
}
.custom-alert-card {
    width: 100%;
    max-width: 450px;
    background: rgba(10, 12, 18, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px 20px 0 0;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-bottom: none;
    padding: 24px 20px 32px 20px;
    text-align: center;
    box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.5);
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1);
}
.custom-alert-overlay.show .custom-alert-card {
    transform: translateY(0);
}
.custom-alert-text { color: #d0daf0; font-size: 15px; line-height: 1.5; margin-bottom: 20px; }
.custom-alert-btn {
    width: 100%; padding: 12px; border-radius: 10px; font-weight: 700; font-size: 14px;
    border: none; cursor: pointer; text-transform: uppercase; letter-spacing: 1px;
    background: linear-gradient(135deg, #f0883e, #f5c842, #ffd700); color: #0a0f1a;
    border: 1px solid #f5c84260; box-shadow: 0 0 20px rgba(240, 136, 62, 0.3); transition: all 0.25s;
}
.custom-alert-btn:active { transform: scale(0.98); box-shadow: 0 0 30px rgba(255, 215, 0, 0.5); }

/* Карточка баланса */
.balance-card {
    width: 100%;
    padding: 20px 18px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    position: relative;
    background: radial-gradient(ellipse at right top, rgba(240, 136, 62, 0.3) 0%, #151419 47%, #151419 100%);
}
.balance-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 12px; padding: 1px;
    background: linear-gradient(45deg, #232228, #232228, #232228, #232228, #f0883e, #f5c842, #ffd700);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    z-index: -1;
}

.balance-card-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-around;
    width: 100%;
    gap: 8px;
}

.balance-card-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.balance-card-divider {
    width: 1px;
    background: rgba(255, 255, 255, 0.08);
    align-self: stretch;
    flex-shrink: 0;
}

.balance-card-amount {
    color: #ffffff;
    font-size: 22px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.balance-card-star {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.balance-card-ton-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.balance-card-wager {
    color: #6b7daa;
    font-size: 11px;
    text-align: center;
    white-space: nowrap;
}

.balance-card-withdraw-btn {
    flex: 1;
    padding: 12px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 14px;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: #ffffff;
    color: #0a0f1a;
    transition: all 0.25s;
}
.balance-card-withdraw-btn:active {
    transform: scale(0.98);
    opacity: 0.9;
}


.balance-card-convert-btn {
  flex: 1;
    padding: 12px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 14px;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: #ffffff;
    color: #0a0f1a;
    transition: all 0.25s;
}
.balance-card-convert-btn:active {
    transform: scale(0.98);
    opacity: 0.9;
}


/* Вывод баланса */
.withdraw-balance-overlay {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 450px;
    height: 100vh;
    height: 100dvh;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 210;
    display: none;
    justify-content: center;
    align-items: flex-end;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.withdraw-balance-overlay.show {
    display: flex;
    opacity: 1;
}

.withdraw-balance-card {
    width: 100%;
    max-width: 450px;
    background: rgba(10, 12, 18, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px 20px 0 0;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-bottom: none;
    padding: 28px 24px 36px 24px;
    text-align: center;
    box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.5);
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1);
    display: flex;
    flex-direction: column;
    gap: 20px;
    will-change: transform;
}

.withdraw-balance-overlay.show .withdraw-balance-card {
    transform: translateY(0);
}
.withdraw-balance-title {
    color: #ffffff;
    font-size: 18px;
    font-weight: 700;
    margin: 0;
}

.withdraw-amount-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 8px 0;
}

.withdraw-amount-input {
    width: 140px;
    background: transparent;
    border: none;
    padding: 8px 4px;
    color: #ffffff;
    font-size: 40px;
    font-weight: 700;
    text-align: center;
    outline: none;
}

.withdraw-amount-input::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

.withdraw-amount-star {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.withdraw-amount-star-small {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.withdraw-usd-hint {
    color: #6b7daa;
    font-size: 14px;
    margin: 0;
}

.withdraw-method-buttons {
    display: flex;
    gap: 0;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 10px;
    padding: 3px;
    position: relative;
}

.withdraw-method-btn {
    flex: 1;
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    border: none;
    cursor: pointer;
    background: transparent;
    color: #6b7daa;
    transition: color 0.3s ease;
    position: relative;
    z-index: 1;
}

.withdraw-method-btn.active {
    color: #ffffff;
}

.withdraw-method-buttons::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: calc(50% - 3px);
    height: calc(100% - 6px);
    background: #0088CC;
    border-radius: 8px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 0;
}

.withdraw-method-buttons.stars-active::before {
    transform: translateX(100%);
    background: #F4D219;
}

.withdraw-next-btn {
    width: 100%;
    padding: 16px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 15px;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 2px;
    background: linear-gradient(135deg, #f0883e, #f5c842, #ffd700);
    color: #0a0f1a;
    border: 1px solid #f5c84260;
    box-shadow: 0 0 25px rgba(240, 136, 62, 0.4);
    transition: all 0.25s;
}

.withdraw-next-btn:active {
    transform: scale(0.98);
}

.withdraw-amount-display {
    color: #ffffff;
    font-size: 28px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.withdraw-balance-input.username-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 14px 16px;
    color: #ffffff;
    font-size: 16px;
    outline: none;
}

.withdraw-balance-input.username-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
    font-weight: 400;
    font-size: 14px;
}

.withdraw-fee-hint {
    color: #6b7daa;
    font-size: 12px;
    text-align: right;
    margin-top: -8px;
}

/* Экран бана */
#bannedScreen {
    position: fixed; top: 0; left: 50%; transform: translateX(-50%);
    width: 100%; max-width: 450px; height: 100vh; background: #08090d;
    display: flex; justify-content: center; align-items: center; z-index: 10000; padding: 30px;
}
.banned-content { text-align: center; max-width: 340px; }
.banned-title { color: #ffffff; font-size: 20px; font-weight: 700; margin-bottom: 20px; }
.banned-text { color: #a0b4e0; font-size: 14px; line-height: 1.7; margin-bottom: 20px; }
.banned-contact { color: #6b7daa; font-size: 13px; }
.banned-contact span { color: #ffd700; }

/* Промокод */
.promo-block {
    margin-top: 8px;
    background: radial-gradient(ellipse at right top, rgba(46, 234, 157, 0.3) 0%, #151419 47%, #151419 100%);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    width: 100%;
    position: relative;
}
.promo-block::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 12px;
    padding: 1px;
    background: linear-gradient(45deg, #232228, #232228, #232228, #232228, #2eea9d);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    z-index: -1;
}
.promo-title {
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 12px;
}
.promo-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 12px 14px;
    color: #d0daf0;
    font-size: 14px;
    outline: none;
    text-transform: uppercase;
    box-sizing: border-box;
    margin-bottom: 10px;
}
.promo-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 10px 14px;
    color: #d0daf0;
    font-size: 13px;
    outline: none;
    text-transform: uppercase;
    box-sizing: border-box;
}
.promo-input::placeholder {
    color: #5a6070;
    text-transform: none;
}
.promo-apply-btn {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 14px;
    border: none;
    cursor: pointer;
    background: #ffffff;
    color: #0a0f1a;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.2s;
}
.promo-apply-btn:active {
    transform: scale(0.98);
    opacity: 0.9;
}

/* Экран пароля */
.password-overlay {
    position: fixed; top: 0; left: 50%; transform: translateX(-50%);
    width: 100%; max-width: 450px; height: 100vh; background: #000;
    display: flex; justify-content: center; align-items: center; z-index: 10000;
}
.password-card { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 30px; width: 90%; max-width: 320px; }
.password-logo { width: 120px; height: auto; object-fit: contain; margin-bottom: 10px; }
.password-title { color: #fff; font-size: 16px; font-weight: 700; letter-spacing: 3px; text-transform: uppercase; text-align: center; }
.password-input {
    width: 100%; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px; padding: 14px 16px; color: #fff; font-size: 16px; text-align: center;
    outline: none; letter-spacing: 4px; transition: border-color 0.2s; box-sizing: border-box;
}
.password-input:focus { border-color: #FEB021; }
.password-input::placeholder { color: rgba(255,255,255,0.3); letter-spacing: 2px; }
.password-error { color: #e74c3c; font-size: 13px; font-weight: 600; text-align: center; }
.password-submit-btn {
    width: 100%; padding: 14px; border-radius: 12px; font-weight: 800; font-size: 15px;
    border: none; cursor: pointer; text-transform: uppercase; letter-spacing: 3px;
    background: linear-gradient(135deg, #f0883e, #f5c842, #ffd700); color: #000;
    border: 1px solid #f5c84260; box-shadow: 0 0 25px rgba(240,136,62,0.4);
    transition: all 0.25s; -webkit-tap-highlight-color: transparent;
}
.password-submit-btn:active { transform: scale(0.98); }

.topup-change-wallet-btn {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    background: #44A3DD !important;
    color: #ffffff !important;
    margin-bottom: 10px;
    transition: all 0.25s;
    text-transform: uppercase;
    letter-spacing: 2px;
    border: 1px solid #44A3DD60 !important;
    box-shadow: 0 0 25px rgba(68, 163, 221, 0.4), 0 0 50px rgba(68, 163, 221, 0.2);
    -webkit-tap-highlight-color: transparent;
}
.topup-change-wallet-btn:active {
    transform: scale(0.98);
    box-shadow: 0 0 40px rgba(68, 163, 221, 0.6);
}

/* Кнопка последних выигрышей */
.last-wins-btn {
    width: 36px; height: 36px; border-radius: 50%; border: none;
    background: rgba(255,255,255,0.06); display: flex; align-items: center; justify-content: center;
    cursor: pointer; flex-shrink: 0; transition: all 0.2s;
}
.last-wins-btn:active { background: rgba(255,255,255,0.1); }
.last-wins-icon { width: 20px; height: 20px; object-fit: contain; }

/* Модалка последних выигрышей */
.last-wins-overlay {
    position: fixed; top: 0; left: 50%; transform: translateX(-50%);
    width: 100%; max-width: 450px; height: 100vh;
    background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
    z-index: 150; display: none; justify-content: center; align-items: flex-end;
    opacity: 0; transition: opacity 0.3s ease;
}
.last-wins-overlay.show { display: flex; opacity: 1; }
.last-wins-sheet {
    width: 100%; max-width: 450px; max-height: 65vh;
    background: rgba(10, 12, 18, 0.95); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-radius: 20px 20px 0 0; border: 1px solid rgba(255, 255, 255, 0.06); border-bottom: none;
    display: flex; flex-direction: column; overflow: hidden;
    box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.5);
    transform: translateY(100%); transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1);
}
.last-wins-overlay.show .last-wins-sheet { transform: translateY(0); }
.last-wins-header { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px; flex-shrink: 0; }
.last-wins-title { color: #d0daf0; font-size: 16px; font-weight: 700; letter-spacing: 1px; }
.last-wins-close {
    width: 30px;
    height: 30px;
    border: none;
    background: transparent;
    color: #6b7daa;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s;
}
.last-wins-close:active {
    background: transparent;
    color: #fff;
}
.last-wins-list { flex: 1; overflow-y: auto; padding: 0 16px 16px 16px; display: flex; flex-direction: column; gap: 8px; }
.last-wins-list::-webkit-scrollbar { width: 3px; }
.last-wins-list::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.08); border-radius: 3px; }
.last-wins-placeholder { color: #5a6070; font-size: 13px; text-align: center; padding: 30px; }
.last-wins-item {
    display: flex; align-items: center; gap: 12px; padding: 12px 14px;
    background: rgba(255, 255, 255, 0.03); border-radius: 14px; border: 1px solid rgba(255, 255, 255, 0.04);
}
.last-wins-avatar { width: 42px; height: 42px; border-radius: 50%; overflow: hidden; flex-shrink: 0; background: rgba(255, 255, 255, 0.04); }
.last-wins-avatar img { width: 100%; height: 100%; object-fit: cover; }
.last-wins-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.last-wins-username { color: #ffffff; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.last-wins-time { color: #5a6070; font-size: 11px; font-weight: 500; }
.last-wins-detail {
    display: flex;
    flex-direction: column;
    align-items: center;  /* 🔥 меняем с flex-end на center */
    gap: 6px;
    flex-shrink: 0;
    justify-content: center;
}

.last-wins-game {
    color: #5a6380;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    background: rgba(255, 255, 255, 0.03);
    padding: 3px 8px;
    border-radius: 6px;
    text-align: center;
}

.last-wins-prize {
    color: #ffd700;
    font-size: 13px;
    font-weight: 700;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;  /* 🔥 меняем с flex-end на center */
    text-align: center;
}
.last-wins-prize-icon {
    width: 18px;   /* было 28px */
    height: 18px;  /* было 28px */
    object-fit: contain;
    filter: drop-shadow(0 0 4px rgba(255, 215, 0, 0.4));
}
.last-wins-star-inline { width: 14px; height: 14px; object-fit: contain; vertical-align: middle; filter: drop-shadow(0 0 3px rgba(255, 215, 0, 0.5)); }

/* ==================== ЭКРАН ЗАДАНИЙ ==================== */

#screenTasks {
    display: none;
    flex-direction: column;
    align-items: center;
    padding: 80px 16px 80px 16px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: #08090d;
}

#screenTasks.active { display: flex !important; }

.tasks-container {
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.tasks-tabs {
    display: flex;
    background: rgba(255,255,255,0.03);
    border-radius: 12px;
    padding: 4px;
    gap: 4px;
}

.tasks-tab {
    flex: 1;
    padding: 10px 0;
    border-radius: 10px;
    font-weight: 700;
    font-size: 13px;
    border: none;
    cursor: pointer;
    background: transparent;
    color: #6b7daa;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.tasks-tab.active {
    background: linear-gradient(135deg, #f0883e, #f5c842);
    color: #0a0f1a;
    box-shadow: 0 0 12px rgba(245,200,66,0.3);
}

.tasks-list {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tasks-placeholder {
    color: #5a6070;
    font-size: 13px;
    text-align: center;
    padding: 40px 20px;
}

.task-item {
    background: rgba(255,255,255,0.03);
    border-radius: 14px;
    padding: 16px;
    border: 1px solid rgba(255,255,255,0.05);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.task-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.task-name {
    color: #fff;
    font-size: 14px;
    font-weight: 700;
}

.task-reward {
    color: #ffd700;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.task-reward-icon {
    width: 14px;  /* было 14px */
    height: 14px; /* было 14px */
    object-fit: contain;
    filter: drop-shadow(0 0 3px rgba(255,215,0,0.5));
}

.task-desc {
    color: #6b7daa;
    font-size: 12px;
    line-height: 1.4;
}

.task-progress-container {
    margin: 4px 0;
}

.task-progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,0.06);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 4px;
}

.task-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #f0883e, #f5c842);
    border-radius: 3px;
    transition: width 0.5s ease;
}

.task-progress-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.task-progress-text {
    color: #6b7daa;
    font-size: 11px;
    font-weight: 600;
}

.task-process-btn {
    width: 100%;
    padding: 10px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 13px;
    border: none;
    cursor: default;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: #1e2530;
    color: #5a6070;
    opacity: 1;
    margin-top: 4px;
}

.task-claim-btn {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 13px;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: linear-gradient(135deg, #f0883e, #f5c842, #ffd700);
    color: #0a0f1a;
    box-shadow: 0 0 15px rgba(240,136,62,0.3);
    margin-top: 4px;
    transition: all 0.2s;
}

.task-claim-btn:active { transform: scale(0.97); }

.task-go-btn {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 13px;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: #44A3DD;
    color: #fff;
    margin-top: 4px;
    transition: all 0.2s;
}

.task-go-btn:active { opacity: 0.8; }

.task-check-btn {
    width: 100%;
    padding: 10px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 13px;
    border: 1px solid rgba(255,255,255,0.1);
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: rgba(255,255,255,0.04);
    color: #a0b4e0;
    margin-top: 6px;
    transition: all 0.2s;
}

.task-check-btn:active { background: rgba(255,255,255,0.08); }

/* Кнопка Мои подарки */
.balance-card-gifts-btn {
    padding: 10px 28px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 14px;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: #ffffff;
    color: #0a0f1a;
    transition: all 0.25s;
    margin-top: 8px;
}
.balance-card-gifts-btn:active { transform: scale(0.98); opacity: 0.9; }

/* ==================== МОДАЛКА "МОИ ПОДАРКИ" ==================== */

.my-gifts-overlay {
    position: fixed; top: 0; left: 50%; transform: translateX(-50%);
    width: 100%; max-width: 450px; height: 100vh;
    background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
    z-index: 150; display: none; justify-content: center; align-items: flex-end;
    opacity: 0; transition: opacity 0.3s ease;
}
.my-gifts-overlay.show { display: flex; opacity: 1; }
.my-gifts-sheet {
    width: 100%; max-width: 450px; max-height: 70vh;
    background: rgba(10, 12, 18, 0.95); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-radius: 20px 20px 0 0; border: 1px solid rgba(255, 255, 255, 0.06); border-bottom: none;
    display: flex; flex-direction: column; overflow: hidden;
    box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.5);
    transform: translateY(100%); transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1);
}
.my-gifts-overlay.show .my-gifts-sheet { transform: translateY(0); }
.my-gifts-header { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px; flex-shrink: 0; }
.my-gifts-title { color: #d0daf0; font-size: 16px; font-weight: 700; letter-spacing: 1px; }
.my-gifts-close {
    width: 30px; height: 30px; border: none; background: transparent;
    color: #6b7daa; font-size: 16px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    border-radius: 8px; transition: all 0.2s;
}
.my-gifts-close:active { background: transparent; color: #fff; }

/* Сетка 3 колонки */
.my-gifts-list { 
    flex: 1; overflow-y: auto; padding: 0 16px 16px 16px; 
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; 
}
.my-gifts-list::-webkit-scrollbar { width: 3px; }
.my-gifts-list::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.08); border-radius: 3px; }
.my-gifts-placeholder { color: #5a6070; font-size: 13px; text-align: center; padding: 30px; grid-column: 1 / -1; }

/* Карточка подарка в сетке */
.my-gift-item {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    padding: 10px 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    cursor: pointer;
    transition: all 0.2s;
    -webkit-tap-highlight-color: transparent;
}
.my-gift-item:active {
    background: rgba(255, 255, 255, 0.06);
}
.my-gift-item-icon {
    width: 48px;
    height: 48px;
    object-fit: contain;
    filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.25));
}
.my-gift-item-name {
    color: #d0daf0;
    font-size: 10px;
    text-align: center;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}
.my-gift-item-count {
    color: #6b7daa;
    font-size: 10px;
    font-weight: 600;
}


/* ==================== МОДАЛКА ДЕЙСТВИЙ С ПОДАРКОМ ==================== */

.gift-action-overlay {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 450px;
    height: 100vh;
    height: 100dvh;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 200;
    display: none;
    justify-content: center;
    align-items: flex-end;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gift-action-overlay.show {
    display: flex;
    opacity: 1;
}

.gift-action-card {
    width: 100%;
    max-width: 450px;
    background: rgba(10, 12, 18, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px 20px 0 0;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-bottom: none;
    padding: 24px 20px 32px 20px;
    text-align: center;
    box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.5);
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    will-change: transform;
}

.gift-action-overlay.show .gift-action-card {
    transform: translateY(0);
}

.gift-action-icon {
    width: 64px;
    height: 64px;
    object-fit: contain;
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.3));
}

.gift-action-name {
    color: #d0daf0;
    font-size: 16px;
    font-weight: 700;
}

.gift-action-price {
    color: #ffd700;
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.gift-action-buttons {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.gift-action-withdraw-btn {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 15px;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 2px;
    background: linear-gradient(135deg, #f0883e, #f5c842, #ffd700);
    color: #0a0f1a;
    border: 1px solid #f5c84260;
    box-shadow: 0 0 25px rgba(240, 136, 62, 0.4);
    transition: all 0.25s;
    -webkit-tap-highlight-color: transparent;
}

.gift-action-withdraw-btn:active {
    transform: scale(0.98);
    box-shadow: 0 0 40px rgba(255, 215, 0, 0.6);
}

.gift-action-sell-btn {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 15px;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 2px;
    background: linear-gradient(135deg, #c0392b, #e74c3c);
    color: #fff;
    border: 1px solid #e74c3c60;
    box-shadow: 0 0 25px rgba(231, 76, 60, 0.4);
    transition: all 0.25s;
    -webkit-tap-highlight-color: transparent;
}

.gift-action-sell-btn:active {
    transform: scale(0.98);
    box-shadow: 0 0 40px rgba(231, 76, 60, 0.6);
}

.profile-gifts-btn {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 15px;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 2px;
    background: linear-gradient(135deg, #f0883e, #f5c842, #ffd700);
    color: #0a0f1a;
    border: 1px solid #f5c84260;
    box-shadow: 0 0 25px rgba(240, 136, 62, 0.4), 0 0 50px rgba(255, 215, 0, 0.2);
    transition: all 0.25s;
    margin-top: 12px;
}
.profile-gifts-btn:active { transform: scale(0.98); box-shadow: 0 0 40px rgba(255, 215, 0, 0.6); }

.my-gift-item-price {
    color: #ffd700;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    text-shadow: 0 0 6px rgba(255, 215, 0, 0.3);
}

/* ==================== МОДАЛКА ДЕПОЗИТА ПОДАРКАМИ ==================== */

.gift-deposit-modal-overlay {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translate(-50%, 0);
    width: 100%;
    max-width: 450px;
    height: 100vh;
    background: rgba(8, 9, 13, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 230;
}

.gift-deposit-modal-overlay.show {
    display: flex;
}

.gift-deposit-modal-card {
    background: #0d111f;
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    max-width: 320px;
    width: 90%;
    border: 1px solid #1e2a45;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.gift-deposit-modal-title {
    color: #ffffff;
    font-size: 18px;
    font-weight: 700;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

.gift-deposit-modal-text {
    color: #a0b4e0;
    font-size: 13px;
    line-height: 1.7;
    text-align: left;
}

.gift-deposit-modal-buttons {
    display: flex;
    gap: 10px;
}

.gift-deposit-dont-show-btn {
    flex: 1;
    padding: 12px 10px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    background: rgba(255, 255, 255, 0.04);
    color: #a0b4e0;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 1px;
    -webkit-tap-highlight-color: transparent;
}

.gift-deposit-dont-show-btn:active {
    background: rgba(255, 255, 255, 0.08);
}

.gift-deposit-ok-btn {
    flex: 1;
    padding: 12px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 14px;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 2px;
    background: linear-gradient(135deg, #f0883e, #f5c842, #ffd700);
    color: #0a0f1a;
    border: 1px solid #f5c84260;
    box-shadow: 0 0 20px rgba(240, 136, 62, 0.3);
    transition: all 0.25s;
    -webkit-tap-highlight-color: transparent;
}

.gift-deposit-ok-btn:active {
    transform: scale(0.98);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.5);
}

/* ==================== КНОПКА "КАК ЭТО РАБОТАЕТ?" ==================== */

.topup-how-it-works-btn {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #a0b4e0;
    transition: all 0.2s;
    letter-spacing: 1px;
    margin-bottom: 10px;
    -webkit-tap-highlight-color: transparent;
}

.topup-how-it-works-btn:active {
    background: rgba(255, 255, 255, 0.08);
}

/* ==================== МОДАЛКА "КАК РАБОТАЕТ ДЕПОЗИТ ПОДАРКАМИ" ==================== */

.gift-how-modal-overlay {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 450px;
    height: 100vh;
    height: 100dvh;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 250;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.gift-how-modal-overlay.show {
    opacity: 1;
    pointer-events: all;
}

.gift-how-modal-card {
    width: 100%;
    max-width: 450px;
    background: rgba(10, 12, 18, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px 20px 0 0;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-bottom: none;
    padding: 24px 20px 32px 20px;
    text-align: center;
    box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.5);
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1);
}
.gift-how-modal-overlay.show .gift-how-modal-card {
    transform: translateY(0);
}

.gift-how-modal-title {
    color: #ffffff;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

.gift-how-modal-text {
    color: #a0b4e0;
    font-size: 13px;
    line-height: 1.7;
    text-align: left;
    margin-bottom: 20px;
}

.gift-how-modal-close-btn {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 14px;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: linear-gradient(135deg, #f0883e, #f5c842, #ffd700);
    color: #0a0f1a;
    border: 1px solid #f5c84260;
    box-shadow: 0 0 20px rgba(240, 136, 62, 0.3);
    transition: all 0.25s;
    -webkit-tap-highlight-color: transparent;
}

.gift-how-modal-close-btn:active {
    transform: scale(0.98);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.5);
}

/* ==================== КНОПКИ КОНВЕРТАЦИИ В МОДАЛКЕ ПОПОЛНЕНИЯ ==================== */

.topup-convert-btn {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 15px;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 2px;
    background: linear-gradient(135deg, #f0883e, #f5c842, #ffd700) !important;
    color: #0a0f1a !important;
    margin-bottom: 10px;
    transition: all 0.25s;
    box-shadow: 0 0 25px rgba(240, 136, 62, 0.4), 0 0 50px rgba(255, 215, 0, 0.2);
    -webkit-tap-highlight-color: transparent;
}


.topup-convert-btn:active {
    transform: scale(0.98);
    box-shadow: 0 0 40px rgba(255, 215, 0, 0.6);
}

.convert-btn-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

/* ==================== МОДАЛКА КОНВЕРТАЦИИ ==================== */

.convert-overlay {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 450px;
    height: 100vh;
    height: 100dvh;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 215;
    display: none;
    justify-content: center;
    align-items: flex-end;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.convert-overlay.show {
    display: flex;
    opacity: 1;
}

.convert-card {
    width: 100%;
    max-width: 450px;
    background: rgba(10, 12, 18, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px 20px 0 0;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-bottom: none;
    padding: 28px 24px 36px 24px;
    text-align: center;
    box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.5);
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1);
    display: flex;
    flex-direction: column;
    gap: 20px;
    will-change: transform;
}

.convert-overlay.show .convert-card {
    transform: translateY(0);
}

.convert-title {
    color: #ffffff;
    font-size: 18px;
    font-weight: 700;
}

/* Табы */
.convert-tabs {
    display: flex;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 10px;
    padding: 3px;
    gap: 0;
}

.convert-tab {
    flex: 1;
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 13px;
    border: none;
    cursor: pointer;
    background: transparent;
    color: #6b7daa;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    -webkit-tap-highlight-color: transparent;
}

.convert-tab.active {
    background: linear-gradient(135deg, #f0883e, #f5c842);
    color: #0a0f1a;
    box-shadow: 0 0 12px rgba(245, 200, 66, 0.3);
}

/* Поле ввода */
.convert-amount-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 8px 0;
}

.convert-amount-input {
    width: 140px;
    background: transparent;
    border: none;
    padding: 8px 4px;
    color: #ffffff;
    font-size: 40px;
    font-weight: 700;
    text-align: center;
    outline: none;
}

.convert-amount-input::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

.convert-currency-icon {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

/* Подсказки */
.convert-rate-hint {
    color: #6b7daa;
    font-size: 12px;
}

.convert-result-hint {
    color: #ffd700;
    font-size: 16px;
    font-weight: 700;
}

/* Кнопка */
.convert-next-btn {
    width: 100%;
    padding: 16px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 15px;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 2px;
    background: linear-gradient(135deg, #f0883e, #f5c842, #ffd700);
    color: #0a0f1a;
    border: 1px solid #f5c84260;
    box-shadow: 0 0 25px rgba(240, 136, 62, 0.4);
    transition: all 0.25s;
    -webkit-tap-highlight-color: transparent;
}

.convert-next-btn:active {
    transform: scale(0.98);
}

/* ==================== ТАБЫ ПОПОЛНЕНИЯ ==================== */

.topup-tabs {
    display: flex;
    background: rgba(120, 120, 128, 0.16);
    border-radius: 10px;
    padding: 2px;
    gap: 0;
    margin-bottom: 24px;
    width: 100%;
}

.topup-tab {
    flex: 1;
    min-height: 36px;
    padding: 10px 4px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 12px;
    border: none;
    cursor: pointer;
    background: transparent;
    color: #6b7daa;
    text-transform: uppercase;
    letter-spacing: 1px;
    -webkit-tap-highlight-color: transparent;
    text-align: center;
    position: relative;
    z-index: 1;
}

.topup-tab.active {
    background: linear-gradient(135deg, #f0883e, #f5c842);
    color: #0a0f1a;
    box-shadow: 0 0 12px rgba(245, 200, 66, 0.3);
}


/* ==================== MYSTERY НАГРАДА В ЗАДАНИЯХ ==================== */

.task-reward-mystery-wrapper {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    flex-shrink: 0 !important;
    color: #ffd700 !important;
    font-size: 13px !important;
    font-weight: 700 !important;
}

.task-reward-mystery-icon {
    width: 22px !important;
    height: 22px !important;
    object-fit: contain !important;
    filter: drop-shadow(0 0 4px rgba(255, 215, 0, 0.5)) !important;
    flex-shrink: 0 !important;
}

.task-reward-mystery-label {
    color: #ffd700 !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    white-space: nowrap !important;
}

/* ==================== МОДАЛКА MYSTERY ==================== */

.mystery-modal-overlay {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 450px;
    height: 100vh;
    height: 100dvh;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 230;
    display: none;
    justify-content: center;
    align-items: flex-end;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mystery-modal-overlay.show {
    display: flex;
    opacity: 1;
}

.mystery-modal-card {
    width: 100%;
    max-width: 450px;
    background: rgba(10, 12, 18, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px 20px 0 0;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-bottom: none;
    padding: 28px 24px 36px 24px;
    text-align: center;
    box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.5);
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    will-change: transform;
}

.mystery-modal-overlay.show .mystery-modal-card {
    transform: translateY(0);
}

.mystery-modal-icon {
    width: 80px;
    height: 80px;
    object-fit: contain;
    animation: mystery-float 1.5s ease-in-out infinite;
}

@keyframes mystery-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.mystery-modal-btn {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 15px;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 2px;
    background: linear-gradient(135deg, #f0883e, #f5c842, #ffd700);
    color: #0a0f1a;
    border: 1px solid #f5c84260;
    box-shadow: 0 0 25px rgba(240, 136, 62, 0.4);
    transition: all 0.25s;
    margin-top: 20px;
    -webkit-tap-highlight-color: transparent;
}

.mystery-modal-btn:active {
    transform: scale(0.98);
}


.shop-currency-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    transition: background 0.2s;
    flex-shrink: 0;
    margin-left: 4px;
}
.shop-currency-btn:active {
    background: rgba(255, 255, 255, 0.06);
}
.shop-currency-icon {
    width: 16px;
    height: 16px;
    object-fit: contain;
    transition: transform 0.3s ease;
}
.shop-currency-icon.flipping {
    transform: rotate(180deg);
}
.shop-item-price .star-icon-small,
.shop-item-price .ton-icon-small {
    width: 14px;
    height: 14px;
    object-fit: contain;
}
.shop-item-price .star-icon-small {
    width: 28px !important;  /* в 2 раза больше */
    height: 28px !important;
}

/* Убираем фон при фокусе для всех полей ввода в модалках */
.topup-amount-input:focus,
.convert-amount-input:focus,
.withdraw-amount-input:focus,
.withdraw-balance-input:focus,
.autospin-modal-input:focus,
.giveaway-buy-input:focus {
    background: transparent !important;
    box-shadow: none !important;
}

/* Убираем фон по умолчанию */
.topup-amount-input,
.convert-amount-input,
.withdraw-amount-input,
.withdraw-balance-input {
    background: transparent !important;
}