body {
    font-family: 'Inter', sans-serif;
    background-color: #f3f4f6;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

@media (min-width: 640px) {
    body {
        padding: 2rem;
    }
}

@media (min-width: 768px) {
    body {
        padding: 3rem;
    }
}

.container {
    background-color: #fff;
    border-radius: 0.75rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
    width: 100%;
    max-width: 48rem;
    text-align: center;
}

@media (min-width: 640px) {
    .container {
        padding: 2rem;
    }
}

.title {
    font-size: 2.25rem;
    line-height: 2.5rem;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

@media (min-width: 640px) {
    .title {
        font-size: 2.5rem;
    }
}

@media (min-width: 768px) {
    .title {
        font-size: 3rem;
    }
}

.subtitle {
    color: #64748b;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    line-height: 1.25rem;
}

@media (min-width: 640px) {
    .subtitle {
        margin-bottom: 2rem;
        font-size: 1rem;
        line-height: 1.5rem;
    }
}

.space-y-6 > * + * {
    margin-top: 1.5rem;
}

.controls-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

@media (min-width: 640px) {
    .controls-container {
        flex-direction: row;
    }
}

.btn {
    width: 100%;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: 9999px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
    transition-duration: 200ms;
}

.btn.primary {
    background-color: #4f46e5;
    color: #fff;
}

.btn.primary:hover {
    background-color: #4338ca;
}

.btn.secondary {
    background-color: #e2e8f0;
    color: #475569;
}

.btn.secondary:hover {
    background-color: #cbd5e1;
}

.select-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
    width: 100%;
}

.select-container label {
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 500;
}

.select-container select {
    width: 100%;
    padding: 0.5rem;
    border-radius: 0.375rem;
    border: 1px solid #d1d5db;
    background-color: #fff;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    font-size: 0.875rem;
}

.loading-indicator {
    display: none;
    color: #6366f1;
    font-weight: 600;
    margin-top: 1rem;
}

.loading-indicator.visible {
    display: block;
}

.loading-icon {
    animation: spin 1s linear infinite;
    display: inline-block;
    height: 1.25rem;
    width: 1.25rem;
    margin-right: 0.75rem;
}

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

.image-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: 2rem;
}

@media (min-width: 768px) {
    .image-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.image-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.image-title {
    font-size: 1.125rem;
    line-height: 1.75rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.5rem;
}

.canvas-box {
    border: 2px solid #cbd5e1;
    border-radius: 0.5rem;
    box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06);
    width: 100%;
    height: auto;
    max-width: 200px;
    aspect-ratio: 1 / 1;
}

.result-box {
    background-color: #eef2ff;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-top: 1.5rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    display: none;
}

.result-box.visible {
    display: block;
}

.error-box {
    background-color: #fef2f2;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-top: 1.5rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    display: none;
}

.error-box.visible {
    display: block;
}

.result-text {
    font-weight: 700;
    color: #334155;
}

.result-value {
    font-size: 1.5rem;
    line-height: 2rem;
    font-weight: 800;
    color: #4f46e5;
}

.error-text {
    font-weight: 600;
    color: #dc2626;
}

.error-message {
    font-size: 0.875rem;
    line-height: 1.25rem;
    color: #ef4444;
}
