/* ===== 全局重置 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
    color: #fff;
    background: #0a0e1f;
    position: relative;
}

a { text-decoration: none; }

input, button {
    font-family: inherit;
    border: none;
    outline: none;
    background: transparent;
}

/* ===== 背景层 ===== */
.page-bg {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, #0a0e1f 0%, #131836 45%, #1b1f3a 100%);
    overflow: hidden;
    z-index: 0;
}

.bg-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.45;
    animation: glowFloat 12s ease-in-out infinite;
}

.bg-glow-1 {
    width: 420px;
    height: 420px;
    background: radial-gradient(circle, #ff9d3d 0%, transparent 70%);
    top: -120px;
    left: -100px;
    animation-delay: 0s;
}

.bg-glow-2 {
    width: 460px;
    height: 460px;
    background: radial-gradient(circle, #6a3dff 0%, transparent 70%);
    bottom: -150px;
    right: -120px;
    animation-delay: -6s;
}

.bg-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: 36px 36px;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
}

@keyframes glowFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50%      { transform: translate(40px, -30px) scale(1.1); }
}

/* ===== 主容器 ===== */
.login-container {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 20px;
    overflow-y: auto;
}

/* ===== Logo 区域 ===== */
.logo-wrap {
    text-align: center;
    margin-bottom: 30px;
    animation: fadeInDown 0.8s ease both;
}

.logo-ring {
    width: 88px;
    height: 88px;
    margin: 0 auto 14px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255, 213, 107, 0.3), rgba(255, 157, 61, 0.1));
    padding: 2px;
    position: relative;
    box-shadow:
        0 0 30px rgba(255, 157, 61, 0.4),
        inset 0 0 10px rgba(255, 213, 107, 0.15);
}

.logo-ring::before {
    content: "";
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 1px solid rgba(255, 213, 107, 0.35);
    animation: ringPulse 3s ease-in-out infinite;
}

.logo-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #2a2f55, #13183a);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.logo-icon {
    width: 52px;
    height: 52px;
}

.brand-name {
    font-size: 26px;
    font-weight: 700;
    background: linear-gradient(180deg, #fff 0%, #ffd56b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 4px;
    line-height: 1.2;
    text-shadow: 0 2px 12px rgba(255, 157, 61, 0.35);
}

.brand-sub {
    font-size: 10px;
    color: rgba(255, 213, 107, 0.55);
    letter-spacing: 3px;
    margin-top: 6px;
    font-weight: 300;
}

@keyframes ringPulse {
    0%, 100% { transform: scale(1);   opacity: 0.6; }
    50%      { transform: scale(1.08); opacity: 0.2; }
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ===== 登录卡片 ===== */
.login-card {
    width: 100%;
    max-width: 380px;
    padding: 30px 24px 24px;
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(40, 46, 90, 0.55) 0%, rgba(20, 24, 50, 0.55) 100%);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    border: 1px solid rgba(255, 213, 107, 0.15);
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    animation: fadeInUp 0.9s ease 0.15s both;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

.card-header {
    text-align: center;
    margin-bottom: 26px;
}

.card-title {
    font-size: 22px;
    font-weight: 600;
    color: #fff;
    letter-spacing: 2px;
    position: relative;
    display: inline-block;
    padding-bottom: 8px;
}

.title-underline {
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 40px;
    height: 3px;
    border-radius: 2px;
    background: linear-gradient(90deg, #ffd56b, #ff9d3d);
    box-shadow: 0 0 12px rgba(255, 157, 61, 0.6);
}

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

.form-item {
    display: flex;
    flex-direction: column;
}

.form-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 8px;
    padding-left: 2px;
    letter-spacing: 1px;
}

.input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(15, 18, 38, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    height: 48px;
    transition: all 0.3s ease;
    overflow: hidden;
}

.input-wrap::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 12px;
    padding: 1px;
    background: linear-gradient(135deg, transparent, rgba(255, 213, 107, 0.4), transparent);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.input-wrap:focus-within {
    background: rgba(20, 24, 50, 0.8);
    box-shadow: 0 0 0 1px rgba(255, 213, 107, 0.4), 0 0 20px rgba(255, 157, 61, 0.15);
}

.input-wrap:focus-within::before {
    opacity: 1;
}

.input-icon {
    width: 18px;
    height: 18px;
    margin: 0 14px;
    color: rgba(255, 213, 107, 0.7);
    flex-shrink: 0;
    transition: color 0.3s;
}

.input-wrap:focus-within .input-icon {
    color: #ffd56b;
}

.form-input {
    flex: 1;
    height: 100%;
    color: #fff;
    font-size: 15px;
    background: transparent;
    border: none;
    outline: none;
    padding-right: 14px;
}

.form-input::placeholder {
    color: rgba(255, 255, 255, 0.35);
    font-size: 14px;
}

.input-icon-eye {
    width: 18px;
    height: 18px;
    margin-right: 14px;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    flex-shrink: 0;
    transition: color 0.3s;
}

.input-icon-eye:hover {
    color: rgba(255, 213, 107, 0.9);
}

/* ===== 选项行 ===== */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2px;
    font-size: 13px;
}

.remember {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    position: relative;
}

.checkbox {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.checkbox-box {
    width: 14px;
    height: 14px;
    border-radius: 3px;
    border: 1px solid rgba(255, 213, 107, 0.4);
    margin-right: 8px;
    position: relative;
    transition: all 0.25s;
    flex-shrink: 0;
}

.remember:hover .checkbox-box {
    border-color: #ffd56b;
}

.checkbox:checked + .checkbox-box {
    background: linear-gradient(135deg, #ffd56b, #ff9d3d);
    border-color: transparent;
}

.checkbox:checked + .checkbox-box::after {
    content: "";
    position: absolute;
    left: 4px;
    top: 1px;
    width: 4px;
    height: 8px;
    border: solid #1a1d38;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.remember-text {
    color: rgba(255, 255, 255, 0.6);
}

.forget-link {
    color: rgba(255, 213, 107, 0.8);
    transition: color 0.25s;
}

.forget-link:hover {
    color: #ffd56b;
    text-decoration: underline;
}

/* ===== 登录按钮 ===== */
.login-btn {
    margin-top: 8px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, #ffd56b 0%, #ff9d3d 100%);
    color: #1a1d38;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 4px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow:
        0 10px 25px rgba(255, 157, 61, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    transition: all 0.25s ease;
}

.login-btn:hover {
    transform: translateY(-1px);
    box-shadow:
        0 14px 30px rgba(255, 157, 61, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.login-btn:active {
    transform: translateY(0);
    box-shadow:
        0 6px 15px rgba(255, 157, 61, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.btn-text {
    position: relative;
    z-index: 1;
}

.btn-shine {
    position: absolute;
    top: 0;
    left: -120%;
    width: 80%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    transform: skewX(-20deg);
    animation: shine 3.5s ease-in-out infinite;
}

@keyframes shine {
    0%   { left: -120%; }
    55%, 100% { left: 130%; }
}

/* ===== 注册链接 ===== */
.register-wrap {
    margin-top: 22px;
    text-align: center;
    font-size: 13px;
}

.register-text {
    color: rgba(255, 255, 255, 0.5);
}

.register-link {
    color: #ffd56b;
    font-weight: 600;
    margin-left: 4px;
    transition: all 0.25s;
}

.register-link:hover {
    color: #ff9d3d;
    text-shadow: 0 0 8px rgba(255, 213, 107, 0.5);
}

/* ===== 底部 ===== */
.footer-text {
    margin-top: 28px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.3);
    letter-spacing: 1px;
    text-align: center;
}

/* ===== 响应式 ===== */
@media (max-width: 380px) {
    .login-container { padding: 20px 16px; }
    .login-card { padding: 26px 20px 22px; }
    .brand-name { font-size: 24px; }
    .card-title { font-size: 20px; }
    .login-btn { font-size: 15px; letter-spacing: 3px; }
}

@media (max-height: 700px) {
    .logo-wrap { margin-bottom: 20px; }
    .logo-ring { width: 76px; height: 76px; }
    .logo-icon { width: 44px; height: 44px; }
    .login-card { padding: 24px 22px 20px; }
    .footer-text { margin-top: 18px; }
}
