/* login.css - 与主页风格一致 */
:root {
    --primary-color: #3a7bd5;
    --secondary-color: #00d2ff;
    --accent-color: #f92672;
    --text-color: #f8f9fa;
    --background-color: #121212;
    --card-bg-color: rgba(30, 30, 30, 0.8);
    --card-hover-color: rgba(40, 40, 40, 0.9);
    --shadow-color: rgba(0, 0, 255, 0.2);
    --gradient-start: #3a7bd5;
    --gradient-end: #00d2ff;
    --border-radius: 12px;
    --button-radius: 24px;
    --transition-speed: 0.3s;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Barlow', 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    opacity: 0.6;
    transition: opacity 0.8s ease;
}

body.page-loaded {
    opacity: 1;
}

.background-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.background-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.4;
}

.shape1 {
    width: 700px;
    height: 700px;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    top: -250px;
    left: -250px;
    animation: float 20s ease-in-out infinite;
}

.shape2 {
    width: 600px;
    height: 600px;
    background: linear-gradient(45deg, var(--accent-color), var(--gradient-start));
    bottom: -200px;
    right: -200px;
    animation: float 25s ease-in-out infinite reverse;
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1) rotate(0deg);
    }
    33% {
        transform: translate(50px, 40px) scale(1.05) rotate(5deg);
    }
    66% {
        transform: translate(-30px, 20px) scale(0.95) rotate(-3deg);
    }
    100% {
        transform: translate(0, 0) scale(1) rotate(0deg);
    }
}

.container {
    max-width: 500px;
    margin: 0 auto;
    padding: 40px 20px;
    position: relative;
    z-index: 1;
}

.logo-container {
    text-align: center;
    margin-bottom: 40px;
    animation: fadeIn 1s ease-out;
}

.logo {
    font-size: 48px;
    font-weight: 700;
    color: var(--text-color);
    background: linear-gradient(to right, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    position: relative;
}

.logo::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(to right, var(--gradient-start), var(--gradient-end));
    border-radius: 3px;
}

h1 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 28px;
    font-weight: 600;
    color: var(--text-color);
    animation: slideFromLeft 0.8s ease-out;
}

.form-container {
    background-color: var(--card-bg-color);
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3), 0 0 20px var(--shadow-color);
    backdrop-filter: blur(10px);
    animation: fadeIn 1s ease-out 0.2s both;
    position: relative;
    overflow: hidden;
}

.form-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(to right, var(--gradient-start), var(--gradient-end));
}

.form-group {
    margin-bottom: 25px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
}

.form-group input {
    width: 100%;
    padding: 15px 20px;
    background-color: rgba(40, 40, 40, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    color: var(--text-color);
    font-size: 16px;
    transition: all var(--transition-speed) ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(58, 123, 213, 0.3);
    background-color: rgba(50, 50, 50, 0.9);
}

.error-message {
    display: block;
    margin-top: 8px;
    color: var(--accent-color);
    font-size: 14px;
    min-height: 20px;
}

.notification {
    display: none;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: var(--border-radius);
    font-weight: 500;
    text-align: center;
    animation: fadeIn 0.5s ease-out;
}

.success-notification {
    background-color: rgba(46, 125, 50, 0.3);
    border: 1px solid rgba(76, 175, 80, 0.5);
    color: #81c784;
}

.error-notification {
    background-color: rgba(198, 40, 40, 0.3);
    border: 1px solid rgba(244, 67, 54, 0.5);
    color: #ef9a9a;
}

.remember-me {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
}

.remember-me input {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
}

.checkbox-label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    cursor: pointer;
}

.login-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
    border: none;
    border-radius: var(--button-radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.login-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4), 0 0 15px var(--shadow-color);
}

.login-btn:active {
    transform: translateY(1px);
}

.login-btn::before {
    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.7s ease;
}

.login-btn:hover::before {
    left: 100%;
}

.links {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 25px;
    font-size: 14px;
}

.links a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: all var(--transition-speed) ease;
    position: relative;
}

.links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--secondary-color);
    transition: width var(--transition-speed) ease;
}

.links a:hover::after {
    width: 100%;
}

.separator {
    color: rgba(255, 255, 255, 0.3);
}

.footer {
    margin-top: 40px;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    animation: fadeIn 1s ease-out 0.4s both;
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideFromLeft {
    from {
        transform: translateX(-50px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideFromRight {
    from {
        transform: translateX(50px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 30px 15px;
    }

    .form-container {
        padding: 30px;
    }

    .logo {
        font-size: 36px;
    }

    h1 {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .form-container {
        padding: 25px 20px;
    }

    .logo {
        font-size: 32px;
    }

    .links {
        flex-direction: column;
        gap: 10px;
        align-items: center;
    }

    .separator {
        display: none;
    }

    /* 新增的登录按钮居中样式 */
    .login-btn {
        width: 100%;
        max-width: 100%;
        margin: 0 auto;
        display: block;
    }

    /* 确保表单组内容居中 */
    .form-group {
        text-align: center;
    }
}


#floating-logo {
    position: absolute;
    top: 30px;
    left: -600px; /* ✅ 默认：桌面端正常位置 */
    z-index: 9999;
    transition: all 0.3s ease;
}


#floating-logo img {
    width: 330px;
    height: auto;
    transition: all 0.3s ease;
}

/* ✅ 向下滚动时缩小 logo + 下移 */
#floating-logo.shrinked {
    top: 120px;
}

#floating-logo.shrinked img {
    width: 100px;
}

/* ✅ 移动端重新设定位置 */
@media (max-width: 768px) {
    #floating-logo {
        left: 90px;  /* 手机上贴边显示，不会挤出屏幕 */
        top: 70px;
    }

    #floating-logo img {
        width: 250px;  /* 适配手机尺寸 */
    }

    #floating-logo.shrinked {
        top: 90px;     /* 缩小时也往下移一些 */
    }

    #floating-logo.shrinked img {
        width: 80px;
    }
}
