.video-container {
    width: 100%;
    min-height: 330px;
    border-radius: 12px;
    border: 1px solid rgba(191, 215, 50, 0.16);
    background:
        radial-gradient(circle at 50% 4%, rgba(191, 215, 50, 0.16), transparent 56%),
        linear-gradient(170deg, #0c1015 0%, #090c11 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.video-placeholder {
    text-align: center;
    color: #c8d0d7;
    font-size: 0.95rem;
}

.video-placeholder p {
    margin-bottom: 5px;
}

.small-text {
    color: var(--text-muted);
    font-size: 0.82rem;
}

#video-player {
    width: 100%;
    max-height: 420px;
    border-radius: 10px;
}

.model-selector {
    margin-bottom: 10px;
}

#pipeline-mode-meta,
#prompt-template-meta {
    margin-bottom: 10px;
}

.model-selector label {
    display: block;
    margin-bottom: 7px;
    color: #cdd5dc;
    font-size: 0.83rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-weight: 600;
}

.model-dropdown,
.prompt-textarea {
    width: 100%;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(8, 11, 15, 0.62);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.92rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.model-dropdown {
    padding: 10px 12px;
    margin-bottom: 10px;
}

.prompt-textarea {
    resize: vertical;
    padding: 11px 12px;
    min-height: 98px;
    margin-bottom: 10px;
    line-height: 1.4;
}

.model-dropdown:focus,
.prompt-textarea:focus {
    outline: none;
    border-color: rgba(191, 215, 50, 0.7);
    box-shadow: 0 0 0 3px rgba(191, 215, 50, 0.12);
}

.model-dropdown:disabled,
.prompt-textarea:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.file-input-wrapper {
    margin-bottom: 10px;
}

.file-input {
    display: none;
}

.file-label {
    width: 100%;
    display: block;
    padding: 13px 14px;
    border-radius: 10px;
    border: 1px dashed rgba(191, 215, 50, 0.48);
    background:
        linear-gradient(180deg, rgba(191, 215, 50, 0.08), rgba(191, 215, 50, 0.03)),
        rgba(7, 10, 13, 0.58);
    color: #f1f8bc;
    text-align: center;
    font-size: 0.92rem;
    font-weight: 500;
    cursor: pointer;
}

.file-label.has-file {
    border-style: solid;
    border-color: var(--accent-strong);
    color: #141a02;
    background: linear-gradient(120deg, rgba(215, 241, 74, 0.95), rgba(191, 215, 50, 0.94));
}

.btn {
    width: 100%;
    border: none;
    border-radius: 10px;
    padding: 11px 14px;
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
}

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

.btn-primary {
    color: var(--accent-ink);
    background: linear-gradient(120deg, var(--accent-strong), var(--accent));
}

.btn-success {
    color: #eaf3f7;
    background: linear-gradient(120deg, #1d262f, #283441);
    border: 1px solid rgba(215, 241, 74, 0.35);
}

.btn-secondary {
    color: #deecf7;
    background: linear-gradient(120deg, #2a3540, #354455);
    border: 1px solid rgba(153, 176, 199, 0.42);
}

.btn-secondary:hover:not(:disabled) {
    filter: brightness(1.05);
}

.btn-ghost {
    color: #deecf7;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.btn-small {
    width: auto;
    padding: 8px 11px;
    font-size: 0.76rem;
}

.status-message {
    margin-top: 10px;
    border-radius: 10px;
    padding: 9px 11px;
    font-size: 0.84rem;
    border: 1px solid transparent;
    display: none;
    line-height: 1.35;
}

.status-message.show {
    display: block;
}

.status-message.success {
    color: #e5ffef;
    background: rgba(71, 211, 127, 0.12);
    border-color: rgba(71, 211, 127, 0.45);
}

.status-message.error {
    color: #ffdce1;
    background: rgba(255, 102, 116, 0.14);
    border-color: rgba(255, 102, 116, 0.45);
}

.status-message.info {
    color: #d7e0e8;
    background: rgba(132, 154, 176, 0.14);
    border-color: rgba(132, 154, 176, 0.32);
}

.status-message.loading {
    color: #fff4d8;
    background: rgba(244, 200, 78, 0.14);
    border-color: rgba(244, 200, 78, 0.45);
}

.activity-config-panel {
    display: grid;
    gap: 12px;
    margin: 14px 0;
    padding: 14px;
    border-radius: 12px;
    border: 1px solid rgba(80, 238, 199, 0.18);
    background: rgba(80, 238, 199, 0.04);
}

.activity-section-head {
    margin-bottom: 0;
}

.activity-preset-toolbar,
.activity-preset-grid,
.activity-threshold-grid,
.zone-grid {
    display: grid;
    gap: 10px;
}

.activity-preset-toolbar {
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
}

.activity-preset-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.activity-threshold-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.activity-threshold-grid label,
.activity-checkbox-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: #dce7ef;
    font-size: 0.78rem;
}

.activity-checkbox-field {
    justify-content: flex-end;
}

.activity-checkbox-field input {
    width: 18px;
    height: 18px;
}

.activity-zone-editor {
    display: grid;
    gap: 10px;
}

.zone-editor-head,
.zone-row-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.zone-editor-head h4 {
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #edf4f8;
}

.zone-rows-container {
    display: grid;
    gap: 10px;
}

.zone-row {
    display: grid;
    gap: 10px;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
}

.zone-row-head strong {
    color: #f0f6fa;
    font-size: 0.82rem;
}

.zone-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.zone-input {
    width: 100%;
}

.upload-divider {
    position: relative;
    margin: 14px 0 12px;
    text-align: center;
}

.upload-divider::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: rgba(255, 255, 255, 0.12);
}

.upload-divider span {
    position: relative;
    z-index: 1;
    padding: 0 10px;
    background: rgba(17, 23, 30, 0.92);
    color: #aeb8c3;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.url-upload-form label {
    display: block;
    margin-bottom: 7px;
    color: #cdd5dc;
    font-size: 0.83rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-weight: 600;
}

.url-input {
    width: 100%;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(8, 11, 15, 0.62);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.92rem;
    padding: 11px 12px;
    margin-bottom: 10px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.url-input:focus {
    outline: none;
    border-color: rgba(191, 215, 50, 0.7);
    box-shadow: 0 0 0 3px rgba(191, 215, 50, 0.12);
}

.upload-note {
    margin-top: 8px;
}

.rtsp-upload-form {
    margin-top: 2px;
}

.rtsp-inline-fields {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 130px;
    gap: 8px;
    margin-bottom: 10px;
}

.rtsp-inline-fields .url-input {
    margin-bottom: 0;
}

.rtsp-seconds-input {
    text-align: center;
}


.stream-status-panel {
    display: grid;
    gap: 0.35rem;
    margin-bottom: 1rem;
    padding: 0.9rem 1rem;
    border-radius: 12px;
    border: 1px solid rgba(191, 215, 50, 0.16);
    background: rgba(191, 215, 50, 0.06);
}
