* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #0f172a;
    color: #e2e8f0;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 2rem 1rem;
}

.container {
    max-width: 600px;
    width: 100%;
    text-align: center;
}

h1 {
    font-size: 2rem;
    margin-bottom: 0.25rem;
    color: #f8fafc;
}

.subtitle {
    color: #94a3b8;
    margin-bottom: 2rem;
}

.upload-area {
    border: 2px dashed #334155;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    transition: border-color 0.2s, background 0.2s;
    cursor: pointer;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: #3b82f6;
    background: #1e293b;
}

.file-label {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 0.5rem 1.25rem;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.file-label:hover {
    background: #334155;
}

.file-name {
    margin-top: 0.75rem;
    color: #3b82f6;
    font-size: 0.875rem;
}

.clear-btn {
    background: none;
    border: none;
    color: #ef4444;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    width: auto;
}

.clear-btn:hover {
    color: #f87171;
}

button {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    background: #3b82f6;
    color: #fff;
    cursor: pointer;
    transition: background 0.2s;
}

button:hover:not(:disabled) {
    background: #2563eb;
}

button:disabled {
    background: #334155;
    color: #64748b;
    cursor: not-allowed;
}

.spinner {
    margin-top: 2rem;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    color: #94a3b8;
}

.spinner:not([hidden]) {
    display: flex;
}

.spinner-circle {
    width: 32px;
    height: 32px;
    border: 3px solid #334155;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.result {
    margin-top: 2rem;
}

.result h2 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.result img {
    max-width: 100%;
    border-radius: 8px;
    border: 1px solid #334155;
}
