/* ============================================================
   DP Auth - 注册/登录 共享样式
   ============================================================ */

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
    font-family: "Inter", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #0a0d1a;
    color: #e6e8eb;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ---- 背景 ---- */
.dp-auth-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    background:
        radial-gradient(ellipse at top, #131836 0%, #0a0d1a 60%),
        linear-gradient(180deg, #0a0d1a 0%, #0d1024 50%, #0a0d1a 100%);
}

.dp-auth-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.5;
    animation: dp-orb-drift 20s ease-in-out infinite;
}
.dp-auth-orb-1 {
    width: 520px; height: 520px;
    background: linear-gradient(135deg, #00C9A7, #4B7BE5);
    top: -15%; left: -10%;
    animation-delay: 0s;
}
.dp-auth-orb-2 {
    width: 460px; height: 460px;
    background: linear-gradient(135deg, #4B7BE5, #845EC2);
    bottom: -20%; right: -10%;
    animation-delay: -7s;
}
.dp-auth-orb-3 {
    width: 360px; height: 360px;
    background: linear-gradient(135deg, #845EC2, #FF6F91);
    top: 40%; right: 20%;
    opacity: 0.3;
    animation-delay: -14s;
}
@keyframes dp-orb-drift {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -40px) scale(1.05); }
    66% { transform: translate(-20px, 30px) scale(0.95); }
}

/* 网格背景 */
.dp-auth-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
}

/* ---- 顶部 Logo ---- */
.dp-auth-header {
    position: relative;
    z-index: 10;
    padding: 28px 32px;
    display: flex;
    justify-content: flex-start;
}
.dp-auth-logo {
    text-decoration: none;
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    transition: opacity 0.25s;
}
.dp-auth-logo:hover { opacity: 0.8; }
.dp-auth-logo-en {
    font-family: "Pacifico", cursive;
    font-size: 26px;
    font-weight: 400;
    background: linear-gradient(135deg, #00C9A7 0%, #4B7BE5 50%, #845EC2 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
}
.dp-auth-logo-zh {
    font-size: 18px;
    font-weight: 700;
    color: #e6e8eb;
    letter-spacing: 0.05em;
}

/* ---- 主容器 ---- */
.dp-auth-main {
    position: relative;
    z-index: 10;
    min-height: calc(100vh - 90px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 20px 40px;
    gap: 20px;
}

/* ---- 卡片 ---- */
.dp-auth-card {
    position: relative;
    width: 100%;
    max-width: 440px;
    border-radius: 24px;
    background: rgba(20, 23, 40, 0.65);
    backdrop-filter: blur(24px) saturate(140%);
    -webkit-backdrop-filter: blur(24px) saturate(140%);
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.06) inset;
    animation: dp-auth-fade-up 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}
@keyframes dp-auth-fade-up {
    from { opacity: 0; transform: translateY(20px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* 流光边框 */
.dp-auth-card-border {
    position: absolute;
    inset: -2px;
    border-radius: 26px;
    background: conic-gradient(
        from 0deg,
        transparent 0%,
        #00C9A7 20%,
        #4B7BE5 40%,
        #845EC2 60%,
        transparent 80%
    );
    opacity: 0.45;
    filter: blur(8px);
    animation: dp-border-spin 8s linear infinite;
    pointer-events: none;
}
.dp-auth-card-border::after {
    content: '';
    position: absolute;
    inset: 2px;
    border-radius: 22px;
    background: rgba(20, 23, 40, 0.85);
    backdrop-filter: blur(24px) saturate(140%);
    -webkit-backdrop-filter: blur(24px) saturate(140%);
}
@keyframes dp-border-spin {
    to { transform: rotate(360deg); }
}

/* 卡片内容 */
.dp-auth-card-inner {
    position: relative;
    z-index: 2;
    padding: 40px 36px 32px;
}

/* ---- 头部 ---- */
.dp-auth-head {
    text-align: center;
    margin-bottom: 32px;
}
.dp-auth-head-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(0, 201, 167, 0.18), rgba(132, 94, 194, 0.18));
    border: 1px solid rgba(0, 201, 167, 0.25);
    margin-bottom: 16px;
    animation: dp-icon-float 4s ease-in-out infinite;
}
@keyframes dp-icon-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}
.dp-auth-icon {
    width: 28px;
    height: 28px;
    color: #00C9A7;
    stroke-width: 1.8;
}
.dp-auth-title {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #ffffff 0%, #b3b7bd 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.dp-auth-subtitle {
    font-size: 14px;
    color: #8a8f99;
    font-weight: 500;
}

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

.dp-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.dp-field-label {
    font-size: 13px;
    font-weight: 600;
    color: #b3b7bd;
    padding-left: 2px;
}
.dp-field-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.dp-field-icon {
    position: absolute;
    left: 14px;
    width: 18px;
    height: 18px;
    color: #6b7280;
    pointer-events: none;
    transition: color 0.25s;
    z-index: 1;
}
.dp-field-input {
    width: 100%;
    height: 48px;
    padding: 0 44px 0 44px;
    background: rgba(255, 255, 255, 0.04);
    border: 1.5px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    color: #e6e8eb;
    font-size: 15px;
    font-weight: 500;
    font-family: inherit;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    outline: none;
}
.dp-field-input::placeholder {
    color: #6b7280;
    font-weight: 400;
}
.dp-field-input:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.15);
}
.dp-field-input:focus {
    background: rgba(255, 255, 255, 0.06);
    border-color: #00C9A7;
    box-shadow:
        0 0 0 4px rgba(0, 201, 167, 0.12),
        0 4px 16px rgba(0, 201, 167, 0.15);
}
.dp-field-wrap:focus-within .dp-field-icon { color: #00C9A7; }

.dp-field-toggle {
    position: absolute;
    right: 8px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s;
    padding: 0;
}
.dp-field-toggle:hover {
    color: #00C9A7;
    background: rgba(0, 201, 167, 0.1);
}
.dp-field-toggle-icon {
    width: 18px;
    height: 18px;
}
.dp-field-hint {
    font-size: 12px;
    color: #6b7280;
    padding-left: 2px;
    min-height: 16px;
    transition: color 0.2s;
}
.dp-field-hint.is-error { color: #ef4444; }
.dp-field-hint.is-ok { color: #22c55e; }

.dp-field-input.is-error {
    border-color: #ef4444;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}
.dp-field-input.is-ok {
    border-color: rgba(0, 201, 167, 0.5);
}

/* ---- 提交按钮 ---- */
.dp-auth-submit {
    position: relative;
    width: 100%;
    height: 50px;
    margin-top: 8px;
    background: linear-gradient(135deg, #00C9A7 0%, #4B7BE5 100%);
    border: none;
    border-radius: 12px;
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    letter-spacing: 0.05em;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow:
        0 6px 24px rgba(0, 201, 167, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}
.dp-auth-submit::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s;
}
.dp-auth-submit:hover {
    transform: translateY(-2px);
    box-shadow:
        0 10px 30px rgba(0, 201, 167, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.12) inset;
}
.dp-auth-submit:hover::before { left: 100%; }
.dp-auth-submit:active {
    transform: translateY(0);
}
.dp-auth-submit:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none !important;
}
.dp-auth-submit-icon {
    width: 18px;
    height: 18px;
    transition: transform 0.3s;
}
.dp-auth-submit:hover .dp-auth-submit-icon {
    transform: translateX(4px);
}
.dp-auth-submit.is-loading .dp-auth-submit-text { opacity: 0; }
.dp-auth-submit.is-loading::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: dp-spin 0.8s linear infinite;
}
@keyframes dp-spin {
    to { transform: rotate(360deg); }
}

/* ---- 错误提示 ---- */
.dp-auth-error {
    display: none;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding: 12px 14px;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-radius: 10px;
    color: #fca5a5;
    font-size: 13px;
    font-weight: 500;
    animation: dp-error-in 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.dp-auth-error.is-show { display: flex; }
@keyframes dp-error-in {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}
.dp-auth-error-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* ---- 分割线 ---- */
.dp-auth-divider {
    position: relative;
    text-align: center;
    margin: 24px 0 16px;
    font-size: 13px;
    color: #6b7280;
    font-weight: 500;
}
.dp-auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}
.dp-auth-divider span {
    position: relative;
    padding: 0 12px;
    background: rgba(20, 23, 40, 0.95);
}

/* ---- 切换链接 ---- */
.dp-auth-switch {
    display: block;
    text-align: center;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    color: #b3b7bd;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.25s;
}
.dp-auth-switch:hover {
    background: rgba(0, 201, 167, 0.08);
    border-color: rgba(0, 201, 167, 0.3);
    color: #00C9A7;
    transform: translateY(-1px);
}

/* ---- 底部小字 ---- */
.dp-auth-foot {
    font-size: 12px;
    color: #6b7280;
    text-align: center;
    max-width: 440px;
    line-height: 1.6;
    margin-top: 4px;
}

/* ---- 响应式 ---- */
@media (max-width: 480px) {
    .dp-auth-header { padding: 20px 24px; }
    .dp-auth-main { padding: 16px 16px 32px; }
    .dp-auth-card-inner { padding: 32px 24px 24px; }
    .dp-auth-title { font-size: 22px; }
    .dp-auth-subtitle { font-size: 13px; }
}

/* ---- 减弱动效 ---- */
@media (prefers-reduced-motion: reduce) {
    .dp-auth-orb,
    .dp-auth-card-border,
    .dp-auth-head-icon {
        animation: none !important;
    }
}


/* ============================================================
   P0-7 升级追加 - Tab / 遮罩 / Logo 字体 / 修分割线
   ============================================================ */

/* ---- 修分割线：让卡片毛玻璃穿透（Chris 反馈固定黑底） ---- */
.dp-auth-divider span {
    background: transparent;
}

/* ---- Logo 字体（与 DP 主页面 dp-base.css .dp-logo-en/.dp-logo-zh 一致） ---- */
.dp-logo-en {
    font-family: "Pacifico", cursive;
    font-size: 24px;
    background: linear-gradient(135deg, #00C9A7 0%, #4B7BE5 50%, #845EC2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}
.dp-logo-zh {
    font-family: "ZCOOL KuaiLe", cursive;
    font-size: 18px;
    background: linear-gradient(135deg, #4B7BE5 0%, #845EC2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

/* ---- Tab 切换 ---- */
.dp-auth-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
    padding: 4px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}
.dp-auth-tab {
    flex: 1;
    padding: 10px 8px;
    border: none;
    background: transparent;
    color: #9ca3af;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}
.dp-auth-tab:hover {
    color: #e5e7eb;
}
.dp-auth-tab.is-active {
    background: linear-gradient(135deg, rgba(0, 201, 167, 0.18) 0%, rgba(75, 123, 229, 0.18) 100%);
    color: #ffffff;
    box-shadow: 0 0 0 1px rgba(0, 201, 167, 0.3) inset, 0 2px 8px rgba(0, 201, 167, 0.15);
}
.dp-tab-panel {
    display: none;
    animation: dp-tab-fade 0.3s ease;
}
.dp-tab-panel.is-active {
    display: block;
}
@keyframes dp-tab-fade {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---- 短信登录专用：验证码输入框 + 发送按钮 ---- */
.dp-field-wrap-with-btn {
    position: relative;
}
.dp-field-wrap-with-btn .dp-field-input {
    padding-right: 110px;
}
.dp-field-append {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    height: calc(100% - 12px);
    padding: 0 14px;
    background: linear-gradient(135deg, rgba(0, 201, 167, 0.15) 0%, rgba(75, 123, 229, 0.15) 100%);
    border: 1px solid rgba(0, 201, 167, 0.3);
    border-radius: 8px;
    color: #00C9A7;
    font-size: 12px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.dp-field-append:hover {
    background: linear-gradient(135deg, rgba(0, 201, 167, 0.25) 0%, rgba(75, 123, 229, 0.25) 100%);
    color: #ffffff;
    border-color: rgba(0, 201, 167, 0.5);
}
.dp-field-append:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ---- 微信 Tab 内容 ---- */
.dp-auth-wechat {
    text-align: center;
    padding: 12px 0 4px;
}
.dp-auth-wechat-tip {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 16px;
    background: rgba(7, 193, 96, 0.06);
    border: 1px solid rgba(7, 193, 96, 0.18);
    border-radius: 14px;
    margin-bottom: 18px;
    text-align: left;
}
.dp-auth-wechat-icon {
    width: 36px;
    height: 36px;
    color: #07c160;
    flex-shrink: 0;
}
.dp-auth-wechat-title {
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 4px;
}
.dp-auth-wechat-sub {
    font-size: 12px;
    color: #9ca3af;
    margin: 0;
    line-height: 1.5;
}
.dp-auth-submit-wechat {
    background: linear-gradient(135deg, #07c160 0%, #00a854 100%);
    box-shadow: 0 4px 16px rgba(7, 193, 96, 0.25);
}
.dp-auth-submit-wechat:hover {
    background: linear-gradient(135deg, #08d167 0%, #00b85d 100%);
    box-shadow: 0 6px 20px rgba(7, 193, 96, 0.4);
}
.dp-auth-submit-wechat .dp-auth-submit-icon {
    fill: currentColor;
}

/* ---- 全屏遮罩（微信登录跳转中）---- */
.dp-auth-mask {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(10, 13, 26, 0.88);
    backdrop-filter: blur(20px) saturate(140%);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: dp-mask-fade 0.3s ease;
}
.dp-auth-mask[hidden] {
    display: none;
}
@keyframes dp-mask-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}
.dp-auth-mask-card {
    position: relative;
    width: 320px;
    max-width: calc(100vw - 40px);
    padding: 36px 28px 28px;
    background: rgba(20, 23, 40, 0.85);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
    text-align: center;
    overflow: hidden;
}
.dp-auth-mask-border {
    position: absolute;
    inset: -2px;
    background: conic-gradient(from 0deg, #00C9A7, #4B7BE5, #845EC2, #00C9A7);
    border-radius: 22px;
    z-index: -1;
    opacity: 0.6;
    filter: blur(2px);
    animation: dp-mask-border-spin 4s linear infinite;
}
@keyframes dp-mask-border-spin {
    to { transform: rotate(360deg); }
}
.dp-auth-mask-content {
    position: relative;
}
.dp-auth-mask-spinner {
    width: 56px;
    height: 56px;
    margin: 0 auto 18px;
    animation: dp-mask-spin 1.2s linear infinite;
}
.dp-auth-mask-spinner svg {
    width: 100%;
    height: 100%;
}
@keyframes dp-mask-spin {
    to { transform: rotate(360deg); }
}
.dp-auth-mask-title {
    font-size: 20px;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 8px;
}
.dp-auth-mask-sub {
    font-size: 13px;
    color: #9ca3af;
    margin: 0 0 20px;
    line-height: 1.5;
}
.dp-auth-mask-cancel {
    padding: 10px 28px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    color: #9ca3af;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
}
.dp-auth-mask-cancel:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.3);
}

/* ---- 响应式微调 ---- */
@media (max-width: 480px) {
    .dp-auth-tab { font-size: 12px; padding: 9px 6px; }
    .dp-field-wrap-with-btn .dp-field-input { padding-right: 96px; }
    .dp-field-append { font-size: 11px; padding: 0 10px; }
}
