body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #1a1a1a;
    color: #e0e0e0;
}

.navbar {
    background-color: #2a2a2a;
    padding: 10px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.navbar-controls button {
    margin: 0;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.navbar-controls #connectButton {
    background-color: #4a90e2;
    color: white;
    border-color: #4a90e2;
}

.navbar-controls #connectButton:hover {
    background-color: #357abd;
    border-color: #357abd;
    transform: translateY(-1px);
}

.navbar-controls #connectButton.connected {
    background-color: #f44336;
    border-color: #f44336;
}

.navbar-controls #connectButton.connected:hover {
    background-color: #d32f2f;
    border-color: #d32f2f;
}

.navbar-controls #streamButton {
    background-color: #4caf50;
    color: white;
    border-color: #4caf50;
}

.navbar-controls #streamButton:hover:not(:disabled) {
    background-color: #45a049;
    border-color: #45a049;
    transform: translateY(-1px);
}

.navbar-controls #streamButton.streaming {
    background-color: #ff9800;
    border-color: #ff9800;
}

.navbar-controls #streamButton.streaming:hover {
    background-color: #f57c00;
    border-color: #f57c00;
}

.navbar-controls #streamButton:disabled {
    background-color: #2a2a2a;
    color: #666;
    border-color: #444;
    cursor: not-allowed;
    transform: none;
}

.navbar-controls #fileInput {
    margin: 0;
    padding: 8px 12px;
    border-radius: 6px;
    border: 2px solid #555;
    background-color: #3a3a3a;
    color: #e0e0e0;
    transition: border-color 0.3s ease;
}

.navbar-controls #fileInput:hover {
    border-color: #4a90e2;
}

.navbar-controls #fileInput::-webkit-file-upload-button {
    background-color: #4a90e2;
    color: white;
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 8px;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.navbar-controls #fileInput::-webkit-file-upload-button:hover {
    background-color: #357abd;
}

.navbar-controls .reset-button {
    background-color: #2d4159;
    color: #4a90e2;
    border-color: #4a90e2;
}

.navbar-controls .reset-button:hover {
    background-color: #4a90e2;
    color: white;
    border-color: #4a90e2;
    transform: translateY(-1px);
}

.navbar-controls .random-button {
    background-color: #3d2d59;
    color: #b76cff;
    border-color: #b76cff;
}

.navbar-controls .random-button:hover {
    background-color: #b76cff;
    color: white;
    border-color: #b76cff;
    transform: translateY(-1px);
}

.navbar-controls #downloadBinButton {
    background-color: #2d4159;
    color: #4a90e2;
    border-color: #4a90e2;
}

.navbar-controls #downloadBinButton:hover:not(:disabled) {
    background-color: #4a90e2;
    color: white;
    border-color: #4a90e2;
    transform: translateY(-1px);
}

.navbar-controls #downloadBinButton:disabled {
    background-color: #2a2a2a;
    color: #666;
    border-color: #444;
    cursor: not-allowed;
    transform: none;
}

.navbar-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
    min-width: 150px;
}

.navbar-info #status {
    font-size: 0.8rem;
    padding: 6px 12px;
    border-radius: 4px;
    margin: 0;
}

.navbar-info #fps {
    color: #4a90e2;
    font-family: monospace;
    font-size: 0.8rem;
    margin: 0;
}

.navbar-info #conversionProgress {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
    min-width: 150px;
}

.navbar-info #conversionProgress .progress-bar {
    width: 120px;
    height: 12px;
    background-color: #2a2a2a;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #333;
}

.navbar-info #conversionProgress .progress-fill {
    height: 100%;
    background-color: #4a90e2;
    width: 0%;
    transition: width 0.3s ease;
}

.navbar-info #conversionProgress .progress-text {
    color: #4a90e2;
    font-family: monospace;
    font-size: 0.8rem;
}

/* Responsive navbar */
@media (max-width: 1024px) {
    .navbar {
        flex-direction: column;
        gap: 15px;
        padding: 15px 20px;
    }

    .navbar-controls {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

    .navbar-controls button {
        padding: 8px 16px;
        font-size: 0.8rem;
    }

    .navbar-controls #fileInput {
        width: 100%;
        max-width: 300px;
    }

    .navbar-info {
        align-items: center;
        min-width: auto;
    }
}

.container {
    border: 1px solid #333;
    padding: 20px;
    border-radius: 5px;
    background-color: #242424;
    max-width: none;
    margin: 5px 20px 20px 20px;
}

button {
    padding: 10px 20px;
    margin: 10px 0;
    cursor: pointer;
    background-color: #3a3a3a;
    color: #e0e0e0;
    border: 1px solid #555;
    border-radius: 4px;
    transition: background-color 0.2s;
}

button:hover {
    background-color: #4a4a4a;
}

button:disabled {
    background-color: #2a2a2a;
    color: #666;
    cursor: not-allowed;
}

#status {
    margin: 10px 0;
    padding: 10px;
    border-radius: 5px;
}

.success {
    background-color: #1b3320;
    color: #4caf50;
    border: 1px solid #2d592f;
}

.error {
    background-color: #331b1b;
    color: #f44336;
    border: 1px solid #592d2d;
}

.info {
    background-color: #1b2433;
    color: #2196f3;
    border: 1px solid #2d4159;
}

#preview,
#previewCanvas {
    width: 240px;
    height: 576px;
    background-color: #000;
    border: 1px solid #333;
    image-rendering: pixelated;
    display: block;
}

#processCanvas {
    display: none;
}

.controls {
    margin: 0px 0;
    padding: 12px;
    background-color: #2a2a2a;
    border-radius: 5px;
    border: 1px solid #333;
}

.control-group {
    margin: 8px 0;
}

.control-group label {
    display: block;
    margin-bottom: 8px;
    color: #e0e0e0;
    font-size: 12px;
}

input[type="range"] {
    width: 100%;
    max-width: 400px;
    background-color: #3a3a3a;
    height: 6px;
    border-radius: 3px;
    -webkit-appearance: none;
    transition: background-color 0.2s ease;
}

input[type="range"]:hover {
    background-color: #4a4a4a;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: #4a90e2;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

input[type="range"]:hover::-webkit-slider-thumb {
    background: #5ba0f2;
    box-shadow: 0 0 8px rgba(74, 144, 226, 0.4);
}

input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: #4a90e2;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    transition: background-color 0.2s ease;
}

input[type="range"]:hover::-moz-range-thumb {
    background: #5ba0f2;
}

.control-group span {
    margin-left: 10px;
    color: #4a90e2;
}

/* Custom toggle switch styles */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0px;
    color: #e0e0e0;
    font-size: 13px;
    cursor: pointer;
    line-height: 0.5;
    min-height: 0px;
}

.checkbox-label input[type="checkbox"] {
    position: relative;
    width: 40px;
    height: 20px;
    appearance: none;
    -webkit-appearance: none;
    background-color: #3a3a3a;
    border: 1px solid #555;
    border-radius: 20px;
    cursor: pointer;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    flex-shrink: 0;
    margin: 0;
}

.checkbox-label input[type="checkbox"]:before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 14px;
    height: 14px;
    background-color: #666;
    border-radius: 50%;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.checkbox-label input[type="checkbox"]:checked {
    background-color: #4a90e2;
    border-color: #4a90e2;
}

.checkbox-label input[type="checkbox"]:checked:before {
    transform: translateX(20px);
    background-color: #ffffff;
}

.checkbox-label input[type="checkbox"]:hover {
    border-color: #4a90e2;
}

.checkbox-label input[type="checkbox"]:hover:before {
    background-color: #888;
}

.checkbox-label input[type="checkbox"]:checked:hover:before {
    background-color: #ffffff;
}

input[type="file"] {
    padding: 10px;
    background-color: #3a3a3a;
    border: 1px solid #555;
    border-radius: 4px;
    color: #e0e0e0;
    margin: 0 10px;
}

input[type="file"]::-webkit-file-upload-button {
    background-color: #4a90e2;
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 10px;
}

#fps {
    color: #4a90e2;
    font-family: monospace;
    font-size: 14px;
    margin-top: 10px;
}

.preview-container {
    display: flex;
    gap: 20px;
    justify-content: flex-start;
    flex-wrap: nowrap;
}

.preview-box {
    flex: 0 0 auto;
    max-width: none;
}

.main-container {
    display: flex;
    gap: 20px;
    margin-top: 0px;
    padding: 0 0px;
}

.controls-container {
    flex: 0 0 300px;
}

.preview-section {
    flex: 1;
    min-width: 600px;
}

.colorize-control {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 10px 0;
}

.colorize-control input[type="color"] {
    width: 100%;
    height: 40px;
    padding: 2px;
    background: #3a3a3a;
    border: 1px solid #555;
    border-radius: 4px;
    cursor: pointer;
}

.colorize-control label {
    margin: 5px 0;
    font-size: 13px;
}

.color-saturation-control {
    display: none;
    flex-direction: column;
    gap: 10px;
    margin: 10px 0;
}

.color-saturation-control.active {
    display: flex;
}

.color-saturation-control input[type="color"] {
    width: 100%;
    height: 40px;
    padding: 2px;
    background: #3a3a3a;
    border: 1px solid #555;
    border-radius: 4px;
    cursor: pointer;
}

.color-saturation-control label {
    margin: 5px 0;
    font-size: 13px;
}

.color-selector {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.offset-control {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin: 0px 0;
}

.offset-control label {
    margin: 0px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.offset-control span {
    color: #4a90e2;
}

.playback-control {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin: 0px 0;
}

.playback-control label:not(.checkbox-label) {
    margin: 0px 0;
}

.playback-control label[for="playbackSpeed"] {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.playback-control span {
    color: #4a90e2;
}

.one-bit-control {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 10px 0;
    background: #333;
    border-radius: 4px;
    display: none;
    /* Hidden by default */
}

.one-bit-control.active {
    display: flex;
}

.one-bit-control input[type="color"] {
    width: 100%;
    height: 40px;
    padding: 2px;
    background: #3a3a3a;
    border: 1px solid #555;
    border-radius: 4px;
    cursor: pointer;
}

.one-bit-control label {
    margin: 5px 0;
    font-size: 13px;
}

.effects-panel {
    flex: 0 0 300px;
    background-color: #2a2a2a;
    border-radius: 5px;
    border: 1px solid #333;
    padding: 12px;
}

.effect-group {
    margin: 8px 0;
    padding: 8px;
    background: #333;
    border-radius: 4px;
}

.effect-group label {
    display: block;
    margin-bottom: 8px;
    color: #e0e0e0;
    font-size: 13px;
}

.time-display {
    text-align: center;
    padding: 5px;
    background: #333;
    border-radius: 4px;
    margin-top: 5px;
    font-family: monospace;
    color: #4a90e2;
}

.time-display span {
    font-size: 14px;
}

.gaussian-control {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 10px 0;
    background: #333;
    border-radius: 4px;
}

.gaussian-control label {
    margin: 5px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}

.gaussian-control span {
    color: #4a90e2;
}

.gaussian-sliders {
    display: none;
    margin-top: 10px;
}

.gaussian-sliders.active {
    display: block;
}

.color-swap-control {
    display: none;
    flex-direction: column;
    gap: 10px;
    margin: 10px 0;
    background: #333;
    border-radius: 4px;
}

.color-swap-control.active {
    display: flex;
}

.color-swap-control input[type="color"] {
    width: 100%;
    height: 40px;
    padding: 2px;
    background: #3a3a3a;
    border: 1px solid #555;
    border-radius: 4px;
    cursor: pointer;
}

.color-swap-control label {
    margin: 5px 0;
    font-size: 13px;
}

.mask-control {
    display: none;
    flex-direction: column;
    gap: 10px;
    margin: 10px 0;
    background: #333;
    border-radius: 4px;
}

.mask-control.active {
    display: flex;
}

.mask-control-row {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.mask-control-row label {
    margin: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mask-control-row span {
    color: #4a90e2;
}

.vignette-control {
    display: none;
    flex-direction: column;
    gap: 10px;
    margin: 10px 0;
    background: #333;
    border-radius: 4px;
}

.vignette-control.active {
    display: flex;
}

/* Add new slider row styles */
.slider-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 6px 0;
}

.slider-row label {
    flex: 0 0 100px;
    margin: 0;
    font-weight: 500;
    color: #e0e0e0;
    text-align: left;
    font-size: 13px;
}

.slider-row input[type="range"] {
    flex: 1;
    margin: 0;
    max-width: none;
    min-width: 150px;
}

.value-input {
    flex: 0 0 50px;
    padding: 4px 4px;
    background-color: #3a3a3a;
    border: 1px solid #555;
    border-radius: 4px;
    color: #e0e0e0;
    font-family: monospace;
    width: 100%;
    font-size: 12px;
    text-align: center;
    transition: border-color 0.3s ease, background-color 0.3s ease;
}

.value-input:focus {
    outline: none;
    border-color: #4a90e2;
    background-color: #404040;
}

.value-input::-webkit-outer-spin-button,
.value-input::-webkit-inner-spin-button {
    -webkit-appearance: auto;
    opacity: 0;
    height: auto;
    width: auto;
    margin: 0;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.value-input:hover::-webkit-outer-spin-button,
.value-input:hover::-webkit-inner-spin-button {
    opacity: 1;
}

.value-input[type="number"] {
    -moz-appearance: number-input;
}

/* Responsive styles for slider rows */
@media (max-width: 768px) {
    .slider-row {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .slider-row label {
        flex: none;
        text-align: center;
        font-size: 14px;
    }

    .value-input {
        flex: none;
        width: 100%;
        max-width: 100px;
        margin: 0 auto;
    }

    .controls-container {
        flex: none;
        width: 100%;
        margin-bottom: 20px;
    }

    .main-container {
        flex-direction: column;
    }

    .preview-section {
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .slider-row label {
        font-size: 12px;
    }

    .value-input {
        font-size: 12px;
        padding: 4px 6px;
    }

    .controls {
        padding: 10px;
    }
}

/* Pill label styles */
.pill-label {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 600;
    text-transform: lowercase;
    letter-spacing: 0.3px;
    margin-bottom: 6px;
    text-align: center;
    min-width: 30px;
}

.input-label {
    background-color: #2d4159;
    color: #4a90e2;
    border: 1px solid #4a90e2;
}

.output-label {
    background-color: #2d5930;
    color: #4caf50;
    border: 1px solid #4caf50;
}

/* Timeline Styles */
.timeline-container {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 300px;
    background: #1a1a1a;
    border-top: 2px solid #333;
    display: none;
    flex-direction: column;
    z-index: 1000;
}

.timeline-container.active {
    display: flex;
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background: #222;
    border-bottom: 1px solid #333;
}

.timeline-title {
    font-size: 16px;
    font-weight: bold;
    color: #fff;
}

.timeline-controls {
    display: flex;
    gap: 10px;
}

.timeline-button {
    padding: 5px 15px;
    background: #444;
    border: 1px solid #555;
    color: #fff;
    cursor: pointer;
    border-radius: 4px;
    font-size: 12px;
}

.timeline-button:hover {
    background: #555;
}

.timeline-button.active {
    background: #4a90e2;
    border-color: #5aa3f0;
}

.track-remove-button {
    background: transparent;
    border: 1px solid #555;
    color: #999;
    padding: 2px 5px;
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
    margin-right: 8px;
    border-radius: 3px;
    min-width: 20px;
    text-align: center;
}

.track-remove-button:hover {
    background: #333;
    color: #fff;
    border-color: #777;
}

.track-name {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.timeline-content {
    flex: 1;
    position: relative;
    display: flex;
}

.timeline-left-panel {
    position: sticky;
    left: 0;
    z-index: 15;
    background: #1a1a1a;
    border-right: 1px solid #444;
    flex-shrink: 0;
}

.timeline-scrollable {
    flex: 1;
    position: relative;
    overflow-x: auto;
    overflow-y: auto;
}

.timeline-ruler {
    height: 30px;
    background: #2a2a2a;
    border-bottom: 1px solid #444;
    position: relative;
    min-width: 100%;
}

.timeline-ruler::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 1px;
    background: #4a90e2;
    opacity: 0.5;
}

.timeline-ruler-spacer {
    width: 150px;
    height: 30px;
    background: #222;
    border-bottom: 1px solid #444;
    border-right: 1px solid #444;
}

.timeline-time-marker {
    position: absolute;
    top: 0;
    font-size: 11px;
    color: #888;
    padding: 5px;
}

.timeline-time-marker.zero-marker {
    color: #4a90e2;
    font-weight: bold;
}

.timeline-time-marker.end-marker {
    color: #e74c3c;
    font-weight: bold;
}

.timeline-tracks-wrapper {
    display: flex;
}

.timeline-headers {
    width: 150px;
    background: #1a1a1a;
    overflow-y: hidden;
    /* Hide scrollbar, we'll sync scroll programmatically */
    overflow-x: hidden;
    min-height: 100px;
}

.timeline-tracks {
    position: relative;
    min-width: 100%;
    flex: 1;
    min-height: 100px;
}

.timeline-track {
    height: 40px;
    background: #242424;
    border-bottom: 1px solid #333;
    position: relative;
    display: flex;
    align-items: center;
}

.timeline-track:hover {
    background: #2a2a2a;
}

.timeline-track.selected {
    background: #2e2e2e;
    border-left: 3px solid #4a90e2;
}

.track-header {
    width: 150px;
    height: 40px;
    padding: 0 10px;
    background: #1e1e1e;
    border-bottom: 1px solid #333;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    font-size: 12px;
    color: #ccc;
}

.track-content {
    flex: 1;
    position: relative;
    height: 100%;
    min-height: 40px;
    cursor: crosshair;
}

.track-content:hover {
    background: rgba(74, 144, 226, 0.1);
}

.keyframe {
    position: absolute;
    width: 12px;
    height: 12px;
    background: #4a90e2;
    border: 2px solid #fff;
    border-radius: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    cursor: pointer;
    z-index: 10;
}

.keyframe:hover {
    background: #5aa3f0;
    width: 14px;
    height: 14px;
    box-shadow: 0 0 8px rgba(74, 144, 226, 0.6);
}

.keyframe.selected {
    background: #ff6b6b;
    border-color: #ffcccc;
}

.automation-line {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: #4a90e2;
    opacity: 0.5;
    pointer-events: none;
}

.automation-curve {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.timeline-playhead {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #ff6b6b;
    z-index: 20;
    pointer-events: none;
    /* Line itself doesn't block interactions */
    margin-top: 30px;
    /* Account for ruler height */
}

.timeline-playhead::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -4px;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 8px solid #ff6b6b;
    pointer-events: none;
}

.timeline-playhead-handle {
    position: absolute;
    top: -10px;
    left: -8px;
    width: 16px;
    height: 20px;
    background: transparent;
    cursor: grab;
    z-index: 21;
    pointer-events: auto;
}

.timeline-playhead-handle:active {
    cursor: grabbing;
}

/* Keyframe tooltip */
.keyframe-tooltip {
    position: absolute;
    background: #2a2a2a;
    border: 1px solid #4a90e2;
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 12px;
    color: #e0e0e0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    display: none;
    pointer-events: none;
    max-width: 200px;
    min-width: 120px;
}

.tooltip-parameter {
    font-weight: bold;
    color: #4a90e2;
    margin-bottom: 4px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tooltip-value {
    font-size: 14px;
    font-weight: bold;
    color: #fff;
    margin-bottom: 4px;
}

.tooltip-time {
    font-size: 11px;
    color: #aaa;
    margin-bottom: 2px;
}

.tooltip-easing {
    font-size: 10px;
    color: #888;
    font-style: italic;
}

.timeline-end-line {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e74c3c;
    z-index: 10;
    opacity: 0.8;
}

.timeline-loop-marker {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #ff9800;
    opacity: 0.5;
    pointer-events: none;
}

.timeline-loop-marker::after {
    content: attr(data-loop);
    position: absolute;
    top: -20px;
    left: 4px;
    font-size: 10px;
    color: #ff9800;
    background: #1a1a1a;
    padding: 2px 4px;
    border-radius: 2px;
}

/* Toggle Timeline Button */
.toggle-timeline {
    position: fixed;
    bottom: 320px;
    right: 20px;
    padding: 10px 20px;
    background: #4a90e2;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    z-index: 999;
    font-size: 14px;
}

.toggle-timeline:hover {
    background: #5aa3f0;
}

.toggle-timeline.timeline-open {
    bottom: 320px;
}

/* Context Menu */
.timeline-context-menu {
    position: absolute;
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 4px;
    padding: 5px 0;
    z-index: 1000;
    display: none;
}

.timeline-context-menu.active {
    display: block;
}

.context-menu-item {
    padding: 8px 20px;
    color: #ccc;
    cursor: pointer;
    font-size: 12px;
}

.context-menu-item:hover {
    background: #3a3a3a;
    color: #fff;
}

/* Keyframe Editor Modal */
.keyframe-editor-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 8px;
    padding: 20px;
    z-index: 2000;
    display: none;
    min-width: 300px;
}

.keyframe-editor-modal.active {
    display: block;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1999;
    display: none;
}

.modal-overlay.active {
    display: block;
}

.keyframe-editor-header {
    font-size: 16px;
    color: #fff;
    margin-bottom: 15px;
}

.keyframe-editor-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.keyframe-input-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.keyframe-input-group label {
    color: #ccc;
    font-size: 12px;
    width: 80px;
}

.keyframe-input-group input {
    flex: 1;
    padding: 5px;
    background: #1a1a1a;
    border: 1px solid #444;
    color: #fff;
    border-radius: 4px;
}

.keyframe-editor-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    justify-content: flex-end;
}

.timeline-zoom-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.timeline-zoom-controls label {
    font-size: 12px;
    color: #ccc;
}

.timeline-zoom-slider {
    width: 100px;
}

/* Parameter selector dropdown */
.parameter-selector {
    position: relative;
}

.parameter-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 4px;
    max-height: 200px;
    overflow-y: auto;
    display: none;
    z-index: 100;
}

.parameter-dropdown.active {
    display: block;
}

.parameter-option {
    padding: 8px 12px;
    color: #ccc;
    cursor: pointer;
    font-size: 12px;
}

.parameter-option:hover {
    background: #3a3a3a;
    color: #fff;
}

.timeline-tracks::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 1px;
    background: #4a90e2;
    opacity: 0.3;
    z-index: 1;
}
