/* Колесо фортуны - премиум плавный дизайн */

.wheel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(12px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    animation: overlayFadeIn 0.3s ease-out forwards;
}

@keyframes overlayFadeIn {
    to { opacity: 1; }
}

.wheel-container {
    position: relative;
    text-align: center;
    width: 100%;
    max-width: 380px;
    max-height: 90vh;
    padding: 20px;
    overflow-y: auto;
    overflow-x: hidden;
    animation: slideUp 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Скроллбар для контейнера */
.wheel-container::-webkit-scrollbar {
    width: 6px;
}

.wheel-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.wheel-container::-webkit-scrollbar-thumb {
    background: rgba(211, 245, 112, 0.4);
    border-radius: 10px;
}

.wheel-container::-webkit-scrollbar-thumb:hover {
    background: rgba(211, 245, 112, 0.6);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wheel-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 6px;
    color: #FFFFFF;
    letter-spacing: -0.3px;
    line-height: 1.2;
    animation: titleAppear 0.4s ease-out 0.05s both;
}

@keyframes titleAppear {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wheel-subtitle {
    font-size: 14px;
    color: #7A7A7A;
    margin-bottom: 28px;
    font-weight: 400;
    animation: titleAppear 0.4s ease-out 0.1s both;
}

.wheel-wrapper {
    position: relative;
    width: 100%;
    max-width: 340px;
    margin: 0 auto 24px;
    aspect-ratio: 1;
    animation: wheelAppear 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both;
}

@keyframes wheelAppear {
    from {
        opacity: 0;
        transform: scale(0.94);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Внешнее декоративное кольцо */
.wheel-wrapper::before {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2A2A2A 0%, #1A1A1A 100%);
    z-index: 0;
}

/* Акцентная тонкая линия */
.wheel-wrapper::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    border: 1px solid rgba(211, 245, 112, 0.2);
    z-index: 0;
}

/* Стрелка указатель */
.wheel-pointer {
    position: absolute;
    top: -18px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 4;
}

.wheel-pointer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 14px solid transparent;
    border-right: 14px solid transparent;
    border-top: 24px solid #D3F570;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4));
}

/* Само колесо */
.wheel-circle {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    background: #0F0F0F;
    border: 3px solid #1A1A1A;
    box-shadow: 
        0 0 0 1px rgba(255, 255, 255, 0.04),
        0 15px 40px rgba(0, 0, 0, 0.8),
        inset 0 -6px 15px rgba(0, 0, 0, 0.6),
        inset 0 2px 8px rgba(255, 255, 255, 0.02);
    transition: transform 4.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 1;
}

.wheel-circle.spinning {
    transition: transform 4.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Центральная кнопка */
.wheel-center-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: linear-gradient(180deg, #E8FF7E 0%, #D3F570 100%);
    border-radius: 50%;
    border: 4px solid #0F0F0F;
    font-size: 12px;
    font-weight: 700;
    color: #000;
    cursor: pointer;
    z-index: 2;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    box-shadow: 
        0 6px 20px rgba(0, 0, 0, 0.6),
        inset 0 -3px 8px rgba(0, 0, 0, 0.2),
        inset 0 2px 6px rgba(255, 255, 255, 0.4);
}

/* Hover эффект */
.wheel-center-button:hover {
    transform: translate(-50%, -50%) scale(1.04);
    box-shadow: 
        0 8px 24px rgba(0, 0, 0, 0.7),
        inset 0 -3px 8px rgba(0, 0, 0, 0.2),
        inset 0 2px 6px rgba(255, 255, 255, 0.4);
}

.wheel-center-button:active {
    transform: translate(-50%, -50%) scale(0.97);
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.6),
        inset 0 2px 8px rgba(0, 0, 0, 0.25);
}

.wheel-center-button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: translate(-50%, -50%);
}

/* Сектора колеса */
.wheel-segment {
    position: absolute;
    width: 50%;
    height: 50%;
    transform-origin: 100% 100%;
    clip-path: polygon(0 0, 100% 0, 100% 100%);
}

.wheel-segment-fill {
    position: absolute;
    width: 200%;
    height: 200%;
    transform-origin: 0 0;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    padding-top: 48px;
    padding-right: 28px;
}

.wheel-segment-text {
    font-size: 18px;
    font-weight: 700;
    color: #FFFFFF;
    text-shadow: 
        0 2px 6px rgba(0, 0, 0, 0.8),
        0 1px 2px rgba(0, 0, 0, 0.6);
    white-space: nowrap;
    letter-spacing: 0.3px;
}

/* Результат */
.wheel-result {
    margin-top: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #1E1E1E 0%, #141414 100%);
    border-radius: 16px;
    border: 2px solid #D3F570;
    box-shadow: 
        0 6px 20px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
    opacity: 0;
    transform: scale(0.95);
    transition: all 0.3s ease;
}

.wheel-result.show {
    opacity: 1;
    transform: scale(1);
    animation: resultPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes resultPop {
    0% {
        transform: scale(0.95);
        opacity: 0;
    }
    50% {
        transform: scale(1.01);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.wheel-result-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #D3F570;
    letter-spacing: -0.3px;
}

.wheel-result-message {
    font-size: 15px;
    color: #CCCCCC;
    line-height: 1.5;
    font-weight: 400;
}

/* Кнопка закрыть/забрать */
.wheel-close-btn {
    margin-top: 24px;
    width: 100%;
    height: 56px;
    background: linear-gradient(135deg, #2A2A2A 0%, #222222 100%);
    border: 2px solid #3A3A3A;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 600;
    color: #FFFFFF;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    letter-spacing: 0.3px;
    animation: buttonAppear 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.4s both;
}

@keyframes buttonAppear {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wheel-close-btn:hover {
    background: linear-gradient(135deg, #333333 0%, #2A2A2A 100%);
    border-color: #4A4A4A;
    transform: translateY(-2px);
    box-shadow: 
        0 6px 16px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.wheel-close-btn:active {
    transform: scale(0.98);
    background: linear-gradient(135deg, #222222 0%, #1A1A1A 100%);
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.5),
        inset 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* Сообщение о кулдауне */
.wheel-cooldown-message {
    padding: 24px;
    background: linear-gradient(135deg, #1E1E1E 0%, #141414 100%);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-width: 340px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
}

.wheel-cooldown-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #FFFFFF;
    letter-spacing: -0.3px;
}

.wheel-cooldown-text {
    font-size: 14px;
    color: #7A7A7A;
    margin-bottom: 18px;
    line-height: 1.5;
}

/* Модалка выбора подписки */
.subscription-select-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(12px);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    animation: overlayFadeIn 0.3s ease-out forwards;
}

.subscription-select-content {
    background: linear-gradient(135deg, #1E1E1E 0%, #141414 100%);
    border-radius: 16px;
    padding: 24px;
    width: 90%;
    max-width: 360px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 
        0 10px 40px rgba(0, 0, 0, 0.7),
        0 0 0 1px rgba(255, 255, 255, 0.04);
    animation: slideUp 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.subscription-select-title {
    font-size: 20px;
    font-weight: 700;
    color: #D3F570;
    margin-bottom: 8px;
    text-align: center;
    letter-spacing: -0.3px;
}

.subscription-select-subtitle {
    font-size: 14px;
    color: #7A7A7A;
    margin-bottom: 20px;
    text-align: center;
}

.subscription-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.subscription-item {
    background: linear-gradient(135deg, #252525 0%, #1C1C1C 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.subscription-item:hover {
    border-color: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
}

.subscription-item:active {
    transform: scale(0.98);
    border-color: #D3F570;
    background: linear-gradient(135deg, #2A2A2A 0%, #222222 100%);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.subscription-email {
    font-size: 15px;
    font-weight: 600;
    color: #FFFFFF;
    margin-bottom: 6px;
    letter-spacing: -0.2px;
}

.subscription-days {
    font-size: 13px;
    color: #7A7A7A;
    font-weight: 400;
}

.subscription-days.active {
    color: #4CAF50;
    font-weight: 600;
}

.subscription-days.expired {
    color: #DC2626;
    font-weight: 600;
}

/* Кастомный скроллбар */
.subscription-select-content::-webkit-scrollbar {
    width: 6px;
}

.subscription-select-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
}

.subscription-select-content::-webkit-scrollbar-thumb {
    background: rgba(211, 245, 112, 0.3);
    border-radius: 10px;
}

.subscription-select-content::-webkit-scrollbar-thumb:hover {
    background: rgba(211, 245, 112, 0.5);
}

/* Адаптивность */
@media (max-width: 390px) {
    .wheel-wrapper {
        max-width: 320px;
    }
    
    .wheel-segment-text {
        font-size: 19px;
        padding-right: 24px;
    }
    
    .wheel-center-button {
        width: 85px;
        height: 85px;
        font-size: 12px;
    }
    
    .wheel-title {
        font-size: 30px;
    }
}

/* Кнопка истории выигрышей */
.wheel-history-btn {
    margin-top: 12px;
    width: 100%;
    height: 52px;
    background: linear-gradient(135deg, #3A3A3A 0%, #2A2A2A 100%);
    border: 2px solid #4A4A4A;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 600;
    color: #FFFFFF;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    letter-spacing: 0.3px;
    animation: buttonAppear 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.35s both;
}

.wheel-history-btn:hover {
    background: linear-gradient(135deg, #4A4A4A 0%, #3A3A3A 100%);
    border-color: #5A5A5A;
    transform: translateY(-2px);
    box-shadow: 
        0 6px 16px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.wheel-history-btn:active {
    transform: scale(0.98);
    background: linear-gradient(135deg, #2A2A2A 0%, #1A1A1A 100%);
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.4),
        inset 0 2px 6px rgba(0, 0, 0, 0.3);
}

.history-empty {
    padding: 40px 20px;
    text-align: center;
    color: #888;
    font-size: 14px;
}

.wheel-history-link {
    display: none !important;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.history-item:last-child {
    border-bottom: none;
}

.history-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.history-prize {
    font-weight: 600;
    font-size: 15px;
}

.history-date {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
}

.history-cost {
    font-size: 13px;
    font-weight: 500;
    color: #ff5252;
    background: rgba(255, 82, 82, 0.1);
    padding: 2px 6px;
    border-radius: 6px;
}

.history-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.history-pagination button {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.history-pagination button:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.2);
}

.history-pagination button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.history-pagination span {
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
}
