html,
body {
    min-height: 100%;
    margin: 0;
}

body {
    font-family: "Segoe UI", "Trebuchet MS", sans-serif;
    color: #163042;
    background:
        radial-gradient(circle at top left, rgba(20, 68, 90, 0.2), transparent 28%),
        radial-gradient(circle at bottom right, rgba(74, 144, 226, 0.14), transparent 24%),
        linear-gradient(180deg, #f5f9fc 0%, #edf3f7 100%);
}

button,
input,
a {
    font: inherit;
}

.page-shell {
    max-width: 1560px;
    margin: 0 auto;
    padding: 28px 18px 40px;
}

.panel {
    border-radius: 24px;
    border: 1px solid rgba(20, 68, 90, 0.1);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: 0 24px 48px rgba(22, 48, 66, 0.08);
}

.hero-card,
.controls-panel,
.streams-panel {
    padding: 24px;
}

.eyebrow,
.section-kicker {
    margin: 0;
    color: #1f6f96;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.72rem;
    font-weight: 700;
}

.hero-heading,
.controls-panel,
.section-header,
.stream-meta {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
}

.hero-heading h1,
.controls-copy h2,
.section-header h2,
.stream-meta h3 {
    margin: 0;
    font-weight: 700;
}

.hero-heading p,
.controls-copy p,
.stream-meta p {
    margin: 8px 0 0;
    color: #546b79;
}

.hero-actions,
.controls-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

button,
.ghost-button {
    border: none;
    border-radius: 999px;
    padding: 12px 18px;
    cursor: pointer;
    text-decoration: none;
    transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

button:hover,
.ghost-button:hover {
    transform: translateY(-1px);
}

.primary-button,
#copyRoomLinkButton {
    background: linear-gradient(135deg, #14445a, #1f6f96);
    color: #ffffff;
    box-shadow: 0 14px 30px rgba(31, 111, 150, 0.24);
}

.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(31, 111, 150, 0.08);
    color: #14445a;
    border: 1px solid rgba(20, 68, 90, 0.12);
}

.stats-grid {
    margin-top: 24px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.stat-card {
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid rgba(20, 68, 90, 0.08);
    background: linear-gradient(180deg, rgba(245, 249, 252, 0.98), rgba(236, 243, 247, 0.98));
}

.stat-label {
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.78rem;
    color: #657c8b;
}

.stat-card strong {
    display: block;
    margin-top: 8px;
    font-size: 1.05rem;
}

.status-stack {
    margin-top: 20px;
}

.status-banner {
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(20, 68, 90, 0.1);
    background: rgba(245, 249, 252, 0.98);
    color: #36505f;
}

.controls-panel {
    margin-top: 20px;
}

.streams-panel {
    margin-top: 20px;
}

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

.stream-card {
    padding: 16px;
    border-radius: 22px;
    border: 1px solid rgba(20, 68, 90, 0.08);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(239, 245, 249, 0.96));
}

.stream-media {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px;
    box-sizing: border-box;
    border-radius: 20px;
    aspect-ratio: 1 / 1;
    background:
        linear-gradient(145deg, rgba(20, 68, 90, 0.86), rgba(31, 111, 150, 0.56)),
        #08141c;
}

.stream-media video,
.media-fallback {
    width: 100%;
    height: 100%;
}

.stream-media video {
    display: block;
    box-sizing: border-box;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 16px;
    object-fit: contain;
    object-position: center center;
    background: #061118;
}

.media-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at top, rgba(255, 255, 255, 0.16), transparent 42%),
        linear-gradient(180deg, rgba(6, 17, 24, 0.12), rgba(6, 17, 24, 0.45));
    color: #ffffff;
    font-size: clamp(30px, 6vw, 58px);
    font-weight: 700;
    letter-spacing: 0.08em;
}

.stream-meta {
    margin-top: 14px;
}

.stream-state {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 10px;
    background: rgba(31, 111, 150, 0.12);
    color: #14445a;
    font-size: 0.78rem;
    font-weight: 700;
}

.stream-state-soft {
    background: rgba(141, 156, 168, 0.18);
    color: #4e6472;
}

.stream-state-alert {
    background: rgba(191, 44, 69, 0.12);
    color: #b12240;
}

.badge-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.stream-info-list {
    display: grid;
    gap: 10px;
    margin: 14px 0 0;
}

.stream-info-list div {
    display: grid;
    gap: 4px;
}

.stream-info-list dt {
    color: #657c8b;
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.stream-info-list dd {
    margin: 0;
    color: #163042;
    font-weight: 600;
    word-break: break-word;
}

.stream-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.stream-actions .ghost-button {
    flex: 1 1 140px;
}

.status-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 0.82rem;
    font-weight: 600;
}

.chip-active {
    background: rgba(17, 154, 95, 0.14);
    color: #0d7e4d;
}

.chip-muted {
    background: rgba(191, 44, 69, 0.12);
    color: #b12240;
}

.empty-state {
    margin-top: 16px;
    padding: 18px;
    border-radius: 18px;
    border: 1px dashed rgba(31, 111, 150, 0.24);
    background: rgba(245, 249, 252, 0.94);
    color: #546b79;
}

.stream-media:fullscreen,
.stream-media:-webkit-full-screen {
    width: 100vw;
    height: 100vh;
    aspect-ratio: auto;
    padding: 0;
    border-radius: 0;
    background: #000000;
}

.stream-media:fullscreen video,
.stream-media:-webkit-full-screen video {
    border: none;
    border-radius: 0;
    object-fit: contain;
    background: #000000;
}

code {
    font-family: "Cascadia Code", "Consolas", monospace;
    font-size: 0.94em;
}

@media (max-width: 900px) {
    .hero-heading,
    .controls-panel,
    .section-header,
    .stream-meta {
        flex-direction: column;
    }
}

@media (max-width: 760px) {
    .page-shell {
        padding-inline: 14px;
    }

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