/* Live Streaming Styles */
.live-streaming-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: linear-gradient(135deg, #ff6b35, #ff8c42);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.live-streaming-btn:hover {
    background: linear-gradient(135deg, #ff7a45, #ff9b52);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
}

.live-streaming-btn .live-indicator {
    animation: pulse 2s infinite;
}

.live-streaming-btn .live-count {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 6px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    min-width: 20px;
    text-align: center;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Live Streaming Section */
.live-streaming-section {
    margin: 40px 0;
    padding: 24px;
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.1), rgba(255, 140, 66, 0.05));
    border-radius: 16px;
    border: 1px solid rgba(255, 107, 53, 0.2);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.section-header h2 {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    font-size: 28px;
    font-weight: 700;
    margin: 0;
}

.live-badge {
    background: linear-gradient(135deg, #ff6b35, #ff8c42);
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    animation: pulse 2s infinite;
}

.section-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.category-filter {
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    outline: none;
    transition: all 0.3s ease;
}

.category-filter:focus {
    border-color: #ff6b35;
    box-shadow: 0 0 0 2px rgba(255, 107, 53, 0.2);
}

.category-filter option {
    background: #0a0a0a;
    color: #fff;
}

.platform-filter {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: #ccc;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.platform-filter:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.platform-filter.active {
    background: rgba(255, 107, 53, 0.2);
    border-color: rgba(255, 107, 53, 0.5);
    color: #ff6b35;
}

.refresh-btn {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.refresh-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

/* Live Streams Grid */
.live-streams-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.live-stream-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

.live-stream-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 107, 53, 0.3);
}

.stream-thumbnail {
    position: relative;
    width: 100%;
    height: 180px;
    overflow: hidden;
}

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

.live-stream-card:hover .stream-thumbnail img {
    transform: scale(1.05);
}

.stream-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.4) 100%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 12px;
}

.platform-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    backdrop-filter: blur(4px);
}

.platform-badge.twitch {
    background: rgba(156, 84, 255, 0.9);
}

.platform-badge.youtube {
    background: rgba(255, 0, 0, 0.9);
}

.viewers-count {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    backdrop-filter: blur(4px);
}

.live-status {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: linear-gradient(135deg, #ff6b35, #ff8c42);
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    animation: pulse 2s infinite;
}

.stream-info {
    padding: 16px;
}

.stream-title {
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 8px 0;
    line-height: 1.4;
}

.stream-game {
    color: #999;
    font-size: 14px;
    margin: 0 0 12px 0;
    line-height: 1.3;
}

.stream-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.stream-language,
.stream-platform {
    background: rgba(255, 255, 255, 0.1);
    color: #ccc;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
}

.stream-actions {
    display: flex;
    gap: 8px;
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.watch-btn,
.follow-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.watch-btn {
    background: linear-gradient(135deg, #ff6b35, #ff8c42);
    color: #fff;
}

.watch-btn:hover {
    background: linear-gradient(135deg, #ff7a45, #ff9b52);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.follow-btn {
    background: rgba(255, 255, 255, 0.1);
    color: #ccc;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.follow-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    transform: translateY(-1px);
}

.follow-btn.following {
    background: rgba(76, 175, 80, 0.2);
    border-color: rgba(76, 175, 80, 0.4);
    color: #4caf50;
}

/* Loading and Error States */
.loading-state,
.error-state,
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    color: #666;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: #ff6b35;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

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

.error-state svg,
.empty-state svg {
    margin-bottom: 16px;
    color: #333;
}

.error-state h3,
.empty-state h3 {
    color: #fff;
    font-size: 18px;
    margin: 16px 0 8px 0;
}

.error-state p,
.empty-state p {
    color: #999;
    font-size: 14px;
    margin: 0 0 20px 0;
}

.retry-btn {
    padding: 10px 20px;
    background: rgba(255, 107, 53, 0.2);
    border: 1px solid rgba(255, 107, 53, 0.4);
    border-radius: 6px;
    color: #ff6b35;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.retry-btn:hover {
    background: rgba(255, 107, 53, 0.3);
    border-color: rgba(255, 107, 53, 0.6);
}

/* Live Streaming Modal */
.live-streaming-modal {
    max-width: 1200px;
    max-height: 90vh;
    width: 95vw;
    background: #0a0a0a;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.8);
}

.live-streaming-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    background: linear-gradient(180deg, #1a1a1a 0%, #0a0a0a 100%);
    border-bottom: 1px solid #333;
}

.live-streaming-modal .modal-header h2 {
    color: #fff;
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.live-streaming-modal .modal-body {
    padding: 24px;
    max-height: 70vh;
    overflow-y: auto;
}

.live-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-item {
    text-align: center;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
}

.stat-value {
    display: block;
    font-size: 32px;
    font-weight: 700;
    color: #ff6b35;
    margin-bottom: 8px;
}

.stat-label {
    color: #999;
    font-size: 14px;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
    .section-header {
        flex-direction: column;
        align-items: stretch;
    }

    .section-header h2 {
        font-size: 24px;
    }

    .section-controls {
        justify-content: center;
    }

    .live-streams-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .stream-thumbnail {
        height: 160px;
    }

    .stream-actions {
        flex-direction: column;
    }

    .watch-btn,
    .follow-btn {
        width: 100%;
    }

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

@media (max-width: 480px) {
    .live-streaming-section {
        margin: 20px 0;
        padding: 16px;
    }

    .section-header h2 {
        font-size: 20px;
    }

    .section-controls {
        flex-direction: column;
        gap: 8px;
    }

    .platform-filter {
        width: 100%;
        text-align: center;
    }

    .stream-thumbnail {
        height: 140px;
    }

    .stream-info {
        padding: 12px;
    }

    .stream-title {
        font-size: 14px;
    }

    .stream-game {
        font-size: 12px;
    }

    .stream-actions {
        padding: 12px;
    }
}

/* Animations */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.live-stream-card {
    animation: slideInUp 0.5s ease-out;
}

.live-stream-card:nth-child(1) { animation-delay: 0.1s; }
.live-stream-card:nth-child(2) { animation-delay: 0.2s; }
.live-stream-card:nth-child(3) { animation-delay: 0.3s; }
.live-stream-card:nth-child(4) { animation-delay: 0.4s; }
.live-stream-card:nth-child(5) { animation-delay: 0.5s; }

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .live-streaming-btn,
    .platform-filter,
    .refresh-btn,
    .live-stream-card,
    .stream-thumbnail img {
        animation: none;
        transition: none;
    }
    
    .live-indicator {
        animation: none;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .live-streaming-btn,
    .live-badge {
        border: 2px solid #fff;
    }
    
    .live-stream-card {
        border-width: 2px;
    }
    
    .platform-badge,
    .viewers-count,
    .live-status {
        border: 1px solid #fff;
    }
}

/* Print Styles */
@media print {
    .live-streaming-section,
    .live-streaming-modal {
        display: none !important;
    }
}

/* Performance Optimizations */
.stream-thumbnail img {
    will-change: transform;
    contain: layout paint;
}

.live-stream-card {
    will-change: transform;
    contain: layout style paint;
}

/* Tooltip Styles */
[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
    z-index: 1000;
    pointer-events: none;
    margin-bottom: 4px;
}
