/* OAuth pages — yopr Liquid Glass, with an opaque fallback for older browsers. */
:root {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', system-ui, sans-serif;
    color-scheme: light dark;
    --text: #172033;
    --muted: #46566e;
    --link: #1454b8;
    --surface: rgba(255, 255, 255, .64);
    --field: rgba(255, 255, 255, .52);
    --edge: rgba(255, 255, 255, .8);
    --fallback: #eef3fc;
    --shadow: rgba(38, 64, 108, .12);
}
* { box-sizing: border-box; }
body {
    margin: 0;
    min-height: 100vh;
    padding: 1px 0;
    color: var(--text);
    background: #e8eef8;
    -webkit-font-smoothing: antialiased;
    line-height: 1.7;
}
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(ellipse at 12% 15%, rgba(119, 175, 255, .55), transparent 52%),
        radial-gradient(ellipse at 88% 40%, rgba(189, 161, 246, .42), transparent 48%),
        radial-gradient(ellipse at 35% 95%, rgba(122, 212, 219, .4), transparent 52%);
}
main {
    width: min(680px, calc(100% - 32px));
    margin: 7vh auto;
    padding: 36px;
    border-radius: 28px;
    border: 1px solid var(--edge);
    background: var(--fallback);
    box-shadow: inset 1px 2px 1px rgba(255, 255, 255, .7),
        inset -1px -1px 1px rgba(255, 255, 255, .35),
        0 20px 60px var(--shadow), 0 3px 12px var(--shadow);
}
h1 { margin: 18px 0; font-size: clamp(1.65rem, 5vw, 2rem); letter-spacing: -.035em; line-height: 1.3; }
h2 { font-size: 1.18rem; line-height: 1.5; overflow-wrap: anywhere; }
p { color: var(--muted); }
a { color: var(--link); text-underline-offset: 4px; }
main > a:first-child { font-weight: 700; text-decoration: none; letter-spacing: -.02em; }
section, #login {
    margin: 24px 0;
    padding: 22px;
    border: 1px solid var(--edge);
    border-radius: 20px;
    background: var(--field);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 4px 16px var(--shadow);
}
section h2:first-child { margin-top: 0; }
button {
    min-height: 44px;
    padding: 11px 18px;
    margin: 6px 4px 6px 0;
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 13px;
    background: linear-gradient(160deg, #2583ed, #1760cd);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .32), 0 4px 12px rgba(0, 90, 200, .18);
    color: white;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease;
}
button:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(0, 90, 200, .24); }
button:active:not(:disabled) { transform: scale(.98); }
button:disabled { opacity: .55; cursor: wait; }
#deny, #reload, #connections button, #clients button {
    background: var(--field);
    border-color: var(--edge);
    color: var(--link);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 2px 8px var(--shadow);
}
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
    outline: 3px solid var(--link);
    outline-offset: 3px;
}
input, textarea {
    display: block;
    width: 100%;
    padding: 12px;
    margin: 8px 0 18px;
    border: 1px solid rgba(105, 126, 157, .4);
    border-radius: 12px;
    background: var(--field);
    color: var(--text);
    font: inherit;
    box-shadow: inset 0 1px 3px var(--shadow);
}
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
textarea { resize: vertical; }
label { display: block; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; font-size: .88rem; }
pre:not(:empty) { padding: 16px; border-radius: 12px; background: var(--field); border: 1px solid var(--edge); }
li { margin: 12px 0; overflow-wrap: anywhere; }
strong { color: var(--text); overflow-wrap: anywhere; }
#connections, #clients { padding: 0; list-style: none; }
#connections li, #clients li { padding: 14px; background: var(--field); border: 1px solid var(--edge); border-radius: 14px; }
#status:empty, [hidden] { display: none !important; }
@supports ((backdrop-filter: blur(20px)) or (-webkit-backdrop-filter: blur(20px))) {
    main {
        background: var(--surface);
        backdrop-filter: blur(24px) saturate(150%);
        -webkit-backdrop-filter: blur(24px) saturate(150%);
    }
    section, #login {
        backdrop-filter: blur(8px) saturate(150%);
        -webkit-backdrop-filter: blur(8px) saturate(150%);
    }
}
@media (prefers-color-scheme: dark) {
    :root {
        --text: #f1f5fc;
        --muted: #c1cee2;
        --link: #9fcaff;
        --surface: rgba(23, 32, 52, .72);
        --field: rgba(147, 172, 212, .1);
        --edge: rgba(193, 212, 247, .18);
        --fallback: #202c43;
        --shadow: rgba(0, 0, 0, .24);
    }
    body { background: #0d1423; }
    body::before {
        background:
            radial-gradient(ellipse at 12% 15%, rgba(32, 87, 169, .5), transparent 52%),
            radial-gradient(ellipse at 88% 40%, rgba(99, 60, 151, .35), transparent 48%),
            radial-gradient(ellipse at 35% 95%, rgba(25, 100, 115, .3), transparent 52%);
    }
    main { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 20px 60px var(--shadow); }
}
@media (max-width: 700px) {
    main { margin: 24px auto; padding: 22px; border-radius: 24px; }
    section, #login { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) {
    button { transition: none; }
    button:hover:not(:disabled), button:active:not(:disabled) { transform: none; }
}
@media (prefers-reduced-transparency: reduce) {
    main, section, #login { background: var(--fallback); backdrop-filter: none; -webkit-backdrop-filter: none; }
}
