/* ===================================
画像サイズ変更ツール専用スタイル
=================================== */

/* ===================================
リサイズ設定セクション
=================================== */
.resize-settings {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

/* 768px以上で横並び */
@media (min-width: 768px) {
    .resize-settings {
        grid-template-columns: 1fr 1fr;
    }
    
    /* 出力設定は全幅 */
    .control-group:last-child {
        grid-column: 1 / -1;
    }
}

/* コントロールグループ（島スタイル） */
.control-group {
    background: var(--gray-100);
    border-radius: 8px;
    padding: 20px;
}

.control-title {
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 15px;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.control-title i {
    color: var(--text-primary);
}

/* ===================================
サイズ入力部分
=================================== */
.size-inputs {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 350px;
}

.size-input-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-right: 40px;
}

.input-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.input-group label {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 80px;
}

.input-group label i {
    font-size: 16px;
}

.size-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--gray-300);
    border-radius: 4px;
    font-size: 14px;
    text-align: center;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.size-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(243, 156, 18, 0.25);
}

/* プリセット適用時のハイライトアニメーション */
.size-input.highlight-applied {
    animation: highlightPulse 2s ease-out;
}

@keyframes highlightPulse {
    0% {
        border-color: var(--success);
        box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.4);
    }
    50% {
        border-color: var(--success);
        box-shadow: 0 0 0 5px rgba(40, 167, 69, 0.2);
    }
    100% {
        border-color: var(--gray-300);
        box-shadow: none;
    }
}

/* アスペクト比リンクコンテナ */
.aspect-link-container {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 30px;
    transition: opacity 0.3s;
}

.aspect-link-line {
    font-size: 24px;
    color: var(--gray-500);
    transition: color 0.3s;
    font-weight: normal;
}

.aspect-link-line.bottom span {
    display: inline-block;
    transform: scaleY(-1);
}

.aspect-link-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    flex-shrink: 0;
}

.aspect-link-icon i {
    font-size: 14px;
    color: var(--gray-500);
    transition: color 0.3s;
}

.size-inputs:not(.aspect-locked) .aspect-link-container {
    opacity: 0;
    pointer-events: none;
}

/* アスペクト比ロック */
.aspect-lock {
    display: flex;
    align-items: center;
    margin-top: 5px;
    padding-left: 92px;
}

.lock-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
}

.lock-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* ===================================
拡大縮小率コントロール
=================================== */
.scale-controls {
    margin-bottom: 20px;
}

.scale-label {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
}

.scale-label i {
    font-size: 16px;
}

.scale-slider-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.scale-slider {
    flex: 1;
    height: 6px;
    background: var(--gray-300);
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.scale-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;
}

.scale-slider::-webkit-slider-thumb:hover {
    background: var(--accent-dark);
    transform: scale(1.2);
}

.scale-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    border: none;
}

input[type="number"].scale-percent {
    width: 60px;
    padding: 6px 8px;
    border: 1px solid var(--gray-300);
    border-radius: 4px;
    font-size: 14px;
    text-align: center;
}

.apply-btn {
    background: var(--info);
    color: white;
    border: none;
    padding: 6px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.apply-btn:hover {
    background: var(--info-hover);
    transform: translateY(-1px);
}

/* ===================================
アスペクト比コントロール
=================================== */
.aspect-ratio-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
    opacity: 1;
    transition: all 0.3s ease-in-out;
    overflow: hidden;
}

.aspect-ratio-controls.hidden {
    max-height: 0;
    opacity: 0;
    margin-top: -10px;
}

.aspect-ratio-controls > label {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.aspect-ratio-controls > label i {
    font-size: 16px;
}

.aspect-ratio-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.aspect-select {
    padding: 8px 12px;
    border: 1px solid var(--gray-300);
    border-radius: 4px;
    font-size: 14px;
    background: white;
    transition: border-color 0.3s;
    flex: 1;
}

.aspect-select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(243, 156, 18, 0.25);
}

.aspect-buttons {
    display: flex;
    gap: 8px;
}

.aspect-btn {
    background: var(--info);
    color: white;
    border: none;
    padding: 6px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    white-space: nowrap;
}

.aspect-btn:hover:not(:disabled) {
    background: var(--info-hover);
    transform: translateY(-1px);
}

.aspect-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===================================
用途別プリセット
=================================== */
.preset-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--gray-300);
}

.preset-controls > label {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.preset-controls > label i {
    font-size: 16px;
}

.preset-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.preset-select {
    padding: 8px 12px;
    border: 1px solid var(--gray-300);
    border-radius: 4px;
    font-size: 14px;
    background: white;
    transition: border-color 0.3s;
    flex: 1;
}

.preset-select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(243, 156, 18, 0.25);
}

.preset-select optgroup {
    font-weight: 600;
    color: var(--text-primary);
}

.preset-select option {
    font-weight: normal;
    padding: 4px 0;
}

.preset-btn {
    background: var(--info);
    color: white;
    border: none;
    padding: 6px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    white-space: nowrap;
}

.preset-btn:hover:not(:disabled) {
    background: var(--info-hover);
    transform: translateY(-1px);
}

.preset-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===================================
ファイル名設定セクション
=================================== */
.filename-settings {
    margin-bottom: 20px;
}

.filename-option {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.filename-option input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.filename-option label {
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* カスタム設定の詳細 */
.filename-custom-details {
    margin-left: 26px;
    padding: 15px;
    background: rgba(243, 156, 18, 0.05);
    border-radius: 6px;
    margin-bottom: 10px;
    border: 1px solid rgba(243, 156, 18, 0.2);
}

.filename-custom-option {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.filename-custom-option:last-child {
    margin-bottom: 0;
}

.filename-custom-option input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.filename-custom-option label {
    font-size: 14px;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.filename-input-inline {
    padding: 6px 10px;
    border: 1px solid var(--gray-300);
    border-radius: 4px;
    font-size: 13px;
    width: 150px;
    transition: all 0.3s;
}

.filename-input-inline:disabled {
    background: var(--gray-100);
    opacity: 0.6;
}

.filename-input-inline:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(243, 156, 18, 0.25);
}

/* ファイル名プレビュー */
.filename-preview {
    background: var(--gray-100);
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    padding: 12px;
    margin-top: 12px;
}

.filename-preview-title {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 6px;
    font-weight: 600;
}

.filename-preview-examples {
    font-family: 'Courier New', monospace;
    font-size: 13px;
}

.filename-preview-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.filename-preview-item:last-child {
    margin-bottom: 0;
}

.filename-original {
    color: var(--text-secondary);
}

.filename-arrow {
    color: var(--accent);
    font-weight: bold;
}

.filename-result {
    color: var(--primary);
    font-weight: 600;
}

/* ===================================
出力形式ボタングループ
=================================== */
.format-buttons {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.format-btn {
    flex: 1;
    padding: 10px 16px;
    border: 2px solid var(--gray-300);
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.3s;
    text-align: center;
}

.format-btn:hover {
    border-color: var(--accent);
    background: rgba(243, 156, 18, 0.05);
}

.format-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
    font-weight: 600;
}

.format-btn.active:hover {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
}

/* ===================================
品質設定（スライダー部分）
=================================== */
.quality-settings {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--gray-300);
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.quality-slider-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quality-slider-group label {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 600;
    min-width: 50px;
}

.quality-slider-wrapper {
    flex: 1;
    position: relative;
    padding: 8px 0;  /* スライダーのつまみ用の余白 */
}

/* 推奨範囲のハイライト表示 */
.range-highlight {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    height: 6px;
    background: rgba(40, 167, 69, 0.3);  /* 緑色の半透明 */
    border-radius: 3px;
    pointer-events: none;  /* クリックイベントを透過 */
    z-index: 1;
    display: none;  /* 初期状態では非表示 */
    transition: all 0.3s ease;  /* スムーズな切り替え */
}

/* 品質スライダー本体 */
.quality-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    background: #dee2e6;  /* グレーの背景 */
    position: relative;
    z-index: 2;  /* ハイライトより上に配置 */
}

.quality-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;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 3;  /* 最前面に配置 */
}

.quality-slider::-webkit-slider-thumb:hover {
    background: var(--accent-dark);
    transform: scale(1.2);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.quality-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 3;
}

.slider-marks {
    display: flex;
    justify-content: space-between;
    margin-top: 5px;
    padding: 0 9px;
    font-size: 10px;
    color: var(--text-secondary);
    user-select: none;
}

.quality-number-input {
    width: 60px !important;
    padding: 6px 8px;
    border: 1px solid var(--gray-300);
    border-radius: 4px;
    font-size: 14px;
    text-align: center;
}

.quality-number-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(243, 156, 18, 0.25);
}

/* 推奨範囲のヒント */
.quality-range-hint {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    font-size: 12px;
    color: var(--text-secondary);
}

.range-indicator {
    display: inline-block;
    width: 20px;
    height: 3px;
    background: rgba(40, 167, 69, 0.5);
    border-radius: 2px;
}

/* WebP用ロスレスオプション（tools.cssにない部分のみ） */
.lossless-option {
    margin-top: 15px;
}

.lossless-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
}

.lossless-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--accent);
}

.lossless-checkbox span {
    user-select: none;
}

.lossless-checkbox:hover span {
    color: var(--accent);
}

/* 出力コントロール */
.output-controls {
    display: flex;
    gap: 20px;
}

.format-group,
.quality-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.format-group label,
.quality-group label {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.format-group label i,
.quality-group label i {
    font-size: 16px;
}

.output-select,
.quality-select {
    padding: 8px 12px;
    border: 1px solid var(--gray-300);
    border-radius: 4px;
    font-size: 14px;
    background: white;
    transition: border-color 0.3s;
}

.output-select:focus,
.quality-select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(243, 156, 18, 0.25);
}

/* ===================================
ファイルリスト
=================================== */
.file-list {
    margin-bottom: 30px;
}

.file-item {
    background: white;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 12px;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    animation: fadeIn 0.3s ease-out;
}

.file-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--gray-300);
    transition: all 0.3s;
}

.file-item.status-waiting::before {
    background: #ffc107;
}

.file-item.status-processing::before {
    background: var(--info);
    animation: pulse 1.5s infinite;
}

.file-item.status-complete::before {
    background: var(--success);
}

.file-item.status-error::before {
    background: var(--danger);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes fadeIn {
    from { 
        opacity: 0;
        transform: translateY(10px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

.file-item:hover {
    border-color: var(--accent);
    box-shadow: 0 2px 8px rgba(243, 156, 18, 0.1);
}

.file-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
    min-width: 0;
}

.file-thumbnail {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid var(--gray-300);
    flex-shrink: 0;
}

.file-details {
    flex: 1;
    min-width: 0;
}

.file-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-meta {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 8px;
}

.file-meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.file-meta-item i {
    font-size: 11px;
    width: 14px;
    text-align: center;
}

.file-meta-value {
    font-weight: 500;
    color: var(--text-primary);
}

.file-meta-value span {
    font-weight: 600;
}

/* ファイルサイズ変化の色分け */
.file-size-change {
    font-weight: bold;
}

.file-size-decrease {
    color: var(--success);
}

.file-size-increase {
    color: var(--danger);
}

.file-size-same {
    color: var(--text-secondary);
}

.file-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.file-status {
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.status-waiting {
    background: #fff3cd;
    color: #856404;
}

.status-processing {
    background: #d1ecf1;
    color: #0c5460;
}

.status-complete {
    background: #d4edda;
    color: #155724;
}

.status-error {
    background: #f8d7da;
    color: #721c24;
}

/* ===================================
ステータス情報
=================================== */
.status-info {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 5px;
    padding: 15px;
    margin: 20px 0;
    text-align: center;
    font-size: 14px;
    color: #856404;
}

.status-ready {
    background: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.status-error {
    background: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.status-processing {
    background: #d1ecf1;
    border-color: #bee5eb;
    color: #0c5460;
}

/* ===================================
アクションバー
=================================== */
.action-bar {
    background: var(--gray-100);
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}

.action-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.action-stats {
    display: flex;
    gap: 30px;
}

.action-stat {
    text-align: center;
}

.action-stat-value {
    font-size: 28px;
    font-weight: bold;
    color: var(--primary);
    display: block;
}

.action-stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    margin-top: 2px;
}

.action-buttons {
    display: flex;
    gap: 10px;
}

.action-btn {
    padding: 12px 24px;
    border-radius: 6px;
    border: none;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.resize-btn {
    background: var(--success);
    color: white;
}

.resize-btn:hover:not(:disabled) {
    background: var(--success-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.download-zip-btn {
    background: var(--accent);
    color: var(--primary);
}

.download-zip-btn:hover:not(:disabled) {
    background: var(--accent-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(243, 156, 18, 0.3);
}

.action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--gray-500);
}

.clear-btn {
    background: transparent;
    color: var(--danger);
    border: 1px solid var(--danger);
    padding: 10px 20px;
    font-size: 14px;
}

.clear-btn:hover {
    background: var(--danger);
    color: white;
    border-color: var(--danger);
}

/* ===================================
個別ダウンロードボタン
=================================== */
.download-link {
    background: var(--info);
    color: white;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.download-link:hover {
    background: var(--info-hover);
    transform: translateY(-1px);
    text-decoration: none;
    color: white;
}

/* ===================================
処理中オーバーレイ
=================================== */
.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: 767px) {
    .resize-settings {
        gap: 20px;
        grid-template-columns: 1fr;
    }
    
    .control-group {
        padding: 15px;
    }
    
    .size-inputs {
        max-width: 100%;
    }
    
    .size-input-wrapper {
        padding-right: 35px;
    }
    
    .aspect-link-container {
        width: 25px;
    }
    
    .aspect-link-line {
        font-size: 20px;
    }
    
    .aspect-lock {
        padding-left: 0;
    }
    
    .aspect-ratio-group {
        flex-wrap: wrap;
    }
    
    .aspect-select {
        width: 100%;
    }
    
    .aspect-buttons {
        width: 100%;
        justify-content: flex-end;
    }
    
    .preset-group {
        flex-wrap: wrap;
    }
    
    .preset-select {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .preset-btn {
        width: 100%;
    }

    .scale-slider-group {
        flex-wrap: wrap;
    }

    .scale-slider {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .quality-slider-group {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .quality-slider-group label {
        width: 100%;
        margin-bottom: 8px;
    }
    
    .quality-slider-wrapper {
        width: 100%;
        margin-bottom: 10px;
    }

    .output-controls {
        flex-direction: column;
    }

    .file-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .file-info {
        width: 100%;
    }

    .file-thumbnail {
        width: 50px;
        height: 50px;
    }

    .file-meta {
        flex-direction: column;
        gap: 8px;
    }

    .file-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .action-bar-content {
        flex-direction: column;
        text-align: center;
    }

    .action-stats {
        width: 100%;
        justify-content: space-around;
    }

    .action-buttons {
        width: 100%;
        flex-direction: column;
    }

    .action-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .format-buttons {
        flex-direction: column;
    }
    
    .format-btn {
        width: 100%;
    }
    
    .filename-input-inline {
        width: 120px;
    }
    
    .filename-custom-details {
        margin-left: 20px;
        padding: 10px;
    }
}