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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.drop-zone {
    border: 2px dashed #2196F3;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    background-color: #fff;
    transition: border-color 0.3s ease;
    cursor: pointer;
}

.drop-zone.drag-over {
    border-color: #1976D2;
    background-color: #E3F2FD;
}

.drop-zone p {
    margin: 0.5rem 0;
    color: #666;
}

#file-input {
    margin-top: 1rem;
}

.results {
    margin-top: 2rem;
    background-color: #fff;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.results.hidden {
    display: none;
}

.file-info {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.keyframe-info-section {
    margin: 1rem 0;
    padding: 1.5rem;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.keyframe-info-section h3 {
    margin-bottom: 1rem;
    color: #2196F3;
    font-size: 1.2rem;
}

.parse-controls {
    margin: 1rem 0;
    display: flex;
    justify-content: flex-start;
}

.control-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: #f5f5f5;
    border-color: #ddd;
    color: #666;
}

.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

th, td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

th {
    background-color: #f8f9fa;
    font-weight: 600;
}

/* Frame type colors */
.frame-audio {
    background-color: #E8F5E9;
}

.frame-video {
    background-color: #FFF3E0;
}

.frame-script {
    background-color: #E3F2FD;
}

.frame-sequence {
    background-color: #F3E5F5;
}

/* Hover effect for table rows */
tbody tr:hover {
    background-color: #f8f9fa;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        margin: 1rem auto;
    }
    
    th, td {
        padding: 0.5rem;
    }
} 

.error-info {
    margin: 1rem 0;
    padding: 1rem;
    background-color: #FFF3E0;
    border-left: 4px solid #FF9800;
    border-radius: 4px;
}

.error-info h3 {
    color: #E65100;
    margin-bottom: 0.5rem;
}

.error-info p {
    margin: 0.25rem 0;
    color: #666;
}

.error-info span {
    color: #333;
    font-family: monospace;
    font-weight: 500;
}

.hidden {
    display: none;
}

.progress-container {
    margin: 1rem 0;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 4px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background-color: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: #2196F3;
    width: 0;
    transition: width 0.3s ease;
}

.progress-text {
    text-align: center;
    margin-top: 0.5rem;
    color: #666;
    font-size: 0.9rem;
}

.table-container {
    max-height: 600px;
    overflow-y: auto;
}

.timeline-view {
    margin: 1rem 0;
    background-color: #fff;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.timeline-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.control-button {
    padding: 0.5rem 1rem;
    border: 1px solid #2196F3;
    background-color: #fff;
    color: #2196F3;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.control-button:hover {
    background-color: #2196F3;
    color: #fff;
}

.zoom-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.timeline-container {
    width: 100%;
    overflow-x: auto;
    background-color: #f8f9fa;
    border-radius: 4px;
    padding: 1rem;
}

.timeline-frames {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 10px;
    min-height: 40px;
}

.frame-block {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 4px;
}

.frame-block:hover {
    transform: scale(1.2);
}

.frame-block.audio {
    background-color: #81C784;
}

.frame-block.video {
    background-color: #FFB74D;
}

.frame-block.script {
    background-color: #64B5F6;
}

.frame-block.keyframe {
    border: 2px solid #FB8C00;
}

.frame-block.folded {
    width: 40px;
    flex: 0 0 40px;
    background-image: linear-gradient(45deg, rgba(255,255,255,0.2) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.2) 50%, rgba(255,255,255,0.2) 75%, transparent 75%, transparent);
    background-size: 10px 10px;
}

.frame-count {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    background-color: rgba(0,0,0,0.7);
    color: #fff;
    padding: 2px 4px;
    border-radius: 2px;
    white-space: nowrap;
}

.frame-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0,0,0,0.8);
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    display: none;
    z-index: 1000;
}

.frame-block:hover .frame-tooltip {
    display: block;
}

#video-info {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

#video-info p {
    margin: 0.25rem 0;
    color: #666;
}

#video-info span {
    color: #333;
    font-weight: 500;
}

.table-row-highlight {
    background-color: #FFF3E0 !important;
    transition: background-color 0.5s ease;
}

.folded-rows {
    background-color: #f8f9fa;
    cursor: pointer;
}

.folded-rows:hover {
    background-color: #eee;
}

.folded-rows td {
    text-align: center;
    color: #666;
}

.selected-block {
    outline: 2px solid #2196F3;
    z-index: 1;
}

.filepositions-list {
    max-height: 200px;
    overflow-y: auto;
    background-color: #f8f9fa;
    border-radius: 4px;
    padding: 0.5rem;
    margin-top: 0.5rem;
    font-family: monospace;
}

.filepositions-header {
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    border-bottom: 2px solid #2196F3;
    font-weight: bold;
    color: #333;
    background-color: #E3F2FD;
    border-radius: 4px;
}

.filepositions-list .position-item {
    padding: 0.25rem 0.5rem;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 1rem;
    font-size: 0.9rem;
    line-height: 1.5;
}

.filepositions-list .position-item:last-child {
    border-bottom: none;
}

.filepositions-list .position-item:hover {
    background-color: #E3F2FD;
}

.filepositions-list .position-item span:first-child {
    min-width: 2rem;
    color: #666;
}

.filepositions-list .position-item span:nth-child(2) {
    min-width: 10rem;
    font-weight: bold;
}

.filepositions-list .position-item span:nth-child(3) {
    color: #666;
}

.binary-data {
    margin: 1rem 0;
    padding: 1.5rem;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.binary-data.hidden {
    display: none;
}

.binary-data-info {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
    display: flex;
    gap: 2rem;
}

.binary-content {
    font-family: monospace;
    font-size: 14px;
    line-height: 1.5;
    white-space: pre-wrap;
    overflow-x: auto;
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 4px;
    display: grid;
    grid-template-columns: 100px 300px 150px;
    gap: 1rem;
}

.binary-content .offset {
    color: #666;
}

.binary-content .hex {
    color: #2196F3;
}

.binary-content .ascii {
    color: #333;
} 