* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", Tahoma, sans-serif;
    background: #f4f6fb;
    color: #1f2937;
}

.page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 96px 16px 16px;
    display: grid;
    gap: 16px;
}

.top-card,
.video-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
}

.top-card {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
}

.top-card h1 {
    margin: 0;
    font-size: 22px;
}

.sub-text {
    margin: 6px 0 0;
    color: #6b7280;
}

.status-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #9ca3af;
}

.dot.connecting {
    background: #f59e0b;
}

.dot.connected {
    background: #22c55e;
}

.dot.failed {
    background: #ef4444;
}

.video-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 10px;
    overflow: hidden;
}

#remote-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.video-empty {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #d1d5db;
    font-size: 15px;
    pointer-events: none;
}

.control-row {
    margin-top: 12px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn {
    border: 1px solid #d1d5db;
    background: #fff;
    color: #111827;
    border-radius: 8px;
    padding: 8px 14px;
    font-weight: 600;
    cursor: pointer;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    border-color: #2563eb;
    background: #2563eb;
    color: #fff;
}

.meta-row {
    margin-top: 12px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    font-size: 14px;
    color: #4b5563;
}

.error-box {
    margin-top: 12px;
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 10px;
    font-size: 14px;
}

.hidden {
    display: none !important;
}

@media (max-width: 768px) {
    .meta-row {
        grid-template-columns: 1fr;
    }
}
