:root {
    --primary: #4f46e5;
    --primary-dark: #4338ca;
    --bg-gradient: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    --surface: #ffffff;
    --text-main: #111827;
    --text-sub: #6b7280;
    --border: #e5e7eb;
    --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.01);
    --radius: 16px;
    --success: #10b981;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Inter', -apple-system, sans-serif; }

body {
    background: var(--bg-gradient);
    color: var(--text-main);
    min-height: 100vh;
    padding: 20px;
    display: flex;
    justify-content: center;
}

.app-wrapper {
    width: 100%;
    max-width: 800px;
    margin-top: 2rem;
}

/* --- Main Card --- */
.converter-card {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 2.5rem;
    text-align: center;
    transition: transform 0.3s ease;
}

.badge-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.badge {
    background: #e0e7ff;
    color: var(--primary);
    display: inline-block;
    padding: 4px 12px;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.github-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: #24292f;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.github-link:hover {
    background: #1b1f23;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.github-link svg {
    flex-shrink: 0;
}

h1 { font-size: 2rem; font-weight: 800; letter-spacing: -0.025em; margin-bottom: 0.5rem; }
.subtitle { color: var(--text-sub); margin-bottom: 2rem; max-width: 600px; margin-left: auto; margin-right: auto; }
.subtitle strong { color: var(--text-main); font-weight: 700; }

/* --- Drop Zone --- */
.drop-zone {
    border: 2px dashed #d1d5db;
    border-radius: var(--radius);
    padding: 3rem 2rem;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #f9fafb;
    outline: none;
}

.drop-zone:hover, .drop-zone.drag-over {
    border-color: var(--primary);
    background: #eef2ff;
    transform: scale(0.99);
}

.drop-zone:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.icon-circle {
    background: white;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    color: var(--primary);
}

.hint { color: var(--text-sub); font-size: 0.9rem; margin-top: 0.5rem; }

/* --- Workspace --- */
.workspace.hidden { display: none; }
.workspace { margin-top: 2rem; animation: slideDown 0.4s ease; }

@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

/* --- Settings Grid --- */
.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    text-align: left;
    margin-bottom: 2rem;
    background: #f9fafb;
    padding: 1.5rem;
    border-radius: 12px;
}

.control-group.full-width { grid-column: span 2; }
label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 0.5rem; }
select, input[type="number"] {
    width: 100%; padding: 0.6rem; border: 1px solid var(--border); border-radius: 8px; font-size: 0.95rem; outline: none;
}
input[type="range"] { width: 100%; cursor: pointer; }
.label-row { display: flex; justify-content: space-between; margin-bottom: 0.5rem; }
#qualityValue { font-family: monospace; color: var(--primary); }

/* Resize Section */
.checkbox-row { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.resize-inputs { 
    display: flex; 
    gap: 8px; 
    align-items: flex-end;
    transition: opacity 0.2s; 
}
.resize-inputs.disabled { opacity: 0.4; pointer-events: none; }
.input-wrap { flex: 1; }

.hint-text {
    font-size: 0.7rem;
    color: var(--text-sub);
    margin-top: 5px;
    font-style: italic;
}

/* Edit Controls */
.edit-controls {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 0.75rem;
    background: white;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.edit-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.edit-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-sub);
}

.edit-btn {
    background: white;
    border: 1px solid var(--border);
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--text-main);
}

.edit-btn:hover {
    background: #f9fafb;
    border-color: var(--primary);
    color: var(--primary);
}

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

.edit-btn svg {
    width: 14px;
    height: 14px;
}

/* Preview Panel */
.preview-panel {
    background: #f9fafb;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 2px solid var(--border);
}

.preview-panel.hidden {
    display: none;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.preview-content {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 1.5rem;
    align-items: center;
}

.preview-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.preview-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-sub);
    text-align: center;
}

.preview-image-container {
    background: white;
    border: 2px solid var(--border);
    border-radius: 8px;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.preview-image-container img {
    max-width: 100%;
    max-height: 300px;
    object-fit: contain;
}

.preview-info {
    font-size: 0.75rem;
    color: var(--text-sub);
    text-align: center;
}

.preview-divider {
    font-size: 2rem;
    color: var(--primary);
    font-weight: bold;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    max-width: 90%;
    max-height: 90vh;
    overflow: auto;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.crop-modal-content {
    max-width: 1000px;
    width: 95vw;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f3f4f6;
}

.modal-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
}

.close-modal-btn {
    background: #f3f4f6;
    border: none;
    color: var(--text-sub);
    cursor: pointer;
    font-size: 1.5rem;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.close-modal-btn:hover {
    background: #fee2e2;
    color: #dc2626;
}

.crop-info-banner {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #1e40af;
    font-size: 0.875rem;
}

.crop-info-banner svg {
    flex-shrink: 0;
    color: #3b82f6;
}

.crop-container {
    position: relative;
    margin: 1rem 0;
    background: #1f2937;
    border-radius: 12px;
    overflow: hidden;
    min-height: 400px;
    max-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.2);
}

#cropPreviewImg {
    max-width: 100%;
    max-height: 60vh;
    display: block;
    user-select: none;
    pointer-events: none;
}

.crop-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.crop-box {
    position: absolute;
    border: 2px solid var(--primary);
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5), 0 0 20px rgba(79, 70, 229, 0.5);
    cursor: move;
    pointer-events: all;
    transition: box-shadow 0.2s;
}

.crop-box:hover {
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.6), 0 0 25px rgba(79, 70, 229, 0.7);
}

.crop-handle {
    position: absolute;
    width: 14px;
    height: 14px;
    background: white;
    border: 3px solid var(--primary);
    border-radius: 50%;
    pointer-events: all;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.crop-handle:hover {
    width: 18px;
    height: 18px;
    background: var(--primary);
    border-color: white;
}

.crop-handle.nw { top: -7px; left: -7px; cursor: nw-resize; }
.crop-handle.ne { top: -7px; right: -7px; cursor: ne-resize; }
.crop-handle.sw { bottom: -7px; left: -7px; cursor: sw-resize; }
.crop-handle.se { bottom: -7px; right: -7px; cursor: se-resize; }
.crop-handle.n { top: -7px; left: 50%; transform: translateX(-50%); cursor: n-resize; }
.crop-handle.s { bottom: -7px; left: 50%; transform: translateX(-50%); cursor: s-resize; }
.crop-handle.e { top: 50%; right: -7px; transform: translateY(-50%); cursor: e-resize; }
.crop-handle.w { top: 50%; left: -7px; transform: translateY(-50%); cursor: w-resize; }

.crop-dimension-label {
    position: absolute;
    top: -35px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    pointer-events: none;
}

.crop-dimension-label::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid var(--primary);
}

.crop-controls {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid #f3f4f6;
}

.crop-presets label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 0.75rem;
    display: block;
}

.preset-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.preset-btn {
    background: white;
    border: 2px solid var(--border);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-sub);
    transition: all 0.2s;
}

.preset-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: #f5f3ff;
}

.preset-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
}

.crop-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

.crop-actions .btn {
    min-width: 120px;
}

/* Aspect ratio lock button */
.aspect-lock-btn {
    background: white;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 8px;
    cursor: pointer;
    color: var(--text-sub);
    transition: all 0.2s;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0;
}

.aspect-lock-btn:hover {
    background: #f9fafb;
    border-color: var(--primary);
    color: var(--primary);
}

.aspect-lock-btn.locked {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.aspect-lock-btn.locked .unlock-only {
    display: none;
}

.aspect-lock-btn:not(.locked) .unlock-only {
    display: block;
}

/* --- File Queue List --- */
.queue-header {
    display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem;
}
.text-btn { background: none; border: none; color: var(--text-sub); cursor: pointer; font-size: 0.85rem; }
.text-btn:hover { color: #ef4444; }

.file-list {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 2rem;
}

.file-item {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    border-bottom: 1px solid var(--border);
    background: white;
    gap: 0.75rem;
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.file-item:last-child { border-bottom: none; }

.file-item[draggable="true"] {
    cursor: move;
}

.file-item[draggable="true"]:hover {
    background: #f9fafb;
}

.file-item.drag-over-top {
    border-top: 3px solid var(--primary);
    margin-top: -3px;
}

.file-item.drag-over-bottom {
    border-bottom: 3px solid var(--primary);
    margin-bottom: -3px;
}

.file-thumbnail {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--border);
}

.file-thumbnail-placeholder {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    border-radius: 6px;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.skeleton-loading {
    background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
    background-size: 200% 100%;
    animation: skeleton-pulse 1.5s ease-in-out infinite;
}

@keyframes skeleton-pulse {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.file-info { flex: 1; text-align: left; overflow: hidden; min-width: 0; }
.file-name { font-size: 0.9rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-meta { 
    font-size: 0.75rem; 
    color: var(--text-sub); 
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2px;
}

.format-badge {
    display: inline-block;
    background: #dbeafe;
    color: #1e40af;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-indicator {
    font-size: 0.75rem; font-weight: 600; padding: 2px 8px; border-radius: 4px; background: #e5e7eb; color: var(--text-sub);
}
.status-indicator.done { background: #d1fae5; color: #065f46; }
.status-indicator.error { background: #fee2e2; color: #dc2626; }

.file-progress {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 100px;
}

.progress-bar {
    flex: 1;
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
}

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

.progress-text {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--primary);
    min-width: 35px;
    text-align: right;
}

.retry-btn {
    background: #fef3c7;
    border: 1px solid #fbbf24;
    color: #92400e;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
    line-height: 1;
    margin-left: 4px;
}

.retry-btn:hover {
    background: #fbbf24;
    color: #78350f;
    transform: rotate(180deg);
}

.size-estimate {
    color: var(--success);
    font-weight: 600;
    font-size: 0.7rem;
}

.remove-btn {
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
    line-height: 1;
}
.remove-btn:hover {
    background: #fee2e2;
    color: #dc2626;
}

/* Buttons */
.action-buttons { display: flex; gap: 1rem; flex-wrap: wrap; }
.btn {
    flex: 1; 
    min-width: 140px;
    padding: 0.85rem; 
    border-radius: 8px; 
    font-weight: 600; 
    cursor: pointer; 
    border: none; 
    transition: all 0.2s;
    outline: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.btn-primary { background: var(--primary); color: white; box-shadow: 0 4px 6px rgba(79, 70, 229, 0.3); }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn-primary:focus { box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.3), 0 4px 6px rgba(79, 70, 229, 0.3); }
.btn-secondary { background: white; border: 1px solid var(--border); color: var(--text-sub); }
.btn-secondary:hover { background: #f9fafb; color: var(--text-main); }
.btn-secondary:focus { box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1); }

.keyboard-hints {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    font-size: 0.75rem;
    color: var(--text-sub);
}

.keyboard-hints kbd {
    background: #f3f4f6;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid #d1d5db;
    font-family: monospace;
    font-size: 0.7rem;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

/* --- SEO Section --- */
.info-section { margin-top: 3rem; }
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; }
.info-card {
    background: rgba(255, 255, 255, 0.6); 
    padding: 1.5rem; 
    border-radius: 12px; 
    border: 1px solid rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
}
.info-card:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}
.info-card h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.info-card p { font-size: 0.9rem; color: var(--text-sub); line-height: 1.5; }
.info-card strong { color: var(--text-main); font-weight: 600; }

/* --- How It Works Section --- */
.how-it-works {
    margin-top: 4rem;
    background: rgba(255, 255, 255, 0.5);
    padding: 3rem 2rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.7);
}

.how-it-works h2 {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 2.5rem;
    color: var(--text-main);
}

.tech-explanation {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.tech-step {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.step-number {
    background: var(--primary);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.step-content h4 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.step-content p {
    font-size: 0.9rem;
    color: var(--text-sub);
    line-height: 1.6;
}

.open-source-cta {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(0,0,0,0.1);
}

.open-source-cta p {
    color: var(--text-sub);
    font-size: 0.95rem;
}

.open-source-cta a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: border-color 0.2s ease;
}

.open-source-cta a:hover {
    border-bottom-color: var(--primary);
}

/* --- Comparison Section --- */
.comparison-section {
    margin-top: 4rem;
    background: rgba(255, 255, 255, 0.5);
    padding: 3rem 2rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.7);
}

.comparison-section h2 {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 2rem;
    color: var(--text-main);
}

.comparison-table {
    max-width: 700px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.comparison-row {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #f3f4f6;
    align-items: center;
}

.comparison-row:last-child {
    border-bottom: none;
}

.comparison-header {
    background: #f9fafb;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-sub);
}

.feature-name {
    font-weight: 600;
    color: var(--text-main);
}

.us {
    color: var(--success);
    font-weight: 600;
    text-align: center;
}

.them {
    color: var(--text-sub);
    text-align: center;
}

.check {
    color: var(--success);
    font-size: 1.2rem;
    font-weight: 700;
}

.cross {
    color: #ef4444;
    font-size: 1.2rem;
    font-weight: 700;
}

.warning {
    color: #f59e0b;
    font-size: 1.2rem;
    font-weight: 700;
}

/* --- Footer --- */
.site-footer {
    margin-top: 4rem;
    padding: 2rem 0;
    border-top: 1px solid rgba(0,0,0,0.1);
}

.footer-content {
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.footer-note p {
    color: var(--text-sub);
    font-size: 0.85rem;
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.license {
    font-size: 0.8rem;
    opacity: 0.8;
}

/* Toast */
#toast {
    position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%) translateY(100px);
    background: #1f2937; color: white; padding: 12px 24px; border-radius: 50px;
    box-shadow: 0 10px 15px rgba(0,0,0,0.2); transition: transform 0.3s ease;
}
#toast.show { transform: translateX(-50%) translateY(0); }

@media (max-width: 600px) {
    .settings-grid { grid-template-columns: 1fr; }
    .converter-card { padding: 1.5rem; }
    .preview-content { grid-template-columns: 1fr; }
    .preview-divider { transform: rotate(90deg); }
    .edit-controls { flex-direction: column; align-items: stretch; }
    .edit-group { justify-content: space-between; }
    .badge-row { flex-direction: column; gap: 0.5rem; }
    .comparison-row { grid-template-columns: 1fr; gap: 0.5rem; text-align: left; }
    .comparison-row > * { text-align: left !important; }
    .us::before { content: "✓ "; }
    .them::before { content: "✗ "; }
    .tech-explanation { grid-template-columns: 1fr; }
    .footer-links { flex-direction: column; gap: 1rem; }
}