/* 註冊頁：與 login.css 同款設計語言（深空底 + 玻璃擬態卡片 + 靛紫輝光），
   在其上擴展：輸入框內嵌左側圖標 / 右側密碼可見性切換、驗證碼發送按鈕。 */
:root {
    --bg-page: #0b0d12;
    --bg-card: rgba(22, 25, 34, 0.72);
    --bg-input: rgba(12, 14, 20, 0.68);
    --border-faint: rgba(255, 255, 255, 0.08);
    --border-accent: rgba(99, 102, 241, 0.45);
    --text-main: #d5d9e1;
    --text-secondary: #9aa0ac;
    --text-muted: #6e7480;
    --accent-indigo: #6366f1;
    --shadow-1: 0 8px 32px rgba(0, 0, 0, 0.36);
    --shadow-2: 0 12px 48px rgba(0, 0, 0, 0.44);
    --glow-indigo: 0 0 24px rgba(99, 102, 241, 0.18);
}
* { box-sizing: border-box; }
html { color-scheme: dark; }
::selection { background: rgba(99, 102, 241, 0.38); color: #f5f5ff; }
:focus-visible { outline: 2px solid rgba(99, 102, 241, 0.55); outline-offset: 2px; }
body {
    margin: 0; min-height: 100vh;
    display: grid; grid-template-rows: 1fr auto; grid-template-columns: minmax(0, 1fr);
    padding: 20px;
    background:
        radial-gradient(1200px 600px at 10% -10%, rgba(99, 102, 241, 0.12), transparent 60%),
        radial-gradient(1000px 520px at 90% -8%, rgba(34, 211, 238, 0.08), transparent 55%),
        radial-gradient(800px 400px at 50% 110%, rgba(139, 92, 246, 0.08), transparent 55%),
        var(--bg-page);
    color: var(--text-main);
    font: 14px/1.5 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    -webkit-font-smoothing: antialiased;
}
main { width: min(100%, 380px); place-self: center; transform: translateY(-2em); }
h1 { margin: 0 0 22px; font-size: 22px; font-weight: 600; text-align: center; color: var(--text-main); }
form {
    padding: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-faint);
    border-radius: 20px;
    box-shadow: var(--shadow-1), inset 0 1px 0 rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}
h2 { margin: 0 0 18px; font-size: 18px; font-weight: 600; text-align: center; color: var(--text-main); }
label { display: block; margin-bottom: 14px; color: var(--text-secondary); }
/* 圖標輸入框：左內邊距給 icon 讓位（icon 絕對定位覆在 field 上） */
.field { position: relative; display: block; }
.field input {
    width: 100%; margin-top: 6px; padding: 10px 40px 10px 38px;
    border: 1px solid var(--border-faint); border-radius: 10px;
    outline: none; background: var(--bg-input); color: var(--text-main);
    font: inherit;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.field input:focus {
    border-color: var(--accent-indigo);
    background: rgba(12, 14, 20, 0.85);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}
.field-icon {
    position: absolute; left: 10px; bottom: 9px;
    width: 18px; height: 18px; fill: var(--text-muted);
    pointer-events: none;
}
.toggle-btn {
    position: absolute; right: 6px; bottom: 5px;
    width: 28px; height: 28px; padding: 0;
    border: none; border-radius: 6px; background: transparent; cursor: pointer;
    box-shadow: none;
}
.toggle-btn svg { width: 18px; height: 18px; fill: var(--text-muted); }
.toggle-btn:hover svg { fill: var(--text-secondary); }
/* 驗證碼發送按鈕：緊貼郵箱框下沿的次級動作按鈕（窄高度右對齊） */
.code-btn {
    width: auto; height: 32px; margin: -6px 0 14px; padding: 0 14px;
    float: right;
    border: 1px solid var(--border-accent); border-radius: 8px;
    background: rgba(99, 102, 241, 0.14);
    color: var(--text-main); font: 500 13px inherit; cursor: pointer;
    box-shadow: none;
    transition: all 0.18s ease;
}
.code-btn:hover { background: rgba(99, 102, 241, 0.26); }
.code-btn:disabled { opacity: .55; cursor: wait; }
form::after { content: ""; display: block; clear: both; }
button[type="submit"] {
    width: 100%; height: 42px; margin-top: 6px;
    border: 1px solid var(--border-accent);
    border-radius: 21px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.28), rgba(139, 92, 246, 0.2));
    color: var(--text-main);
    font: 500 14px inherit;
    letter-spacing: 0.3px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.18s ease;
}
button[type="submit"]:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.4), rgba(139, 92, 246, 0.3));
    box-shadow: 0 6px 18px rgba(99, 102, 241, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}
button[type="submit"]:active { transform: translateY(1px); filter: brightness(0.92); }
button[type="submit"]:disabled { opacity: .6; cursor: wait; }
#error { min-height: 21px; margin: 0 0 12px; color: #ff6b6b; text-align: center; }
.alt-link { margin: 14px 0 0; text-align: center; color: var(--text-secondary); }
.alt-link a { color: #818cf8; text-decoration: none; transition: color .15s; }
.alt-link a:hover { color: #c7d2fe; }
/* autofill 深色適配（與 login.css 同款） */
input:-webkit-autofill, input:-webkit-autofill:hover, input:-webkit-autofill:focus, input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px #0e1017 inset !important;
    -webkit-text-fill-color: var(--text-main) !important;
    color: var(--text-main) !important;
    caret-color: var(--text-main);
    transition: background-color 9999s ease-out infinite;
}
.site-footer { width: 100%; min-width: 0; display: flex; justify-content: center; text-align: center; color: var(--text-muted); font-size: 12.5px; padding: 2px 0 0; margin-bottom: 40px; user-select: none; }
.site-footer a { color: #818cf8; text-decoration: none; transition: color .15s; }
.site-footer .footer-tvadd { font-weight: 600; }
.site-footer a:hover { color: #c7d2fe; }
.site-footer .footer-cn { font-size: 0.95em; }
.site-footer .footer-domain { font-size: 1.1em; }

/* [S2] 註冊成功後的一次性 webhook secret 展示面板 */
#secret-panel { text-align: center; }
#secret-panel h2 { margin: 0 0 12px; }
#secret-panel p { color: var(--text-secondary); font-size: 13px; line-height: 1.65; }
#secret-panel b { color: #fbbf24; font-weight: 600; }
#webhook-secret-value {
    display: block; margin: 16px auto; padding: 11px 16px; max-width: 100%;
    border: 1px solid var(--border-accent); border-radius: 10px;
    background: rgba(99, 102, 241, 0.12); color: var(--text-main);
    font: 600 14px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    letter-spacing: .5px; word-break: break-all; user-select: all;
}
#secret-panel .secret-warning { color: #fbbf24; }
#enter-center-btn {
    width: 100%; height: 42px; margin-top: 14px;
    border: 1px solid var(--border-accent); border-radius: 21px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.28), rgba(139, 92, 246, 0.2));
    color: var(--text-main); font: 500 14px inherit; letter-spacing: 0.3px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.18s ease;
}
#enter-center-btn:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.4), rgba(139, 92, 246, 0.3));
    box-shadow: 0 6px 18px rgba(99, 102, 241, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}
#enter-center-btn:active { transform: translateY(1px); filter: brightness(0.92); }
