/* News Hub Widget Styles */
#frogames-news-widget {
    position: fixed;
    bottom: 120px;
    right: 24px;
    z-index: 9997; /* Below RPG and Cookie banners */
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

#frogames-news-widget .news-fab {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: #449cb9; /* Frogames Teal */
    color: white;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(68, 156, 185, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

#frogames-news-widget .news-fab:hover {
    transform: scale(1.1) rotate(5deg);
    background: #368aa5;
    box-shadow: 0 8px 25px rgba(68, 156, 185, 0.6);
}

#frogames-news-widget .news-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #ef4444;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid #080708;
    display: none; /* Shown when there's new content */
}

/* MODAL / PANEL */
#news-hub-panel {
    position: fixed;
    bottom: 90px;
    right: 24px;
    width: 380px;
    max-height: 600px;
    background: #080708;
    border: 1px solid rgba(68, 156, 185, 0.3);
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 10000;
}

#news-hub-panel.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

.news-header {
    background: linear-gradient(135deg, #0f172a 0%, #080708 100%);
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.news-header h2 {
    color: white;
    font-size: 1.1rem;
    margin: 0;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.news-header h2 span {
    color: #449cb9;
}

.news-close {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 5px;
    transition: color 0.2s;
}

.news-close:hover {
    color: white;
}

.news-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    scrollbar-width: thin;
    scrollbar-color: #449cb9 rgba(255, 255, 255, 0.05);
}

.news-content::-webkit-scrollbar {
    width: 6px;
}

.news-content::-webkit-scrollbar-thumb {
    background: #449cb9;
    border-radius: 10px;
}

/* CARDS */
.news-item {
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    padding: 12px;
    margin-bottom: 15px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.news-item:hover {
    background: rgba(68, 156, 185, 0.1);
    border-color: rgba(68, 156, 185, 0.3);
    transform: translateY(-2px);
}

.news-item-thumb {
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 10px;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}

.news-item-type {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 6px;
    text-transform: uppercase;
}

.news-item-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.news-item-title {
    color: #f1f5f9;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-item-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: #94a3b8;
}

.news-item-source {
    display: flex;
    align-items: center;
    gap: 5px;
}

.news-footer {
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
}

.news-footer a {
    color: #449cb9;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
}

.news-footer a:hover {
    text-decoration: underline;
}

/* LOADING SHIMMER */
.news-skeleton {
    height: 120px;
    background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.03) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 14px;
    margin-bottom: 15px;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@media (max-width: 480px) {
    #news-hub-panel {
        width: calc(100vw - 48px);
        right: 24px;
        bottom: 90px;
    }
}
