/* AIWriteX login page - minimal, dark, glassy. NO instructions, NO hints. */
:root {
    --bg-0: #0a0a0f;
    --bg-1: #12121a;
    --ink: #f3f3f5;
    --ink-dim: #6b6b7a;
    --ink-mid: #9a9aa8;
    --line: rgba(255, 255, 255, 0.06);
    --line-strong: rgba(255, 255, 255, 0.10);
    --accent: #f5f5f7;
    --accent-ink: #0a0a0f;
    --error: #ff5b5b;
    --r-card: 14px;
    --r-input: 10px;
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }

html, body { height: 100%; margin: 0; }

body.auth-page {
    font-family:
        -apple-system, BlinkMacSystemFont, "SF Pro Display",
        "Segoe UI", "Inter", "Microsoft YaHei", system-ui, sans-serif;
    color: var(--ink);
    background: var(--bg-0);
    display: grid;
    place-items: center;
    padding: 24px;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* === 背景：极轻噪点 + 中心光晕（静态 SVG，不消耗 GPU） === */
body.auth-page::before {
    content: "";
    position: fixed; inset: 0;
    background:
        radial-gradient(900px 600px at 20% 10%, rgba(120, 119, 198, 0.18), transparent 60%),
        radial-gradient(700px 500px at 85% 90%, rgba(255, 119, 198, 0.10), transparent 60%),
        radial-gradient(1200px 800px at 50% 50%, rgba(40, 40, 60, 0.6), transparent 70%);
    z-index: -2;
    pointer-events: none;
}
body.auth-page::after {
    content: "";
    position: fixed; inset: 0;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.025 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
    opacity: 0.5;
    z-index: -1;
    pointer-events: none;
    mix-blend-mode: overlay;
}

/* === 主容器 === */
.auth-container {
    width: 100%;
    max-width: 380px;
    position: relative;
}

/* === 卡片 === */
.auth-card {
    background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.015));
    border: 1px solid var(--line);
    border-radius: var(--r-card);
    padding: 36px 32px 28px;
    backdrop-filter: blur(24px) saturate(140%);
    -webkit-backdrop-filter: blur(24px) saturate(140%);
    box-shadow:
        0 1px 0 rgba(255,255,255,0.04) inset,
        0 20px 60px rgba(0,0,0,0.4),
        0 1px 2px rgba(0,0,0,0.4);
    position: relative;
    overflow: hidden;
}
.auth-card::before {
    content: "";
    position: absolute; top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
}

/* === 头部：极简 logo + 标题（无副标题） === */
.auth-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
}
.auth-mark {
    width: 32px; height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, #fff, #c5c5d0);
    color: var(--accent-ink);
    display: grid; place-items: center;
    font-weight: 700; font-size: 13px;
    letter-spacing: -0.5px;
    box-shadow: 0 0 0 1px rgba(255,255,255,0.1), 0 4px 12px rgba(0,0,0,0.3);
    flex-shrink: 0;
}
.auth-title {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.2px;
    color: var(--ink);
}

/* === 表单 === */
.auth-form { display: flex; flex-direction: column; gap: 16px; }

/* 无 placeholder / 无边框 input —— 只有底部 1px 分隔线 */
.auth-input {
    width: 100%;
    padding: 14px 0 12px;
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--line-strong);
    border-radius: 0;
    color: var(--ink);
    font-size: 15px;
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    outline: none;
    transition: border-color 0.2s var(--ease);
    letter-spacing: 0.3px;
    -webkit-appearance: none;
    appearance: none;
}
.auth-input:-webkit-autofill {
    -webkit-text-fill-color: var(--ink);
    -webkit-box-shadow: 0 0 0 1000px transparent inset;
    transition: background-color 9999s ease-in-out 0s;
}
.auth-input:focus {
    border-bottom-color: rgba(255,255,255,0.45);
}

.auth-button {
    margin-top: 6px;
    padding: 12px 16px;
    background: var(--accent);
    color: var(--accent-ink);
    border: 0;
    border-radius: var(--r-input);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -0.1px;
    cursor: pointer;
    transition: opacity 0.15s var(--ease), transform 0.05s var(--ease);
}
.auth-button:hover { opacity: 0.92; }
.auth-button:active { transform: scale(0.985); }
.auth-button:disabled { opacity: 0.4; cursor: wait; }

/* === 错误：自动消失，无残留 === */
.auth-error {
    color: var(--error);
    font-size: 12.5px;
    padding: 0;
    text-align: left;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.25s var(--ease), opacity 0.2s var(--ease), padding 0.2s var(--ease);
}
.auth-error.show {
    max-height: 60px;
    opacity: 1;
    padding: 6px 2px 0;
}

/* === 极小移动端 === */
@media (max-width: 420px) {
    .auth-card { padding: 28px 24px 24px; border-radius: 12px; }
    .auth-title { font-size: 16px; }
}
