/* ===== 云环云电脑 · 登录页  ===== */

:root {
    --brand: #22d3ee;
    --brand-deep: #06b6d4;
    --brand-hover: #67e8f9;
    --brand-gradient: linear-gradient(135deg, #06b6d4, #3b82f6, #8b5cf6);

    --bg-page: #0b1120;
    --bg-card: #151e32;
    --bg-input: #0f172a;
    --border-color: rgba(148, 163, 184, 0.12);
    --border-soft: rgba(148, 163, 184, 0.22);

    --text-primary: #f8fafc;
    --text-regular: #cbd5e1;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --radius-sm: 8px;
    --radius-md: 10px;
    --radius-lg: 14px;

    --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 32px rgba(0, 0, 0, 0.35);
    --shadow-form: -8px 0 32px rgba(0, 0, 0, 0.35);
    --shadow-btn: 0 4px 14px rgba(6, 182, 212, 0.3);
    --shadow-btn-hover: 0 6px 20px rgba(6, 182, 212, 0.42);

    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-page);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }

/* 细滚动条，融入深色主题 */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.25);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.45);
}
::-webkit-scrollbar-track,
::-webkit-scrollbar-corner {
    background: transparent;
}
html {
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.25) transparent;
}

/* ===== 双栏布局容器 ===== */
.login-container {
    display: flex;
    min-height: 100vh;
    height: 100%;
    background: var(--bg-page);
    position: relative;
    overflow: auto;
}

/* ===== 左侧横幅 ===== */
.login-banner {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(ellipse 80% 60% at 50% 40%, rgba(34, 211, 238, 0.07) 0%, transparent 70%), var(--bg-page);
    position: relative;
    overflow: hidden;
}

/* 光晕效果 */
.banner-glow {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    animation: floatGlow 8s ease-in-out infinite;
}

.banner-glow:nth-child(1) {
    width: 420px;
    height: 420px;
    top: -10%;
    left: 20%;
    background: radial-gradient(circle, rgba(34, 211, 238, 0.14) 0%, transparent 70%);
}

.banner-glow--2 {
    width: 360px;
    height: 360px;
    bottom: -5%;
    right: 15%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.13) 0%, transparent 70%);
    animation-delay: -4s;
}

@keyframes floatGlow {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(20px, -20px) scale(1.05); }
    66% { transform: translate(-15px, 15px) scale(0.95); }
}

/* 网格背景 */
.banner-grid {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(148, 163, 184, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, 0.06) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black 40%, transparent 70%);
}

/* SVG 插图 */
.banner-illustration {
    position: relative;
    z-index: 1;
    width: min(60vw, 900px);
    min-width: 280px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: clamp(16px, 2vw, 24px);
}

/* ===== 3D 旋转轮播 ===== */
.ring-stage {
    width: 100%;
    height: min(42vw, 560px);
    min-height: 280px;
    perspective: 1600px;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, black 4%, black 96%, transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0%, black 4%, black 96%, transparent 100%);
}

.ring-tilt {
    transform-style: preserve-3d;
    transform: rotateX(-12deg) rotateY(18deg) rotateZ(-16deg);
}

.ring {
    position: relative;
    width: clamp(100px, 11vw, 180px);
    height: clamp(100px, 11vw, 180px);
    transform-style: preserve-3d;
    animation: ringRotate 24s linear infinite;
}

.ring-panel {
    position: absolute;
    inset: 0;
    border-radius: clamp(10px, 1.6vw, 18px);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow:
        0 16px 45px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.05);
    transform: rotateY(calc(var(--i) * 30deg)) translateZ(clamp(200px, 24vw, 460px));
    will-change: transform, opacity, filter;
}

@keyframes ringRotate {
    from { transform: rotateY(0deg); }
    to { transform: rotateY(360deg); }
}

.banner-title {
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 700;
    background: linear-gradient(135deg, #22d3ee, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.banner-subtitle {
    font-size: clamp(16px, 2.2vw, 22px);
    color: #64748b;
    opacity: 0.8;
}

.banner-svg {
    width: 100%;
    height: auto;
    display: block;
}
@keyframes svgPulse {
    0%, 100% { opacity: 0.7; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.06); }
}

@keyframes svgFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

@keyframes svgFloatSlow {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

@keyframes svgSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes svgDash {
    to { stroke-dashoffset: 0; }
}

@keyframes svgBlink {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

.banner-svg .chip-core {
    animation: svgPulse 3s ease-in-out infinite;
    transform-origin: center center;
}

.banner-svg .monitor-screen {
    animation: svgPulse 4s ease-in-out infinite;
    animation-delay: -1s;
    transform-origin: center center;
}

.banner-svg .server-rack {
    animation: svgPulse 5s ease-in-out infinite;
    animation-delay: -2s;
    transform-origin: center center;
}

.banner-svg .particle {
    animation: svgFloat 3s ease-in-out infinite;
}

.banner-svg .particle--slow {
    animation: svgFloatSlow 4s ease-in-out infinite;
}

.banner-svg .ring {
    animation: svgSpin 30s linear infinite;
    transform-origin: 280px 190px;
}

.banner-svg .ring:nth-child(2) {
    animation-duration: 25s;
    animation-direction: reverse;
}

.banner-svg .ring:nth-child(3) {
    animation-duration: 20s;
}

.banner-svg .conn-line {
    stroke-dasharray: 100;
    animation: svgDash 3s linear infinite;
}

.banner-svg .led {
    animation: svgBlink 2s ease-in-out infinite;
}

.banner-svg .led:nth-child(2) { animation-delay: -0.5s; }
.banner-svg .led:nth-child(3) { animation-delay: -1s; }

/* ===== 右侧登录表单 ===== */
.login-form {
    width: 420px;
    flex-shrink: 0;
    padding: 44px 44px 32px;
    background: var(--bg-card);
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-left: 1px solid var(--border-color);
    box-shadow: var(--shadow-form);
    position: relative;
    z-index: 2;
}

/* 品牌头部 */
.form-header {
    text-align: center;
    margin-bottom: 28px;
    padding-bottom: 16px;
    position: relative;
}

.form-header::after {
    display: none;
}

.brand-logo {
    height: 52px;
    width: 52px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);
    margin-bottom: 12px;
}

.form-title {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.01em;
    margin: 0;
}

/* ===== 选项卡 ===== */
.login-tabs {
    display: flex;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

.login-tab {
    flex: 1;
    padding: 10px 0 12px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: color 0.2s ease;
    text-align: center;
}

.login-tab:first-child { text-align: left; }
.login-tab:last-child { text-align: right; }

.login-tab:hover {
    color: var(--text-primary);
}

.login-tab.active {
    color: var(--brand);
    font-weight: 600;
    border-bottom-color: var(--brand);
}

/* ===== 面板 ===== */
.tab-pane {
    display: none;
    min-height: 330px;
}

.tab-pane.active {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* 微信扫码 */
.qr-box {
    display: flex;
    justify-content: center;
    align-items: center;
}

#wechatQrContainer {
    position: relative;
    width: 195px;
    height: 185px;
    overflow: hidden;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: #fff;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

#wechatQrContainer iframe {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    transform: scale(0.65);
    transform-origin: top left;
    display: block;
}

.pane-tip {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 16px;
}

/* ===== 表单输入 ===== */
.form-item {
    margin-bottom: 18px;
}

.form-item-code {
    display: flex;
    gap: 8px;
}

.form-input {
    width: 100%;
    padding: 12px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: inherit;
    outline: none;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-input:hover {
    border-color: rgba(34, 211, 238, 0.4);
}

.form-input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12);
}

/* 验证码按钮 */
.btn-code {
    flex-shrink: 0;
    width: 120px;
    height: 48px;
    padding: 0;
    background: rgba(34, 211, 238, 0.08);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-sm);
    color: var(--brand);
    font-size: 0.85rem;
    font-weight: 500;
    font-family: inherit;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.btn-code:hover:not(:disabled) {
    background: rgba(34, 211, 238, 0.16);
    border-color: var(--brand);
}

.btn-code:disabled {
    color: var(--text-muted);
    background: var(--bg-input);
    border-color: var(--border-color);
    cursor: not-allowed;
}

/* ===== 按钮 ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 15px;
    font-family: inherit;
    letter-spacing: 0.02em;
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--brand-gradient);
    color: #fff;
    box-shadow: var(--shadow-btn);
}

.btn-primary:hover:not(:disabled) {
    filter: brightness(1.04);
    transform: translateY(-1px);
    box-shadow: var(--shadow-btn-hover);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-block {
    width: 100%;
    height: 48px;
    margin-top: 8px;
}

/* ===== 协议 ===== */
.agreement {
    margin-top: 20px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 13px;
}

.agreement-link {
    color: var(--brand);
    font-weight: 500;
    transition: var(--transition);
}

.agreement-link:hover {
    color: var(--brand-deep);
}

/* ===== 备案页脚 ===== */
.site-footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 10px 16px;
    text-align: center;
    font-size: 12px;
    pointer-events: none;
    z-index: 5;
}

.site-footer a {
    color: var(--text-muted, #64748b);
    text-decoration: none;
    pointer-events: auto;
    transition: color 0.2s ease;
}

.site-footer a:hover {
    color: var(--brand, #22d3ee);
}

.site-footer .footer-sep {
    margin: 0 10px;
    color: var(--border-soft);
}

.site-footer .footer-text {
    color: var(--text-muted, #64748b);
}

/* ===== 提示浮层 ===== */
.toast {
    position: fixed;
    top: 32px;
    left: 50%;
    transform: translateX(-50%) translateY(-16px);
    padding: 11px 22px;
    background: #1e293b;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    color: var(--text-regular);
    font-size: 0.9rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 100;
    max-width: 90vw;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast.error {
    border-color: rgba(244, 63, 94, 0.4);
    color: #f43f5e;
}

.toast.success {
    border-color: rgba(102, 126, 234, 0.4);
    color: var(--brand);
}

/* ===== 滑块验证弹窗 ===== */
.captcha-mask {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
}

.captcha-mask[hidden] {
    display: none;
}

.captcha-modal {
    width: 340px;
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    padding: 16px;
}

.captcha-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    color: var(--text-regular);
    font-size: 0.95rem;
}

.captcha-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    transition: var(--transition);
}

.captcha-close:hover {
    color: var(--text-primary);
}

.captcha-stage {
    position: relative;
    width: 300px;
    height: 150px;
    margin: 0 auto;
    border-radius: var(--radius-sm);
    overflow: hidden;
    user-select: none;
}

.captcha-bg {
    width: 300px;
    height: 150px;
    display: block;
}

.captcha-piece {
    position: absolute;
    width: 44px;
    height: 44px;
    left: 0;
    pointer-events: none;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
}

.captcha-refresh {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: rgba(15, 23, 42, 0.6);
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
}

.captcha-refresh:hover {
    background: rgba(15, 23, 42, 0.85);
}

.captcha-track {
    position: relative;
    width: 300px;
    height: 44px;
    margin: 14px auto 0;
    background: var(--bg-input);
    border: 1px solid var(--border-soft);
    border-radius: 22px;
}

.captcha-track-text {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    pointer-events: none;
}

.captcha-handle {
    position: absolute;
    top: 0;
    left: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--brand-gradient);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: grab;
    touch-action: none;
    box-shadow: var(--shadow-btn);
}

.captcha-handle.active {
    cursor: grabbing;
}

/* ===== 响应式 ===== */
@media (max-width: 1200px) {
    .login-container {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 24px 16px;
    }

    .login-banner {
        display: none;
    }

    .login-form {
        width: 100%;
        max-width: 480px;
        margin: 0 auto;
        border-left: none;
        border: 1px solid var(--border-color);
        border-radius: var(--radius-lg);
        box-shadow: var(--shadow-card);
        padding: 36px 40px 28px;
        min-height: auto;
    }
}

@media (max-width: 768px) {
    .login-form {
        padding: 28px 28px 24px;
    }
}

@media (max-width: 480px) {
    .login-container {
        padding: 16px 12px;
    }

    .login-form {
        padding: 20px 18px 18px;
        border-radius: var(--radius-sm);
    }

    .form-title {
        font-size: 18px;
    }

    .btn-code {
        width: 110px;
        font-size: 12px;
    }
}

@media (max-height: 700px) {
    .login-form {
        padding-top: 24px;
        padding-bottom: 20px;
    }

    .form-header {
        margin-bottom: 16px;
        padding-bottom: 10px;
    }
}