/* Activity Modal - Premium Design */
.activity-modal {
    max-width: 560px;
    width: 90%;
    top: 5%;
    left: 33%;
    max-height: 85vh;
    background: var(--background);
    border-radius: 20px;
    border: 1px solid var(--border);
    padding: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: fixed;
}

.activity-modal .modal-header {
    display: flex;
    border-bottom: 1px solid var(--border);
    gap: 10px;
    align-items: center;
    padding: 11px 25px;
    justify-content: space-between;
    background: transparent;
}

.activity-modal .modal-title {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: var(--functional);
    letter-spacing: -0.5px;
}

.activity-modal .modal-close-btn {
    background: none;
    border: none;
    font-size: 25px;
    cursor: pointer;
    color: var(--functional);
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease;
}

.activity-modal .modal-close-btn:hover {
    opacity: 0.7;
}

/* Tabs */
.activity-tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    padding: 0 16px;
    background: rgba(255, 255, 255, 0.01);
}

.activity-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 20px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--secondary);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    flex: 1;
    position: relative;
}

.activity-tab:hover {
    color: var(--primary);
    background: rgba(255, 255, 255, 0.02);
}

.activity-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    font-weight: 600;
}

.activity-tab i {
    font-size: 16px;
    margin-bottom: 1px;
}

.tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    color: var(--secondary);
    transition: all 0.2s;
}

.activity-tab.active .tab-count {
    background: var(--primary);
    color: var(--background);
}

/* Content */
.activity-content {
    flex: 1;
    overflow-y: auto;
    padding: 0;
    min-height: 350px;
    background: var(--background);
}

.activity-tab-content {
    display: none;
    padding: 14px;
}

.activity-tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading State */
.activity-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 80px 20px;
    color: var(--secondary);
}

.activity-loading i {
    font-size: 28px;
    opacity: 0.7;
}

/* User List */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.activity-user-item {
    display: flex;
    align-items: center;
    gap: 16px;
    background: transparent;
    border-radius: 12px;
}

.activity-user-item:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.05);
}

.activity-user-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid rgba(255, 255, 255, 0.05);
}

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

.activity-user-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
}

.activity-user-name:hover {
    text-decoration: underline;
}

.activity-user-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 20px;
}

.reaction-icon {
    font-size: 16px;
}

.reaction-icon {
    color: var(--accent-color, #4CAF50);
}

.reply-count {
    font-size: 13px;
    color: var(--secondary);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.reply-count::before {
    content: '\f112';
    /* fa-reply */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 11px;
    opacity: 0.7;
}

/* Empty State */
.activity-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 80px 20px;
    color: var(--secondary);
    text-align: center;
}

.activity-empty i {
    font-size: 48px;
    opacity: 0.1;
    margin-bottom: 8px;
}

.activity-empty p {
    margin: 0;
    font-size: 15px;
    font-weight: 500;
}

/* Views Stats */
.views-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.view-stat-card {
    padding: 24px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 16px;
    text-align: center;
    transition: transform 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.view-stat-card:hover {
    background: rgba(255, 255, 255, 0.04);
    transform: translateY(-2px);
}

.view-stat-value {
    font-size: 42px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 8px;
    line-height: 1;
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
}

.view-stat-label {
    font-size: 13px;
    color: var(--secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

/* Custom Scrollbar for Content */
.activity-content::-webkit-scrollbar {
    width: 6px;
}

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

.activity-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.activity-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Responsive Design */
@media (max-width: 600px) {
    .activity-modal {
        width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
        border: none;
    }

    .modal-header {
        position: sticky;
        top: 0;
        z-index: 10;
        background: var(--background);
    }

    .activity-tabs {
        padding: 0 8px;
        position: sticky;
        top: 73px;
        /* Adjust based on header height */
        z-index: 9;
        background: var(--background);
    }

    .activity-tab {
        padding: 14px 12px;
        font-size: 14px;
    }

    .activity-tab span:not(.tab-count) {
        display: none;
    }

    .views-stats {
        grid-template-columns: 1fr;
    }

    .view-stat-card {
        padding: 20px;
    }
}