body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; line-height: 1.6; margin: 0; padding: 20px; background: #f5f5f5; color: #333; }
.container { max-width: 1200px; margin: 0 auto; background: white; padding: 20px; border-radius: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
h1 { color: #2c3e50; margin-bottom: 10px; }
.subtitle { color: #7f8c8d; margin-top: 0; }
.params-container { margin: 20px 0; padding: 15px; background: #f8f9fa; border-radius: 6px; }
.params h3 { margin-top: 0; color: #2c3e50; }
.params-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.params-grid > span {
    color: #666;
    display: inline-block;
    margin-right: 10px;
}

.params-grid > strong {
    display: inline-block;
    color: #2c3e50;
    font-size: 1.1em;
    margin-left: 5px;
}

/* Make each parameter pair take up one grid cell */
.params-grid > span,
.params-grid > strong {
    grid-column: span 1;
}

/* Ensure pairs stay together */
.params-grid > span + strong {
    margin-top: -15px; /* Counteract the gap */
}

.tuning-helper { border: 1px solid #dee2e6; border-radius: 8px; padding: 15px 20px; background-color: #fff; }
.tuning-helper h3 { margin-top: 0; text-align: center; color: #495057; border-bottom: 1px solid #e9ecef; padding-bottom: 10px; margin-bottom: 15px; }

.timeline {
    position: relative;
    margin-top: 30px;
    padding: 40px 0;
    background: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 6px;
}

/* Center line */
.timeline-center {
    position: absolute;
    top: 0;
    left: 50%;
    width: 2px;
    height: 100%;
    background: #e1e1e1;
    transform: translateX(-50%);
}

/* Sequence positioning */
.sequence {
    position: relative;
    width: 45%;  /* Slightly less than 50% to create spacing */
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* Left sequences */
.sequence-left {
    margin-right: auto;
    margin-left: 20px;
}

/* Right sequences */
.sequence-right {
    margin-left: auto;
    margin-right: 20px;
}

/* Connection lines */
.sequence::before {
    content: '';
    position: absolute;
    top: 50%;
    width: 20px;
    height: 2px;
    background: #e1e1e1;
}

.sequence-left::before {
    right: -20px;
}

.sequence-right::before {
    left: -20px;
}

/* Sequence content */
.sequence-content {
    position: relative;
}

.sequence:hover {
    background: #f1f8ff;
    border-color: #c8e1ff;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Shot images */
.shot-images {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-height: 100px;
}

.frame-image,
.spectrogram-image {
    position: relative;
    width: 100%;
    background: #f8f9fa;
    border-radius: 4px;
    overflow: hidden;
    padding: 10px;
    border: 1px solid #ddd;
}

.frame-image img,
.spectrogram-image img {
    width: 100%;
    height: auto;
    display: block;
}

.spectrogram-image {
    height: 60px;
    overflow: hidden;
}

.spectrogram-image img {
    object-fit: cover;
}

/* Error states */
.error-message {
    color: #721c24;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    padding: 8px;
    margin-top: 5px;
    border-radius: 4px;
    font-size: 0.9em;
    word-break: break-all;
}

.shot-images.error pre {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 4px;
    overflow: auto;
    font-size: 0.8em;
    margin: 5px 0;
}

.debug-info {
    margin-top: 5px;
    color: #666;
    font-family: monospace;
    background: #f8f9fa;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8em;
}

/* Hide empty containers */
.shot-images:empty {
    display: none;
}

/* Shots container */
.shots-container {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 10px 0;
    margin: 10px 0;
    scrollbar-width: thin;
    scrollbar-color: #888 #f1f1f1;
}

.shot {
    flex: 0 0 auto;
    width: 200px;
    background: white;
    border: 1px solid #e1e1e1;
    border-radius: 4px;
    padding: 5px;
    transition: transform 0.2s;
}

.shot:hover {
    transform: scale(1.05);
    z-index: 1;
}

.shot img {
    width: 100%;
    height: auto;
    border-radius: 2px;
    display: block;
}

.shot-details {
    margin-top: 5px;
    font-size: 0.8em;
    color: #666;
}

.shot-time {
    display: block;
}

.shot-score {
    display: block;
    color: #0366d6;
}

.sequence-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e1e1e1;
}

.sequence-index {
    font-weight: bold;
    color: #0366d6;
    min-width: 40px;
}

.sequence-time {
    color: #666;
}

.sequence-duration {
    color: #888;
    font-size: 0.9em;
}

.sequence-shots-count {
    color: #0366d6;
    font-size: 0.9em;
    font-weight: 500;
}

.sequence-dialogue {
    margin: 10px 0;
    padding: 10px;
    background: #fff;
    border-radius: 4px;
    border-left: 3px solid #0366d6;
}

.dialogue-label {
    font-weight: 500;
    color: #0366d6;
    margin-right: 8px;
}

.dialogue-text {
    color: #24292e;
}

.sequence-summary {
    margin-top: 10px;
    padding: 10px;
    background: #fff;
    border-radius: 4px;
    border-left: 3px solid #28a745;
}

.summary-label {
    font-weight: 500;
    color: #28a745;
    margin-right: 8px;
}

.summary-text {
    color: #24292e;
}

.sequence-notes {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #e1e1e1;
    color: #666;
    font-style: italic;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
}

.modal-content {
    position: relative;
    background: white;
    margin: 50px auto;
    padding: 20px;
    width: 80%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.close {
    position: absolute;
    right: 20px;
    top: 10px;
    font-size: 28px;
    font-weight: bold;
    color: #666;
    cursor: pointer;
}

.close:hover {
    color: #333;
}

.sequence-time-details,
.sequence-scores-details,
.sequence-notes-details,
.sequence-faces-details {
    margin: 15px 0;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
}

.sequence-time-details p,
.sequence-scores-details p {
    margin: 5px 0;
}

.modal-shots-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.modal-shot {
    background: white;
    border: 1px solid #e1e1e1;
    border-radius: 4px;
    padding: 10px;
}

.modal-shot img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    margin-bottom: 10px;
}

.modal-shot-details {
    font-size: 0.9em;
    color: #666;
}

.modal-shot-details p {
    margin: 5px 0;
}

.sequence-dialogue-details,
.sequence-summary-details,
.sequence-shots-details {
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
}

@media (max-width: 768px) {
    .params-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        margin: 20px auto;
    }
    
    .sequence-scores {
        flex-direction: column;
        gap: 5px;
    }
    
    .sequence-header {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .modal-shots-container {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .shots-container {
        gap: 8px;
    }
    
    .shot {
        width: 150px;
    }
}

@media (max-width: 1024px) {
    .sequence {
        width: 90%;
        margin: 20px auto;
    }

    .sequence::before {
        display: none;
    }

    .timeline-center {
        display: none;
    }

    .shot {
        width: 150px;
    }
} 