/* ============================================
   AiFLY 登录落地页 — 修复版本
   ============================================ */

/* --- CSS Variables --- */
:root {
    --bg-deep: #0a0a0f;
    --bg-card: rgba(26, 31, 53, 0.6);
    --border-card: #2d3559;
    --cyan: #00d4ff;
    --cyan-dark: #0099cc;
    --green-badge: #64e659;
    --text-primary: #e5e7eb;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    --input-bg: rgba(10, 14, 26, 0.8);
    --input-border: #2d3559;
    --font-inter: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* --- Reset & Base --- */
*, *::before, *::after {
    margin:0;
    padding:0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-inter);
    background: var(--bg-deep);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

/* --- Starfield Canvas --- */
#universe-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* --- Landing Page Container --- */
.landing-page {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* --- Decorative Orb --- */
.decor-orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.orb-bottom-left {
    bottom: 60px;
    left: 50px;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(0, 153, 204, 0.06) 0%, transparent 70%);
}

/* =============================================
   HERO SECTION — 修复：顶部留白 10px
   ============================================= */
.hero {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 80px;
    padding: 10px 80px 10px;
    min-height: calc(100vh - 64px);
    position: relative;
}

/* --- Hero Left --- */
.hero-left {
    flex: 1;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    position: relative;
    padding-left: 96px !important;  /* 修复：强制右移 6 个字 */
}

/* --- Hero Badge --- */
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 20px 6px 12px;
    border: 1px solid var(--green-badge);
    border-radius: 24px;
    background: transparent;
    width: fit-content;
    animation: borderFlicker 3s ease-in-out infinite;
}

@keyframes borderFlicker {
    0%, 100% { border-color: rgba(100, 230, 89, 0.25); }
    50% { border-color: rgba(100, 230, 89, 1); }
}

.badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 4px;
    background: rgba(120, 129, 238, 0.97);
    box-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
    animation: dotPulse 2.5s ease-in-out infinite;
}

@keyframes dotPulse {
    0%, 100% {
        opacity: 0.35;
        box-shadow: 0 0 2px rgba(120, 129, 238, 0.2);
    }
    50% {
        opacity: 1;
        box-shadow: 0 0 8px rgba(120, 129, 238, 0.8), 0 0 16px rgba(120, 129, 238, 0.4);
    }
}

.badge-text {
    font-family: 'Source Han Sans CN', sans-serif;
    font-size: 13px;
    font-weight: 300;
    color: #0ef93f;
    letter-spacing: 0.5px;
}

/* --- Logo Showcase --- */
.logo-showcase {
    width: 400px;
    height: auto;
    aspect-ratio: 2/1;
    overflow: hidden;
}

.logo-showcase img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* --- Hero Title (Gradient Text) --- */
.hero-title {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.title-line {
    display: block;
    font-size: 56px;
    line-height: 68px;
    font-weight: 700;
    letter-spacing: -1px;
}

.title-line-1 {
    background: linear-gradient(90deg, 
        #ffffff 0%, 
        #c4b5fd 25%, 
        #818cf8 50%, 
        #67e8f9 75%, 
        #ffffff 100%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 4s ease infinite;
    width: fit-content;
}

.title-line-2 {
    margin-left: 110px;
    font-weight: 100;
    background: linear-gradient(135deg,
        #a78bfa 0%,
        #67e8f9 40%,
        #3b82f6 70%,
        #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 
        0 0 50px rgba(102, 133, 255, 0.25),
        0 0 28px rgba(127, 102, 242, 0.35),
        0 0 12px rgba(166, 140, 255, 0.55);
    width: fit-content;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* --- Logo Gradient Line --- */
.logo-gradient-line {
    width: 400px;
    height: 3px;
    background: linear-gradient(90deg, var(--cyan) 0%, transparent 100%);
    border-radius: 2px;
}

/* --- Hero Subheadline --- */
.hero-subheadline {
    font-family: 'Source Han Sans CN', sans-serif;
    font-size: 18px;
    font-weight: 300;
    color: #87b4f3;
    line-height: 28px;
    max-width: 600px;
    white-space: nowrap;  /* 修复：禁止换行 */
}

/* =============================================
   LOGIN CARD
   ============================================= */
.hero-right {
    flex: 1;
    max-width: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    position: relative;
    width: 420px;
    padding: 40px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 20px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 40px rgba(0, 212, 255, 0.05);
}

/* --- Accent Bar (top gradient line) --- */
.card-accent-bar {
    position: absolute;
    top: -3px;
    left: 50%;
    transform: translateX(-50%);
    width: 377px;
    height: 3px;
    background: linear-gradient(90deg, transparent 0%, var(--cyan) 100%);
    border-radius: 2px;
}

/* --- Card Title --- */
.card-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

/* =============================================
   FORM ELEMENTS
   ============================================= */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 0.3px;
}

.form-field {
    width: 100%;
    height: 48px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 10px;
    overflow: hidden;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-field:focus-within {
    border-color: var(--cyan);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.form-field input {
    width: 100%;
    height: 100%;
    padding: 0 16px;
    background: transparent;
    border: none;
    outline: none;
    font-family: var(--font-inter);
    font-size: 14px;
    color: var(--text-primary);
}

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

/* --- Options Row --- */
.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-secondary);
    position: relative;
    padding-left: 24px;
}

.remember-me input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.remember-me .checkmark {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    background: rgba(26, 31, 53, 1);
    border: 1px solid var(--input-border);
    border-radius: 4px;
    transition: all 0.2s ease;
}

.remember-me input:checked ~ .checkmark {
    background: var(--cyan);
    border-color: var(--cyan);
}

.remember-me input:checked ~ .checkmark::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid var(--bg-deep);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.forgot-password {
    font-size: 13px;
    font-weight: 500;
    color: var(--cyan);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.forgot-password:hover {
    opacity: 0.8;
}

/* --- Login Button --- */
.login-btn {
    width: 100%;
    height: 48px;
    background: linear-gradient(90deg, var(--cyan) 0%, var(--cyan-dark) 100%);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.3s ease;
    box-shadow: 
        0 0 20px rgba(0, 212, 255, 0.35),
        0 0 40px rgba(0, 212, 255, 0.15);
}

.login-btn:hover {
    transform: translateY(-1px);
    box-shadow: 
        0 0 30px rgba(0, 212, 255, 0.5),
        0 0 60px rgba(0, 212, 255, 0.25);
}

.login-btn:active {
    transform: translateY(0);
}

.login-btn span {
    font-size: 16px;
    font-weight: 600;
    color: var(--bg-deep);
    letter-spacing: 4px;
}

/* Button shine animation */
.login-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.login-btn:hover::after {
    left: 100%;
}

/* =============================================
   COPYRIGHT BAR
   ============================================= */
.copyright-bar {
    width: 100%;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 14, 26, 1);
    border-top: 1px solid rgba(45, 53, 89, 0.3);
    position: relative;
    z-index: 2;
}

.copyright-bar p {
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.6;
}
.copyright-bar p a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s ease;
}
.copyright-bar p a:hover {
    color: var(--cyan);
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1200px) {
    .hero {
        padding: 10px 40px 10px;
        gap: 40px;
    }
}

@media (max-width: 960px) {
    .hero {
        flex-direction: column;
        padding: 40px 24px 24px;
        gap: 48px;
        min-height: auto;
    }

    .hero-left {
        max-width: 100%;
        align-items: center;
        text-align: center;
        padding-left: 0 !important;  /* 移动端取消右移 */
    }

    .hero-badge {
        align-self: center;
    }

    .logo-showcase {
        width: 100%;
        max-width: 400px;
    }

    .title-line {
        font-size: 40px;
        line-height: 50px;
    }

    .title-line-2 {
        margin-left: 40px;
    }

    .logo-gradient-line {
        align-self: center;
    }

    .hero-subheadline {
        text-align: center;
        white-space: normal;  /* 移动端允许换行 */
    }

    .hero-right {
        max-width: 100%;
        width: 100%;
    }

    .login-card {
        width: 100%;
        max-width: 420px;
    }
}

@media (max-width: 480px) {
    .title-line {
        font-size: 32px;
        line-height: 42px;
    }

    .title-line-2 {
        margin-left: 20px;
    }

    .login-card {
        padding: 32px 24px;
    }
}
