/* SRT切割工具样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
    height: 100vh;
    overflow: hidden;
}

.container {
    display: flex;
    width: 100%;
    height: 100vh;
    max-width: none;
    margin: 0;
    padding: 0;
    background-color: white;
    border-radius: 0;
    box-shadow: none;
 }
  
 /* 左侧按钮区域 */
 .sidebar {
    width: 160px;
    background-color: #2c3e50;
    color: white;
    padding: 15px 10px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex-shrink: 0;
 }
  
 /* 主内容区域 */
.main-content {
    flex: 1;
    padding: 12px 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

h1 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 6px;
    font-size: 18px;
    line-height: 1.2;
    padding: 0;
}

/* 自定义滚动条容器 */
.custom-scrollbar-container {
    margin-bottom: 10px;
    padding: 10px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 1px solid #ddd;
}

/* 自定义滚动条 */
.custom-scrollbar {
    width: 100%;
}

/* 滚动条刻度 */
.scrollbar-scale {
    height: 20px;
    background-image: linear-gradient(to right, #ddd 1px, transparent 1px);
    background-size: 40px 1px;
    margin-bottom: 5px;
}

/* 滚动条轨道 */
.scrollbar-track {
    height: 40px;
    background-color: #f1f1f1;
    border-radius: 20px;
    position: relative;
    margin-bottom: 10px;
    overflow: hidden;
    border: 1px solid #ddd;
}

/* 滚动条滑块 */
.scrollbar-slider {
    width: 20px;
    height: 100%;
    position: absolute;
    top: 0;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
}

/* 起始滑块 */
.slider-start {
    background-color: #e74c3c;
    left: 10%;
}

/* 结束滑块 */
.slider-end {
    background-color: #27ae60;
    left: 50%;
}

/* 滑块标签 */
.slider-label {
    position: absolute;
    top: -25px;
    white-space: nowrap;
    font-size: 12px;
    font-weight: bold;
    color: #333;
}

/* 时间标记 */
.time-marker {
    position: absolute;
    top: -20px;
    font-size: 11px;
    color: #666;
    transform: translateX(-50%);
    white-space: nowrap;
    pointer-events: none;
    font-family: monospace;
}

/* 时间标记下方的小竖线 */
.time-marker::after {
    content: '';
    position: absolute;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: 5px;
    background-color: #666;
}

/* 时间信息显示 */
.scrollbar-time-info {
    display: flex;
    justify-content: space-between;
    padding: 5px 10px;
    background-color: #e8f4f8;
    border-radius: 4px;
    font-size: 14px;
}

.scrollbar-time-info span {
    font-family: monospace;
    font-weight: bold;
    width: 33%;
    text-align: center;
}

#start-time-display {
    text-align: left;
}

#end-time-display {
    text-align: center;
}

#total-time-display {
    text-align: right;
}

/* 工具按钮样式 */
.sidebar button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 14px 10px;
    margin-bottom: 4px;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
    text-align: center;
    height: 44px;
    line-height: 1.2;
    word-break: keep-all;
    white-space: normal;
    min-height: 44px;
}

/* 按钮组样式 */
.sidebar .btn-group-1 {
    background-color: #3498db;
}

.sidebar .btn-group-1:hover {
    background-color: #2980b9;
}

.sidebar .btn-group-2 {
    background-color: #27ae60;
}

.sidebar .btn-group-2:hover {
    background-color: #229954;
}

.sidebar .btn-group-3 {
    background-color: #e67e22;
}

.sidebar .btn-group-3:hover {
    background-color: #d35400;
}

/* 所有按钮的悬停和激活效果 */
.sidebar button:hover {
    transform: translateX(2px);
}

.sidebar button:active {
    transform: translateX(1px);
}

/* 歌词容器 */
.content-container {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    height: calc(100vh - 300px);
}

.lyrics-container {
    flex: 1;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid #ddd;
    min-height: 0;
}

.lyrics-header {
    display: grid;
    grid-template-columns: 60px 120px 120px 1fr;
    padding: 6px 15px;
    background-color: #34495e;
    color: white;
    font-weight: bold;
    font-size: 12px;
    height: 32px;
    align-items: center;
}

.lyrics-list {
    overflow-y: auto;
    flex: 1;
}

.lyrics-line {
    display: grid;
    grid-template-columns: 60px 120px 120px 1fr;
    padding: 4px 15px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background-color 0.2s;
    align-items: center;
    min-height: 28px;
}

.lyrics-line:hover {
    background-color: #f8f9fa;
}

.lyrics-line.selected {
    background-color: #e3f2fd;
    border-left: 4px solid #2196f3;
}

.lyrics-line.highlighted {
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
    font-weight: bold;
    animation: pulse 1s ease-in-out;
}

@keyframes pulse {
    0% { background-color: #fff3cd; }
    50% { background-color: #fff9c4; }
    100% { background-color: #fff3cd; }
}

/* 时间轴范围内的歌词（部分重叠） */
.lyrics-line.within-range {
    background-color: #e8f5e9;
    opacity: 0.8;
}

/* 完全在导出范围内的歌词 */
.lyrics-line.export-range {
    background-color: #e3f2fd;
    opacity: 1;
    border-left: 3px solid #1976d2;
}

/* 高亮状态优先于范围状态 */
.lyrics-line.highlighted.within-range,
.lyrics-line.highlighted.export-range {
    background-color: #fff3cd;
}

.lyrics-line .lyrics-index {
    font-weight: bold;
    color: #666;
    font-size: 12px;
    text-align: center;
}

.lyrics-line .time-tag {
    font-family: monospace;
    color: #e74c3c;
    font-weight: bold;
    background-color: #fee;
    padding: 2px 4px;
    border-radius: 3px;
}

.lyrics-line .end-time-tag {
    font-family: monospace;
    color: #27ae60;
    font-weight: bold;
    background-color: #e6f7ff;
    padding: 2px 4px;
    border-radius: 3px;
}

/* 错误信息 */
.error-message {
    margin-top: 15px;
    padding: 10px;
    background-color: #ffebee;
    color: #c62828;
    border-radius: 4px;
    font-size: 14px;
    display: none;
}

/* 滚动条样式 */
.lyrics-list::-webkit-scrollbar,
.main-content::-webkit-scrollbar {
    width: 8px;
}

.lyrics-list::-webkit-scrollbar-track,
.main-content::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.lyrics-list::-webkit-scrollbar-thumb,
.main-content::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.lyrics-list::-webkit-scrollbar-thumb:hover,
.main-content::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        flex-direction: row;
        overflow-x: auto;
        white-space: nowrap;
        padding: 10px;
    }
    
    .content-container {
        flex-direction: column;
    }
    
    .lyrics-header,
    .lyrics-line {
        grid-template-columns: 40px 80px 80px 1fr;
    }
}