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

body {
    font-family: Inter, Segoe UI, sans-serif;
    background: #f4f6f9;
    min-height: 90vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.viewer {
    width: 100%;
    max-width: 720px;

    background: white;
    border-radius: 24px;

    padding: 24px;

    box-shadow:
        0 10px 30px rgba(0,0,0,.08),
        0 2px 8px rgba(0,0,0,.05);
}

.viewer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;

    margin-bottom: 20px;
}

.camera-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.camera-info h2 {
    color: #1e293b;
    font-size: 24px;
    font-weight: 600;
}

.live-badge {
    background: #eef2ff;
    color: #4f46e5;

    padding: 6px 12px;

    border-radius: 10px;

    font-size: 14px;
    font-weight: 600;
}

.status {
    padding: 8px 16px;
    border-radius: 999px;

    font-weight: 600;
    font-size: 14px;
}

.disconnected {
    background: #fee2e2;
    color: #dc2626;
}

.connected {
    background: #dcfce7;
    color: #16a34a;
}

.player-wrapper {
    width: 100%;
    overflow: hidden;

    border-radius: 20px;
    position: relative;
    align-items: center;

    background: #000;

    box-shadow:
        inset 0 0 0 1px rgba(255,255,255,.05);
}

video {
    width: 100%;
    display: block;
    position: relative;

    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.viewer-footer {
    margin-top: 24px;

    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.camera-select {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.camera-select label {
    color: #64748b;
    font-size: 14px;
}

.camera-select input {
    width: 260px;

    padding: 12px 16px;

    border: 1px solid #dbe2ea;
    border-radius: 12px;

    font-size: 15px;
    outline: none;
}

.camera-select input:focus {
    border-color: #4f46e5;
}

.buttons {
    display: flex;
    gap: 12px;
}

.btn {
    border: 1px solid #dbe2ea;
    background: white;

    padding: 12px 22px;

    border-radius: 12px;

    cursor: pointer;

    font-size: 15px;
    transition: .2s;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn.primary {
    background: #4f46e5;
    border-color: #4f46e5;
    color: white;
}

.btn.primary:hover {
    background: #4338ca;
}

.btn.danger {
    color: #dc2626;
    border-color: #fecaca;
}

.btn.danger:hover {
    background: #fef2f2;
}

@media (max-width: 768px) {

    body {
        padding: 15px;
    }

    .viewer {
        padding: 16px;
    }

    .viewer-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .viewer-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }

    .camera-select {
        width: 100%;
    }

    .camera-select input {
        width: 100%;
    }

    .buttons {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .btn {
        width: 100%;
    }

    .status {
        align-self: flex-start;
    }
}