:root {
    --background-color: #181818;
    --surface-color: #282828;
    --surface-color-hover: #3a3a3a;
    --primary-color: #00A0F0;
    --secondary-color: #FFD700;
    --text-color: #E0E0E0;
    --text-color-dark: #181818;
    --red-color: #D93025;
    --green-color: #34A853;
    --border-color: #444;
    --border-radius: 4px;
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    font-family: 'Roboto', 'Helvetica Neue', Arial, sans-serif;
}

.main-header {
    background-color: var(--surface-color);
    border-bottom: 1px solid var(--border-color);
    padding: 0.75rem 1.5rem;
}

.video-panel {
    background-color: #000;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    aspect-ratio: 16 / 9;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    transition: background-color 0.3s ease;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.video-panel .panel-label {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 5px 10px;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    font-weight: bold;
    text-transform: uppercase;
}

.video-panel .scene-content {
    font-size: 1.5rem;
    font-weight: bold;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
}

#preview-panel .panel-label {
    background-color: var(--green-color);
    color: #fff;
}

#program-panel .panel-label {
    background-color: var(--red-color);
    color: #fff;
}

.control-panel {
    background-color: var(--surface-color);
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-top: 1rem;
}

.scene-list .list-group-item {
    background-color: var(--surface-color);
    color: var(--text-color);
    border-color: var(--border-color);
    cursor: pointer;
    transition: background-color 0.2s;
}

.scene-list .list-group-item:hover {
    background-color: var(--surface-color-hover);
}

.scene-list .list-group-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.scene-list .scene-name {
    flex-grow: 1;
    cursor: pointer;
}

.scene-list .remove-scene-btn {
    margin-left: 1rem;
    visibility: hidden; /* Hidden by default */
    opacity: 0;
    transition: opacity 0.2s, visibility 0.2s;
}

.scene-list .list-group-item:hover .remove-scene-btn {
    visibility: visible; /* Show on hover */
    opacity: 1;
}

#add-scene-btn {
    padding: 0.2rem 0.5rem;
    font-size: 0.9rem;
}

.scene-list .list-group-item.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

.transition-controls .btn {
    font-size: 1.2rem;
    font-weight: bold;
    padding: 0.75rem 0;
    width: 120px;
}

.btn-cut {
    background-color: var(--secondary-color);
    color: var(--text-color-dark);
    border: none;
}
.btn-cut:hover {
    background-color: #ffed4a;
    color: var(--text-color-dark);
}

.btn-fade {
    background-color: #6c757d;
    color: #fff;
    border: none;
}
.btn-fade:hover {
    background-color: #5a6268;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1040;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-dialog {
    background-color: var(--surface-color);
    color: var(--text-color);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    width: 100%;
    max-width: 500px;
}

.modal-content {
    background-color: transparent;
    border: none;
}

.modal-header, .modal-footer {
    border-bottom-color: var(--border-color);
    border-top-color: var(--border-color);
}

.modal-body .form-control, .modal-body .form-select {
    background-color: var(--background-color);
    color: var(--text-color);
    border-color: var(--border-color);
}

.modal-body .form-control:focus, .modal-body .form-select:focus {
    background-color: var(--background-color);
    color: var(--text-color);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(0, 160, 240, 0.25);
}

.modal-body .form-control-color {
    min-height: 38px;
}