/* ===================================
MP4→MP3変換ツール専用スタイル
=================================== */

/* ===================================
ファイル情報カード
=================================== */
.file-info-card {
    background: white;
    border: 2px solid var(--accent);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    display: none;
}

.file-info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.file-name {
    font-size: 18px;
    font-weight: bold;
    color: var(--primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 70%;
}

.file-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.detail-label {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.detail-value {
    font-size: 16px;
    font-weight: bold;
    color: var(--text-primary);
}

/* ===================================
設定パネル
=================================== */
.settings-panel {
    background: var(--gray-100);
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
    display: none;
}

.settings-title {
    font-size: 18px;
    font-weight: bold;
    color: var(--primary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.settings-title i {
    color: var(--accent);
}

/* ===================================
設定グループ
=================================== */
.setting-group {
    background: white;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 15px;
    border: 1px solid var(--gray-300);
    transition: all 0.3s;
}

.setting-group:hover {
    border-color: var(--accent);
    box-shadow: 0 2px 8px rgba(243, 156, 18, 0.1);
}

.setting-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.setting-label {
    font-weight: bold;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ===================================
トグルスイッチ
=================================== */
.toggle-switch {
    position: relative;
    width: 50px;
    height: 26px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--gray-300);
    transition: .4s;
    border-radius: 26px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: var(--accent);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

/* ===================================
スライダーとセレクト
=================================== */
.slider-control {
    margin-top: 10px;
}

.slider {
    width: 100%;
    height: 6px;
    background: var(--gray-300);
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    transition: all 0.3s;
}

.slider::-webkit-slider-thumb:hover {
    background: var(--accent-dark);
    transform: scale(1.2);
}

.slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    border: none;
}

.slider-value {
    font-size: 14px;
    color: var(--text-secondary);
    margin-left: 10px;
    font-weight: bold;
}

.output-select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--gray-300);
    border-radius: 5px;
    background-color: white;
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
    transition: border-color 0.3s;
}

.output-select:hover {
    border-color: var(--accent);
}

.output-select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(243, 156, 18, 0.25);
}

/* ===================================
推奨設定ボックス
=================================== */
.recommendation-box {
    background: rgba(243, 156, 18, 0.1);
    border: 1px solid var(--accent);
    border-radius: 6px;
    padding: 15px;
    margin-top: 10px;
    font-size: 13px;
    color: var(--text-primary);
}

.recommendation-box strong {
    color: var(--accent-dark);
}

/* ===================================
プログレスセクション
=================================== */
.progress-section {
    background: var(--gray-100);
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
    display: none;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.progress-title {
    font-weight: bold;
    color: var(--text-primary);
}

.progress-text {
    font-size: 14px;
    color: var(--text-secondary);
}

.progress-bar {
    width: 100%;
    height: 30px;
    background: var(--gray-300);
    border-radius: 15px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent) 0%, var(--accent-light) 100%);
    transition: width 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-weight: bold;
    font-size: 14px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* 時間表示 */
.time-info {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 13px;
    color: var(--text-secondary);
}

.elapsed-time {
    color: var(--info);
}

.remaining-time {
    color: var(--accent-dark);
}

/* ===================================
波形表示セクション
=================================== */
.waveform-section {
    background: var(--gray-100);
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    display: none;
}

.waveform-title {
    font-size: 16px;
    font-weight: bold;
    color: var(--primary);
    margin-bottom: 15px;
}

.waveform-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 10px;
}

.waveform-box {
    background: white;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    padding: 15px;
}

.waveform-label {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 10px;
    text-align: center;
}

.waveform-canvas {
    width: 100%;
    height: 100px;
    border: 1px solid var(--gray-300);
    border-radius: 4px;
}

.waveform-note {
    font-size: 12px;
    color: var(--text-secondary);
    text-align: center;
}

/* ===================================
ダウンロードボタン
=================================== */
.download-btn {
    background-color: var(--success);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 5px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    display: none;
    margin: 20px auto;
}

.download-btn:hover {
    background-color: var(--success-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ===================================
セカンダリボタン
=================================== */
.secondary-btn {
    background-color: var(--gray-500);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.secondary-btn:hover {
    background-color: var(--gray-700);
}

/* ===================================
処理中オーバーレイ
=================================== */
.processing-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.processing-modal {
    background: var(--bg-secondary);
    border-radius: 10px;
    padding: 40px;
    text-align: center;
    max-width: 400px;
}

.processing-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid var(--gray-100);
    border-top: 5px solid var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.processing-title {
    font-size: 20px;
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.processing-message {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.processing-progress {
    width: 100%;
    height: 6px;
    background: var(--gray-300);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 10px;
}

.processing-progress-fill {
    height: 100%;
    background: var(--accent);
    transition: width 0.3s;
}

/* ===================================
レスポンシブ対応
=================================== */
@media (max-width: 768px) {
    .waveform-container {
        grid-template-columns: 1fr;
    }
    
    .file-details {
        grid-template-columns: 1fr 1fr;
    }
    
    .file-name {
        max-width: 60%;
    }
    
    .time-info {
        flex-direction: column;
        gap: 5px;
    }
}