/* ============================================
   ACTIVITY FEED STYLES
   Live activity feed component
   ============================================ */

/* ============================================
   NOTIFICATIONS DROPDOWN
   ============================================ */
.notifications-dropdown {
    position: fixed;
    top: 60px;
    right: 10px;
    width: 380px;
    max-width: calc(100vw - 20px);
    max-height: 600px;
    background: var(--surface-color, #1a1d29);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    z-index: 1000;
    overflow: hidden;
    animation: slideDown 0.3s ease-out;
}

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

.notifications-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.notifications-header > div:first-child {
    display: flex;
    align-items: center;
    gap: 12px;
}

.notifications-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: white;
    display: flex;
    align-items: center;
    gap: 8px;
}

.notifications-list {
    max-height: 480px;
    overflow-y: auto;
    padding: 8px;
    background: #1a1d29;
}

.notifications-list::-webkit-scrollbar {
    width: 6px;
}

.notifications-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.notifications-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.notifications-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Notification Badge */
.notification-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    background: #ef4444;
    color: white;
    font-size: 10px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    animation: pulse 2s infinite;
}

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

/* Activity Filters */
.activity-filters {
    display: flex;
    gap: 6px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    overflow-x: auto;
    scrollbar-width: none; /* Firefox */
}

.activity-filters::-webkit-scrollbar {
    display: none; /* Chrome, Safari */
}

.filter-btn {
    flex-shrink: 0;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: white;
    transform: translateY(-1px);
}

.filter-btn.active {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border-color: transparent;
    color: white;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.4);
}

.filter-btn i {
    font-size: 11px;
}

/* Filter count badge */
.filter-count {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 10px;
    margin-left: 4px;
}

.filter-btn.active .filter-count {
    background: rgba(255, 255, 255, 0.3);
}

/* Empty state styling */
.activity-empty {
    padding: 40px 20px;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
}

.activity-empty .empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.activity-empty p {
    font-size: 16px;
    font-weight: 600;
    margin: 8px 0 4px;
    color: rgba(255, 255, 255, 0.7);
}

.activity-empty span {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.4);
}

/* Compact styles for dropdown */
.notifications-dropdown .activity-item {
    padding: 12px;
    margin-bottom: 6px;
}

.notifications-dropdown .activity-avatar {
    width: 40px;
    height: 40px;
    font-size: 20px;
}

.notifications-dropdown .activity-main {
    font-size: 13px;
}

.notifications-dropdown .activity-badge {
    font-size: 12px;
    min-width: 60px;
}

/* Mobile responsive */
@media (max-width: 480px) {
    .notifications-dropdown {
        right: 5px;
        width: calc(100vw - 10px);
        max-height: 500px;
    }
    
    .notifications-list {
        max-height: 380px;
    }
    
    .filter-btn {
        font-size: 11px;
        padding: 6px 10px;
    }
    
    .filter-btn i {
        font-size: 10px;
    }
}

.activity-feed-container {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 30px;
}

.activity-feed-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.activity-feed-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 700;
}

.activity-feed-title i {
    background: linear-gradient(135deg, #10b981, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: rgba(239, 68, 68, 0.2);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: #ef4444;
}

.live-dot {
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    animation: livePulse 2s infinite;
}

@keyframes livePulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
}

.activity-feed-controls {
    display: flex;
    gap: 10px;
}

.activity-feed-refresh {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.activity-feed-refresh:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: rotate(90deg);
}

.activity-feed-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 600px;
    overflow-y: auto;
    padding-right: 8px;
}

/* Custom scrollbar */
.activity-feed-list::-webkit-scrollbar {
    width: 6px;
}

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

.activity-feed-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

.activity-feed-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Activity Items */
.activity-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: all 0.3s;
    animation: slideIn 0.3s ease;
    cursor: pointer;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.activity-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(16, 185, 129, 0.3);
    transform: translateX(4px);
}

.activity-avatar {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #10b981, #3b82f6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.activity-content {
    flex: 1;
    min-width: 0;
}

.activity-main {
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 4px;
    color: rgba(255, 255, 255, 0.9);
}

.activity-main strong {
    color: white;
    font-weight: 600;
}

.activity-highlight {
    color: #10b981;
    font-weight: 600;
}

.activity-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.activity-time {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
}

.activity-prize {
    font-size: 12px;
    color: #ffd700;
    font-weight: 600;
}

.activity-badge {
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
}

.achievement-badge {
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
    color: white;
}

.coins-badge {
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    color: #1e293b;
}

.streak-badge {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.tournament-badge {
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    color: #1e293b;
}

.big-win-badge {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    animation: pulse 2s infinite;
}

.level-badge {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
}

.milestone-badge {
    background: linear-gradient(135deg, #ec4899, #db2777);
    color: white;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Activity type specific colors */
.activity-item.achievement {
    border-left: 3px solid #8b5cf6;
}

.activity-item.game-win {
    border-left: 3px solid #ffd700;
}

.activity-item.streak {
    border-left: 3px solid #ef4444;
}

.activity-item.tournament {
    border-left: 3px solid #ffd700;
}

.activity-item.big-win {
    border-left: 3px solid #10b981;
    background: rgba(16, 185, 129, 0.05);
}

.activity-item.level-up {
    border-left: 3px solid #3b82f6;
}

.activity-item.milestone {
    border-left: 3px solid #ec4899;
}

.activity-item.sharp-alert {
    border-left: 3px solid #6366f1;
    background: rgba(99, 102, 241, 0.05);
}

.activity-item.whale-bet {
    border-left: 3px solid #0ea5e9;
    background: linear-gradient(90deg, rgba(14, 165, 233, 0.05) 0%, rgba(14, 165, 233, 0.02) 100%);
}

.sharp-badge {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
}

.whale-badge {
    background: linear-gradient(135deg, #0ea5e9, #2563eb);
    color: white;
}

/* Empty state */
.activity-empty {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.3;
}

.activity-empty p {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 8px;
}

.activity-empty span {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
}

/* Toast notifications */
.activity-toast {
    position: fixed;
    top: 80px;
    right: 20px;
    background: linear-gradient(135deg, #10b981, #059669);
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    max-width: 350px;
}

.activity-toast.show {
    transform: translateX(0);
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 14px;
}

.toast-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.toast-message {
    font-size: 15px;
    font-weight: 600;
    color: white;
    line-height: 1.4;
}

/* Compact version for sidebar */
.activity-feed-compact .activity-item {
    padding: 12px;
}

.activity-feed-compact .activity-avatar {
    width: 40px;
    height: 40px;
    font-size: 20px;
}

.activity-feed-compact .activity-main {
    font-size: 13px;
}

.activity-feed-compact .activity-badge {
    padding: 6px 10px;
    font-size: 11px;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .activity-feed-container {
        padding: 20px;
    }

    .activity-feed-list {
        max-height: 500px;
    }

    .activity-item {
        padding: 14px;
    }

    .activity-avatar {
        width: 42px;
        height: 42px;
        font-size: 20px;
    }

    .activity-main {
        font-size: 13px;
    }

    .activity-badge {
        padding: 6px 12px;
        font-size: 12px;
    }

    .activity-toast {
        right: 10px;
        left: 10px;
        max-width: none;
    }

    .activity-feed-title {
        font-size: 18px;
    }

    .live-indicator {
        font-size: 11px;
        padding: 3px 10px;
    }
}

@media (max-width: 480px) {
    .activity-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .activity-badge {
        align-self: flex-end;
        margin-top: 8px;
    }

    .activity-feed-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .activity-feed-controls {
        align-self: flex-end;
    }
}
