.externe-posts-wrapper {
    margin: 3rem 0;
}

.externe-posts-wrapper a {
    text-decoration: none !important;
}

/* Avatar Filter */
.externe-posts-filter {
    padding: 2rem;
    border-radius: 16px;
    margin-bottom: 3rem;
    box-shadow: 0 10px 30px rgba(0, 168, 132, 0.3);
}

.filter-avatars {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: flex-start;
    overflow-x: auto;
    overflow-y: hidden;
    flex-wrap: nowrap;
    padding-bottom: 0.5rem;
}

.filter-avatars::-webkit-scrollbar {
    height: 8px;
}

.filter-avatars::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
}

.filter-avatars::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.3);
    border-radius: 10px;
}

.filter-avatars::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.5);
}

.filter-avatar {
    background: rgba(255,255,255,0.15);
    border: 2px solid transparent;
    border-radius: 16px;
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-weight: 500;
    backdrop-filter: blur(10px);
    height: 68px;
    white-space: nowrap;
    flex-shrink: 0;
}

.filter-avatar:hover {
    background: rgba(255,255,255,0.25);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.filter-avatar.active {
    background: rgba(255,255,255,0.95);
    color: #00a884;
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
    transform: scale(1.05);
    border: 2px solid #25d366;
}

.filter-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid #fff;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.filter-avatar-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: bold;
    font-size: 18px;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.filter-avatar-placeholder svg {
    fill: rgba(255, 255, 255, 0.9);
}

.filter-avatar[data-source="all"] {
    padding: 8px 20px;
}

.filter-avatar-all {
    padding: 0;
    font-size: 16px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    height: 100%;
}

.filter-avatar-name {
    font-size: 15px;
}

/* Loading */
.externe-posts-loading {
    text-align: center;
    padding: 3rem;
}

.loading-spinner {
    border: 4px solid rgba(0, 168, 132, 0.2);
    border-top: 4px solid #00a884;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Posts List */
.externe-posts-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.externe-post-item {
    background: #0b141a;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
}

.externe-post-item:hover {
    box-shadow: 0 8px 24px rgba(0, 168, 132, 0.2);
    transform: translateY(-4px);
    border-left: 4px solid #00a884;
}

.externe-post-thumbnail {
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: #f5f5f5;
    display: block;
    position: relative;
}

.externe-post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
    display: block;
}

.externe-post-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #00a884 0%, #008069 100%);
}

.externe-post-placeholder svg {
    fill: rgba(255, 255, 255, 0.4);
    opacity: 0.8;
}

.externe-post-item:hover .externe-post-thumbnail img {
    transform: scale(1.1);
}

.externe-post-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    flex: 1;
}

.externe-post-source {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #00a884;
}

.externe-post-source .source-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid #00a884;
    object-fit: cover;
}

.source-avatar-placeholder {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: bold;
    font-size: 12px;
    flex-shrink: 0;
    background-color: #00a884;
}

.source-avatar-placeholder svg {
    fill: rgba(255, 255, 255, 0.9);
}

.externe-post-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.3;
}

.externe-post-title a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.2s;
}

.externe-post-title a:hover {
    color: #00a884;
    text-decoration: none;
}

.externe-post-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: #8a8a8a;
}

.externe-post-meta svg {
    vertical-align: middle;
    margin-right: 4px;
}

.externe-post-excerpt {
    color: #b3b3b3;
    line-height: 1.6;
    font-size: 0.95rem;
}

.externe-post-excerpt p {
    margin: 0;
}

.externe-post-readmore {
    color: #00a884;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(0, 168, 132, 0.1);
    border-radius: 50%;
    padding: 0;
}

.externe-post-readmore:hover {
    color: #fff;
    background: #00a884;
    transform: scale(1.1);
    text-decoration: none;
}

.externe-posts-error,
.externe-posts-empty {
    padding: 2rem;
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border: 2px solid #ffc107;
    border-radius: 12px;
    color: #856404;
    text-align: center;
    font-weight: 500;
}

/* Pagination */
.externe-posts-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 3rem;
    padding: 2rem 0;
}

.page-numbers {
    display: flex;
    gap: 0.5rem;
    background: transparent !important;
    border: none !important;
}

.page-number,
.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background: #fff;
    border: 2px solid #00a884;
    border-radius: 8px;
    color: #00a884;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.page-number:hover,
.page-link:hover {
    background: #008069;
    border-color: #008069;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 128, 105, 0.4);
}

.page-number.current {
    background: #00a884;
    border-color: #00a884;
    color: #fff;
    cursor: default;
    box-shadow: 0 4px 12px rgba(0, 168, 132, 0.3);
}

.page-prev,
.page-next {
    min-width: auto;
    padding: 0 16px;
}

.page-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    color: #00a884;
    font-weight: 600;
    cursor: default;
    user-select: none;
}

/* Login Modal */
.externe-posts-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    opacity: 0;
    transition: opacity 0.3s;
}

.externe-posts-modal-overlay.show {
    opacity: 1;
}

.externe-posts-modal {
    background: #0b141a;
    border-radius: 16px;
    padding: 2rem;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 168, 132, 0.3);
    text-align: center;
    transform: scale(0.9);
    transition: transform 0.3s;
}

.externe-posts-modal-overlay.show .externe-posts-modal {
    transform: scale(1);
}

.externe-posts-modal-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, #00a884 0%, #008069 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.externe-posts-modal-icon svg {
    color: #fff;
}

.externe-posts-modal h3 {
    color: #fff;
    font-size: 1.5rem;
    margin: 0 0 1rem 0;
}

.externe-posts-modal p {
    color: #b3b3b3;
    margin: 0 0 2rem 0;
    line-height: 1.6;
}

.externe-posts-modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.modal-btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 15px;
}

.modal-btn-cancel {
    background: transparent;
    border: 2px solid #333;
    color: #b3b3b3;
}

.modal-btn-cancel:hover {
    background: #1a1a1a;
    border-color: #555;
}

.modal-btn-primary {
    background: linear-gradient(135deg, #00a884 0%, #008069 100%);
    color: #fff;
    border: none;
}

.modal-btn-primary:hover {
    background: linear-gradient(135deg, #008069 0%, #00a884 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 168, 132, 0.4);
}

/* Responsive */
@media (max-width: 768px) {
    .externe-posts-filter {
        padding: 1.5rem;
    }
    
    .filter-avatars {
        gap: 0.75rem;
    }
    
    .filter-avatar {
        padding: 8px 14px;
        font-size: 14px;
    }
    
    .filter-avatar img,
    .filter-avatar-placeholder {
        width: 32px;
        height: 32px;
    }
    
    .externe-posts-list {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .externe-post-thumbnail {
        height: 200px;
    }
}

@media (max-width: 480px) {
    .filter-avatar {
        padding: 8px 14px;
    }
}
