/* 登录页面专用样式 */ body { background-color: var(--bg-color); background-image: url('https://source.unsplash.com/random/1920x1080/?technology'); background-size: cover; background-position: center; display: flex; flex-direction: column; min-height: 100vh; margin: 0; padding: 0; } .overlay { background-color: rgba(0, 0, 0, 0.4); backdrop-filter: blur(5px); position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: -1; } .theme-toggle { position: absolute; top: 20px; right: 20px; z-index: 10; cursor: pointer; padding: 8px; border-radius: 50%; background-color: rgba(255, 255, 255, 0.2); backdrop-filter: blur(5px); border: 1px solid rgba(255, 255, 255, 0.1); font-size: 18px; width: 36px; height: 36px; display: flex; justify-content: center; align-items: center; transition: all 0.3s ease; } .theme-toggle:hover { transform: rotate(45deg); } .language-selector { position: absolute; top: 20px; left: 20px; z-index: 10; } .language-selector select { padding: 8px 15px; border-radius: 6px; border: 1px solid rgba(255, 255, 255, 0.2); background-color: rgba(255, 255, 255, 0.2); backdrop-filter: blur(5px); color: white; font-size: 14px; cursor: pointer; outline: none; transition: all 0.3s ease; } .language-selector select:hover { background-color: rgba(255, 255, 255, 0.3); } .language-selector select option { background-color: var(--card-bg); color: var(--text-color); } .main-container { display: flex; justify-content: center; align-items: center; flex: 1; padding: 20px; } .login-container { background-color: var(--card-bg); border-radius: 12px; box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15); width: 450px; padding: 35px; position: relative; overflow: hidden; animation: fadeIn 0.5s ease; } @keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } } .login-container::before { content: ""; position: absolute; top: -50px; left: -50px; width: 100px; height: 100px; background-color: var(--primary-color); border-radius: 50%; opacity: 0.1; } .login-container::after { content: ""; position: absolute; bottom: -50px; right: -50px; width: 100px; height: 100px; background-color: var(--secondary-color); border-radius: 50%; opacity: 0.1; } .logo { text-align: center; margin-bottom: 25px; position: relative; } .logo img { width: 90px; height: 90px; border-radius: 12px; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); padding: 5px; background-color: #fff; transition: transform 0.3s ease; } .logo img:hover { transform: scale(1.05); } h1 { text-align: center; color: var(--text-color); margin-bottom: 10px; font-weight: 600; font-size: 28px; } .subtitle { text-align: center; color: var(--light-text); margin-bottom: 30px; font-size: 14px; } .tab-container { display: flex; margin-bottom: 25px; } .tab { flex: 1; text-align: center; padding: 12px 0; cursor: pointer; border-bottom: 2px solid var(--border-color); transition: all 0.3s ease; font-weight: 500; } .tab.active { border-bottom: 2px solid var(--primary-color); color: var(--primary-color); } .form-group { margin-bottom: 22px; position: relative; } .form-group label { display: block; margin-bottom: 8px; color: var(--text-color); font-weight: 500; font-size: 14px; } .input-with-icon { position: relative; } .input-icon { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--light-text); } .form-control { width: 100%; height: 48px; border: 1px solid var(--border-color); border-radius: 6px; padding: 0 15px 0 45px; font-size: 15px; transition: all 0.3s ease; background-color: var(--card-bg); color: var(--text-color); } .form-control:focus { border-color: var(--primary-color); box-shadow: 0 0 0 3px rgba(74, 137, 220, 0.2); outline: none; } .password-toggle { position: absolute; right: 15px; top: 50%; transform: translateY(-50%); cursor: pointer; color: var(--light-text); } .validation-message { margin-top: 6px; font-size: 12px; color: var(--error-color); display: none; } .validation-message.show { display: block; animation: shake 0.5s ease; } @keyframes shake { 0%, 100% { transform: translateX(0); } 10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); } 20%, 40%, 60%, 80% { transform: translateX(5px); } } .remember-forgot { display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; } .remember-me { display: flex; align-items: center; } .custom-checkbox { position: relative; padding-left: 30px; cursor: pointer; font-size: 14px; user-select: none; color: var(--light-text); } .custom-checkbox input { position: absolute; opacity: 0; cursor: pointer; height: 0; width: 0; } .checkmark { position: absolute; top: 0; left: 0; height: 18px; width: 18px; background-color: var(--card-bg); border: 1px solid var(--border-color); border-radius: 3px; transition: all 0.2s ease; } .custom-checkbox:hover input ~ .checkmark { border-color: var(--primary-color); } .custom-checkbox input:checked ~ .checkmark { background-color: var(--primary-color); border-color: var(--primary-color); } .checkmark:after { content: ""; position: absolute; display: none; } .custom-checkbox input:checked ~ .checkmark:after { display: block; } .custom-checkbox .checkmark:after { left: 6px; top: 2px; width: 4px; height: 9px; border: solid white; border-width: 0 2px 2px 0; transform: rotate(45deg); } .forgot-password a { color: var(--primary-color); text-decoration: none; font-size: 14px; transition: color 0.3s ease; } .forgot-password a:hover { color: var(--primary-hover); text-decoration: underline; } .btn-login { width: 100%; height: 48px; background-color: var(--primary-color); color: white; border: none; border-radius: 6px; font-size: 16px; font-weight: 600; cursor: pointer; transition: all 0.3s ease; position: relative; overflow: hidden; } .btn-login:hover { background-color: var(--primary-hover); } .btn-login:active { transform: scale(0.98); } .btn-login .loading { display: none; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); animation: spin 1s linear infinite; } @keyframes spin { from { transform: translate(-50%, -50%) rotate(0deg); } to { transform: translate(-50%, -50%) rotate(360deg); } } .btn-login.loading-state { color: transparent; } .btn-login.loading-state .loading { display: block; } .divider { display: flex; align-items: center; margin: 30px 0; } .divider::before, .divider::after { content: ""; flex: 1; border-bottom: 1px solid var(--border-color); } .divider span { padding: 0 15px; color: var(--light-text); font-size: 14px; } .social-login { display: flex; justify-content: center; gap: 20px; margin-bottom: 25px; } .social-btn { width: 50px; height: 50px; border-radius: 50%; background-color: rgba(245, 245, 245, 0.1); border: 1px solid var(--border-color); display: flex; justify-content: center; align-items: center; cursor: pointer; transition: all 0.3s ease; position: relative; overflow: hidden; } .social-btn::before { content: ""; position: absolute; top: 0; left: -100%; width: 100%; height: 100%; background: linear-gradient( 90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.2) 50%, rgba(255, 255, 255, 0) 100% ); transition: left 0.7s ease; } .social-btn:hover { transform: translateY(-3px); box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1); } .social-btn:hover::before { left: 100%; } .social-btn img { width: 25px; height: 25px; } .social-btn.wechat { background-color: rgba(9, 187, 7, 0.1); border-color: rgba(9, 187, 7, 0.3); } .social-btn.qq { background-color: rgba(18, 183, 245, 0.1); border-color: rgba(18, 183, 245, 0.3); } .signup { text-align: center; margin-top: 25px; font-size: 14px; color: var(--light-text); } .signup a { color: var(--primary-color); text-decoration: none; font-weight: 600; transition: color 0.3s ease; } .signup a:hover { color: var(--primary-hover); text-decoration: underline; } .qr-code-login { text-align: center; } .qr-code { width: 180px; height: 180px; margin: 20px auto; padding: 10px; background-color: white; border-radius: 6px; } .qr-code img { width: 100%; height: 100%; } .qr-code-tip { font-size: 14px; color: var(--light-text); margin-bottom: 25px; } footer { text-align: center; padding: 20px; color: rgba(255, 255, 255, 0.7); font-size: 12px; } footer a { color: rgba(255, 255, 255, 0.9); text-decoration: none; } footer a:hover { text-decoration: underline; } /* 响应式设计 */ @media (max-width: 576px) { .login-container { width: 100%; padding: 25px; border-radius: 10px; } .theme-toggle, .language-selector { top: 10px; } .logo img { width: 70px; height: 70px; } h1 { font-size: 22px; } .social-login { gap: 15px; } .social-btn { width: 45px; height: 45px; } .main-container { padding: 0; } } /* 暗色模式适配 */ body.theme-dark .overlay { background-color: rgba(0, 0, 0, 0.6); } body.theme-dark .login-container { background-color: rgba(45, 45, 45, 0.9); } body.theme-dark .logo img { background-color: #333; } body.theme-dark .checkmark { background-color: #333; } body.theme-dark .form-control { background-color: rgba(60, 60, 60, 0.8); color: #ddd; } body.theme-dark .social-btn { background-color: rgba(50, 50, 50, 0.5); }