/* ============================================================
   PATCHED: auth-ocean v2 —— 前台登录注册页蓝海玻璃风格（单主题）
   作用域限定在 .auth-page 内，不影响 App 其他页面
   ============================================================ */
.auth-page {
    --ao-bg1: #0a1f44;
    --ao-bg2: #0c4a6e;
    --ao-bg3: #155e75;
    --ao-accent1: #38bdf8;
    --ao-accent2: #818cf8;
    --ao-grad: linear-gradient(135deg, #38bdf8 0%, #818cf8 100%);
    --ao-glow: rgba(56, 189, 248, 0.55);
    --ao-glass: rgba(255, 255, 255, 0.17);
    --ao-border: rgba(255, 255, 255, 0.26);
    --ao-text: #f0f9ff;
    --ao-dim: rgba(240, 249, 255, 0.65);
    --ao-input-bg: rgba(255, 255, 255, 0.08);
    --ao-input-border: rgba(255, 255, 255, 0.22);
    position: relative;
    height: 100vh;
    height: 100dvh;
    box-sizing: border-box;
    overflow: hidden;
    background: linear-gradient(160deg, var(--ao-bg1) 0%, var(--ao-bg2) 55%, var(--ao-bg3) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

/* ---------- 背景装饰衬底层（元素由 auth-ocean.js 注入，超出裁剪不撑滚动） ---------- */
.auth-page .ao-decor {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

/* ---------- 背景装饰（元素由 auth-ocean.js 注入） ---------- */
.auth-page .ao-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    opacity: 0.5;
    pointer-events: none;
    z-index: 0;
    animation: aoDrift 14s ease-in-out infinite alternate;
}
.auth-page .ao-orb1 { width: 420px; height: 420px; background: var(--ao-accent1); top: -120px; left: -100px; }
.auth-page .ao-orb2 { width: 360px; height: 360px; background: var(--ao-accent2); bottom: -100px; right: -80px; animation-delay: -6s; }
@keyframes aoDrift {
    from { transform: translate(0, 0) scale(1); }
    to   { transform: translate(40px, 30px) scale(1.12); }
}

.auth-page .ao-waves {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    z-index: 0;
    pointer-events: none;
    line-height: 0;
}
.auth-page .ao-waves svg { width: 100%; height: 22vh; min-height: 110px; display: block; }

.auth-page .ao-particle {
    position: absolute;
    bottom: -6px;
    border-radius: 50%;
    background: #fff;
    z-index: 0;
    pointer-events: none;
    opacity: 0;
    animation: aoFloat linear infinite;
}
@keyframes aoFloat {
    0%   { transform: translateY(0) scale(1); opacity: 0; }
    12%  { opacity: 0.55; }
    85%  { opacity: 0.35; }
    100% { transform: translateY(-108vh) scale(0.5); opacity: 0; }
}

/* ---------- 海底点缀：水母 / 珊瑚 / 贝壳 / 气泡 ---------- */
.auth-page .ao-jelly {
    position: absolute;
    z-index: 1;
    opacity: 0.85;
    pointer-events: none;
    animation: aoJellySwim 12s ease-in-out infinite alternate;
}
.auth-page .ao-jelly .ao-ten {
    animation: aoTentacle 2.6s ease-in-out infinite alternate;
    transform-origin: top center;
}
.auth-page .ao-jelly1 { width: 50px; left: 10%; top: 30%; }
.auth-page .ao-jelly2 { width: 36px; right: 12%; top: 16%; animation-duration: 15s; animation-delay: -4s; }
.auth-page .ao-jelly3 { width: 26px; left: 22%; top: 62%; animation-duration: 18s; animation-delay: -8s; opacity: 0.6; }
@keyframes aoJellySwim {
    0%   { transform: translate(0, 0) rotate(-3deg); }
    100% { transform: translate(46px, -26px) rotate(4deg); }
}
@keyframes aoTentacle {
    from { transform: skewX(-6deg); }
    to   { transform: skewX(7deg); }
}
.auth-page .ao-coral { position: absolute; z-index: 1; bottom: 10px; width: 100px; pointer-events: none; }
.auth-page .ao-coral-l { left: 4%; }
.auth-page .ao-coral-r { right: 5%; width: 80px; }
.auth-page .ao-shell { position: absolute; z-index: 1; bottom: 8px; left: 50%; margin-left: -26px; width: 52px; pointer-events: none; }
.auth-page .ao-bubble {
    position: absolute;
    z-index: 1;
    bottom: 40px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.08);
    pointer-events: none;
    opacity: 0;
    animation: aoBubble linear infinite;
}
@keyframes aoBubble {
    0%   { transform: translateY(0); opacity: 0; }
    10%  { opacity: 0.6; }
    85%  { opacity: 0.35; }
    100% { transform: translateY(-70vh); opacity: 0; }
}

/* ---------- 玻璃卡片 ---------- */
.auth-page .auth-card {
    position: relative;
    z-index: 2;
    margin: auto;
    width: 100%;
    max-width: 380px;
    background: var(--ao-glass);
    border: 1px solid var(--ao-border);
    border-radius: 22px;
    padding: 24px 22px 18px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(22px) saturate(1.4);
    -webkit-backdrop-filter: blur(22px) saturate(1.4);
    animation: aoCardIn 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    color: var(--ao-text);
}
@keyframes aoCardIn {
    from { opacity: 0; transform: translateY(24px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---------- 品牌区 ---------- */
.auth-page .ao-brand { text-align: center; margin-bottom: 16px; }
.auth-page .ao-brand-logo {
    width: 46px; height: 46px;
    margin: 0 auto 10px;
    border-radius: 14px;
    background: var(--ao-grad);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #fff;
    box-shadow: 0 8px 24px var(--ao-glow);
}
.auth-page .ao-brand-name {
    font-size: 21px;
    font-weight: 700;
    letter-spacing: 3px;
    margin: 0;
    background: linear-gradient(120deg, #fff 30%, var(--ao-accent1) 70%, #fff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    background-size: 200% 100%;
    animation: aoShimmer 5s linear infinite;
}
@keyframes aoShimmer {
    from { background-position: 0% 0; }
    to   { background-position: 200% 0; }
}
.auth-page .ao-brand-slogan {
    font-size: 11px;
    color: var(--ao-dim);
    letter-spacing: 3px;
    margin-top: 6px;
}

/* ---------- 登录/注册切换 ---------- */
.auth-page .role-switch {
    display: flex;
    background: var(--ao-input-bg);
    border: 1px solid var(--ao-input-border);
    border-radius: 13px;
    padding: 4px;
    margin-bottom: 14px;
}
.auth-page .role-btn {
    flex: 1;
    height: 36px;
    padding: 0;
    border: none;
    border-radius: 9px;
    background: transparent;
    color: var(--ao-dim);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
}
.auth-page .role-btn.active {
    background: var(--ao-grad);
    color: #fff;
    box-shadow: 0 4px 14px var(--ao-glow);
}

/* ---------- 表单 ---------- */
.auth-page .form-item { margin-bottom: 11px; }
.auth-page .form-label { color: var(--ao-dim); }
.auth-page .form-tip { color: var(--ao-dim); }
.auth-page .form-input {
    width: 100%;
    height: 44px;
    padding: 0 14px;
    background: var(--ao-input-bg);
    border: 1px solid var(--ao-input-border);
    border-radius: 11px;
    color: var(--ao-text);
    font-size: 14px;
    outline: none;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition: all 0.25s ease;
}
.auth-page .form-input::placeholder { color: var(--ao-dim); }
.auth-page .form-input:focus {
    border-color: var(--ao-accent1);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.12), 0 0 18px var(--ao-glow);
    background: rgba(255, 255, 255, 0.14);
}
.auth-page .auth-captcha {
    width: 104px;
    height: 42px;
    cursor: pointer;
    border-radius: 11px;
    border: 1px solid var(--ao-input-border);
    background: rgba(255, 255, 255, 0.15);
}

/* ---------- 按钮 ---------- */
.auth-page .btn {
    height: 44px;
    border: none;
    border-radius: 11px;
    background: var(--ao-grad) !important;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 4px;
    box-shadow: 0 8px 22px var(--ao-glow);
    position: relative;
    overflow: hidden;
    transition: all 0.25s ease;
}
.auth-page .btn::after {
    content: '';
    position: absolute;
    top: 0; left: -80%;
    width: 50%; height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.45), transparent);
    transform: skewX(-20deg);
    animation: aoSheen 3.2s ease infinite;
}
@keyframes aoSheen {
    0%, 60% { left: -80%; }
    100%    { left: 140%; }
}
.auth-page .btn:hover:not(:disabled) { filter: brightness(1.08); }
.auth-page .btn:active { transform: scale(0.98); }

/* ---------- 提示与链接 ---------- */
.auth-page .msg { font-size: 13px; min-height: 20px; margin-top: 8px; color: var(--ao-dim); }
.auth-page .msg-error { color: #fca5a5; }
.auth-page .msg-success { color: #6ee7b7; }
.auth-page .ao-link { color: var(--ao-accent1); font-size: 13px; text-decoration: none; transition: color 0.2s; }
.auth-page .ao-link:hover { color: #fff; }
.auth-page .ao-link-dim { color: var(--ao-dim); font-size: 13px; text-decoration: none; transition: color 0.2s; }
.auth-page .ao-link-dim:hover { color: var(--ao-text); }

@media (max-width: 480px) {
    .auth-page { padding: 12px; }
    .auth-page .auth-card { padding: 20px 18px 16px; }
    .auth-page .ao-brand-name { letter-spacing: 2px; }
    .auth-page .ao-waves svg { height: 18vh; min-height: 90px; }
}

/* 矮屏（高度不足 740px）进一步压缩纵向间距，保证一屏放得下 */
@media (max-height: 740px) {
    .auth-page { padding: 10px; }
    .auth-page .auth-card { padding: 18px 18px 12px; }
    .auth-page .ao-brand { margin-bottom: 10px; }
    .auth-page .ao-brand-logo { width: 38px; height: 38px; font-size: 18px; margin-bottom: 6px; }
    .auth-page .ao-brand-slogan { margin-top: 4px; }
    .auth-page .role-switch { margin-bottom: 10px; }
    .auth-page .form-item { margin-bottom: 8px; }
    .auth-page .form-input { height: 40px; }
    .auth-page .auth-captcha { height: 38px; }
    .auth-page .btn { height: 40px; }
    .auth-page .msg { margin-top: 4px; min-height: 16px; }
    .auth-page .ao-waves svg { min-height: 80px; }
}
