:root {
    --primary-color: #4CAF50;
    --hover-color: #45a049;
    --bg-color: #f5f5f5;
    --text-color: #333;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 20px;
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.container {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 600px;
    text-align: center;
}

h1 {
    margin-bottom: 1.5rem;
    color: #2c3e50;
}

.upload-area {
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #fafafa;
}

.upload-area:hover, .upload-area.dragover {
    border-color: var(--primary-color);
    background-color: #e8f5e9;
}

.browse-btn {
    color: var(--primary-color);
    font-weight: bold;
    text-decoration: underline;
}

.controls {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.quality-control {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
    width: 100%;
    max-width: 200px;
}

.btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.btn:not(:disabled):hover {
    background-color: var(--hover-color);
}

.btn.secondary {
    background-color: #2196F3;
}
.btn.secondary:not(:disabled):hover {
    background-color: #1976D2;
}

.status-area {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #666;
    min-height: 1.2em;
}

.preview-area {
    margin-top: 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
}

.preview-item {
    position: relative;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    aspect-ratio: 1;
}

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

.preview-item .status-badge {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.6);
    color: white;
    font-size: 10px;
    padding: 2px;
}
