body {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    min-height: 100vh;
    padding: 2rem 0;
}

.video-frame-tool {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    padding: 2rem;
    margin-bottom: 2rem;
}

.video-frame-tool h2 {
    font-size: 1.75rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.75rem;
}

/* 视频信息面板样式 */
.video-info-panel {
    background: #f8f9fa;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    border: 1px solid #e9ecef;
    overflow: hidden;
}

.info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: #e9ecef;
    border-bottom: 1px solid #dee2e6;
}

.info-header h4 {
    margin: 0;
    font-size: 1.1rem;
    color: #495057;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-header h4 i {
    color: #4a90e2;
}

.info-content {
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.info-content.collapsed {
    display: none;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: white;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.info-label {
    font-weight: 500;
    color: #495057;
    font-size: 0.9rem;
}

.info-value {
    color: #2c3e50;
    font-weight: 600;
    font-size: 0.9rem;
    text-align: right;
    word-break: break-all;
}

/* 上传区域样式 */
.upload-area {
    border: 2px dashed #e0e0e0;
    border-radius: 12px;
    padding: 3rem 2rem;
    text-align: center;
    background: #f8f9fa;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-area:hover {
    border-color: #4a90e2;
    background: #f0f7ff;
}

.upload-area.dragover {
    border-color: #4a90e2;
    background: #f0f7ff;
}

.upload-hint {
    color: #666;
}

.upload-hint i {
    font-size: 3rem;
    color: #4a90e2;
    margin-bottom: 1rem;
}

.upload-hint p {
    margin: 0;
    font-size: 1rem;
}

.upload-hint .sub-hint {
    font-size: 0.85rem;
    color: #999;
    margin-top: 0.5rem;
}

/* 视频播放区域 */
.video-container {
    margin-bottom: 1.5rem;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
}

.video-container video {
    width: 100%;
    display: block;
}

/* 控制区域 */
.controls-container {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.time-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.time-display {
    font-family: monospace;
    font-size: 1.1rem;
    color: #495057;
    padding: 0.375rem 0.75rem;
    background: #fff;
    border-radius: 4px;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.075);
}

.frame-slider {
    margin: 1.5rem 0;
}

.form-range {
    height: 1.5rem;
}

.form-range::-webkit-slider-thumb {
    background: #4a90e2;
}

.frame-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

/* 预览区域 */
.preview-section {
    margin-top: 2rem;
}

.preview-section h3 {
    font-size: 1.2rem;
    color: #2c3e50;
    margin-bottom: 1rem;
}

/* 标尺控制面板样式 */
.ruler-controls-panel {
    background: #f8f9fa;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    border: 1px solid #e9ecef;
    overflow: hidden;
}

.ruler-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: #e9ecef;
    border-bottom: 1px solid #dee2e6;
}

.ruler-header h5 {
    margin: 0;
    font-size: 1rem;
    color: #495057;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ruler-header h5 i {
    color: #dc3545;
}

.ruler-buttons {
    display: flex;
    gap: 0.5rem;
}

.ruler-coordinates {
    padding: 1rem 1.5rem;
    display: flex;
    gap: 2rem;
    background: white;
}

.coord-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.coord-label {
    font-weight: 500;
    color: #495057;
    font-size: 0.9rem;
}

.coord-value {
    font-family: monospace;
    color: #2c3e50;
    font-weight: 600;
    font-size: 0.9rem;
    background: #f8f9fa;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    border: 1px solid #e9ecef;
}

.preview-container {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem;
}

.preview-wrapper {
    position: relative;
    display: inline-block;
    max-width: 100%;
    margin-bottom: 1rem;
}

.preview-wrapper canvas {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
}

.ruler-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

.ruler-overlay.active {
    pointer-events: auto;
}

/* 标尺线条样式 */
.ruler-line {
    position: absolute;
    background: rgba(220, 53, 69, 0.8);
    z-index: 20;
    cursor: move;
    transition: background-color 0.2s ease;
}

.ruler-line:hover {
    background: rgba(220, 53, 69, 1);
}

.ruler-line.horizontal {
    height: 2px;
    width: 100%;
    cursor: ns-resize;
}

.ruler-line.vertical {
    width: 2px;
    height: 100%;
    cursor: ew-resize;
}

.ruler-line .line-label {
    position: absolute;
    background: rgba(220, 53, 69, 0.9);
    color: white;
    font-size: 0.75rem;
    padding: 0.125rem 0.25rem;
    border-radius: 2px;
    white-space: nowrap;
    font-family: monospace;
}

.ruler-line.horizontal .line-label {
    top: -20px;
    left: 10px;
}

.ruler-line.vertical .line-label {
    top: 10px;
    left: 10px;
    /* 移除了旋转，保持正常角度 */
}

.preview-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.preview-info {
    color: #666;
    font-size: 0.9rem;
}

.preview-info span {
    margin-right: 1rem;
}

.preview-buttons {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.format-select {
    width: 100px;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .info-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .info-value {
        text-align: left;
    }
    
    .ruler-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .ruler-buttons {
        width: 100%;
        justify-content: space-between;
    }
    
    .ruler-coordinates {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .time-controls {
        flex-wrap: wrap;
    }
    
    .frame-actions {
        flex-direction: column;
    }
    
    .frame-actions button {
        width: 100%;
    }
    
    .preview-actions {
        flex-direction: column;
        gap: 1rem;
    }
    
    .preview-buttons {
        width: 100%;
    }
} 