﻿/* ==========================================================================
   Yixiang UI / 翊象 UI
   Authentication Pages / 登录注册页

   Copyright (c) 2026 威海颜翊网络科技有限公司
   Licensed under the MIT License. Commercial use is permitted.
   ========================================================================== */

.yx-auth-body {
    min-height: 100vh;
    margin: 0;
    background-color: var(--yx-bg-body);
}

.yx-auth-page {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    min-height: 100vh;
}

.yx-auth-brand {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 48px;
    overflow: hidden;
    color: #ffffff;
    background:
        radial-gradient(700px 500px at 15% 15%, rgba(83, 128, 255, 0.35), transparent 60%),
        radial-gradient(600px 500px at 90% 85%, rgba(109, 79, 255, 0.28), transparent 60%),
        #0a1020;
}

.yx-auth-brand::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
    background-size: 80px 80px;
    mask-image: radial-gradient(circle at center, #000 20%, transparent 78%);
    pointer-events: none;
}

.yx-auth-brand > * {
    position: relative;
    z-index: 1;
}

.yx-auth-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
    font-size: 18px;
    font-weight: 700;
    text-decoration: none;
}

.yx-auth-logo img {
    width: 34px;
    height: 34px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.yx-auth-copy {
    max-width: 520px;
}

.yx-auth-copy h1 {
    margin: 0 0 18px;
    font-size: clamp(30px, 3.2vw, 48px);
    line-height: 1.25;
    letter-spacing: -0.5px;
}

.yx-auth-copy p {
    margin: 0;
    max-width: 460px;
    color: rgba(255, 255, 255, 0.62);
    font-size: 15px;
    line-height: 1.9;
}

.yx-auth-points {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 22px;
    margin-top: 28px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
}

.yx-auth-points span::before {
    content: "✓";
    margin-right: 7px;
    color: #7fa4ff;
}

.yx-auth-brand-footer {
    color: rgba(255, 255, 255, 0.36);
    font-size: 12px;
    line-height: 1.8;
}

.yx-auth-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 28px;
}

.yx-auth-card {
    width: 100%;
    max-width: 400px;
}

.yx-auth-title {
    margin: 0 0 6px;
    font-size: 28px;
    font-weight: 700;
    color: var(--yx-text-primary);
}

.yx-auth-subtitle {
    margin: 0 0 26px;
    color: var(--yx-text-secondary);
    font-size: 14px;
    line-height: 1.7;
}

.yx-auth-form .yx-form-group {
    margin-bottom: 16px;
}

.yx-auth-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.yx-auth-link {
    color: var(--yx-brand-primary);
    font-size: 13px;
    text-decoration: none;
}

.yx-auth-link:hover {
    text-decoration: underline;
}

.yx-auth-submit {
    width: 100%;
    margin-top: 4px;
}

.yx-auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 22px 0;
    color: var(--yx-text-tertiary);
    font-size: 12px;
}

.yx-auth-divider::before,
.yx-auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background-color: var(--yx-border-light);
}

.yx-auth-bottom {
    margin-top: 20px;
    text-align: center;
    color: var(--yx-text-secondary);
    font-size: 13px;
}

.yx-auth-bottom a {
    color: var(--yx-brand-primary);
    font-weight: 500;
    text-decoration: none;
}

.yx-auth-legal {
    margin-top: 26px;
    color: var(--yx-text-tertiary);
    font-size: 11px;
    line-height: 1.8;
    text-align: center;
}

.yx-auth-legal a {
    color: inherit;
}

/* 滑动验证码 / Slide captcha */
.yx-captcha {
    margin: 4px 0 18px;
    padding: 12px;
    border: 1px solid var(--yx-border-light);
    border-radius: var(--yx-radius-md);
    background-color: var(--yx-bg-hover);
}

.yx-captcha-stage {
    position: relative;
    width: 100%;
    max-width: 320px;
    aspect-ratio: 300 / 180;
    margin: 0 auto 10px;
    overflow: hidden;
    border-radius: var(--yx-radius-sm);
    background-color: var(--yx-bg-active);
}

.yx-captcha-stage img {
    display: block;
    width: 100%;
    height: 100%;
    user-select: none;
    -webkit-user-drag: none;
}

.yx-captcha-tile {
    position: absolute;
    top: 0;
    left: 0;
    width: 44px;
    height: 44px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    pointer-events: none;
}

.yx-captcha-track {
    position: relative;
    height: 40px;
    border: 1px solid var(--yx-border-base);
    border-radius: var(--yx-radius-sm);
    background-color: var(--yx-bg-paper);
    overflow: hidden;
}

.yx-captcha-fill {
    position: absolute;
    inset: 0 auto 0 0;
    width: 40px;
    background-color: var(--yx-brand-primary-light);
}

.yx-captcha-thumb {
    position: absolute;
    top: -1px;
    left: -1px;
    width: 40px;
    height: 40px;
    border: 1px solid var(--yx-brand-primary);
    border-radius: var(--yx-radius-sm);
    background-color: #ffffff;
    color: var(--yx-brand-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    touch-action: none;
    user-select: none;
}

.yx-captcha-thumb:active {
    cursor: grabbing;
}

.yx-captcha-track.is-ok .yx-captcha-fill {
    background-color: var(--yx-success-bg);
}

.yx-captcha-track.is-ok .yx-captcha-thumb {
    border-color: var(--yx-success);
    color: var(--yx-success);
}

.yx-captcha-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 8px;
}

.yx-captcha-status {
    color: var(--yx-text-tertiary);
    font-size: 12px;
}

.yx-captcha-refresh {
    border: none;
    background: none;
    padding: 0;
    color: var(--yx-brand-primary);
    font-size: 12px;
    cursor: pointer;
}

.yx-captcha-refresh:hover {
    text-decoration: underline;
}

@media (max-width: 900px) {
    .yx-auth-page {
        grid-template-columns: 1fr;
    }

    .yx-auth-brand {
        min-height: 220px;
        padding: 30px 24px;
        justify-content: flex-start;
        gap: 26px;
    }

    .yx-auth-copy h1 {
        font-size: 26px;
    }

    .yx-auth-copy p {
        font-size: 13px;
        line-height: 1.7;
    }

    .yx-auth-points,
    .yx-auth-brand-footer {
        display: none;
    }

    .yx-auth-panel {
        padding: 28px 20px 40px;
    }
}


/* 协议页面 / Legal pages */
.yx-legal-body {
    min-height: 100vh;
    background-color: var(--yx-bg-body);
}

.yx-legal-header {
    padding: 18px 0;
    border-bottom: 1px solid var(--yx-border-light);
    background-color: var(--yx-bg-paper);
}

.yx-legal-header .yx-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.yx-legal-container {
    max-width: 860px;
    margin: 0 auto;
    padding: 48px 24px 72px;
}

.yx-legal-container h1 {
    margin: 0 0 8px;
    font-size: clamp(26px, 3vw, 36px);
    color: var(--yx-text-primary);
}

.yx-legal-meta {
    margin-bottom: 32px;
    color: var(--yx-text-tertiary);
    font-size: 13px;
}

.yx-legal-container h2 {
    margin: 30px 0 10px;
    font-size: 18px;
    color: var(--yx-text-primary);
}

.yx-legal-container p,
.yx-legal-container li {
    color: var(--yx-text-secondary);
    font-size: 14px;
    line-height: 1.9;
}

.yx-legal-container ul {
    margin: 8px 0;
    padding-left: 22px;
}

.yx-legal-footer {
    padding: 24px 0;
    border-top: 1px solid var(--yx-border-light);
    color: var(--yx-text-tertiary);
    font-size: 12px;
    text-align: center;
}
