:root {
    color-scheme: dark;
    --bg-primary: #1c1c1e;
    --bg-elevated: #2c2c2e;
    --bg-card: #3a3a3c;
    --text-primary: #ffffff;
    --text-secondary: rgba(235, 235, 245, 0.6);
    --text-tertiary: rgba(235, 235, 245, 0.3);
    --accent: #0a84ff;
    --border-subtle: rgba(255, 255, 255, 0.15);
    --shadow-dark: 0 4px 24px rgba(0, 0, 0, 0.5);
    --radius-card: 12px;
    --radius-button: 10px;
    --radius-input: 8px;
    --trans-smooth: 420ms ease-in-out;
}

* {
    box-sizing: border-box;
    transition: background-color var(--trans-smooth), color var(--trans-smooth), border-color var(--trans-smooth), box-shadow var(--trans-smooth), transform 360ms ease-in-out;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
    font-optical-sizing: auto;
    max-width: 700px;
    margin: 40px auto;
    padding: 20px;
    background: var(--bg-primary);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.container {
    background: color-mix(in srgb, var(--bg-elevated) 82%, transparent);
    padding: 24px;
    border-radius: var(--radius-card);
    border: 0.5px solid var(--border-subtle);
    box-shadow: var(--shadow-dark);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
}

h2 {
    margin: 0 0 10px;
    font-size: clamp(1.45rem, 2.5vw, 1.95rem);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0 0 20px;
}

label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 14px;
    letter-spacing: -0.01em;
}

input[type="text"],
input[type="password"],
select {
    width: 100%;
    padding: 12px;
    margin-top: 8px;
    border: 0.5px solid var(--border-subtle);
    border-radius: var(--radius-input);
    background: var(--bg-card);
    color: var(--text-primary);
    box-sizing: border-box;
    font-size: 0.98rem;
}

input::placeholder {
    color: var(--text-tertiary);
}

input:focus-visible,
select:focus-visible,
button:focus-visible {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 40%, transparent);
}

button {
    width: 100%;
    padding: 12px;
    background: var(--accent);
    color: var(--text-primary);
    border: 0;
    border-radius: var(--radius-button);
    cursor: pointer;
    font-size: 1rem;
    margin-top: 18px;
    font-weight: 600;
    letter-spacing: -0.01em;
    box-shadow: 0 2px 10px rgba(10, 132, 255, 0.35);
}

button:hover {
    background: color-mix(in srgb, var(--accent) 85%, white);
    transform: translateY(-1px);
}

button:disabled {
    background: color-mix(in srgb, var(--accent) 45%, #8e8e93);
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

#log {
    margin-top: 20px;
    padding: 15px;
    background: var(--bg-card);
    color: var(--text-secondary);
    border: 0.5px solid var(--border-subtle);
    border-radius: var(--radius-input);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-size: 13px;
    max-height: 400px;
    overflow-y: auto;
    line-height: 1.45;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

a {
    color: var(--accent);
}
