/* 精美登录页面样式 - 3D浮雕毛玻璃质感设计 */
@import './google-fonts.css';

/* 浏览器兼容性检测 */
@supports not (backdrop-filter: blur(10px)) {
    .login-container,
    .form-box,
    .input-box input,
    .social-icons a,
    .toggle-panel .btn,
    .error-message,
    .success-message {
        background: rgba(255, 255, 255, 0.2) !important;
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: 
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.4) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.4) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(120, 219, 255, 0.3) 0%, transparent 50%),
        linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

/* 动态背景装饰 */
body::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(120, 219, 255, 0.2) 0%, transparent 50%);
    animation: float 20s ease-in-out infinite;
    z-index: -1;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(30px, -30px) rotate(120deg); }
    66% { transform: translate(-20px, 20px) rotate(240deg); }
}

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

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

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.login-container {
    position: relative;
    width: 850px;
    height: 550px;
    background: 
        linear-gradient(145deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.05) 100%);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 30px;
    box-shadow: 
        /* 外阴影 - 3D效果 */
        0 20px 60px rgba(0, 0, 0, 0.15),
        0 8px 25px rgba(0, 0, 0, 0.1),
        /* 内阴影 - 浮雕效果 */
        inset 0 2px 4px rgba(255, 255, 255, 0.3),
        inset 0 -2px 4px rgba(0, 0, 0, 0.1),
        /* 顶部高光 */
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    margin: 20px;
    overflow: hidden;
    animation: slideInUp 0.8s ease-out;
    transform-style: preserve-3d;
}

.login-container.active .toggle-box::before {
    left: 50%;
}

.form-box {
    position: absolute;
    right: 0;
    width: 50%;
    height: 100%;
    background: 
        linear-gradient(145deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.1) 100%);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    color: #fff;
    text-align: center;
    padding: 40px;
    z-index: 1;
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    animation: fadeInRight 0.8s ease-out 0.3s both;
    box-shadow: 
        inset 0 1px 3px rgba(255, 255, 255, 0.2),
        inset 0 -1px 3px rgba(0, 0, 0, 0.1);
}

.login-container.active .form-box {
    right: 50%;
}

/* 注册表单 - 默认隐藏状态（从蓝色形状下） */
.form-box.register {
    visibility: hidden;
    opacity: 0;
    transform: translateX(50%) translateY(0) scale(0.3);
    z-index: 0;
    pointer-events: none;
    transition: 
        visibility 0s linear 0.8s,
        opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.1s,
        transform 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.1s;
}

/* 注册表单 - 激活状态 */
.login-container.active .form-box.register {
    visibility: visible;
    opacity: 1;
    transform: translateX(0) scale(1);
    z-index: 2;
    pointer-events: auto;
    transition: none; /* 禁用CSS transition，使用JavaScript animation */
}

/* 登录表单 - 默认状态（可见） */
.form-box:not(.register) {
    visibility: visible;
    opacity: 1;
    transform: translateX(0) scale(1);
    z-index: 1;
    pointer-events: auto;
    transition: 
        visibility 0s linear 0.7s,
        opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0s,
        transform 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0s;
}

/* 登录表单 - 激活时隐藏（滑动到紫色形状下） */
.login-container.active .form-box:not(.register) {
    visibility: hidden;
    opacity: 0;
    transform: translateX(-50%) translateY(0) scale(0.3);
    z-index: 1;
    pointer-events: none;
    transition: none; /* 禁用CSS transition，使用JavaScript animation */
}

/* 确保transitioning类不会覆盖表单动画 */
.login-container.transitioning .form-box:not(.register) {
    transition: none; /* 完全使用JavaScript animation */
}

.login-container.transitioning .form-box.register {
    transition: none; /* 完全使用JavaScript animation */
}

/* 确保动画过程中表单不会重叠 */
.form-box {
    will-change: transform, opacity, visibility;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* 添加动画过程中的特殊效果 */
.login-container.transitioning .form-box:not(.register) {
    transform-origin: center center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.login-container.transitioning .form-box.register {
    transform-origin: center center;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

/* 重新设计的表单切换动画 - 更现代流畅的效果 */
@keyframes slideToLeft {
    0% {
        transform: translateX(0) scale(1);
        opacity: 1;
        visibility: visible;
        box-shadow: inset 0 1px 3px rgba(255, 255, 255, 0.2),
                    inset 0 -1px 3px rgba(0, 0, 0, 0.1);
    }
    90% {
        transform: translateX(-100%) scale(0.9);
        opacity: 0;
        visibility: hidden;
        box-shadow: inset 0 1px 3px rgba(255, 255, 255, 0.1),
                    inset 0 -1px 3px rgba(0, 0, 0, 0.05);
    }
    100% {
        transform: translateX(-100%) scale(0.9);
        opacity: 0;
        visibility: hidden;
    }
}

@keyframes slideToRight {
    0% {
        transform: translateX(0) scale(1);
        opacity: 1;
        visibility: visible;
        box-shadow: inset 0 1px 3px rgba(255, 255, 255, 0.2),
                    inset 0 -1px 3px rgba(0, 0, 0, 0.1);
    }
    90% {
        transform: translateX(100%) scale(0.9);
        opacity: 0;
        visibility: hidden;
        box-shadow: inset 0 1px 3px rgba(255, 255, 255, 0.1),
                    inset 0 -1px 3px rgba(0, 0, 0, 0.05);
    }
    100% {
        transform: translateX(100%) scale(0.9);
        opacity: 0;
        visibility: hidden;
    }
}

@keyframes slideFromLeft {
    0% {
        transform: translateX(-100%) scale(0.9);
        opacity: 0;
        visibility: hidden;
        box-shadow: inset 0 1px 3px rgba(255, 255, 255, 0.1),
                    inset 0 -1px 3px rgba(0, 0, 0, 0.05);
    }
    10% {
        transform: translateX(-100%) scale(0.9);
        opacity: 0;
        visibility: hidden;
    }
    100% {
        transform: translateX(0) scale(1);
        opacity: 1;
        visibility: visible;
        box-shadow: inset 0 1px 3px rgba(255, 255, 255, 0.2),
                    inset 0 -1px 3px rgba(0, 0, 0, 0.1);
    }
}

@keyframes slideFromRight {
    0% {
        transform: translateX(100%) scale(0.9);
        opacity: 0;
        visibility: hidden;
        box-shadow: inset 0 1px 3px rgba(255, 255, 255, 0.1),
                    inset 0 -1px 3px rgba(0, 0, 0, 0.05);
    }
    10% {
        transform: translateX(100%) scale(0.9);
        opacity: 0;
        visibility: hidden;
    }
    100% {
        transform: translateX(0) scale(1);
        opacity: 1;
        visibility: visible;
        box-shadow: inset 0 1px 3px rgba(255, 255, 255, 0.2),
                    inset 0 -1px 3px rgba(0, 0, 0, 0.1);
    }
}

/* 移动端垂直动画效果 */
@keyframes slideUp {
    0% {
        transform: translateY(0) scale(1);
        opacity: 1;
        visibility: visible;
    }
    90% {
        transform: translateY(-100%) scale(0.9);
        opacity: 0;
        visibility: hidden;
    }
    100% {
        transform: translateY(-100%) scale(0.9);
        opacity: 0;
        visibility: hidden;
    }
}

@keyframes slideDown {
    0% {
        transform: translateY(100%) scale(0.9);
        opacity: 0;
        visibility: hidden;
    }
    10% {
        transform: translateY(100%) scale(0.9);
        opacity: 0;
        visibility: hidden;
    }
    100% {
        transform: translateY(0) scale(1);
        opacity: 1;
        visibility: visible;
    }
}

/* 确保动画过程中表单有正确的层级 */
.login-container.transitioning .form-box:not(.register) {
    z-index: 1;
}

.login-container.transitioning .form-box.register {
    z-index: 0;
}

.form-box form {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
}

.form-box h1 {
    font-size: 36px;
    margin: -10px 0;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.input-box {
    position: relative;
    margin: 30px 0;
}

.input-box input {
    width: 100%;
    padding: 13px 50px 13px 20px;
    background: 
        linear-gradient(145deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.05) 100%);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    outline: none;
    font-size: 16px;
    border-radius: 12px;
    color: #333;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 
        inset 0 2px 4px rgba(255, 255, 255, 0.2),
        inset 0 -2px 4px rgba(0, 0, 0, 0.1),
        0 2px 8px rgba(0, 0, 0, 0.1);
}

.input-box input:focus {
    background: 
        linear-gradient(145deg, rgba(255, 255, 255, 0.25) 0%, rgba(255, 255, 255, 0.1) 100%);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 
        inset 0 2px 4px rgba(255, 255, 255, 0.3),
        inset 0 -2px 4px rgba(0, 0, 0, 0.1),
        0 0 0 3px rgba(255, 255, 255, 0.15),
        0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px) scale(1.02);
}

.input-box input::placeholder {
    color: rgba(0, 0, 0, 0.6);
    font-weight: 400;
}

.input-box i {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.3s ease;
}

.input-box input:focus + i {
    color: rgba(255, 255, 255, 0.9);
}

.forgot-link {
    margin: -15px 0 15px;
}

.forgot-link a {
    font-size: 14.5px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.forgot-link a:hover {
    color: rgba(255, 255, 255, 1);
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

.btn {
    width: 100%;
    height: 48px;
    background: 
        linear-gradient(145deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    box-shadow: 
        /* 外阴影 - 3D效果 */
        0 8px 20px rgba(102, 126, 234, 0.4),
        0 4px 8px rgba(0, 0, 0, 0.1),
        /* 内阴影 - 浮雕效果 */
        inset 0 2px 4px rgba(255, 255, 255, 0.3),
        inset 0 -2px 4px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    font-size: 16px;
    color: #fff;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
}

.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.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    background: 
        linear-gradient(145deg, #5a6fd8 0%, #6a4190 100%);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 
        /* 外阴影 - 增强3D效果 */
        0 12px 30px rgba(102, 126, 234, 0.6),
        0 6px 15px rgba(0, 0, 0, 0.15),
        /* 内阴影 - 增强浮雕效果 */
        inset 0 2px 4px rgba(255, 255, 255, 0.4),
        inset 0 -2px 4px rgba(0, 0, 0, 0.2);
}

.btn:active {
    transform: translateY(-1px);
}

.form-box p {
    font-size: 14.5px;
    margin: 15px 0;
    color: rgba(255, 255, 255, 0.8);
}

.social-icons {
    display: flex;
    justify-content: center;
}

.social-icons a {
    display: inline-flex;
    padding: 12px;
    background: 
        linear-gradient(145deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.05) 100%);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 12px;
    font-size: 24px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    margin: 0 8px;
    transition: all 0.3s ease;
    box-shadow: 
        inset 0 2px 4px rgba(255, 255, 255, 0.2),
        inset 0 -2px 4px rgba(0, 0, 0, 0.1),
        0 4px 12px rgba(0, 0, 0, 0.1);
    transform-style: preserve-3d;
}

.social-icons a:hover {
    background: 
        linear-gradient(145deg, rgba(255, 255, 255, 0.25) 0%, rgba(255, 255, 255, 0.1) 100%);
    border-color: rgba(255, 255, 255, 0.5);
    color: #fff;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 
        inset 0 2px 4px rgba(255, 255, 255, 0.3),
        inset 0 -2px 4px rgba(0, 0, 0, 0.1),
        0 6px 20px rgba(0, 0, 0, 0.2);
}

.toggle-box {
    position: absolute;
    width: 100%;
    height: 100%;
}

.toggle-box::before {
    content: '';
    position: absolute;
    left: -250%;
    width: 300%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    z-index: 2;
    border-radius: 150px;
    transition: 1.8s ease-in-out;
    box-shadow: 
        0 8px 32px rgba(102, 126, 234, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.toggle-panel {
    position: absolute;
    width: 50%;
    height: 100%;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 2;
    transition: 0.6s ease-in-out;
    animation: fadeInLeft 0.8s ease-out 0.5s both;
}

.toggle-panel.toggle-left {
    left: 0;
    transition-delay: 1.2s;
}

.login-container.active .toggle-panel.toggle-left {
    left: -50%;
    transition-delay: 0.6s;
}

.toggle-panel.toggle-right {
    right: -50%;
    transition-delay: 0.6s;
}

.login-container.active .toggle-panel.toggle-right {
    right: 0;
    transition-delay: 1.2s;
}

.toggle-panel h1 {
    font-size: 36px;
    margin-bottom: 20px;
    color: #fff;
}

.toggle-panel p {
    margin-bottom: 20px;
    color: #fff;
    font-size: 16px;
}

/* 版权信息样式 - 统一位置 */
.copyright-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    margin: 0 auto;
    width: 95%;
    text-align: center;
    opacity: 0.7;
}

/* 移动端隐藏切换面板中的版权信息 */
@media screen and (max-width: 650px) {
    .toggle-panel .copyright-info {
        display: none;
    }
}

.copyright-info p {
    margin: 1px 0;
    font-size: 9px;
    color: rgba(255, 255, 255, 0.7);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    line-height: 1.2;
}

.copyright-info a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: color 0.3s ease;
}

.copyright-info a:hover {
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.copyright {
    font-weight: 500;
}

.icp-info {
    font-size: 8px !important;
}

.toggle-panel .btn {
    width: 160px;
    height: 46px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    color: #fff;
    border-radius: 12px;
}

.toggle-panel .btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-3px);
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* 页面底部版权信息样式 */
.page-footer {
    position: absolute;
    bottom: 10px;
    left: 0;
    right: 0;
    text-align: center;
    z-index: 10;
}

.page-footer .copyright {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
    font-weight: 500;
}

.page-footer .icp-info {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.7);
    margin: 2px 0 0 0;
}

.page-footer .icp-info a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
}

.page-footer .icp-info a:hover {
    color: #fff;
    text-decoration: underline;
}

/* 错误和成功消息样式 */
.error-message {
    background: rgba(255, 107, 107, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #ff6b6b;
    padding: 12px;
    border-radius: 12px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 107, 107, 0.3);
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.2);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.success-message {
    background: rgba(79, 172, 254, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #4facfe;
    padding: 12px;
    border-radius: 12px;
    margin-bottom: 20px;
    border: 1px solid rgba(79, 172, 254, 0.3);
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(79, 172, 254, 0.2);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* 响应式设计 */
@media screen and (max-width: 650px) {
    body {
        padding: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        height: 100vh;
        overflow: hidden;
        margin: 0;
        background: linear-gradient(135deg, #2c3e50 0%, #1a1a2e 100%);
    }

    .login-container {
        height: 600px; /* 增加容器高度 */
        width: 100%;
        max-width: 360px;
        margin: 0;
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        position: relative;
        /* 移除scale效果，避免跳动 */
        transition: height 0.3s ease;
    }

    .form-box {
        bottom: 0;
        width: 100%;
        height: calc(100% - 160px); /* 动态计算表单高度，确保铺满容器 */
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        right: 0;
        padding: 15px 12px; /* 减小内边距，使内容更紧凑 */
        box-sizing: border-box;
        overflow-y: hidden; /* 禁用滚动条 */
        -webkit-overflow-scrolling: auto;
        transform: none; /* 移除缩放效果 */
        display: flex;
        flex-direction: column;
        justify-content: center; /* 垂直居中对齐 */
        color: #e0e0e0; /* 深色背景下的文字颜色 */
    }
    
    .login-container.active .form-box {
        right: 0;
        bottom: 160px; /* 保持表单位置 */
    }

    /* 移动端表单动画 - 滑动效果 */
    .form-box {
        transition: transform 0.5s ease-in-out, 
                    opacity 0.3s ease-in-out;
        will-change: transform, opacity;
        backface-visibility: hidden;
    }

    .form-box.register {
        transform: translateY(100%);
        opacity: 0;
    }

    .login-container.active .form-box.register {
        transform: translateY(0);
        opacity: 1;
    }

    .login-container.active .form-box:not(.register) {
        transform: translateY(-100%);
        opacity: 0;
    }

    .toggle-box::before {
        left: 0;
        width: 100%;
        top: -270%;
        height: 300%;
        border-radius: 20vw;
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }

    .login-container.active .toggle-box::before {
        left: 0;
        top: 70%;
    }

    .toggle-panel {
        width: 100%;
        height: 140px; /* 增加切换面板高度 */
        padding: 16px;
        box-sizing: border-box;
    }

    .toggle-panel.toggle-left {
        top: 0;
    }

    .login-container.active .toggle-panel.toggle-left {
        left: 0;
        top: -140px;
    }

    .toggle-panel.toggle-right {
        right: 0;
        bottom: -140px;
    }

    .login-container.active .toggle-panel.toggle-right {
        bottom: 0;
    }

    /* 移动端输入框优化 */
    .input-box {
        margin: 12px 0; /* 减小间距，使内容更紧凑 */
        flex-shrink: 0;
    }

    .input-box input {
        font-size: 15px; /* 防止iOS缩放 */
        padding: 10px 35px 10px 12px; /* 调整内边距 */
        color: #333; /* 输入框文字颜色 */
        background: rgba(255, 255, 255, 0.9); /* 输入框背景色 */
    }

    .input-box input::placeholder {
        color: #666; /* 输入框占位符颜色 */
    }

    /* 移动端按钮优化 */
    .btn {
        height: 42px; /* 减小按钮高度 */
        font-size: 15px;
        margin-top: 4px;
        flex-shrink: 0;
    }

    /* 移动端表单段落优化 */
    .form-box p {
        flex-shrink: 0;
        margin: 8px 0; /* 减小间距 */
        color: #ccc; /* 段落文字颜色 */
    }

    /* 移动端社交图标优化 */
    .social-icons {
        margin-top: 8px; /* 增加上边距 */
        position: relative;
        z-index: 3; /* 确保社交图标在表单之上 */
    }

    .social-icons a {
        padding: 8px; /* 增加内边距 */
        margin: 0 3px; /* 调整间距 */
        font-size: 16px; /* 增大图标 */
        background: rgba(255, 255, 255, 0.2); /* 增加背景色 */
        border: 1px solid rgba(255, 255, 255, 0.3); /* 增加边框 */
        color: #fff; /* 社交图标颜色 */
    }


    /* 移动端标题优化 */
    .form-box h1 {
        font-size: 24px;
        margin: 0 0 10px 0; /* 减小下边距 */
        flex-shrink: 0;
        color: #fff; /* 标题文字颜色 */
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); /* 标题阴影 */
    }

    /* 移动端切换面板标题优化 */
    .toggle-panel h1 {
        font-size: 20px;
        margin-bottom: 7px;
        color: #333 !important;
        text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
    }

    .toggle-panel p {
        font-size: 12px;
        margin-bottom: 11px;
        color: #555 !important;
        text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
    }

    /* 移动端切换面板按钮优化 - 增大按钮尺寸 */
    .toggle-panel .btn {
        width: 150px; /* 增大按钮宽度 */
        height: 48px; /* 增大按钮高度 */
        font-size: 16px; /* 增大字体 */
        margin-top: 10px; /* 增加上边距 */
        padding: 0 20px;
        border-radius: 12px; /* 增加圆角 */
    }

    /* 移动端忘记密码链接优化 */
    .forgot-link a {
        color: #aaa; /* 忘记密码链接颜色 */
    }

    .forgot-link a:hover {
        color: #fff; /* 忘记密码链接悬停颜色 */
    }
}

@media screen and (max-width: 400px) {
    body {
        padding: 10px;
        background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    }

    .login-container {
        height: 580px; /* 增加容器高度 */
        max-width: 340px;
        /* 移除scale效果 */
        transition: height 0.3s ease;
    }

    .form-box {
        padding: 15px 10px; /* 减小内边距，使内容更紧凑 */
        height: calc(100% - 160px); /* 动态计算表单高度 */
        transform: none; /* 移除缩放效果 */
        display: flex;
        flex-direction: column;
        justify-content: center; /* 垂直居中对齐 */
        color: #e0e0e0; /* 深色背景下的文字颜色 */
    }

    .login-container.active .form-box {
        bottom: 160px; /* 上移表单位置 */
    }

    .toggle-panel {
        height: 140px; /* 增加切换面板高度 */
        padding: 14px;
    }

    .login-container.active .toggle-panel.toggle-left {
        top: -140px;
    }

    .toggle-panel.toggle-right {
        bottom: -140px;
    }

    .toggle-panel h1 {
        font-size: 20px;
        margin-bottom: 6px;
        color: #333 !important;
        text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
    }
    
    .form-box h1 {
        font-size: 24px;
        margin: 0 0 10px 0;
        color: #fff; /* 标题文字颜色 */
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); /* 标题阴影 */
    }

    /* 小屏幕输入框优化 */
    .input-box {
        margin: 12px 0; /* 减小间距，使内容更紧凑 */
        flex-shrink: 0;
    }

    .input-box input {
        padding: 9px 35px 9px 11px; /* 调整内边距 */
        font-size: 14px; /* 调整字体大小 */
        color: #333; /* 输入框文字颜色 */
        background: rgba(255, 255, 255, 0.9); /* 输入框背景色 */
    }

    .input-box input::placeholder {
        color: #666; /* 输入框占位符颜色 */
    }

    /* 小屏幕按钮优化 */
    .btn {
        height: 40px; /* 减小按钮高度 */
        font-size: 14px; /* 调整字体大小 */
        margin-top: 4px;
        flex-shrink: 0;
    }

    /* 小屏幕表单段落优化 */
    .form-box p {
        flex-shrink: 0;
        margin: 8px 0; /* 减小间距 */
        color: #ccc; /* 段落文字颜色 */
    }

    /* 小屏幕社交图标优化 */
    .social-icons {
        margin-top: 6px; /* 增加上边距 */
        position: relative;
        z-index: 3; /* 确保社交图标在表单之上 */
    }

    .social-icons a {
        padding: 7px; /* 增加内边距 */
        margin: 0 2px; /* 调整间距 */
        font-size: 15px; /* 增大图标 */
        background: rgba(255, 255, 255, 0.2); /* 增加背景色 */
        border: 1px solid rgba(255, 255, 255, 0.3); /* 增加边框 */
        color: #fff; /* 社交图标颜色 */
    }


    .toggle-panel p {
        font-size: 12px;
        margin-bottom: 10px;
        color: #555 !important;
        text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
    }

    /* 400px以下切换面板按钮优化 - 增大按钮尺寸 */
    .toggle-panel .btn {
        width: 150px; /* 增大按钮宽度 */
        height: 48px; /* 增大按钮高度 */
        font-size: 16px; /* 增大字体 */
        margin-top: 10px; /* 增加上边距 */
        padding: 0 20px;
        border-radius: 12px; /* 增加圆角 */
    }

    /* 移动端版权信息样式 */
    .copyright-info {
        bottom: 1px;
        width: 98%;
    }

    .copyright-info p {
        font-size: 8px;
        margin: 1px 0;
    }

    .icp-info {
        font-size: 7px !important;
    }

    /* 400px以下忘记密码链接优化 */
    .forgot-link a {
        color: #aaa; /* 忘记密码链接颜色 */
    }

    .forgot-link a:hover {
        color: #fff; /* 忘记密码链接悬停颜色 */
    }
}

/* 超小屏幕优化 */
@media screen and (max-width: 320px) {
    body {
        padding: 8px;
        background: linear-gradient(135deg, #0f3460 0%, #1a1a2e 100%);
    }

    .login-container {
        height: 540px; /* 增加容器高度 */
        max-width: 300px;
        /* 移除scale效果 */
        transition: height 0.3s ease;
    }

    .form-box {
        padding: 12px 8px; /* 减小内边距，使内容更紧凑 */
        height: calc(100% - 160px); /* 动态计算表单高度 */
        transform: none; /* 移除缩放效果 */
        display: flex;
        flex-direction: column;
        justify-content: center; /* 垂直居中对齐 */
        color: #e0e0e0; /* 深色背景下的文字颜色 */
    }

    .login-container.active .form-box {
        bottom: 160px; /* 上移表单位置 */
    }

    .toggle-panel {
        height: 140px; /* 增加切换面板高度 */
        padding: 12px;
    }

    .login-container.active .toggle-panel.toggle-left {
        top: -140px;
    }

    .toggle-panel.toggle-right {
        bottom: -140px;
    }

    .form-box h1 {
        font-size: 22px;
        margin: 0 0 8px 0;
        color: #fff; /* 标题文字颜色 */
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); /* 标题阴影 */
    }

    .toggle-panel h1 {
        font-size: 18px;
        margin-bottom: 5px;
        color: #333 !important;
        text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
    }

    .input-box {
        margin: 10px 0; /* 进一步减小间距 */
        flex-shrink: 0;
    }

    .input-box input {
        padding: 7px 30px 7px 9px; /* 调整内边距 */
        font-size: 13px; /* 调整字体大小 */
        color: #333; /* 输入框文字颜色 */
        background: rgba(255, 255, 255, 0.9); /* 输入框背景色 */
    }

    .input-box input::placeholder {
        color: #666; /* 输入框占位符颜色 */
    }

    .btn {
        height: 38px; /* 减小按钮高度 */
        font-size: 13px; /* 调整字体大小 */
        margin-top: 3px;
        flex-shrink: 0;
    }

    /* 超小屏幕表单段落优化 */
    .form-box p {
        flex-shrink: 0;
        margin: 6px 0; /* 减小间距 */
        color: #ccc; /* 段落文字颜色 */
    }

    .social-icons {
        margin-top: 6px; /* 增加上边距 */
        position: relative;
        z-index: 3; /* 确保社交图标在表单之上 */
    }

    .social-icons a {
        padding: 8px; /* 增加内边距 */
        margin: 0 3px; /* 调整间距 */
        font-size: 16px; /* 增大图标 */
        background: rgba(255, 255, 255, 0.2); /* 增加背景色 */
        border: 1px solid rgba(255, 255, 255, 0.3); /* 增加边框 */
        color: #fff; /* 社交图标颜色 */
    }


    .toggle-panel p {
        font-size: 11px;
        margin-bottom: 8px;
        color: #555 !important;
        text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
    }

    /* 320px以下切换面板按钮优化 - 统一按钮大小 */
    .toggle-panel .btn {
        width: 130px; /* 增大按钮宽度 */
        height: 44px; /* 增大按钮高度 */
        font-size: 15px; /* 增大字体 */
        margin-top: 10px; /* 增加上边距 */
        padding: 0 18px;
        border-radius: 12px; /* 增加圆角 */
    }

    .copyright-info {
        bottom: 1px;
        width: 99%;
    }

    .copyright-info p {
        font-size: 7px;
        margin: 0.5px 0;
    }

    .icp-info {
        font-size: 6px !important;
    }

    /* 320px以下忘记密码链接优化 */
    .forgot-link a {
        color: #aaa; /* 忘记密码链接颜色 */
    }

    .forgot-link a:hover {
        color: #fff; /* 忘记密码链接悬停颜色 */
    }
}
