:root {
    --bg: #ffffff;
    --card: #f8fafc;
    --card-border: #e2e8f0;
    --text: #0f172a;
    --muted: #64748b;
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --success: #16a34a;
    --error: #dc2626;
    --warning: #f59e0b;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

.container {
    max-width: 520px;
    margin: 0 auto;
    padding: 3rem 1rem;
}

header {
    text-align: center;
    margin-bottom: 2rem;
}

header h1 {
    margin: 0 0 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

header p {
    color: var(--muted);
    margin: 0;
    font-size: 0.95rem;
}

.card {
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.card h2 {
    margin-top: 0;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
}

.field {
    margin-bottom: 0.75rem;
}

.field label {
    display: block;
    margin-bottom: 0.3rem;
    font-weight: 500;
    font-size: 0.9rem;
}

.field .hint {
    color: var(--muted);
    font-weight: normal;
    font-size: 0.85rem;
}

input[type="text"],
input[type="email"] {
    width: 100%;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--card-border);
    border-radius: 6px;
    background: #fff;
    color: var(--text);
    font-size: 0.95rem;
}

input[type="text"]:focus,
input[type="email"]:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.radio-box {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.875rem;
    border: 1px solid var(--card-border);
    border-radius: 8px;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

.radio-box:hover {
    border-color: var(--accent);
    background: #f1f5f9;
}

.radio-box input {
    margin-top: 0.15rem;
    width: 1rem;
    height: 1rem;
    accent-color: var(--accent);
    flex-shrink: 0;
}

.radio-box div {
    flex: 1;
}

.radio-box strong {
    display: block;
    margin-bottom: 0.15rem;
    font-size: 0.95rem;
}

.radio-box p {
    margin: 0;
    color: var(--muted);
    font-size: 0.82rem;
}

.btn-primary {
    width: 100%;
    padding: 0.85rem;
    border: none;
    border-radius: 8px;
    background: var(--accent);
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.btn-primary:hover {
    background: var(--accent-hover);
}

.hidden {
    display: none !important;
}

#loading {
    text-align: center;
    padding: 1.5rem;
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--card-border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 0.75rem;
}

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

.success {
    color: var(--success);
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.error {
    color: var(--error);
    margin-bottom: 0.75rem;
}

.results {
    list-style: none;
    padding: 0;
    margin: 0.75rem 0;
}

.results li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--card-border);
    font-size: 0.9rem;
}

.results li:last-child {
    border-bottom: none;
}

.badge {
    display: inline-block;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}

.badge.created {
    background: rgba(22, 163, 74, 0.1);
    color: var(--success);
}

.badge.exists {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.credentials {
    background: var(--bg);
    border: 1px solid var(--card-border);
    border-radius: 6px;
    padding: 0.75rem;
    overflow-x: auto;
    font-size: 0.85rem;
    color: var(--text);
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}
