* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px;
    text-align: center;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    font-weight: 700;
}

.subtitle {
    font-size: 1.1em;
    opacity: 0.9;
}

.main-content {
    padding: 40px;
}

.upload-section,
.config-section,
.preview-section,
.action-section {
    margin-bottom: 40px;
}

h2 {
    font-size: 1.5em;
    margin-bottom: 20px;
    color: #333;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

.upload-area {
    border: 3px dashed #667eea;
    border-radius: 12px;
    padding: 60px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8f9ff;
}

.upload-area:hover {
    border-color: #764ba2;
    background: #f0f2ff;
    transform: translateY(-2px);
}

.upload-area.dragover {
    border-color: #764ba2;
    background: #e8ebff;
    transform: scale(1.02);
}

.upload-placeholder svg {
    color: #667eea;
    margin-bottom: 20px;
}

.upload-placeholder p {
    font-size: 1.2em;
    color: #333;
    margin-bottom: 10px;
}

.file-hint {
    color: #666;
    font-size: 0.9em;
}

.file-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    background: #e8f5e9;
    border-radius: 8px;
    margin-top: 15px;
    border-left: 4px solid #4caf50;
}

.file-info span {
    color: #2e7d32;
    font-weight: 500;
}

.video-info {
    background: #e3f2fd;
    border-left: 4px solid #2196f3;
    flex-direction: column;
    align-items: stretch;
}

.video-info-content {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    flex: 1;
}

.video-preview-container {
    flex-shrink: 0;
}

.video-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.video-detail-item {
    color: #1565c0;
    font-size: 0.95em;
}

.video-detail-item strong {
    color: #0d47a1;
    margin-right: 8px;
}

.video-upload-area {
    border-color: #2196f3;
    background: #e3f2fd;
}

.video-upload-area:hover {
    border-color: #1976d2;
    background: #bbdefb;
}

.video-upload-area.dragover {
    border-color: #1976d2;
    background: #90caf9;
}

.btn-remove {
    background: #f44336;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    transition: all 0.3s ease;
}

.btn-remove:hover {
    background: #d32f2f;
    transform: rotate(90deg);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-hint {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 0.85em;
    font-style: italic;
}

.input-with-button {
    display: flex;
    gap: 10px;
    align-items: center;
}

.input-with-button input {
    flex: 1;
}

.btn-auto-fill {
    padding: 12px 20px;
    background: #2196f3;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.btn-auto-fill:hover {
    background: #1976d2;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.3);
}

.btn-auto-fill:active {
    transform: translateY(0);
}

.timestamp-list {
    max-height: 400px;
    overflow-y: auto;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    background: #fafafa;
}

.empty-hint {
    text-align: center;
    color: #999;
    padding: 40px;
    font-style: italic;
}

.timestamp-item {
    background: white;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.timestamp-item:last-child {
    margin-bottom: 0;
}

.timestamp-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.timestamp-index {
    background: #667eea;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 600;
}

.timestamp-time {
    color: #666;
    font-size: 0.9em;
    font-family: 'Courier New', monospace;
}

.timestamp-text {
    color: #333;
    line-height: 1.6;
    margin-top: 8px;
}

.btn-primary {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.2em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.status-message {
    margin-top: 15px;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
    display: none;
}

.status-message.success {
    background: #e8f5e9;
    color: #2e7d32;
    border-left: 4px solid #4caf50;
    display: block;
}

.status-message.error {
    background: #ffebee;
    color: #c62828;
    border-left: 4px solid #f44336;
    display: block;
}

.status-message.info {
    background: #e3f2fd;
    color: #1565c0;
    border-left: 4px solid #2196f3;
    display: block;
}

/* 滚动条样式 */
.timestamp-list::-webkit-scrollbar {
    width: 8px;
}

.timestamp-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.timestamp-list::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 4px;
}

.timestamp-list::-webkit-scrollbar-thumb:hover {
    background: #764ba2;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        margin: 10px;
        border-radius: 12px;
    }

    header {
        padding: 30px 20px;
    }

    header h1 {
        font-size: 2em;
    }

    .main-content {
        padding: 20px;
    }

    .upload-area {
        padding: 40px 15px;
    }

    .video-info-content {
        flex-direction: column;
        gap: 15px;
    }

    .video-preview-container {
        width: 100%;
        text-align: center;
    }

    #videoPreview {
        max-width: 100%;
        height: auto;
    }

    .input-with-button {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-auto-fill {
        width: 100%;
    }
}

