/* === ACTIVITY HISTORY MODAL === */

.activity-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 4000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.activity-modal {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    max-width: 900px;
    width: 100%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease;
    overflow: hidden;
}

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

.activity-header {
    padding: 25px 30px;
    border-bottom: 1px solid var(--border);
    background: rgba(249, 248, 243, 0.02);
}

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

.activity-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 28px;
    color: var(--accent);
    margin: 0;
}

.close-activity-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--accent);
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    line-height: 1;
}

.close-activity-btn:hover {
    background: var(--accent);
    color: var(--bg);
    transform: rotate(90deg);
}

/* Stats Bar */
.activity-stats-bar {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(212, 175, 55, 0.05);
    border-radius: 12px;
}

.activity-stat {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 10px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.activity-stat:hover {
    background: rgba(212, 175, 55, 0.1);
}

.activity-stat svg {
    opacity: 0.8;
}

.activity-stat .stat-count {
    font-size: 24px;
    font-weight: 700;
    color: var(--gold);
}

.activity-stat .stat-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent);
    opacity: 0.6;
}

/* Filter Buttons */
.activity-filter {
    display: flex;
    gap: 10px;
}

.filter-btn {
    padding: 8px 16px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--accent);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.6;
}

.filter-btn:hover {
    opacity: 1;
    border-color: var(--gold);
}

.filter-btn.active {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--bg);
    opacity: 1;
}

/* Activity List */
.activity-list {
    flex: 1;
    overflow-y: auto;
    padding: 20px 30px;
}

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

.activity-list::-webkit-scrollbar-track {
    background: transparent;
}

.activity-list::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

.activity-list::-webkit-scrollbar-thumb:hover {
    background: var(--gold);
}

/* Loading State */
.activity-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--accent);
    opacity: 0.6;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 15px;
}

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

/* Empty State */
.activity-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--accent);
}

.activity-empty .empty-icon {
    font-size: 64px;
    margin-bottom: 15px;
    opacity: 0.4;
}

.activity-empty p {
    font-size: 18px;
    margin-bottom: 8px;
    opacity: 0.7;
}

.activity-empty .empty-hint {
    font-size: 12px;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.6;
}

/* Date Groups */
.activity-date-group {
    margin-bottom: 30px;
}

.activity-date-header {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--gold);
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.activity-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Activity Item */
.activity-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(249, 248, 243, 0.02);
    cursor: pointer;
    transition: all 0.3s ease;
}

.activity-item:hover {
    background: rgba(249, 248, 243, 0.05);
    border-color: var(--gold);
    transform: translateX(4px);
}

.activity-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(212, 175, 55, 0.1);
}

.activity-news-preview {
    flex: 1;
    display: flex;
    gap: 15px;
    min-width: 0;
}

.activity-news-image {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 8px;
    background-size: cover;
    background-position: center;
    background-color: rgba(249, 248, 243, 0.05);
}

.activity-news-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.activity-action {
    display: flex;
    align-items: center;
    gap: 10px;
}

.action-text {
    font-size: 12px;
    font-weight: 600;
    color: var(--accent);
    opacity: 0.6;
}

.activity-time {
    font-size: 11px;
    color: var(--accent);
    opacity: 0.4;
}

.activity-news-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--accent);
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.activity-news-meta {
    display: flex;
    align-items: center;
    gap: 10px;
}

.source-name {
    font-size: 10px;
    color: var(--accent);
    opacity: 0.5;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.activity-arrow {
    flex-shrink: 0;
    opacity: 0.3;
    transition: all 0.3s ease;
}

.activity-item:hover .activity-arrow {
    opacity: 1;
    transform: translateX(4px);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .activity-modal {
        max-height: 90vh;
        border-radius: 16px 16px 0 0;
    }

    .activity-header {
        padding: 20px;
    }

    .activity-header h2 {
        font-size: 22px;
    }

    .activity-stats-bar {
        gap: 10px;
        padding: 10px;
    }

    .activity-stat .stat-count {
        font-size: 20px;
    }

    .activity-stat .stat-label {
        font-size: 9px;
    }

    .activity-filter {
        flex-wrap: wrap;
        gap: 8px;
    }

    .filter-btn {
        padding: 6px 12px;
        font-size: 10px;
    }

    .activity-list {
        padding: 15px 20px;
    }

    .activity-item {
        padding: 12px;
        gap: 12px;
    }

    .activity-icon {
        width: 36px;
        height: 36px;
    }

    .activity-news-image {
        width: 60px;
        height: 60px;
    }

    .activity-news-title {
        font-size: 13px;
    }

    .activity-date-group {
        margin-bottom: 20px;
    }
}