/* Mastodon Feed Plugin Styles */

.mastodon-feed {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    max-width: 1280px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid #e6e6e6;
    border-radius: 8px;
    overflow: hidden;
}

.mastodon-feed-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px;
    background: linear-gradient(135deg, #6364FF 0%, #563ACC 100%);
    color: #fff;
    font-weight: 600;
}

.mastodon-logo {
    flex-shrink: 0;
}

.mastodon-feed-error {
    padding: 20px;
    text-align: center;
    color: #666;
    background: #f9f9f9;
    border-radius: 8px;
}

/* Einzelner Post */
.mastodon-post {
    padding: 16px;
    border-bottom: 1px solid #e6e6e6;
}

.mastodon-post:last-of-type {
    border-bottom: none;
}

.mastodon-reblog-info {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
    color: #666;
    font-size: 13px;
}

.mastodon-reblog-info svg {
    color: #8c8dff;
}

.mastodon-post-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.mastodon-avatar {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
}

.mastodon-post-meta {
    flex: 1;
    min-width: 0;
}

.mastodon-display-name {
    display: block;
    font-weight: 700;
    color: #1a1a1a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mastodon-username {
    display: block;
    color: #666;
    font-size: 13px;
}

.mastodon-post-date {
    color: #666;
    font-size: 12px;
    text-decoration: none;
    white-space: nowrap;
}

.mastodon-post-date:hover {
    text-decoration: underline;
}

/* Post-Inhalt */
.mastodon-post-content {
    line-height: 1.5;
    color: #1a1a1a;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.mastodon-post-content p {
    margin: 0 0 10px 0;
}

.mastodon-post-content p:last-child {
    margin-bottom: 0;
}

.mastodon-post-content a {
    color: #595aff;
    text-decoration: none;
}

.mastodon-post-content a:hover {
    text-decoration: underline;
}

.mastodon-post-content .invisible {
    display: none;
}

.mastodon-post-content .ellipsis::after {
    content: '…';
}

/* Hashtags */
.mastodon-post-content a.hashtag {
    color: #595aff;
}

/* Medien */
.mastodon-media {
    display: grid;
    gap: 4px;
    margin-top: 12px;
    border-radius: 8px;
    overflow: hidden;
}

.mastodon-media-1 {
    grid-template-columns: 1fr;
}

.mastodon-media-2 {
    grid-template-columns: 1fr 1fr;
}

.mastodon-media-3 {
    grid-template-columns: 1fr 1fr;
}

.mastodon-media-3 .mastodon-media-item:first-child {
    grid-row: span 2;
}

.mastodon-media-4 {
    grid-template-columns: 1fr 1fr;
}

.mastodon-media-item {
    display: block;
    position: relative;
    background: #f0f0f0;
    overflow: hidden;
}

.mastodon-media-item img,
.mastodon-media-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.2s ease;
}

.mastodon-media-item:hover img {
    transform: scale(1.02);
}

.mastodon-media-1 .mastodon-media-item img,
.mastodon-media-1 .mastodon-media-item video {
    max-height: 400px;
    object-fit: contain;
    background: #1a1a1a;
}

.mastodon-video video {
    max-height: 400px;
}

/* Post-Statistiken */
.mastodon-post-stats {
    display: flex;
    gap: 20px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
}

.mastodon-post-stats span {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #666;
    font-size: 13px;
}

.mastodon-post-stats svg {
    opacity: 0.7;
}

/* Follow-Link */
.mastodon-follow-link {
    display: block;
    padding: 14px 16px;
    text-align: center;
    background: #f7f7f7;
    color: #595aff;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s ease;
}

.mastodon-follow-link:hover {
    background: #efefef;
}

/* Grüne Variante (optional per CSS-Klasse aktivierbar) */
.mastodon-feed.green .mastodon-feed-header {
    background: linear-gradient(135deg, #46962b 0%, #005437 100%);
}

.mastodon-feed.green .mastodon-post-content a,
.mastodon-feed.green .mastodon-follow-link {
    color: #005437;
}

.mastodon-feed.green .mastodon-reblog-info svg {
    color: #46962b;
}

/* Responsive */
@media (max-width: 480px) {
    .mastodon-post-header {
        flex-wrap: wrap;
    }
    
    .mastodon-post-date {
        width: 100%;
        margin-top: 8px;
        margin-left: 60px;
    }
    
    .mastodon-avatar {
        width: 42px;
        height: 42px;
    }
    
    .mastodon-post-stats {
        gap: 16px;
    }
}

/* Dark Mode Support 
@media (prefers-color-scheme: light) {
    .mastodon-feed {
        background: #1a1a2e;
        border-color: #2a2a4a;
    }
    
    .mastodon-post {
        border-color: #2a2a4a;
    }
    
    .mastodon-display-name,
    .mastodon-post-content {
        color: #e6e6e6;
    }
    
    .mastodon-username,
    .mastodon-post-date,
    .mastodon-post-stats span,
    .mastodon-reblog-info {
        color: #999;
    }
    
    .mastodon-post-stats {
        border-color: #2a2a4a;
    }
    
    .mastodon-follow-link {
        background: #2a2a4a;
    }
    
    .mastodon-follow-link:hover {
        background: #3a3a5a;
    }
}
*/