/* Top-up page styles (SPA integrated) */

#view-topup {
    /* ✅ Убраны view-specific paddings - используются глобальные из layout.css */
    max-width: 600px;
    margin: 0 auto;
}

.topup-header {
    text-align: center;
    margin-bottom: 24px;
}

.topup-header h1 {
    font-size: 26px;
    font-weight: 700;
    color: white;
    margin: 0 0 8px 0;
}

.topup-subtitle {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
}

/* Прайс hint - менее акцентно */
.topup-price-hint {
    text-align: center;
    margin-bottom: 20px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    display: inline-block;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
    display: flex;
    justify-content: center;
}

.topup-price-hint span {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 500;
}

/* Result card - главный акцент */
.topup-result-card {
    background: linear-gradient(135deg, rgba(88, 101, 242, 0.2), rgba(114, 137, 218, 0.15));
    border: 2px solid rgba(88, 101, 242, 0.4);
    border-radius: 20px;
    padding: 28px 24px;
    margin-bottom: 28px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Label "Вы получите" */
.topup-main-label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Главный акцент - БОЛЬШИЕ цифры токенов */
.topup-tokens-big {
    font-size: 56px;
    font-weight: 900;
    color: white;
    margin-bottom: 12px;
    letter-spacing: -2px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 64px;  /* ✅ Фиксированная высота - предотвращает прыжки */
}

.topup-tokens-big span {
    display: inline-block;  /* ✅ Для стабильности при изменении */
}

.topup-tokens-big .token-star {
    flex-shrink: 0;  /* ✅ Звезда не меняет размер */
}

.topup-tokens-big .token-star {
    width: 40px;
    height: 40px;
    filter: drop-shadow(0 0 12px rgba(255, 215, 0, 0.8))
            drop-shadow(0 0 24px rgba(255, 215, 0, 0.5))
            drop-shadow(0 0 4px rgba(255, 215, 0, 1));
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Анимация звезды при изменении количества */
.topup-tokens-big .token-star.pulse {
    animation: star-pulse 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes star-pulse {
    0% {
        transform: scale(1);
        filter: drop-shadow(0 0 12px rgba(255, 215, 0, 0.8))
                drop-shadow(0 0 24px rgba(255, 215, 0, 0.5))
                drop-shadow(0 0 4px rgba(255, 215, 0, 1));
    }
    50% {
        transform: scale(1.15);
        filter: drop-shadow(0 0 16px rgba(255, 215, 0, 1))
                drop-shadow(0 0 32px rgba(255, 215, 0, 0.7))
                drop-shadow(0 0 8px rgba(255, 215, 0, 1));
    }
    100% {
        transform: scale(1);
        filter: drop-shadow(0 0 12px rgba(255, 215, 0, 0.8))
                drop-shadow(0 0 24px rgba(255, 215, 0, 0.5))
                drop-shadow(0 0 4px rgba(255, 215, 0, 1));
    }
}

/* Бонус плашка с анимациями */
.topup-bonus-badge {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 12px;
    position: relative;
    overflow: hidden;
}

/* 5% бонус - жёлтый */
.topup-bonus-badge.bonus-5-percent {
    background: rgba(255, 215, 0, 0.15);
    border: 1px solid rgba(255, 215, 0, 0.3);
    color: #FFD700;
}

/* 10% бонус - зелёный */
.topup-bonus-badge.bonus-10-percent {
    background: rgba(0, 255, 127, 0.15);
    border: 1px solid rgba(0, 255, 127, 0.4);
    color: #00FF7F;
}

/* Shimmer анимация для бонусного бейджа */
.topup-bonus-badge.shimmer::before {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 100%
    );
    animation: shimmer-sweep 0.8s ease-out;
}

@keyframes shimmer-sweep {
    0% {
        left: -150%;
    }
    100% {
        left: 150%;
    }
}

/* Shake по дуге (затухающий ease-out) */
.topup-bonus-badge.shake-arc {
    animation: shake-arc 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes shake-arc {
    0% {
        transform: translateX(0) rotate(0deg);
    }
    15% {
        transform: translateX(-8px) rotate(-4deg);
    }
    30% {
        transform: translateX(8px) rotate(4deg);
    }
    45% {
        transform: translateX(-6px) rotate(-3deg);
    }
    60% {
        transform: translateX(4px) rotate(2deg);
    }
    75% {
        transform: translateX(-2px) rotate(-1deg);
    }
    90% {
        transform: translateX(1px) rotate(0.5deg);
    }
    100% {
        transform: translateX(0) rotate(0deg);
    }
}

/* К оплате - менее акцентно */
.topup-payment-line {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
}

.topup-payment-line #topupPaymentAmount {
    font-weight: 700;
    color: white;
    font-size: 18px;
}

/* Form */
.topup-form {
    margin-bottom: 28px;
}

.topup-input-label {
    display: block;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 12px;
    font-weight: 500;
}

/* Поле ввода суммы */
.topup-input-wrapper {
    position: relative;
    margin-bottom: 20px;
}

.topup-amount-input {
    width: 100%;
    padding: 16px 50px 16px 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    color: #fff;
    font-size: 20px;
    font-weight: 600;
    text-align: center;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.topup-amount-input:focus {
    outline: none;
    border-color: rgba(88, 101, 242, 0.5);
    background: rgba(255, 255, 255, 0.12);
}

/* Remove spinner arrows */
.topup-amount-input::-webkit-outer-spin-button,
.topup-amount-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.topup-amount-input[type=number] {
    -moz-appearance: textfield;
}

.topup-currency {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    pointer-events: none;
}

.topup-slider-container {
    position: relative;
}

.topup-amount-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.15);
    outline: none;
    margin-bottom: 12px;
}

.topup-amount-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #5865F2, #7289DA);
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(88, 101, 242, 0.4);
}

.topup-amount-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #5865F2, #7289DA);
    cursor: pointer;
    border: none;
    box-shadow: 0 4px 12px rgba(88, 101, 242, 0.4);
}

.topup-slider-marks {
    display: flex;
    justify-content: space-between;
    padding: 0 4px;
}

.topup-mark {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
}

/* Пометки бонусов */
.topup-mark-bonus {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.topup-mark-bonus .mark-value {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
}

.topup-mark-bonus .mark-label {
    font-size: 9px;
    font-weight: 700;
    color: #FFD700;
    background: rgba(255, 215, 0, 0.15);
    padding: 2px 6px;
    border-radius: 6px;
    border: 1px solid rgba(255, 215, 0, 0.3);
}

/* Payment button */
.topup-button-container {
    margin-bottom: 28px;
}

.topup-payment-btn {
    width: 100%;
    background: linear-gradient(135deg, #5865F2, #7289DA);
    color: #fff;
    border: none;
    padding: 16px;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(88, 101, 242, 0.3);
}

.topup-payment-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.topup-payment-btn:not(:disabled):active {
    transform: translateY(2px);
}

/* Payment info */
.topup-payment-info {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    padding: 16px 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.topup-payment-info h3 {
    font-size: 15px;
    font-weight: 600;
    color: white;
    margin: 0 0 12px 0;
}

.topup-payment-info ul {
    margin: 0;
    padding: 0 0 0 20px;
    list-style: disc;
}

.topup-payment-info li {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 6px;
}

.topup-payment-info li:last-child {
    margin-bottom: 0;
}
