body {
    font-family: 'Segoe UI', Arial, sans-serif;
    margin: 0;
    padding: 0;
    padding-bottom: 90px;
    /* Adjusted slightly for the new footer height */
    background: #0f0f11;
    color: #fff;
}

main {
    padding: 2rem 1rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* Platform Toggles */
.platform-toggles {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.toggle-btn {
    background: #27272a;
    border: 1px solid #3f3f46;
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.toggle-btn:hover {
    background: #3f3f46;
}

.toggle-btn.active {
    background: #fff;
    color: #000;
    border-color: #fff;
}

/* Pure Video Theater Zone */
.theater-zone {
    margin-bottom: 3rem;
    background: #18181b;
    border-radius: 8px;
    overflow: hidden;
}

.theater-split {
    display: block;
    border-bottom: 1px solid #27272a;
}

/* Removed grid to allow 100% width */
.player-container {
    background: #000;
    aspect-ratio: 16 / 9;
    width: 100%;
    position: relative;
}

.player-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.theater-metadata {
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.theater-metadata h2 {
    margin: 0;
    font-size: 1.5rem;
}

.source-link {
    color: #3b82f6;
    text-decoration: none;
    font-weight: bold;
    background: rgba(59, 130, 246, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 4px;
}

.source-link:hover {
    background: rgba(59, 130, 246, 0.2);
}

/* Discover Grid */
.discover-heading {
    text-align: center;
    color: #a1a1aa;
    letter-spacing: 1px;
    font-size: 1rem;
    margin-top: 1rem;
}

#streams {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

/* Stream Cards */
.stream {
    background: #18181b;
    padding: 1.25rem;
    border-radius: 8px;
    transition: transform 0.2s, background 0.2s;
    border: 1px solid #27272a;
}

.stream:hover {
    background: #27272a;
    transform: translateY(-4px);
    border-color: #3f3f46;
}

.stream a {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
    cursor: pointer;
}

.thumbnail-wrapper {
    position: relative;
    width: 100%;
    margin-bottom: 0.75rem;
}

.stream img {
    width: 100%;
    border-radius: 6px;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
}

.viewer-badge {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    background: rgba(220, 38, 38, 0.9);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: bold;
}

.platform-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(0, 0, 0, 0.75);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: bold;
}

.twitch-badge {
    color: #a855f7;
}

.youtube-badge {
    color: #ef4444;
}

.stream h3 {
    font-size: 1.15rem;
    margin: 0 0 0.25rem 0;
    line-height: 1.3;
}

.stream p.channel-name {
    font-size: 0.95rem;
    color: #a1a1aa;
    margin: 0 0 0.5rem 0;
    font-weight: bold;
}

.stream p.uptime {
    font-size: 0.85rem;
    color: #71717a;
    margin: 0 0 0.5rem 0;
}

.stream p.desc {
    font-size: 0.85rem;
    color: #71717a;
    margin: 0 0 1rem 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

/* Footer Branding & Links */
footer {
    background: #18181b;
    padding: 1rem 1.5rem;
    border-top: 1px solid #27272a;
    position: fixed;
    bottom: 0;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-branding {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: 1px;
    color: #fff;
}

.slogan {
    font-size: 0.85rem;
    color: #aaa;
    font-style: italic;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: #a1a1aa;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #fff;
}

#load-more {
    display: none;
    margin: 3rem auto;
    background: #18181b;
    border: 1px solid #3f3f46;
    color: #fff;
    padding: 0.75rem 2rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.1rem;
}

#load-more:hover {
    background: #27272a;
}

/* Responsive constraints */
@media (max-width: 900px) {
    #streams {
        grid-template-columns: repeat(2, 1fr);
    }

    footer {
        flex-direction: column;
        gap: 1rem;
        padding: 1.5rem;
    }

    body {
        padding-bottom: 120px;
    }
}

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

    .footer-links {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .theater-metadata {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    body {
        padding-bottom: 160px;
    }
}