* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: system-ui, sans-serif; background: #f5f5f5; min-height: 100vh; }
.container { max-width: 1200px; margin: 0 auto; padding: 20px; }
h1 { text-align: center; margin-bottom: 20px; color: #333; }

.main-layout { display: flex; gap: 20px; }
.left-panel { width: 300px; flex-shrink: 0; display: flex; flex-direction: column; gap: 15px; }

.upload-area {
    border: 2px dashed #ccc;
    border-radius: 12px;
    padding: 30px 15px;
    text-align: center;
    cursor: pointer;
    background: white;
    transition: all 0.2s;
}
.upload-area:hover { border-color: #007bff; background: #f8f9ff; }
.upload-area.dragover { border-color: #007bff; background: #e7f2ff; }
.upload-area p { color: #666; font-size: 14px; }

.words-section { flex: 1; }
.words-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    background: white;
    padding: 15px;
    border-radius: 12px;
    min-height: 200px;
}
.word-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: calc((100% - 32px) / 5);
    min-width: 80px;
    height: 44px;
    padding: 4px 8px;
    background: #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
}
.word-item:hover { background: #dee2e6; transform: translateY(-1px); }
.word-item.selected { background: #007bff; color: white; box-shadow: 0 2px 8px rgba(0,123,255,0.3); }
.word-item .word-index { color: #999; font-size: 11px; margin-right: 4px; }
.word-item.selected .word-index { color: #ccc; }
.word-item .word-text { white-space: nowrap; }

.controls {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.control-group {
    margin-bottom: 18px;
    padding-bottom: 18px;
    border-bottom: 1px solid #eee;
}
.control-group:last-of-type { border-bottom: none; margin-bottom: 15px; padding-bottom: 0; }
.control-label {
    font-size: 12px;
    color: #999;
    margin-bottom: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.control-row { display: flex; align-items: center; justify-content: center; gap: 8px; }
.control-row.split { flex-wrap: wrap; }
.control-item { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 100px; }
.control-item label { font-size: 11px; color: #888; }

.control-row.params { flex-wrap: wrap; gap: 10px; justify-content: flex-start; }
.param-item { display: flex; align-items: center; gap: 4px; }
.param-item label { font-size: 12px; color: #666; }
.param-item input { width: 50px; padding: 5px 8px; border: 1px solid #ddd; border-radius: 6px; font-size: 13px; text-align: center; }
.param-item input:focus { outline: none; border-color: #007bff; }
.param-item .param-unit { font-size: 12px; color: #999; }

.btn-icon {
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    background: #f0f0f0;
    color: #333;
    font-size: 16px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.btn-icon:hover { background: #e0e0e0; transform: scale(1.05); }
.btn-icon:active { transform: scale(0.95); }
.btn-play { background: #007bff; color: white; }
.btn-play:hover { background: #0056b3; }

select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 13px;
    background: white;
    cursor: pointer;
    width: 100%;
}
select:focus { outline: none; border-color: #007bff; }
.full-width { width: 100%; }

.slider {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    background: #e0e0e0;
    border-radius: 3px;
    outline: none;
}
.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: #007bff;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.btn-auto {
    width: 100%;
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0,123,255,0.3);
}
.btn-auto:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,123,255,0.4); }
.btn-auto:active { transform: translateY(0); }

.status {
    text-align: center;
    color: #888;
    font-size: 13px;
    margin-top: 12px;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 6px;
}