:root {
    --primary-color: #6200ea;
    --background-color: #f5f5f7;
    --text-color: #333;
    --border-radius: 12px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

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

h1 {
    margin-top: 0;
    color: var(--primary-color);
}

.config-panel {
    background: #eef;
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.config-fields {
    display: grid;
    gap: 10px;
    margin-top: 10px;
}

input, textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    box-sizing: border-box;
}

button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    width: 100%;
    margin-top: 10px;
    transition: background 0.2s;
}

button:hover {
    background-color: #3700b3;
}

.hidden {
    display: none;
}

#loading {
    margin-top: 15px;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid #ccc;
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

#error-box {
    background: #fee;
    color: #c00;
    padding: 10px;
    border-radius: 8px;
    margin-top: 15px;
}

#result-box {
    margin-top: 20px;
    background: #f0f0f0;
    padding: 15px;
    border-radius: 8px;
    white-space: pre-wrap;
    line-height: 1.5;
}
