* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    min-height: 100vh;
    color: #fff;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    padding: 40px 0;
}

header h1 {
    font-size: 2.5rem;
    background: linear-gradient(90deg, #ff6b6b, #feca57, #48dbfb, #ff9ff3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.subtitle {
    color: #a0a0a0;
    font-size: 1.1rem;
}

/* 上传区域 */
.upload-section {
    margin-bottom: 30px;
}

.upload-box {
    border: 3px dashed #4a4a6a;
    border-radius: 20px;
    padding: 60px 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.02);
}

.upload-box:hover {
    border-color: #48dbfb;
    background: rgba(72, 219, 251, 0.05);
}

.upload-box.dragover {
    border-color: #ff6b6b;
    background: rgba(255, 107, 107, 0.1);
}

.upload-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.file-hint {
    color: #666;
    font-size: 0.9rem;
    margin-top: 10px;
}

.bpm-input {
    margin-top: 20px;
    text-align: center;
}

.bpm-input label {
    margin-right: 10px;
    color: #a0a0a0;
}

.bpm-input input {
    padding: 10px 15px;
    border: 2px solid #4a4a6a;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    width: 150px;
    font-size: 1rem;
}

.bpm-input input:focus {
    outline: none;
    border-color: #48dbfb;
}


/* 播放器区域 */
.player-section {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
}

.audio-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.file-name {
    font-weight: bold;
    color: #48dbfb;
}

.bpm-display {
    background: linear-gradient(90deg, #ff6b6b, #feca57);
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: bold;
}

audio {
    width: 100%;
    margin-bottom: 20px;
}

.controls {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
}

.btn.primary {
    background: linear-gradient(90deg, #48dbfb, #0abde3);
    color: #fff;
}

.btn.success {
    background: linear-gradient(90deg, #26de81, #20bf6b);
    color: #fff;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

/* 灯光预览 */
.preview-section {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
}

.preview-section h2 {
    margin-bottom: 20px;
    text-align: center;
}

.light-preview {
    background: #000;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 20px;
}

#lightCanvas {
    width: 100%;
    height: 200px;
}

.light-strips {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.light-strip {
    width: 150px;
    height: 80px;
    border-radius: 10px;
    background: #333;
    transition: all 0.1s ease;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

/* 输出区域 */
.output-section {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
}

.output-section h2 {
    margin-bottom: 20px;
    text-align: center;
}

.output-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.tab-btn {
    padding: 10px 25px;
    border: 2px solid #4a4a6a;
    border-radius: 10px;
    background: transparent;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn.active {
    background: #48dbfb;
    border-color: #48dbfb;
}

.output-content {
    background: #0a0a15;
    border-radius: 10px;
    padding: 20px;
    max-height: 400px;
    overflow: auto;
}

.output-content pre {
    font-family: 'Consolas', monospace;
    font-size: 0.85rem;
    color: #48dbfb;
    white-space: pre-wrap;
    word-break: break-all;
}

.export-controls {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    justify-content: center;
}

.export-controls .btn {
    background: linear-gradient(90deg, #a55eea, #8854d0);
    color: #fff;
}

/* 时间轴 */
.timeline-section {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
}

.timeline-section h2 {
    margin-bottom: 20px;
    text-align: center;
}

.timeline-container {
    max-height: 300px;
    overflow-y: auto;
}

.timeline-item {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    border-left: 3px solid #48dbfb;
    margin-bottom: 10px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 0 10px 10px 0;
}

.timeline-time {
    font-weight: bold;
    color: #feca57;
    min-width: 80px;
}

.timeline-color {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin: 0 15px;
    box-shadow: 0 0 10px currentColor;
}

.timeline-effect {
    color: #a0a0a0;
}

/* Footer */
footer {
    text-align: center;
    padding: 30px 0;
    color: #666;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #1a1a2e;
}

::-webkit-scrollbar-thumb {
    background: #4a4a6a;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #5a5a7a;
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 响应式 */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.8rem;
    }
    
    .upload-box {
        padding: 40px 20px;
    }
    
    .light-strips {
        flex-wrap: wrap;
    }
    
    .light-strip {
        width: 100px;
        height: 60px;
    }
}
