#app {
    width: 100%;
    max-width: 450px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    background: #08090d;
    box-shadow: 0 0 60px rgba(100, 100, 255, 0.1), 0 0 120px rgba(100, 100, 255, 0.03);
    overflow: hidden;
    transition: filter 0.4s ease;
}

/* Прелоадер */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #08090d;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.3s ease;
}
#preloader.hide { opacity: 0; pointer-events: none; }
.preloader-content { 
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}
.preloader-logo {
    width: 200px;  /* было 180px, увеличили на ~40% */
    height: auto;
    object-fit: contain;
    animation: pulse-logo 2s ease-in-out infinite;
}
@keyframes pulse-logo {
    0%, 100% { opacity: 0.7; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.08); }
}

.preloader-loader {
    width: 50px;
    aspect-ratio: 1;
    border-radius: 50%;
    border: 8px solid #0000;
    border-right-color: #ffa50097;
    position: relative;
    animation: preloader-spin 1s infinite linear;
}
.preloader-loader:before,
.preloader-loader:after {
    content: "";
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: inherit;
    animation: inherit;
    animation-duration: 2s;
}
.preloader-loader:after {
    animation-duration: 4s;
}
@keyframes preloader-spin {
    100% {transform: rotate(1turn)}
}

.preloader-text {
    color: #ffd700; 
    font-size: 18px; 
    font-weight: 800; 
    letter-spacing: 2px;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
}

/* Экраны */
.screen {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow-y: auto;
    display: none;
    flex-direction: column;
}
.screen.active { display: flex; }

/* Главный экран */
.screen-main { padding-bottom: 0; padding-top: 80px; }

/* Floating Header */
.floating-header {
    position: absolute;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 24px);
    max-width: 426px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 8px 16px;
    z-index: 50;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.floating-header .user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    cursor: pointer;
}

.floating-header .avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.header-right-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Кнопка TON Connect */
.ton-connect-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #44A3DD;
    border: none;
    border-radius: 30px;
    padding: 6px 14px;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.ton-connect-btn:active {
    transform: scale(0.96);
    opacity: 0.9;
}

.ton-connect-icon {
    width: 16px;
    height: 16px;
    object-fit: contain;
}

.ton-connect-text {
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
}

.floating-header .balance-container {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.06);
    padding: 6px 14px;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}
.floating-header .balance-container:active { background: rgba(255, 255, 255, 0.1); }

.floating-header .balance {
    color: #ffffff;
    font-weight: bold;
    font-size: 18px;
}

/* Кнопка TON баланс (после подключения) */
.ton-balance-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.04);
    border: none;
    border-radius: 30px;
    padding: 6px 14px;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.3);
}
.ton-balance-btn:active {
    background: rgba(255, 255, 255, 0.06);
}
.ton-balance {
    color: #ffffff;
    font-weight: bold;
    font-size: 18px;
}

/* Карточки подарков */
.gift-selection-row {
    display: flex; gap: 12px; width: 100%; align-items: stretch;
    padding: 0 12px; margin-top: 10px; flex: 1; min-height: 0;
}
.gift-card-wrapper { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; }
.gift-card {
    width: 100%; flex: 1; background: rgba(255, 255, 255, 0.03);
    border: none; border-radius: 14px; padding: 8px;
    display: flex; align-items: center; justify-content: center;
    min-width: 0; cursor: pointer; transition: all 0.25s;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.4);
    min-height: 100px; position: relative; overflow: hidden;
}
.gift-card.current-gift { box-shadow: 0 0 20px rgba(63, 185, 80, 0.15); }
.gift-card.target-gift {
    background: radial-gradient(ellipse at center, rgba(240, 136, 62, 0.15) 0%, rgba(240, 136, 62, 0.03) 60%, rgba(255, 255, 255, 0.03) 100%);
    box-shadow: 0 0 20px rgba(240, 136, 62, 0.2);
}
.gift-card.empty-card { background: rgba(255, 255, 255, 0.03); box-shadow: 0 0 10px rgba(0, 0, 0, 0.3); }
.gift-icon {
    width: 100%; height: 100%; max-height: 78px;
    object-fit: contain;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.3));
}

.multi-gift-grid {
    display: flex; flex-wrap: wrap; gap: 1px; justify-content: center;
    align-items: center; width: 100%; height: 100%; padding: 1px;
}
.multi-gift-item { position: relative; display: flex; align-items: center; justify-content: center; }
.multi-gift-item .gift-icon { max-height: 55px; }
.multi-gift-item:only-child .gift-icon { max-height: 78px !important; }
.star-stake-icon {
    filter: drop-shadow(0 0 12px rgba(255, 215, 0, 0.5)) drop-shadow(0 0 24px rgba(255, 180, 0, 0.3));
}

.target-chance-inside {
    display: flex; flex-direction: column; align-items: center;
    justify-content: flex-end; position: absolute; bottom: 15px; left: 50%;
    transform: translateX(-50%); opacity: 0.6; pointer-events: none;
}
.chance-percent-inside {
    font-size: 14px; font-weight: 800; color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.4), 0 0 20px rgba(255, 215, 0, 0.15);
}
.chance-label-inside {
    font-size: 6px; color: #6b7daa; letter-spacing: 2px;
    text-shadow: 0 0 6px rgba(100, 140, 255, 0.2);
}

.gift-info-outside {
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    text-align: center; min-height: 32px; padding: 4px 0;
}
.gift-name-outside {
    color: #d0daf0; font-size: 12px; font-weight: 600; text-align: center;
    text-shadow: 0 0 8px rgba(200, 210, 255, 0.2);
    max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.gift-price-outside {
    color: #ffd700; font-size: 13px; font-weight: bold;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.3);
    display: flex; align-items: center; justify-content: center; gap: 4px;
}

/* Стрелки */
.placeholder-arrows {
    display: flex; flex-direction: column; gap: 3px; align-items: center;
    justify-content: center; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
}
.placeholder-arrow {
    color: #ffd700; font-weight: bold; opacity: 0.8;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5); line-height: 0.8; display: inline-block;
}
.placeholder-arrow:nth-child(1),
.placeholder-arrow:nth-child(3) { font-size: 18px; }
.placeholder-arrow:nth-child(2) { font-size: 26px; }

.left-arrows .placeholder-arrow {
    transform: scaleX(2.2) rotate(-90deg);
    animation: arrow-fade 2.5s ease-in-out infinite;
}
.right-arrows .placeholder-arrow {
    transform: scaleX(2.2) rotate(90deg);
    animation: arrow-fade 2.5s ease-in-out infinite;
}
.left-arrows .placeholder-arrow:nth-child(1),
.right-arrows .placeholder-arrow:nth-child(1) { animation-delay: 0s; }
.left-arrows .placeholder-arrow:nth-child(2),
.right-arrows .placeholder-arrow:nth-child(2) { animation-delay: 0.3s; }
.left-arrows .placeholder-arrow:nth-child(3),
.right-arrows .placeholder-arrow:nth-child(3) { animation-delay: 0.6s; }

@keyframes arrow-fade {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 0.65; }
}

/* Кнопка Прокачать */
.upgrade-btn {
    width: calc(100% - 24px); padding: 12px; 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; transition: all 0.25s;
    box-shadow: 0 0 25px rgba(240, 136, 62, 0.4), 0 0 50px rgba(255, 215, 0, 0.2);
    display: flex; align-items: center; justify-content: center;
    margin: 6px auto 4px auto; box-sizing: border-box; flex-shrink: 0;
}
.upgrade-btn:active {
    background: linear-gradient(135deg, #f5c842, #ffd700, #f0883e);
    transform: scale(0.98); box-shadow: 0 0 40px rgba(255, 215, 0, 0.6);
}
.upgrade-btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; box-shadow: 0 0 15px rgba(240, 136, 62, 0.1); }
.upgrade-btn.spinning {
    background: linear-gradient(135deg, #5a2a10, #c0501e); border-color: #f0883e;
    color: white; animation: neon-pulse 0.6s ease-in-out infinite;
    text-shadow: 0 0 8px rgba(255, 200, 100, 0.5);
}
@keyframes neon-pulse {
    0%, 100% { box-shadow: 0 0 30px rgba(240, 136, 62, 0.4), 0 0 60px rgba(240, 136, 62, 0.15); }
    50% { box-shadow: 0 0 50px rgba(240, 136, 62, 0.7), 0 0 90px rgba(240, 136, 62, 0.3); }
}

/* Слайдер */
.stake-slider-row {
    width: calc(100% - 24px); margin: 0 auto 2px auto;
    padding: 6px 12px 2px 12px; box-sizing: border-box; flex-shrink: 0; position: relative;
}
.stake-slider-label {
    font-size: 8px; font-weight: 600; color: #f0883e;
    text-shadow: 0 0 6px rgba(240, 136, 62, 0.4);
    letter-spacing: 1px; text-transform: uppercase; position: absolute; top: 0;
}
.stake-slider-label-left { left: 12px; }
.stake-slider-label-right { right: 12px; text-align: right; }
.stake-slider-container { margin-top: 2px; padding: 0; }
.stake-slider {
    -webkit-appearance: none; appearance: none;
    width: 100%; height: 6px; border-radius: 3px;
    background: rgba(255, 255, 255, 0.08); outline: none;
}
.stake-slider::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none;
    width: 22px; height: 22px; border-radius: 50%;
    background: linear-gradient(135deg, #f0883e, #f5c842, #ffd700);
    cursor: pointer; border: 2px solid #ffd700;
    box-shadow: 0 0 16px rgba(255, 215, 0, 0.5), 0 0 32px rgba(240, 136, 62, 0.3);
    transition: all 0.15s;
}
.stake-slider::-webkit-slider-thumb:active {
    box-shadow: 0 0 24px rgba(255, 215, 0, 0.7), 0 0 40px rgba(240, 136, 62, 0.5);
    transform: scale(1.1);
}

/* Быстрые кнопки */
.quick-bet-row {
    display: flex; align-items: center; gap: 6px;
    padding: 0 12px; margin-bottom: 6px; width: 100%; box-sizing: border-box; flex-shrink: 0;
}
.quick-bet-buttons { display: flex; gap: 5px; flex: 1; min-width: 0; }
.quick-bet-btn {
    background: #111827; border: 1px solid #2a3a5c; color: #a0b4e0;
    padding: 6px 0; border-radius: 8px; font-weight: 600; cursor: pointer; font-size: 10px;
    transition: all 0.2s; box-shadow: 0 0 8px rgba(0, 0, 0, 0.4);
    text-shadow: 0 0 6px rgba(160, 180, 224, 0.3); flex: 1; text-align: center; min-width: 0;
}
.quick-bet-btn:active { background: #1a2540; box-shadow: 0 0 18px rgba(100, 140, 255, 0.3); }
.quick-bet-btn.active {
    border-color: #ffd700; color: #ffd700; background: #1a2540;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3); text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}
.quick-bet-btn:disabled { opacity: 0.4; cursor: not-allowed; box-shadow: none; }

/* Список подарков */
.lists-row {
    width: 100%; flex: 1; min-height: 140px; overflow: hidden;
    padding: 0 12px 10px 12px; box-sizing: border-box;
}
.gift-list-panel {
    width: 100%; height: 100%; 
    background: #0d111f; border: 1px solid #1e2a45;
    border-radius: 10px; overflow: hidden; display: flex; flex-direction: column;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.4);
}
.tab-header {
    display: flex; background: #08090d; border-radius: 20px;
    margin: 6px; padding: 2px; flex-shrink: 0;
}
.tab-btn {
    flex: 1; text-align: center; padding: 8px 0;
    font-size: 10px; letter-spacing: 2px; text-transform: uppercase;
    cursor: pointer; color: #6b7daa; border-radius: 18px;
    font-weight: 600; transition: all 0.15s;
}
.tab-btn.active {
    background: #ffd700; color: #0a0f1a; font-weight: 800;
    box-shadow: 0 0 16px rgba(255, 215, 0, 0.3);
}
.gift-list-search-row {
    display: flex; align-items: center;
    padding: 6px 8px; background: #0d111f; flex-shrink: 0;
}
.gift-list-search-input-wrapper { flex: 1; }
.gift-list-search-input {
    width: 100%; background: #0d111f;
    border: none; border-radius: 8px;
    padding: 7px 10px; color: #d0daf0;
    font-size: 12px; outline: none;
}
.gift-list-search-input::placeholder { color: #5a6070; }
#giftListContent { flex: 1; overflow-y: auto; padding-bottom: 4px; }
#giftListContent::-webkit-scrollbar { width: 3px; }
#giftListContent::-webkit-scrollbar-thumb { background: #1e2a45; border-radius: 3px; }
.gift-list-item {
    display: flex; align-items: center; gap: 12px; padding: 14px 12px;
    cursor: pointer; transition: all 0.2s; border-bottom: 1px solid #0a0f1a;
}
.gift-list-item:hover,
.gift-list-item:active { background: #111827; }
.gift-list-item.selected-for-upgrade {
    background: #111827; border-left: 4px solid #f0883e;
}
.gift-icon-small { width: 42px; height: 42px; object-fit: contain; filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.2)); }
.gift-list-item-info { flex: 1; min-width: 0; }
.gift-list-item-name { color: #d0daf0; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gift-list-item-price { color: #ffd700; font-size: 12px; margin-top: 2px; text-shadow: 0 0 6px rgba(255, 215, 0, 0.3); }

.sell-icon-btn, .withdraw-icon-btn {
    background: transparent; border: none;
    width: 22px; height: 22px; cursor: pointer; flex-shrink: 0; padding: 0;
}
.sell-icon-btn img, .withdraw-icon-btn img {
    width: 100%; height: 100%; object-fit: contain;
    filter: drop-shadow(0 0 6px rgba(240, 136, 62, 0.5)) drop-shadow(0 0 10px rgba(255, 215, 0, 0.3));
}
.sell-icon-btn:active, .withdraw-icon-btn:active { transform: scale(0.9); }
.withdraw-icon-btn { margin-right: 4px; }

#app.blurred .floating-header,
#app.blurred .screen-main,
#app.blurred .floating-bar {
    filter: blur(6px);
    transition: filter 0.4s ease;
    pointer-events: none;
}

/* Floating Bar */
.floating-bar {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 6px 8px;
    z-index: 100;
    gap: 0;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        inset 0 -1px 0 rgba(255, 255, 255, 0.05);
    overflow: hidden;
    width: calc(100% - 16px);
    max-width: 418px;
    box-sizing: border-box;
}
.floating-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
}

.floating-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 1px;
    height: 100%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.3), transparent, rgba(255, 255, 255, 0.1));
}
.floating-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 20px;
    transition: all 0.2s;
    min-width: 52px;
    flex: 1;
}
.floating-btn:active { background: transparent; }
.floating-btn.active { background: transparent; }
.floating-icon-img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    transition: all 0.2s;
}
.floating-label {
    font-size: 8px;
    color: #A3A3A3;
    font-weight: 600;
    transition: all 0.2s;
    letter-spacing: 0.5px;
    white-space: nowrap;
}
.floating-btn.active .floating-label { 
    color: #FDBC2A; 
}

/* Экран магазина */
.screen-shop { flex-direction: column; padding-bottom: 0; padding-top: 80px; }
.shop-search-row {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 12px; background: #08090d; flex-shrink: 0;
}
.shop-search-input-wrapper { flex: 1; }
.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;
}
.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;
}
.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;
}
.shop-item:active { background: transparent; }
.shop-item-icon {
    width: 44px;
    height: 44px;
    object-fit: contain;
    filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.25));
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
}
.shop-item-icon.loading {
    animation: icon-pulse 1.5s ease-in-out infinite;
}
@keyframes icon-pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}
.shop-item-name { color: #d0daf0; font-size: 11px; text-align: center; line-height: 1.2; }
.shop-item-price { color: #ffd700; font-weight: bold; font-size: 12px; text-shadow: 0 0 8px rgba(255, 215, 0, 0.3); }

/* Экран профиля */
.screen-profile { align-items: center; padding: 30px 16px 80px 16px; gap: 16px; }

/* Экран настроек */
.screen-settings { 
    padding: 0; 
    padding-top: 60px;       /* было 80px */
    padding-bottom: 120px;   /* было 100px, увеличено */
}
.settings-card {
    background: #08090d;
    padding: 30px 20px 120px 20px; /* увеличил с 100px до 120px */
    width: 100%;
    min-height: 100%;
    border: none;
    margin-bottom: 140px; /* ← добавь эту строку */
}
.settings-section { margin-bottom: 24px; }
.settings-section h4 {
    color: #a0b4e0; font-size: 14px; text-transform: uppercase; letter-spacing: 2px;
    margin-bottom: 12px; text-align: center;
    text-shadow: 0 0 5px rgba(160, 180, 224, 0.2);
}
.settings-row { display: flex; gap: 10px; margin-bottom: 8px; }
.settings-row input[type="number"] {
    flex: 1; background: rgba(255, 255, 255, 0.04); border: none;
    border-radius: 10px; padding: 14px; color: #d0daf0; font-size: 18px;
    text-align: center; outline: none; transition: all 0.2s;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}
.settings-row input[type="number"]:focus {
    background: rgba(255, 255, 255, 0.06); box-shadow: 0 0 20px rgba(240, 136, 62, 0.2);
}
.settings-save-btn {
    width: 100%; padding: 16px; border-radius: 12px; font-weight: 700; font-size: 16px;
    border: none; cursor: pointer; text-transform: uppercase; letter-spacing: 2px;
    background: linear-gradient(135deg, #f0883e, #f5c842, #ffd700); color: #0a0f1a;
    border: 1px solid #f5c84260; transition: all 0.25s;
    box-shadow: 0 0 25px rgba(240, 136, 62, 0.4); margin-top: 16px;
}
.settings-save-btn:active { transform: scale(0.98); box-shadow: 0 0 40px rgba(255, 215, 0, 0.6); }

/* Экран лидерборда */
.screen-leaderboard { padding: 80px 0 30px 0; }
.leaderboard-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 16px;
    gap: 20px;
}
.leaderboard-header {
    text-align: center;
    width: 100%;
}

.leaderboard-title {
    color: #ffffff;
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 6px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

.leaderboard-subtitle {
    color: #a0b4e0;
    font-size: 13px;
    line-height: 1.5;
    max-width: 280px;
    margin: 0 auto;
}

/* Пьедестал */
.podium {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 40px 0 40px 0;
    position: relative;
}
.podium-place {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    position: relative;
}

/* Аватарка с левитацией — без обводки */
.podium-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    overflow: hidden;
    border: none;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    animation: podium-float 3s ease-in-out infinite;
    flex-shrink: 0;
    z-index: 2;
}

.podium-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Разная задержка для каждой аватарки */
.podium-1 .podium-avatar { animation-delay: 0s; }
.podium-2 .podium-avatar { animation-delay: 0.5s; }
.podium-3 .podium-avatar { animation-delay: 1s; }

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

.podium-name {
    color: #d0daf0;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    max-width: 90px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    z-index: 2;
}

/* 3D Колонны */
.podium-column {
    width: 100px;
    border-radius: 12px 12px 0 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 30px;
    position: relative;
    transform-style: preserve-3d;
    perspective: 300px;
}
.podium-column::before {
    content: '';
    position: absolute;
    top: 0;
    right: -14px;
    width: 14px;
    height: 100%;
    border-radius: 0 12px 0 0;
    transform: skewY(2deg);
    transform-origin: left;
}
.podium-column::after {
    content: '';
    position: absolute;
    bottom: -50px;
    left: 50%;
    transform: translateX(-50%);
    width: 130%;
    height: 50px;
    background: inherit;
    opacity: 0.15;
    filter: blur(16px);
    border-radius: 50%;
}

/* Золото */
.podium-column.gold {
    height: 190px;
    background: linear-gradient(180deg, #ffd700 0%, #f5c842 30%, #f0883e 70%, #c8751e 100%);
    box-shadow: 
        8px 0 0 #c8a200,
        16px 0 0 rgba(200, 162, 0, 0.3),
        inset 10px 0 15px rgba(255, 255, 255, 0.2),
        inset -6px 0 10px rgba(0, 0, 0, 0.2),
        0 -4px 20px rgba(255, 215, 0, 0.3);
}
.podium-column.gold::before {
    background: linear-gradient(180deg, #c8a200 0%, #b89600 50%, #a08000 100%);
}

/* Серебро */
.podium-column.silver {
    height: 150px;
    background: linear-gradient(180deg, #e0e0e0 0%, #c0c0c0 30%, #a0a0a0 70%, #808080 100%);
    box-shadow: 
        8px 0 0 #909090,
        16px 0 0 rgba(144, 144, 144, 0.3),
        inset 10px 0 15px rgba(255, 255, 255, 0.2),
        inset -6px 0 10px rgba(0, 0, 0, 0.2),
        0 -4px 20px rgba(192, 192, 192, 0.3);
}
.podium-column.silver::before {
    background: linear-gradient(180deg, #909090 0%, #808080 50%, #707070 100%);
}

/* Бронза */
.podium-column.bronze {
    height: 120px;
    background: linear-gradient(180deg, #e8a860 0%, #cd7f32 30%, #b87333 70%, #8b5a2b 100%);
    box-shadow: 
        8px 0 0 #9a5a20,
        16px 0 0 rgba(154, 90, 32, 0.3),
        inset 10px 0 15px rgba(255, 255, 255, 0.15),
        inset -6px 0 10px rgba(0, 0, 0, 0.2),
        0 -4px 20px rgba(205, 127, 50, 0.3);
}
.podium-column.bronze::before {
    background: linear-gradient(180deg, #9a5a20 0%, #8a4a18 50%, #7a3a10 100%);
}

/* Номер на колонне */
.podium-number {
    font-size: 44px;
    font-weight: 800;
    color: rgba(0, 0, 0, 0.25);
    text-shadow: 0 2px 4px rgba(255, 255, 255, 0.2);
    position: relative;
    z-index: 1;
}

/* Список лидерборда */
.leaderboard-list {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.leaderboard-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
}
.leaderboard-row.gold-bg { background: rgba(255, 215, 0, 0.08); }
.leaderboard-row.silver-bg { background: rgba(192, 192, 192, 0.08); }
.leaderboard-row.bronze-bg { background: rgba(205, 127, 50, 0.08); }
.leaderboard-rank {
    color: #6b7daa;
    font-size: 16px;
    font-weight: 700;
    width: 34px;
    text-align: center;
    flex-shrink: 0;
}
.leaderboard-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}
.leaderboard-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.leaderboard-name {
    flex: 1;
    color: #d0daf0;
    font-size: 16px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.leaderboard-balance {
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 5px;
}
.leaderboard-star-icon {
    width: 16px;
    height: 16px;
    object-fit: contain;
}

/* Место текущего игрока */
.leaderboard-me {
    width: 80%;
    margin-top: 10px;
}
.leaderboard-me .leaderboard-row {
    border: 1px solid rgba(245, 200, 66, 0.3);
    background: rgba(245, 200, 66, 0.06);
}

/* Спиннер лидерборда */
.leaderboard-spinner {
    width: 40px;
    height: 40px;
    margin: 60px auto 0;
    border: 3px solid #1e2a45;
    border-top-color: #f5c842;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
/* Экран заданий */
.screen-tasks {
    padding-top: 80px;
    padding-bottom: 100px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: #08090d;
    display: none;
    flex-direction: column;
    align-items: center;
}

.screen-tasks.active {
    display: flex !important;
}

/* Заголовок заданий */
.tasks-title {
    color: #ffffff;
    font-size: 18px;
    font-weight: 800;
    text-align: center;
    letter-spacing: 1px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

.tasks-container {
    width: calc(100% - 24px);
    max-width: 426px;
    margin: 0 auto;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.tasks-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
    overflow-y: auto;
    position: relative;
    width: 100%;
}

.tasks-placeholder {
    color: #5a6070;
    font-size: 14px;
    text-align: center;
    padding: 0;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
}

/* ==================== КАРТОЧКА ЗАДАНИЯ ==================== */

.task-item {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 14px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    transform: translateY(20px);
    animation: taskFadeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.task-item:nth-child(1) { animation-delay: 0.05s; }
.task-item:nth-child(2) { animation-delay: 0.10s; }
.task-item:nth-child(3) { animation-delay: 0.15s; }
.task-item:nth-child(4) { animation-delay: 0.20s; }
.task-item:nth-child(5) { animation-delay: 0.25s; }
.task-item:nth-child(6) { animation-delay: 0.30s; }
.task-item:nth-child(7) { animation-delay: 0.35s; }
.task-item:nth-child(8) { animation-delay: 0.40s; }
.task-item:nth-child(9) { animation-delay: 0.45s; }
.task-item:nth-child(10) { animation-delay: 0.50s; }
.task-item:nth-child(11) { animation-delay: 0.55s; }
.task-item:nth-child(12) { animation-delay: 0.60s; }
.task-item:nth-child(13) { animation-delay: 0.65s; }
.task-item:nth-child(14) { animation-delay: 0.70s; }
.task-item:nth-child(15) { animation-delay: 0.75s; }

@keyframes taskFadeIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Убираем старую анимацию если есть */
@keyframes fadeInUp {
    0% {
        transform: translateY(40px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

.task-top-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
}

.task-name {
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    flex: 1;
    min-width: 0;
}

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

.task-reward-icon {
    width: 16px;
    height: 16px;
    object-fit: contain;
    filter: drop-shadow(0 0 3px rgba(255,215,0,0.4));
}

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

/* ==================== ПРОГРЕСС ==================== */

.task-progress-container {
    margin: 4px 0 2px 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-timer {
    color: #f0883e;
    font-size: 11px;
    font-weight: 600;
}

/* ==================== КНОПКИ ==================== */

.task-process-btn {
    width: 100%;
    padding: 10px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 13px;
    cursor: not-allowed;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.1);
    color: #5a6070;
    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;
    -webkit-tap-highlight-color: transparent;
}

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

.task-go-btn {
    width: 100%;
    padding: 10px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 13px;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: linear-gradient(135deg, #f5c842, #ffd700);
    color: #0a0f1a;
    margin-top: 6px;
    transition: all 0.2s;
    box-shadow: 0 0 15px rgba(245,200,66,0.4);
    -webkit-tap-highlight-color: transparent;
}

.task-go-btn:active {
    transform: scale(0.97);
}
.task-timer {
    color: #f0883e;
    font-size: 11px;
    font-weight: 600;
    text-shadow: 0 0 6px rgba(240, 136, 62, 0.3);
}

/* Анимация появления элементов профиля */
@keyframes fadeInUp {
    0% {
        transform: translateY(40px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

.profile-content > * {
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}

.profile-content > *:nth-child(1) { animation-delay: 0.05s; }  /* Аватар */
.profile-content > *:nth-child(2) { animation-delay: 0.1s; }   /* Имя */
.profile-content > *:nth-child(3) { animation-delay: 0.15s; }  /* Username */
.profile-content > *:nth-child(4) { animation-delay: 0.2s; }   /* Ранг */
.profile-content > *:nth-child(5) { animation-delay: 0.25s; }  /* Бонусы */
.profile-content > *:nth-child(6) { animation-delay: 0.3s; }   /* Инфо */
.profile-content > *:nth-child(7) { animation-delay: 0.35s; }  /* Баланс карточка */
.profile-content > *:nth-child(8) { animation-delay: 0.4s; }   /* Кнопка МОИ ПОДАРКИ */
.profile-content > *:nth-child(9) { animation-delay: 0.45s; }  /* Транзакции */
.profile-content > *:nth-child(10) { animation-delay: 0.5s; }  /* Рефералы */
.profile-content > *:nth-child(11) { animation-delay: 0.55s; } /* Реферальная программа */
.profile-content > *:nth-child(12) { animation-delay: 0.6s; }  /* Промокод */
.profile-content > *:nth-child(13) { animation-delay: 0.65s; } /* Правила */



/* Анимация появления элементов лидерборда */
.leaderboard-content > * {
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}

.leaderboard-content > *:nth-child(1) { animation-delay: 0.05s; }  /* Заголовок */
.leaderboard-content > *:nth-child(2) { animation-delay: 0.15s; }  /* Подиум */
.leaderboard-content > *:nth-child(3) { animation-delay: 0.25s; }  /* Список */
.leaderboard-content > *:nth-child(4) { animation-delay: 0.35s; }  /* Место игрока */

/* Для строк в списке лидерборда */
.leaderboard-row {
    animation: fadeInUp 0.4s ease-out forwards;
    opacity: 0;
}

.leaderboard-row:nth-child(1) { animation-delay: 0.25s; }
.leaderboard-row:nth-child(2) { animation-delay: 0.28s; }
.leaderboard-row:nth-child(3) { animation-delay: 0.31s; }
.leaderboard-row:nth-child(4) { animation-delay: 0.34s; }
.leaderboard-row:nth-child(5) { animation-delay: 0.37s; }
.leaderboard-row:nth-child(6) { animation-delay: 0.40s; }
.leaderboard-row:nth-child(7) { animation-delay: 0.43s; }
.leaderboard-row:nth-child(8) { animation-delay: 0.46s; }
.leaderboard-row:nth-child(9) { animation-delay: 0.49s; }
.leaderboard-row:nth-child(10) { animation-delay: 0.52s; }
.leaderboard-row:nth-child(11) { animation-delay: 0.55s; }
.leaderboard-row:nth-child(12) { animation-delay: 0.58s; }
.leaderboard-row:nth-child(13) { animation-delay: 0.61s; }
.leaderboard-row:nth-child(14) { animation-delay: 0.64s; }
.leaderboard-row:nth-child(15) { animation-delay: 0.67s; }
.leaderboard-row:nth-child(16) { animation-delay: 0.70s; }
.leaderboard-row:nth-child(17) { animation-delay: 0.73s; }
.leaderboard-row:nth-child(18) { animation-delay: 0.76s; }
.leaderboard-row:nth-child(19) { animation-delay: 0.79s; }
.leaderboard-row:nth-child(20) { animation-delay: 0.82s; }

/* Место текущего игрока */
.leaderboard-me {
    animation: fadeInUp 0.5s ease-out forwards;
    opacity: 0;
    animation-delay: 0.9s;
}

/* Таймер до конца месяца */
/* Таймер до конца месяца */
.leaderboard-timer {
    text-align: center;
    padding: 12px 16px;
    margin-bottom: 8px;
    background: transparent;
    border-radius: 0;
    border: none;
}

.leaderboard-timer-title {
    color: #6b7daa;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 8px;
    font-weight: 600;
}

.leaderboard-timer-digits {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.leaderboard-timer-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 48px;
}

.leaderboard-timer-value {
    color: #ffd700;
    font-size: 28px;
    font-weight: 800;
    line-height: 1;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.leaderboard-timer-label {
    color: #6b7daa;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 4px;
}



.floating-btn:active .floating-icon-img {
    animation: floating-pulse 0.3s ease;
}

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

/* ==================== АНИМИРОВАННЫЕ ТАБЫ ==================== */

/* Контейнеры табов */
.tasks-tabs,
.giveaways-tabs,
.cases-tabs {
    position: relative !important;
    display: flex !important;
    background: rgba(120, 120, 128, 0.16) !important;
    border-radius: 10px !important;
    padding: 2px !important;
    width: 100% !important;
    gap: 0 !important;
    flex-shrink: 0;
}

/* Бегающая подложка */
.tab-pill {
    position: absolute;
    top: 2px;
    left: 2px;
    height: calc(100% - 4px);
    background: linear-gradient(135deg, #f0883e, #f5c842);
    border-radius: 8px;
    box-shadow:
        0 2px 6px rgba(240, 136, 62, 0.3),
        0 1px 2px rgba(0, 0, 0, 0.2);
    pointer-events: none;
    z-index: 0;
     transition:
        left 0.34s cubic-bezier(0.4, 0, 0.2, 1),
        width 0.34s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Кнопки табов */
.tasks-tab,
.giveaways-tab,
.cases-tab {
    flex: 1 !important;
    min-width: 0 !important;
    padding: 10px 4px !important;
    border: 0 !important;
    background: transparent !important;
    font-weight: 700 !important;
    font-size: 11px !important;
    cursor: pointer !important;
    position: relative !important;
    z-index: 1 !important;
    color: #6b7daa !important;
    letter-spacing: 1px !important;
    text-transform: uppercase !important;
    -webkit-tap-highlight-color: transparent !important;
    text-align: center !important;
    border-radius: 8px !important;
    transition: color 0.2s ease !important;
}

/* Активный таб */
.tasks-tab.active,
.giveaways-tab.active,
.cases-tab.active {
    color: #0a0f1a !important;
    background: transparent !important;
    box-shadow: none !important;
}

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

.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, #00E77A, #00FBDD);
    color: #0a0f1a;
    margin-bottom: 10px;
    transition: all 0.25s;
    box-shadow: 0 0 25px rgba(0, 231, 122, 0.4), 0 0 50px rgba(0, 251, 221, 0.2);
    -webkit-tap-highlight-color: transparent;
}

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