* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --accent-color: #3b82f6;
    --text-color: #1f2937;
    --text-light: #6b7280;
    --bg-color: #ffffff;
    --card-bg: #f1f5f9;
    --border-color: #e5e7eb;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --button-bg: var(--primary-color);
    --button-text: #ffffff;
    --link-color: var(--accent-color);
    --link-hover: var(--secondary-color);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: all 0.3s ease;
}

/* Dark Theme Overrides */
body.dark-theme {
    --primary-color: #60a5fa;
    --secondary-color: #3b82f6;
    --accent-color: #93c5fd;
    --text-color: #e0f2fe;
    --text-light: #94a3b8;
    --bg-color: #0f172a;
    --card-bg: #1e293b;
    --border-color: #334155;
    --shadow: 0 4px 6px rgba(255, 255, 255, 0.05);
    --button-bg: var(--primary-color);
    --button-text: #0f172a;
    --link-color: var(--accent-color);
    --link-hover: #60a5fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header Styles */
.header {
    background-color: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
}

.nav-brand i {
    font-size: 1.5rem;
}

.nav-brand h1 {
    font-size: 1.5rem;
    font-weight: 700;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-light);
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

.nav-link.active::after {
    content: "";
    position: absolute;
    bottom: -0.5rem;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--primary-color);
}

.theme-toggle {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 0.5rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    background-color: var(--primary-color);
    color: var(--button-text);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 4rem 0;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.broadcast-preview {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    /* maintain landscape video frame shape */
    border-radius: 12px;
    overflow: hidden;
    background-color: #eee;
    /* fallback gray */
}

.broadcast-preview img {
    width: 100%;
    height: 100%;
    object-fit: fill;
    display: block;
    border-radius: 12px;
}

.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    padding: 12px;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.play-overlay:hover {
    background-color: rgba(0, 0, 0, 0.7);
}

.broadcasts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

/* Individual card styling */
.broadcast-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}

.broadcast-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.card-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

/* Overlay elements */
.card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #e53935;
    color: #fff;
    padding: 4px 10px;
    font-size: 0.75rem;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.card-badge.trending {
    background: #fb8c00;
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.6);
    padding: 10px 14px;
    border-radius: 50%;
    cursor: pointer;
    color: #fff;
    transition: background 0.3s ease;
}

.play-button:hover {
    background: rgba(0, 0, 0, 0.8);
}

.duration {
    position: absolute;
    bottom: 10px;
    right: 12px;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 4px;
}

.card-content {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    /* color: #777; */
}

.card-meta .category {
    font-weight: 600;
    color: #1e88e5;
}

.card-content h3 {
    font-size: 1.1rem;
    font-weight: 600;
    /* color: #333; */
    margin: 0;
}

.card-content p {
    font-size: 0.95rem;
    /* color: #555; */
    margin: 0;
}

.card-stats {
    display: flex;
    gap: 16px;
    margin-top: 8px;
    font-size: 0.85rem;
    color: #666;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .card-image {
        height: 180px;
    }
}

@media (max-width: 480px) {
    .card-image {
        height: 150px;
    }

    .card-content h3 {
        font-size: 1rem;
    }
}

/* Main container limit */
.broadcasts-section .container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 16px;
}

/* Responsive grid layout */
#broadcastsGrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

/* Ensure no more than 4 cards per row on large screens */
@media (min-width: 1200px) {
    #broadcastsGrid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 1024px) {
    #broadcastsGrid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    #broadcastsGrid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    #broadcastsGrid {
        grid-template-columns: 1fr;
    }
}

.broadcasts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin: 0 auto;
    padding: 0 16px;
    max-width: 1300px;
}

/* Force 4 cards max per row on large screens */
@media (min-width: 1200px) {
    .broadcasts-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Adjust for tablets */
@media (max-width: 1024px) {
    .broadcasts-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .broadcasts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .broadcasts-grid {
        grid-template-columns: 1fr;
    }
}


.live-indicator {
    color: #ef4444;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.hero h2 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero p {
    font-size: 1.125rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: white;
    color: var(--primary-color);
    padding: 1rem 2rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.cta-button:hover {
    transform: translateY(-2px);
}

.broadcast-preview {
    position: relative;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(255, 255, 255, 0.9);
    color: var(--primary-color);
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.play-overlay:hover {
    background-color: white;
    transform: translate(-50%, -50%) scale(1.1);
}

/* Broadcasts Section */
.broadcasts-section {
    padding: 4rem 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2rem;
    font-weight: 700;
}

.filter-tabs {
    display: flex;
    gap: 0.5rem;
}

.filter-tab {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-light);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-tab:hover,
.filter-tab.active {
    background-color: var(--primary-color);
    color: var(--button-text);
    border-color: var(--primary-color);
}

.broadcasts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.broadcast-card {
    background-color: var(--card-bg);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    cursor: pointer;
}

.broadcast-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.broadcast-card.featured {
    grid-column: span 2;
}

.card-image {
    position: relative;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.broadcast-card.featured .card-image img {
    height: 250px;
}

.broadcast-card:hover .card-image img {
    transform: scale(1.05);
}

.card-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.card-badge.live {
    background-color: #ef4444;
    color: white;
}

.card-badge.trending {
    background-color: #f59e0b;
    color: white;
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    opacity: 0;
    transition: all 0.3s ease;
}

.broadcast-card:hover .play-button {
    opacity: 1;
}

.duration {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.card-content {
    padding: 1.5rem;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.category {
    background-color: var(--primary-color);
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.timestamp {
    color: var(--text-light);
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.card-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.card-content p {
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.card-stats {
    display: flex;
    gap: 1rem;
    color: var(--text-light);
    font-size: 0.875rem;
}

.card-stats span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.load-more-section {
    text-align: center;
    margin-top: 3rem;
}

.load-more-btn {
    background-color: var(--button-bg);
    color: var(--button-text);
    border: none;
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.load-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero h2 {
        font-size: 2rem;
    }

    .section-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .filter-tabs {
        flex-wrap: wrap;
    }

    .broadcasts-grid {
        grid-template-columns: 1fr;
    }

    .broadcast-card.featured {
        grid-column: span 1;
    }

    .nav-menu {
        gap: 1rem;
    }

    .nav-link {
        font-size: 0.875rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 0.5rem;
    }

    .hero {
        padding: 2rem 0;
    }

    .broadcasts-section {
        padding: 2rem 0;
    }

    .broadcasts-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .card-content {
        padding: 1rem;
    }
}

/* Generic Card Component */
.card {
    background-color: var(--card-bg);
    color: var(--text-color);
    padding: 1.5rem;
    border-radius: 0.75rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}