/* General Container */
.audio-converter-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

.audio-converter-container h2 {
    text-align: center;
    color: #5d4037;
    margin-bottom: 10px;
}

.converter-description {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
}

/* Upload Area */
.upload-container {
    border: 2px dashed #d2b48c;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 30px;
    background-color: rgba(245, 240, 232, 0.4);
}

.upload-container.highlight {
    border-color: #a0522d;
    background-color: rgba(160, 82, 45, 0.1);
}

.upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.upload-content i {
    font-size: 48px;
    color: #a0522d;
}

.file-input-label {
    background-color: #a0522d;
    color: white;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.file-input-label:hover {
    background-color: #8b4513;
}

.hidden-input {
    display: none;
}

.supported-formats, .upload-content p {
    font-size: 0.85rem;
    color: #888;
    margin-top: 10px;
}

/* Hidden Class */
.hidden {
    display: none !important;
}

/* Containers */
.preview-container,
.edit-options,
.conversion-options,
.result-container,
.progress-container {
    margin-bottom: 30px;
    background-color: #fdfbf7;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #5d4037;
    border-bottom: 1px solid rgba(210, 180, 140, 0.4);
    padding-bottom: 10px;
}

.audio-player {
    width: 100%;
}

.audio-info, .result-info {
    background-color: #f5f0e8;
    border-radius: 4px;
    padding: 10px 15px;
    margin-top: 15px;
}

.audio-info p, .result-info p {
    margin: 5px 0;
    font-size: 14px;
}

/* Edit Options */
.edit-tools {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.tool-group h4 {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 16px;
    color: #5d4037;
}

#waveform {
    margin-bottom: 10px;
}

.trim-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}
.fade-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.time-input {
    width: 80px;
    padding: 5px;
    border: 1px solid #d2b48c;
    border-radius: 4px;
}

.tool-button {
    padding: 8px 12px;
    background-color: #f5f0e8;
    border: 1px solid #d2b48c;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}
.tool-button:hover {
    background-color: #efe8d9;
}

.slider-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.slider-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.slider-value {
    font-size: 0.9rem;
    color: #666;
    text-align: center;
}

/* --- Milk Tea Themed Adjustment Slider --- */

/* 針對您專案中的 .adjustment-slider class */
.adjustment-slider {
    -webkit-appearance: none; /* 移除 Chrome, Safari, Opera 的預設樣式 */
    appearance: none;
    width: 100%; /* 拉條寬度 */
    height: 8px; /* 拉條軌道高度 */
    background: #e0dcd7; /* 軌道背景色 (淺奶茶底色) */
    border-radius: 5px; /* 軌道圓角 */
    outline: none; /* 移除點擊時的藍色外框 */
    cursor: pointer;
    transition: opacity 0.2s ease-in-out;
}

.adjustment-slider:hover {
    opacity: 0.9; /* 滑鼠懸停時稍微變透明 */
}

/* --- 滑塊 (Thumb) 樣式 --- */

/* Webkit 瀏覽器 (Chrome, Safari, Edge) */
.adjustment-slider::-webkit-slider-thumb {
    -webkit-appearance: none; /* 移除預設樣式 */
    appearance: none;
    width: 20px; /* 滑塊寬度 */
    height: 20px; /* 滑塊高度 */
    background: #c5a992; /* 滑塊顏色 (主奶茶色) */
    border-radius: 50%; /* 圓形滑塊 */
    border: 2px solid #ffffff; /* 滑塊白色邊框 */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15); /* 輕微陰影增加立體感 */
    margin-top: -6px; /* 垂直置中滑塊 ( (20px - 8px) / 2 * -1 ) */
}

/* Firefox 瀏覽器 */
.adjustment-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #c5a992;
    border-radius: 50%;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    border: none; /* Firefox 可能需要重置邊框 */
}

/* --- 軌道 (Track) 樣式 (主要為 Firefox) --- */

.adjustment-slider::-moz-range-track {
    width: 100%;
    height: 8px;
    background: #e0dcd7;
    border-radius: 5px;
    cursor: pointer;
}

.edit-actions {
    margin-top: 20px;
    display: flex;
    justify-content: flex-end;
}

/* Options */
.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.option-group {
    display: flex;
    flex-direction: column;
}

.option-group label {
    margin-bottom: 8px;
    font-weight: bold;
}

.option-group select {
    width: 100%;
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #d2b48c;
    background-color: #fdfbf7;
}
.option-group-checkbox {
    justify-content: center;
}
.checkbox-wrapper {
    display: flex;
    align-items: center;
    margin-top: 8px;
}
.checkbox-wrapper input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    cursor: pointer;
    accent-color: #a0522d;
}
.checkbox-label {
    font-size: 0.9rem;
    color: #666;
}

@media (max-width: 520px) {
    .options-grid {
        grid-template-columns: 1fr;
    }
}

/* Progress Bar */
.progress-container p {
    margin-bottom: 10px;
}

progress {
    width: 100%;
    height: 12px;
    -webkit-appearance: none;
    appearance: none;
}

progress::-webkit-progress-bar {
    background-color: #e8e2d9;
    border-radius: 6px;
}

progress::-webkit-progress-value {
    background-color: #a0522d;
    border-radius: 6px;
    transition: width 0.3s ease;
}

/* Buttons */
.convert-button,
.download-button,
.new-conversion-button,
.secondary-button {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background-color 0.3s;
    text-decoration: none; /* For <a> tags */
    color: white;
}

.convert-button {
    background-color: #8b4513;
    width: 100%;
}
.convert-button:hover {
    background-color: #a0522d;
}

.result-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.download-button {
    background-color: #a0522d;
    flex: 1;
}
.download-button:hover {
    background-color: #8b4513;
}

.new-conversion-button {
    flex: 1;
    background-color: #f5f0e8;
    color: #5d4037;
    border: 1px solid #d2b48c;
}
.new-conversion-button:hover {
    background-color: #efe8d9;
}

.secondary-button {
    background-color: #f5f0e8;
    color: #5d4037;
    border: 1px solid #d2b48c;
}
.secondary-button:hover {
    background-color: #efe8d9;
}

/* Message for unsupported formats */
.unsupported-message {
    background-color: #fffbe6;
    border: 1px solid #ffe58f;
    border-radius: 4px;
    padding: 10px 15px;
    margin-bottom: 15px;
}

/* 等化器相關樣式 */
.equalizer-controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.eq-control {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.eq-control label {
    font-weight: bold;
    color: #5d4037;
}

/* 效果相關樣式 */
.effects-controls {
    padding: 5px 0;
}

/* 效果預設 */
.preset-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.preset-button {
    padding: 8px 12px;
    background-color: #f5f0e8;
    border: 1px solid #d2b48c;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}
.preset-button:hover, .preset-button.active {
    background-color: #efe8d9;
    border-color: #c5a992;
}

/* 音訊分割輸出 */
.split-output {
    margin-top: 15px;
    max-height: 150px;
    overflow-y: auto;
}