/* ===== LIVE WIDGETS - Canlı Durum, Discord, YouTube ===== */

/* ===== TEMA DEĞİŞKENLERİ ===== */
:root {
    --bg-primary: #030308;
    --bg-secondary: #0a0a12;
    --bg-card: rgba(20, 20, 35, 0.6);
    --text-primary: #ffffff;
    --text-secondary: #9999bb;
    --accent-purple: #8b5cf6;
}

[data-theme="light"] {
    --bg-primary: #f8f9fc;
    --bg-secondary: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.9);
    --text-primary: #1a1a2e;
    --text-secondary: #64748b;
    --glass-border: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] body {
    background: var(--bg-primary);
    color: var(--text-primary);
}

[data-theme="light"] .navbar {
    background: rgba(255, 255, 255, 0.9) !important;
    border-color: rgba(0, 0, 0, 0.05) !important;
}

[data-theme="light"] .bg-animated {
    opacity: 0.3;
}

/* ===== TEMA TOGGLE BUTONU (KALDIRILDI) ===== */
.theme-toggle {
    display: none !important;
}

/* ===== ZİYARETÇİ SAYACI ===== */
.visitor-counter {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    font-size: 0.85rem;
    backdrop-filter: blur(10px);
}

.visitor-counter .live-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.visitor-counter .count {
    font-weight: 600;
    color: var(--text-primary);
}

.visitor-counter .label {
    color: var(--text-secondary);
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

/* ===== CANLI DURUM BADGE ===== */
.live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.live-indicator.live {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.live-indicator .live-dot {
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    animation: livePulse 1.5s infinite;
}

.live-indicator .live-text {
    color: #ef4444;
}

.live-indicator .viewer-count {
    padding-left: 6px;
    border-left: 1px solid rgba(239, 68, 68, 0.3);
    margin-left: 6px;
}

.live-indicator .offline-text {
    color: var(--text-secondary);
}

@keyframes livePulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    50% { opacity: 0.8; box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
}

/* ===== CANLI DURUM BANNER ===== */
.live-banner {
    display: none;
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #ef4444, #dc2626);
    padding: 12px 24px;
    border-radius: 30px;
    z-index: 9998;
    animation: slideDown 0.5s ease;
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.4);
}

.live-banner.active {
    display: flex;
    align-items: center;
    gap: 12px;
}

.live-banner .live-dot {
    width: 10px;
    height: 10px;
    background: white;
    border-radius: 50%;
    animation: livePulse 1s infinite;
}

.live-banner .live-info {
    display: flex;
    flex-direction: column;
}

.live-banner .live-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: white;
}

.live-banner .live-platform {
    font-size: 0.75rem;
    opacity: 0.9;
    color: white;
}

.live-banner .watch-btn {
    padding: 8px 16px;
    background: white;
    color: #ef4444;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
    transition: transform 0.2s;
}

.live-banner .watch-btn:hover {
    transform: scale(1.05);
}

@keyframes slideDown {
    from { transform: translateX(-50%) translateY(-100%); opacity: 0; }
    to { transform: translateX(-50%) translateY(0); opacity: 1; }
}

/* ===== DISCORD WIDGET ===== */
.discord-widget {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.discord-widget-content {
    padding: 20px;
}

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

.discord-header i {
    font-size: 1.5rem;
    color: #5865F2;
}

.discord-name {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.discord-stats {
    display: flex;
    gap: 24px;
    margin-bottom: 16px;
}

.discord-stat {
    display: flex;
    flex-direction: column;
}

.discord-stat .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.discord-stat .stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.discord-join-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px;
    background: #5865F2;
    color: white;
    border-radius: 10px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.discord-join-btn:hover {
    background: #4752c4;
    transform: translateY(-2px);
}

.discord-widget-fallback,
.discord-widget-error {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px;
    color: var(--text-secondary);
}

.discord-widget-fallback i,
.discord-widget-error i {
    font-size: 1.5rem;
    color: #5865F2;
}

/* ===== YOUTUBE SON VİDEO ===== */
.youtube-widget {
    display: block;
    text-decoration: none;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.youtube-widget:hover {
    transform: translateY(-4px);
    border-color: #ff0000;
}

.youtube-video-card {
    display: flex;
    flex-direction: column;
}

.video-thumbnail {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.youtube-widget:hover .video-thumbnail img {
    transform: scale(1.05);
}

.video-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    padding: 2px 6px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 4px;
}

.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(255, 0, 0, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.youtube-widget:hover .play-overlay {
    opacity: 1;
}

.play-overlay i {
    color: white;
    font-size: 1.5rem;
    margin-left: 4px;
}

.video-info {
    padding: 16px;
}

.video-info h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-meta {
    display: flex;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* ===== WIDGETS GRID ===== */
.widgets-section {
    padding: 60px 0;
}

.widgets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

/* ===== STREAM STATUS SECTION ===== */
.stream-status-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 12px 20px;
    background: var(--bg-card);
    border-radius: 30px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.stream-status-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.stream-status-item i {
    font-size: 1.2rem;
}

.stream-status-item.twitch i { color: #9146ff; }
.stream-status-item.kick i { color: #53fc18; }
.stream-status-item.youtube i { color: #ff0000; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .theme-toggle {
        bottom: 90px;
        right: 16px;
        width: 44px;
        height: 44px;
    }
    
    .live-banner {
        top: auto;
        bottom: 80px;
        left: 16px;
        right: 16px;
        transform: none;
        border-radius: 16px;
    }
    
    .live-banner.active {
        flex-wrap: wrap;
        justify-content: center;
        text-align: center;
    }
    
    .widgets-grid {
        grid-template-columns: 1fr;
    }
    
    .stream-status-bar {
        flex-direction: column;
        gap: 12px;
    }
    
    .visitor-counter {
        font-size: 0.8rem;
        padding: 6px 12px;
    }
}
