:root {
    /* Light Theme */
    --bg: #f8fafc;
    --panel: #ffffff;
    --panel-light: #f1f5f9;
    --border: #e2e8f0;
    --text: #0f172a;
    --text-dim: #64748b;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --success: #10b981;
    --danger: #ef4444;
    --radius: 12px;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
}

.app-interface {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow);
}

/* ─── Dropzone ─── */
.dropzone {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    background: var(--panel-light);
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color .2s, background .2s;
    margin-bottom: 20px;
}

.dropzone.dragover {
    border-color: var(--accent);
    background: #eff6ff;
}

.dropzone-content svg {
    color: var(--accent);
    margin-bottom: 10px;
}

.dropzone-content p {
    margin: 4px 0;
    color: var(--text-dim);
    font-size: 14px;
}

.dropzone-content p strong {
    color: var(--text);
    font-size: 16px;
}

/* ─── Controls ─── */
.controls {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 16px;
    padding: 0 0 20px 0;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
    color: var(--text-dim);
    flex: 1;
    min-width: 180px;
}

select {
    background: var(--panel-light);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 14px;
    font-family: inherit;
}

/* ─── Buttons ─── */
.btn-primary,
.btn-secondary,
.btn-download,
.btn-remove {
    border: none;
    border-radius: 8px;
    padding: 10px 18px;
    font-size: 14px;
    cursor: pointer;
    transition: background .15s, opacity .15s;
    font-weight: 600;
    font-family: inherit;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
}

.btn-primary:hover {
    background: var(--accent-hover);
}

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

.btn-secondary:hover {
    color: var(--text);
    border-color: var(--text-dim);
}

/* ─── Results ─── */
.results {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--panel-light);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
}

.card-preview {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: #e2e8f0;
}

.card-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

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

.card-name {
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.card-size {
    font-size: 12px;
    color: var(--text-dim);
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
}

.new-size.shrunk {
    color: var(--success);
    font-weight: 600;
}

.new-size.same {
    color: var(--text-dim);
    font-weight: 600;
}

.card-bar {
    height: 4px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

.card-bar-fill {
    height: 100%;
    width: 0%;
    background: var(--accent);
    transition: width .4s ease;
}

.card-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.btn-download {
    background: var(--success);
    color: #fff;
}

.btn-download:disabled {
    background: #e2e8f0;
    color: #94a3b8;
    cursor: not-allowed;
}

.btn-remove {
    background: transparent;
    color: var(--text-dim);
    border: 1px solid var(--border);
    padding: 10px 12px;
}

.btn-remove:hover {
    color: var(--danger);
    border-color: var(--danger);
}

/* ─── Mobile ─── */
@media (max-width: 560px) {
    .app-interface {
        padding: 20px;
    }

    .card {
        flex-wrap: wrap;
    }

    .card-actions {
        width: 100%;
        justify-content: flex-end;
    }
}