/* ============================================
   GIF to AVIF Converter - Dark Mode Compatible
   Uses CSS variables from custom_styles.css
   Orange Theme (GIF Tools)
   ============================================ */

/* Theme Color - Orange for GIF tools */
:root {
    --tool-primary: #F97316;
    --tool-primary-dark: #EA580C;
    --tool-primary-light: rgba(249, 115, 22, 0.1);
    --tool-primary-shadow: rgba(249, 115, 22, 0.3);
}

[data-theme="dark"] {
    --tool-primary: #FB923C;
    --tool-primary-dark: #F97316;
    --tool-primary-light: rgba(251, 146, 60, 0.15);
    --tool-primary-shadow: rgba(251, 146, 60, 0.25);
}

/* Tool Container */
.tool-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px 15px 40px;
}

/* Tool Header */
.tool-header {
    text-align: center;
    margin-bottom: 30px;
}

.tool-title-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
}

.tool-icon-wrapper {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--tool-primary), var(--tool-primary-dark));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 15px var(--tool-primary-shadow);
}

.tool-icon-wrapper svg {
    width: 28px;
    height: 28px;
}

.tool-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.tool-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Upload Section */
.upload-section {
    margin-bottom: 25px;
}

.upload-area {
    background: var(--card-bg);
    border: 2px dashed var(--border-color);
    border-radius: 16px;
    padding: 50px 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.upload-area::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.05), rgba(234, 88, 12, 0.02));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.upload-area:hover {
    border-color: var(--tool-primary);
    box-shadow: 0 8px 25px var(--tool-primary-light);
}

.upload-area:hover::before {
    opacity: 1;
}

.upload-area.dragover {
    border-color: var(--tool-primary);
    background: var(--card-secondary);
    transform: scale(1.01);
}

.upload-content {
    position: relative;
    z-index: 1;
}

.upload-icon {
    color: var(--tool-primary);
    margin-bottom: 20px;
}

.upload-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 8px;
}

.upload-subtitle {
    color: var(--text-muted);
    margin: 0 0 20px;
    font-size: 1rem;
}

.upload-hint {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--text-light);
    background: var(--card-secondary);
    padding: 8px 16px;
    border-radius: 20px;
}

/* Editor Section */
.editor-section {
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

/* Files Header */
.files-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: var(--card-secondary);
    border-bottom: 1px solid var(--border-color);
}

.files-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: var(--text-primary);
}

.files-header-left svg {
    color: var(--tool-primary);
}

.btn-text {
    background: none;
    border: none;
    color: var(--tool-primary);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.btn-text:hover {
    background: var(--tool-primary-light);
}

/* Files List */
.files-list {
    max-height: 300px;
    overflow-y: auto;
    padding: 15px 20px;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    background: var(--card-secondary);
    border-radius: 10px;
    margin-bottom: 10px;
    transition: all 0.2s ease;
}

.file-item:hover {
    background: var(--card-tertiary);
}

.file-item:last-child {
    margin-bottom: 0;
}

.file-preview {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    flex-shrink: 0;
}

.file-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.file-info {
    flex: 1;
    min-width: 0;
}

.file-name {
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.file-meta {
    display: flex;
    gap: 15px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.file-meta .animated-badge {
    background: var(--tool-primary-light);
    color: var(--tool-primary);
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.75rem;
}

.file-remove {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--text-light);
    cursor: pointer;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.file-remove:hover {
    background: var(--error-bg);
    color: var(--error-color);
}

/* Settings Panel */
.settings-panel {
    padding: 20px;
    border-top: 1px solid var(--border-color);
}

.panel-header {
    margin-bottom: 20px;
}

.panel-header h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.panel-header h3 svg {
    color: var(--tool-primary);
}

/* Frame Selection Section */
.frame-section {
    margin-bottom: 25px;
}

.section-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.section-label svg {
    color: var(--tool-primary);
}

.section-description {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0 0 12px;
}

.frame-options {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.frame-option {
    flex: 1;
    min-width: 120px;
    cursor: pointer;
}

.frame-option input {
    display: none;
}

.frame-option-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 15px;
    background: var(--card-secondary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.2s ease;
}

.frame-option-box svg {
    color: var(--text-muted);
    transition: color 0.2s ease;
}

.frame-option-box span {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color 0.2s ease;
}

.frame-option:hover .frame-option-box {
    border-color: var(--tool-primary);
}

.frame-option input:checked + .frame-option-box {
    border-color: var(--tool-primary);
    background: var(--tool-primary-light);
}

.frame-option input:checked + .frame-option-box svg {
    color: var(--tool-primary);
}

.frame-option input:checked + .frame-option-box span {
    color: var(--tool-primary);
    font-weight: 600;
}

/* Quality Section */
.quality-section {
    margin-bottom: 20px;
}

.quality-slider-row {
    display: flex;
    align-items: center;
    gap: 15px;
}

.slider-input {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 8px;
    background: linear-gradient(to right, #2ecc71, #f1c40f, #e74c3c);
    border-radius: 4px;
    outline: none;
}

.slider-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--tool-primary);
    cursor: pointer;
    box-shadow: 0 2px 8px var(--tool-primary-shadow);
    transition: transform 0.2s ease;
}

.slider-input::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

.slider-input::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--tool-primary);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 8px var(--tool-primary-shadow);
}

.slider-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.quality-value-display {
    min-width: 60px;
    text-align: center;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--tool-primary);
    background: var(--tool-primary-light);
    padding: 6px 12px;
    border-radius: 8px;
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 8px;
}

.quality-presets {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.preset-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.preset-btn {
    padding: 6px 14px;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    color: var(--text-secondary);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.preset-btn:hover {
    border-color: var(--tool-primary);
    color: var(--tool-primary);
}

.preset-btn.active {
    background: var(--tool-primary);
    border-color: var(--tool-primary);
    color: white;
}

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

.option-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.option-group label svg {
    color: var(--tool-primary);
}

.styled-dropdown {
    width: 100%;
    padding: 10px 35px 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--input-bg);
    color: var(--text-primary);
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23F97316' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
}

.styled-dropdown:hover,
.styled-dropdown:focus {
    border-color: var(--tool-primary);
    outline: none;
}

/* Quality Info */
.quality-info {
    display: flex;
    gap: 12px;
    padding: 15px;
    background: var(--tool-primary-light);
    border-radius: 10px;
    margin-top: 15px;
}

.quality-info .info-icon {
    color: var(--tool-primary);
    flex-shrink: 0;
}

.quality-info .info-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.quality-info .info-text a {
    color: var(--tool-primary);
    font-weight: 600;
    text-decoration: none;
}

.quality-info .info-text a:hover {
    text-decoration: underline;
}

/* Action Bar */
.action-bar {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px;
    border-top: 1px solid var(--border-color);
    background: var(--card-secondary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--tool-primary), var(--tool-primary-dark));
    color: white;
    box-shadow: 0 4px 15px var(--tool-primary-shadow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--tool-primary-shadow);
}

.btn-secondary {
    background: var(--card-bg);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--card-secondary);
    color: var(--text-primary);
}

.btn-success {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: white;
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.3);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(46, 204, 113, 0.4);
}

/* Results Section */
.results-section {
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    padding: 30px;
    text-align: center;
}

.results-header {
    margin-bottom: 30px;
}

.results-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin: 0 auto 20px;
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.3);
}

.results-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 10px;
}

.results-subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin: 0;
}

/* Converted Files List */
.converted-files-list {
    margin-bottom: 25px;
}

.converted-file-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: var(--card-secondary);
    border-radius: 12px;
    margin-bottom: 10px;
    text-align: left;
}

.converted-file-preview {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    overflow: hidden;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    flex-shrink: 0;
}

.converted-file-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.converted-file-info {
    flex: 1;
    min-width: 0;
}

.converted-file-name {
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 5px;
}

.converted-file-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.converted-file-savings {
    background: var(--success-bg);
    color: var(--success-color);
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.8rem;
}

.converted-file-download {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    background: var(--tool-primary);
    color: white;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.converted-file-download:hover {
    background: var(--tool-primary-dark);
    transform: translateY(-2px);
}

/* Results Actions */
.results-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

/* Error Message */
.error-message {
    background: var(--error-bg);
    color: var(--error-color);
    padding: 15px 20px;
    border-radius: 10px;
    margin-top: 20px;
    font-weight: 500;
}

/* Browser Support */
.browser-support {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 20px;
    background: var(--card-bg);
    border-radius: 10px;
    margin: 25px 0;
    font-size: 0.9rem;
    color: var(--text-muted);
    box-shadow: var(--shadow-sm);
}

.browser-support svg {
    color: var(--tool-primary);
}

/* Related Tools */
.related-tools {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    padding: 20px;
    background: var(--card-bg);
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-sm);
}

.related-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.related-label svg {
    color: var(--tool-primary);
}

.related-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.related-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--card-secondary);
    color: var(--text-secondary);
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.related-link:hover {
    background: var(--tool-primary);
    color: white;
}

.related-link svg {
    width: 16px;
    height: 16px;
}

/* Info Sections */
.info-sections {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.info-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 25px 30px;
    box-shadow: var(--shadow-sm);
}

.info-card h2 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 20px;
}

.info-card h2 svg {
    color: var(--tool-primary);
}

/* Steps List */
.steps-list {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: step;
}

.steps-list li {
    position: relative;
    padding-left: 50px;
    margin-bottom: 18px;
    line-height: 1.6;
    color: var(--text-secondary);
    counter-increment: step;
}

.steps-list li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--tool-primary), var(--tool-primary-dark));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.steps-list li:last-child {
    margin-bottom: 0;
}

/* Format Explanations */
.format-explanations {
    display: grid;
    gap: 15px;
}

.format-explain {
    display: flex;
    gap: 15px;
    padding: 15px;
    background: var(--card-secondary);
    border-radius: 10px;
}

.format-tag {
    flex-shrink: 0;
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    height: fit-content;
}

.format-tag.gif {
    background: var(--tool-primary-light);
    color: var(--tool-primary);
}

.format-tag.avif {
    background: rgba(139, 92, 246, 0.15);
    color: #8B5CF6;
}

[data-theme="dark"] .format-tag.avif {
    background: rgba(167, 139, 250, 0.15);
    color: #A78BFA;
}

.format-explain p {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Mode Explanations */
.mode-explanations {
    display: grid;
    gap: 15px;
}

.mode-explain {
    display: flex;
    gap: 15px;
    padding: 15px;
    background: var(--card-secondary);
    border-radius: 10px;
}

.mode-tag {
    flex-shrink: 0;
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.85rem;
    height: fit-content;
}

.mode-tag.high {
    background: rgba(46, 204, 113, 0.15);
    color: var(--success-color);
}

.mode-tag.medium {
    background: rgba(241, 196, 15, 0.15);
    color: var(--warning-color);
}

.mode-tag.low {
    background: rgba(231, 76, 60, 0.15);
    color: var(--error-color);
}

.mode-explain p {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.95rem;
}

/* FAQ Section */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.faq-item {
    background: var(--card-secondary);
    border-radius: 10px;
    overflow: hidden;
}

.faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    background: none;
    border: none;
    text-align: left;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    transition: background 0.2s ease;
}

.faq-question:hover {
    background: var(--card-tertiary);
}

.faq-question svg {
    color: var(--tool-primary);
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.faq-item.open .faq-question svg {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-item.open .faq-answer {
    max-height: 500px;
}

.faq-answer p {
    padding: 0 20px 20px;
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.7;
}

.faq-answer a {
    color: var(--tool-primary);
    text-decoration: none;
}

.faq-answer a:hover {
    text-decoration: underline;
}

.faq-answer code {
    background: var(--card-tertiary);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.9em;
}

/* Processing Overlay */
.processing-overlay {
    position: fixed;
    inset: 0;
    background: var(--overlay-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(4px);
}

.processing-content {
    background: var(--card-bg);
    padding: 40px 50px;
    border-radius: 20px;
    text-align: center;
    box-shadow: var(--shadow-lg);
    max-width: 400px;
    width: 90%;
}

.processing-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--border-color);
    border-top-color: var(--tool-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 25px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.processing-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 10px;
}

.processing-subtitle {
    color: var(--text-muted);
    margin: 0 0 25px;
}

.progress-bar {
    height: 8px;
    background: var(--card-secondary);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--tool-primary), var(--tool-primary-dark));
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-text {
    font-weight: 600;
    color: var(--tool-primary);
    margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .tool-container {
        padding: 15px 10px 30px;
    }
    
    .tool-title {
        font-size: 1.6rem;
    }
    
    .tool-description {
        font-size: 1rem;
    }
    
    .upload-area {
        padding: 35px 20px;
    }
    
    .upload-title {
        font-size: 1.2rem;
    }
    
    .files-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .frame-options {
        flex-direction: column;
    }
    
    .frame-option {
        min-width: 100%;
    }
    
    .options-grid {
        grid-template-columns: 1fr;
    }
    
    .action-bar {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    .related-tools {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .related-links {
        width: 100%;
    }
    
    .related-link {
        flex: 1;
        min-width: calc(50% - 5px);
        justify-content: center;
    }
    
    .info-card {
        padding: 20px;
    }
    
    .info-card h2 {
        font-size: 1.15rem;
    }
    
    .format-explain,
    .mode-explain {
        flex-direction: column;
        gap: 10px;
    }
    
    .converted-file-item {
        flex-direction: column;
        text-align: center;
    }
    
    .converted-file-download {
        width: 100%;
        justify-content: center;
    }
    
    .results-actions {
        flex-direction: column;
    }
    
    .results-actions .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .tool-title-row {
        flex-direction: column;
        gap: 10px;
    }
    
    .quality-presets {
        justify-content: center;
    }
    
    .preset-label {
        width: 100%;
        text-align: center;
    }
    
    .steps-list li {
        padding-left: 42px;
    }
    
    .steps-list li::before {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion) {
    .processing-spinner {
        animation: none;
    }
    
    .upload-area::before,
    .btn,
    .related-link,
    .faq-question svg {
        transition: none;
    }
}
