/* Box sizing and base */
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; padding: 0; overflow-x: hidden; }
body {
    display: flex;
    flex-direction: column;
    font-family: Arial, Helvetica, sans-serif;
    background: #f8f9fa;
    overflow: hidden; /* Prevent page scrollbars */
}

/* Layout variables (adjust if you change paddings) */
:root {
    --header-h: 72px;
    --footer-h: 56px;
    --side-gap: 1rem;
}

header {
    height: var(--header-h);
    padding: 0 var(--side-gap);
    display: flex;
    justify-content: flex-end;
    align-items: center;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.logo img {
    max-height: 48px;
    width: auto;
}

main {
    flex: 1 1 auto;
    min-height: calc(100vh - var(--header-h) - var(--footer-h));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0; /* keep content within viewport */
}

.stream-container {
    width: 90%;
    max-width: 1200px;
    aspect-ratio: 16 / 9;
    max-height: calc(100vh - var(--header-h) - var(--footer-h) - 2rem);
    display: flex;
    justify-content: center;
    align-items: center;
    background: #000;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    overflow: hidden;
}

.stream-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: #000;
    display: block;
}

footer {
    height: var(--footer-h);
    min-height: var(--footer-h);
    background: #222;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 var(--side-gap);
    flex-shrink: 0;
}

.footer-links a {
    color: #fff;
    text-decoration: underline;
    margin: 0 0.5rem;
    font-size: 1rem;
}

@media (max-width: 800px) {
    :root { --header-h: 64px; --footer_h: 56px; }
    .logo img { max-height: 36px; }
    .stream-container { width: 95%; aspect-ratio: 16 / 9; max-height: calc(100vh - var(--header-h) - var(--footer-h) - 1.5rem); }
}

@media (max-width: 500px) {
    :root { --header-h: 56px; --footer_h: 56px; }
    header { padding: 0 0.5rem; }
    .stream-container { width: 100%; border-radius: 0; aspect-ratio: 16 / 9; max-height: calc(100vh - var(--header-h) - var(--footer-h)); }
    .footer-links a { font-size: 0.95rem; }
}
