@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.status-waiting svg {
    animation: rotate 3s infinite linear;
    transform-origin: center;
}


/* Стили для виджета - компактный режим с текстом при наведении */
.dailyrewards-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999;
}

.dailyrewards-widget-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, var(--span), var(--span-low));
    border: none;
    border-radius: 50%;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
    position: relative;
    overflow: hidden;
    padding: 0;
}

/* Состояние когда доступна награда */
.dailyrewards-widget-btn.available {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.3);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(34, 197, 94, 0.3);
    }
    50% {
        box-shadow: 0 4px 25px rgba(34, 197, 94, 0.5);
    }
}

/* Иконка */
.widget-icon {
    position: relative;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.widget-icon svg {
    width: 20px;
    height: 20px;
    fill: white;
}

/* Счетчик серии внутри иконки */
.widget-streak {
    position: absolute;
    bottom: -6px;
    right: -6px;
    background: #fbbf24;
    color: #1a1a2e;
    font-size: 0.7rem;
    font-weight: bold;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--span);
    z-index: 2;
}

/* Бейдж доступности */
.widget-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 12px;
    height: 12px;
    background: #ef4444;
    border-radius: 50%;
    border: 2px solid var(--span);
    z-index: 3;
}

.widget-badge.pulse {
    animation: pulseBadge 1.5s infinite;
}

@keyframes pulseBadge {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.1); }
}

/* Тултип с текстом "Ежедневный бонус" */
.dailyrewards-tooltip {
    position: absolute;
    bottom: calc(100% + 10px);
    right: 0;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Стрелка тултипа */
.dailyrewards-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    right: 20px;
    border-width: 6px;
    border-style: solid;
    border-color: rgba(0, 0, 0, 0.9) transparent transparent transparent;
}

/* Показываем тултип при наведении на весь виджет */
.dailyrewards-widget:hover .dailyrewards-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Эффект при наведении на кнопку */
.dailyrewards-widget-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.dailyrewards-widget-btn.available:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.4);
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    .dailyrewards-widget {
        bottom: 15px;
        right: 15px;
    }
    
    .dailyrewards-widget-btn {
        width: 48px;
        height: 48px;
    }
    
    .widget-icon {
        width: 28px;
        height: 28px;
    }
    
    .widget-icon svg {
        width: 18px;
        height: 18px;
    }
    
    .widget-streak {
        font-size: 0.65rem;
        min-width: 16px;
        height: 16px;
    }
    
    .widget-badge {
        width: 10px;
        height: 10px;
    }
    
    .dailyrewards-tooltip {
        font-size: 0.8rem;
        padding: 6px 10px;
        bottom: calc(100% + 8px);
    }
}

/* Модальное окно */
.dailyrewards-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.dailyrewards-modal-overlay.active {
    display: flex;
    opacity: 1;
}

.dailyrewards-modal-content {
    background: var(--card);
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.dailyrewards-modal-overlay.active .dailyrewards-modal-content {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    color: var(--text-default);
}

.modal-header svg {
    width: 24px;
    height: 24px;
    fill: var(--span);
}

.modal-close {
    background: none;
    border: none;
    color: #aaa;
    font-size: 24px;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--span);
}

/* Карточка текущей награды */
.current-reward-section {
    padding: 20px;
}

.current-reward-card {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid rgba(99, 102, 241, 0.2);
    margin-top: 15px;
}

.reward-image {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(168, 85, 247, 0.1));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.reward-image img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.reward-image svg {
    width: 30px;
    height: 30px;
    fill: var(--span);
}

.reward-info {
    flex: 1;
}

.reward-info h4 {
    margin: 0 0 8px 0;
    color: var(--text-default);
    font-size: 1.1rem;
}

.reward-type {
    color: #aaa;
    font-size: 0.9rem;
}

/* Следующие награды */
.next-rewards-section {
    padding: 0 20px 20px;
}

.next-rewards-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 15px;
}

.next-reward-item {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    padding: 12px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.2s ease;
}

.next-reward-item:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
}

.next-reward-day {
    font-size: 0.8rem;
    color: #aaa;
    margin-bottom: 8px;
}

.next-reward-icon {
    width: 36px;
    height: 36px;
    margin: 0 auto 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.next-reward-icon img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.next-reward-icon svg {
    width: 20px;
    height: 20px;
    fill: var(--span);
}

.next-reward-name {
    font-size: 0.85rem;
    color: var(--text-default);
    margin-bottom: 5px;
    font-weight: 500;
}

.next-reward-value {
    font-size: 0.9rem;
    color: #22c55e;
    font-weight: 600;
}

.reward-type-small {
    font-size: 0.75rem;
    color: #aaa;
    margin-left: 3px;
}

/* Кнопка получения в виджете */
.claim-btn-widget {
    background: linear-gradient(135deg, var(--span), var(--span-low));
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.claim-btn-widget:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.3);
}

/* Футер виджета */
.widget-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
}

.full-page-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--span);
    text-decoration: none;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 8px;
    background: rgba(99, 102, 241, 0.1);
    transition: all 0.2s ease;
}

.full-page-link:hover {
    background: rgba(99, 102, 241, 0.2);
    transform: translateY(-1px);
}

.full-page-link svg {
    width: 16px;
    height: 16px;
    fill: var(--span);
}

/* Анимации */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dailyrewards-modal-content {
    animation: slideIn 0.3s ease;
}

/* Адаптивность модального окна */
@media (max-width: 480px) {
    .dailyrewards-modal-content {
        width: 95%;
        border-radius: 12px;
    }
    
    .current-reward-card {
        flex-direction: column;
        text-align: center;
    }
    
    .next-rewards-list {
        grid-template-columns: 1fr;
    }
}