body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    max-width: 1000px;
    margin: 2rem auto;
    padding: 0 1rem;
    line-height: 1.5;
    background: #f5f7fa;
    color: #2d3748;
}

h1 {
    color: #2d3748;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 0.5rem;
}

.controls {
    display: grid;
    gap: 1rem;
    margin-bottom: 2rem;
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.dir-select {
    display: flex;
    gap: 1rem;
    align-items: center;
    padding: 0.5rem;
    background: #f8fafc;
    border-radius: 6px;
}

.tree-view {
    margin: 1rem 0;
    max-height: 300px;
    overflow-y: auto;
    background: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.tree-item {
    padding: 0.25rem 0;
}

.tree-item.directory {
    cursor: pointer;
    color: #4a5568;
    font-weight: 500;
}

.tree-item.file {
    color: #718096;
    padding-left: 1.5rem;
}

.tree-toggle {
    display: inline-block;
    width: 20px;
    text-align: center;
    cursor: pointer;
}

.preview {
    border: 2px dashed #ccc;
    padding: 1rem;
    margin-top: 2rem;
}

.preview img {
    max-width: 100%;
    max-height: 300px;
    display: block;
    margin: 0 auto;
}

.progress {
    margin-top: 1rem;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    height: 20px;
    background: #4CAF50;
    width: 0%;
    transition: width 0.3s ease;
}

button {
    padding: 0.5rem 1rem;
    cursor: pointer;
    background: #4299e1;
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: 500;
    transition: background 0.2s;
}

button:hover:not(:disabled) {
    background: #3182ce;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.current-file {
    margin: 0.5rem 0;
    padding: 0.5rem;
    background: #ebf8ff;
    border-radius: 4px;
    color: #2c5282;
    font-family: monospace;
}

.status {
    margin-top: 1rem;
    font-style: italic;
}