/* ====================================
   NEWS CARDS - Modern Design
   ==================================== */

/* Scroll-Fix für News-Seiten - überschreibt globale overflow:hidden */
body.is-mainpage,
body.news-page {
    overflow-y: auto !important;
    height: auto !important;
    min-height: 100vh;
}

body.is-mainpage .main-content,
body.news-page .main-content {
    overflow-y: auto !important;
    height: auto !important;
    min-height: calc(100vh - 60px);
    padding-bottom: 100px;
}

/* Mobile Scroll Fix */
@media (max-width: 768px) {

    body.is-mainpage,
    body.news-page {
        overflow-y: auto !important;
        height: auto !important;
        position: relative !important;
    }

    body.is-mainpage .main-content,
    body.news-page .main-content {
        overflow-y: auto !important;
        height: auto !important;
        -webkit-overflow-scrolling: touch;
    }
}

.news-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 20px;
    max-width: 800px;
    margin: 0 auto;
}

.news-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: rgba(255, 255, 255, 0.6);
}

.news-loading .spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(135, 252, 116, 0.2);
    border-top-color: #87fc74;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

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

.news-empty {
    text-align: center;
    padding: 60px 20px;
    color: rgba(255, 255, 255, 0.5);
}

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

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

.news-empty p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.4);
}

/* News Card */
.news-card {
    background: linear-gradient(145deg, rgba(30, 30, 30, 0.95), rgba(20, 20, 20, 0.98));
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(135, 252, 116, 0.15);
    transition: all 0.3s ease;
    position: relative;
}

.news-card:hover {
    transform: translateY(-2px);
    border-color: rgba(135, 252, 116, 0.35);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4),
        0 0 20px rgba(135, 252, 116, 0.1);
}

/* Hervorgehobener Artikel (wenn man zurückkommt) */
.news-card.highlighted-article {
    animation: subtle-pulse 2s ease-in-out infinite;
}

/* Topic Badge */
.news-topic-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.news-topic-badge.INJURY {
    background: linear-gradient(135deg, #ff4444, #cc0000);
    color: white;
}

.news-topic-badge.TRANSFER {
    background: linear-gradient(135deg, #4488ff, #0055cc);
    color: white;
}

.news-topic-badge.TRANSFER_RUMOR {
    background: linear-gradient(135deg, #9944ff, #6600cc);
    color: white;
}

.news-topic-badge.CONTRACT {
    background: linear-gradient(135deg, #44cc44, #009900);
    color: white;
}

.news-topic-badge.TRAINING {
    background: linear-gradient(135deg, #ffaa00, #cc8800);
    color: white;
}

.news-topic-badge.SUSPENSION {
    background: linear-gradient(135deg, #ff6600, #cc4400);
    color: white;
}

.news-topic-badge.MILESTONE {
    background: linear-gradient(135deg, #ffd700, #b8860b);
    color: #333;
}

.news-topic-badge.FEEDBACK {
    background: linear-gradient(135deg, #00cccc, #008888);
    color: white;
}

.news-topic-badge.MANAGEMENT_CHANGE {
    background: linear-gradient(135deg, #888888, #555555);
    color: white;
}

.news-topic-badge.PRE_MATCH {
    background: linear-gradient(135deg, #87fc74, #5bc94a);
    color: #1a1a1a;
}

.news-topic-badge.POST_MATCH {
    background: linear-gradient(135deg, #87fc74, #5bc94a);
    color: #1a1a1a;
}

.news-topic-badge.OTHER {
    background: linear-gradient(135deg, #666666, #444444);
    color: white;
}

/* News Content */
.news-content {
    padding: 20px;
}

.news-title {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 12px;
    line-height: 1.4;
    padding-right: 100px;
    /* Platz für Badge */
}

.news-lead {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.6;
    margin-bottom: 16px;
}

.news-body {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.7;
    margin-bottom: 16px;
}

.news-body p {
    margin-bottom: 8px;
}

.news-body ul {
    margin: 8px 0;
    padding-left: 20px;
}

.news-body li {
    margin-bottom: 4px;
}

/* News Meta */
.news-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
}

.news-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.news-meta-item svg {
    width: 14px;
    height: 14px;
    opacity: 0.6;
}

/* Sources Section */
.news-sources {
    background: rgba(0, 0, 0, 0.3);
    padding: 16px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.news-sources-header {
    font-size: 11px;
    font-weight: 600;
    color: rgba(135, 252, 116, 0.8);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 10px;
}

.news-sources-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.news-source-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(135, 252, 116, 0.1);
    border: 1px solid rgba(135, 252, 116, 0.2);
    border-radius: 20px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.news-source-link:hover {
    background: rgba(135, 252, 116, 0.2);
    border-color: rgba(135, 252, 116, 0.4);
    color: #fff;
    transform: translateY(-1px);
}

.news-source-link svg {
    width: 12px;
    height: 12px;
    opacity: 0.7;
}

/* Confidence Indicator */
.news-confidence {
    display: flex;
    align-items: center;
    gap: 8px;
}

.news-confidence-bar {
    width: 60px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.news-confidence-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.3s ease;
}

.news-confidence-fill.high {
    background: linear-gradient(90deg, #87fc74, #5bc94a);
}

.news-confidence-fill.medium {
    background: linear-gradient(90deg, #ffaa00, #cc8800);
}

.news-confidence-fill.low {
    background: linear-gradient(90deg, #ff4444, #cc0000);
}

/* Topic Translation */
.topic-label {
    font-size: 12px;
    opacity: 0.7;
}

/* Responsive */
@media (max-width: 600px) {
    .news-container {
        padding: 12px;
        gap: 12px;
    }

    .news-content {
        padding: 16px;
    }

    .news-title {
        font-size: 16px;
        padding-right: 0;
        margin-top: 40px;
        /* Platz für Badge */
    }

    .news-topic-badge {
        top: 12px;
        right: 12px;
    }

    .news-meta {
        flex-direction: column;
        gap: 8px;
    }

    .news-sources {
        padding: 12px 16px;
    }

    .news-sources-list {
        gap: 6px;
    }
}

/* Load More Button */
.news-load-more {
    display: flex;
    justify-content: center;
    padding: 20px;
}

.news-load-more-btn {
    padding: 12px 32px;
    background: linear-gradient(135deg, rgba(135, 252, 116, 0.2), rgba(135, 252, 116, 0.1));
    border: 1px solid rgba(135, 252, 116, 0.3);
    border-radius: 25px;
    color: #87fc74;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.news-load-more-btn:hover {
    background: linear-gradient(135deg, rgba(135, 252, 116, 0.3), rgba(135, 252, 116, 0.2));
    border-color: rgba(135, 252, 116, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(135, 252, 116, 0.2);
}

.news-load-more-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* ====================================
   NEWS FEED - Hauptseite
   ==================================== */

.news-feed-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

.news-feed-header {
    text-align: center;
    margin-bottom: 24px;
}

.news-feed-header h2 {
    color: #fff;
    font-family: 'Russo One', sans-serif;
    font-size: 28px;
    margin: 0 0 8px 0;
}

.news-feed-subtitle {
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    overflow: visible;
}

/* Kompakte News Cards für Hauptseite */
a.news-card-compact,
.news-card-compact {
    background: linear-gradient(145deg, rgba(30, 30, 30, 0.95), rgba(20, 20, 20, 0.98));
    border-radius: 12px;
    padding: 16px;
    border: 1px solid rgba(135, 252, 116, 0.12);
    position: relative;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    display: block;
    color: inherit;
}

a.news-card-compact:hover,
.news-card-compact:hover {
    border-color: rgba(135, 252, 116, 0.3);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4),
        0 0 15px rgba(135, 252, 116, 0.08);
}

/* Hervorgehobener Artikel (wenn man zurückkommt) */
.news-card-compact.highlighted-article,
.news-card.highlighted-article {
    animation: subtle-pulse 2s ease-in-out infinite !important;
    transition: none !important;
}

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

.news-card-compact .news-topic-badge {
    position: relative;
    top: auto;
    right: auto;
    display: inline-block;
    margin-bottom: 0;
    font-size: 10px;
    padding: 4px 10px;
}

/* Badges Row - Topic + Entity Badges */
.news-badges-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
    align-items: center;
}

/* Entity Badges (Spieler & Teams) */
.news-entity-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
}

.news-entity-badge.player {
    background: rgba(100, 149, 237, 0.2);
    color: #6495ed;
    border: 1px solid rgba(100, 149, 237, 0.3);
}

.news-entity-badge.team {
    background: rgba(135, 252, 116, 0.15);
    color: #87fc74;
    border: 1px solid rgba(135, 252, 116, 0.25);
}

.news-entity-badge.source {
    background: rgba(255, 183, 77, 0.15);
    color: #ffb74d;
    border: 1px solid rgba(255, 183, 77, 0.25);
}

/* Sources Row */
.news-sources-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 8px;
}

.news-title-compact {
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    margin: 0 0 8px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-lead-compact {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    margin: 0 0 12px 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-meta-compact {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.news-time {
    display: flex;
    align-items: center;
    gap: 4px;
}

.news-sources-count {
    background: rgba(135, 252, 116, 0.15);
    padding: 2px 8px;
    border-radius: 10px;
    color: rgba(135, 252, 116, 0.8);
}

/* Share Button */
.news-share-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    background: rgba(135, 252, 116, 0.15);
    border: 1px solid rgba(135, 252, 116, 0.25);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 2;
}

.news-share-btn:hover {
    background: rgba(135, 252, 116, 0.3);
    transform: scale(1.1);
}

.news-share-btn svg {
    width: 14px;
    height: 14px;
    stroke: #87fc74;
}

/* News Card Footer mit Links und Share */
.news-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    margin-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.news-title-link {
    text-decoration: none;
    color: inherit;
}

.news-title-link:hover .news-title {
    color: #87fc74;
}

.news-read-more {
    color: #87fc74;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.news-read-more:hover {
    color: #fff;
    text-decoration: underline;
}

.news-card .news-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: rgba(135, 252, 116, 0.1);
    border: 1px solid rgba(135, 252, 116, 0.2);
    border-radius: 20px;
    color: #87fc74;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.news-card .news-share-btn:hover {
    background: rgba(135, 252, 116, 0.2);
    transform: translateY(-1px);
}

/* Toast Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Mobile Optimierung */
@media (max-width: 600px) {
    .news-feed-container {
        padding: 12px;
    }

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

    .news-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .news-card-compact {
        padding: 14px;
    }

    .news-card-footer {
        flex-direction: column;
        gap: 12px;
    }

    .news-card .news-share-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ===== LOAD MORE BUTTON ===== */
.load-more-container {
    display: flex;
    justify-content: center;
    padding: 30px 20px;
    margin-top: 20px;
}

.load-more-btn {
    background: linear-gradient(135deg, #87fc74 0%, #5cb85c 100%);
    color: #000;
    border: none;
    padding: 14px 40px;
    font-size: 16px;
    font-weight: 700;
    font-family: 'Russo One', sans-serif;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(135, 252, 116, 0.3);
    min-width: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.load-more-btn:hover:not(.disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(135, 252, 116, 0.4);
    background: linear-gradient(135deg, #9dff8a 0%, #6fcf6f 100%);
}

.load-more-btn:active:not(.disabled) {
    transform: translateY(0);
}

.load-more-btn.disabled {
    background: #444;
    color: #888;
    cursor: not-allowed;
    box-shadow: none;
}

.spinner-small {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(0, 0, 0, 0.2);
    border-top-color: #000;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@media (max-width: 768px) {
    .load-more-btn {
        width: 100%;
        max-width: 300px;
        padding: 12px 30px;
        font-size: 14px;
    }
}

/* ====================================
   NEWS CARDS V2 - Neues Design mit Hintergrund-Logos
   ==================================== */

/* V2 Card Container */
.news-v2-card {
    background: linear-gradient(145deg, rgba(30, 30, 30, 0.95), rgba(20, 20, 20, 0.98));
    border-radius: 12px;
    padding: 16px;
    border: 1px solid rgba(135, 252, 116, 0.12);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    text-decoration: none;
    display: block;
    color: inherit;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.news-v2-card:hover {
    border-color: rgba(135, 252, 116, 0.3);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 15px rgba(135, 252, 116, 0.08);
}

/* Hintergrund-Logos Container */
.news-v2-bg {
    position: absolute;
    top: -15%;
    left: 0;
    right: 0;
    bottom: -15%;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

/* Ein Team: zentriert */
.news-v2-bg.single-team {
    justify-content: center;
}

/* Zwei Teams: links und rechts */
.news-v2-bg.two-teams {
    justify-content: space-between;
}

/* Hintergrund-Logo Bilder */
.news-v2-bg-logo {
    height: 130%;
    width: auto;
    opacity: 0.12;
    object-fit: contain;
    filter: blur(2px);
}

/* Bei zwei Teams: außen abschneiden */
.news-v2-bg.two-teams .news-v2-bg-logo:first-child {
    margin-left: -25%;
}

.news-v2-bg.two-teams .news-v2-bg-logo:last-child {
    margin-right: -25%;
}

/* Content über dem Hintergrund */
.news-v2-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 120px;
}

/* Header Row: Spieler links, Teams rechts */
.news-v2-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 10px;
    min-height: 24px;
}

.news-v2-players,
.news-v2-teams {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.news-v2-players {
    justify-content: flex-start;
    max-width: 60%;
}

.news-v2-teams {
    justify-content: flex-end;
    max-width: 40%;
}

/* Entity Badge mit Farbschema */
.news-v2-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.news-v2-badge:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Titel */
.news-v2-title {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

/* Lead/Beschreibung */
.news-v2-lead {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    margin: 0 0 12px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Footer: Topic + Zeit */
.news-v2-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    padding-top: 8px;
}

/* Topic badge in v2 footer - override absolute positioning */
.news-v2-footer .news-topic-badge {
    position: static;
    top: auto;
    right: auto;
}

.news-v2-time {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
}

/* Favoriten-Highlight */
.news-v2-card.has-favorite {
    border-color: rgba(255, 215, 0, 0.4);
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.15);
}

.news-v2-card.has-favorite::before {
    content: '★';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 18px;
    color: #ffd700;
    z-index: 2;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.8), 0 0 4px rgba(0, 0, 0, 0.5);
}

/* Highlighted Artikel (zurückgekommen) */
.news-v2-card.highlighted {
    animation: news-v2-pulse 2s ease-in-out infinite;
}

@keyframes news-v2-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}
