纯粹的黑 (Pure Black):背景不再是杂乱的渐变,而是纯粹的 #000,配合中心极其微弱的蓝色呼吸光,像是在深海或太空。
整块巨石 (The Monolith):登录卡片不再有明显的边框,而是一块极其厚重、高度模糊的暗色玻璃。顶部有一道微弱的“聚光灯”效果。
内嵌式输入框 (Carved Inputs):抛弃了传统的边框设计,输入框像是直接在玻璃上雕刻出来的凹槽(Inner Shadow),质感极强。
全息按钮 (Holographic Button):主按钮默认是极简的黑白配色,但当你悬停时,背后会浮现出流动的全息极光色彩。
字体升级:引入了 Space Grotesk 配合 Inter,让标题和标签更有科技杂志的排版感。
This commit is contained in:
2026-01-26 15:19:04 +08:00
parent 605171b87b
commit 3bef846077
2 changed files with 236 additions and 161 deletions

View File

@@ -1,234 +1,328 @@
/* Modern Login Page Styles */
/* "Ethereal Void" Ultra-Modern Theme */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=Inter:wght@300;400;500;600&display=swap');
:root {
--primary-glow: conic-gradient(from 180deg at 50% 50%, #2a8af6 0deg, #a853ba 180deg, #e92a67 360deg);
--glass-surface: rgba(255, 255, 255, 0.03);
--glass-border: rgba(255, 255, 255, 0.08);
}
.login-page {
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
background-color: var(--bg-primary);
/* Rich Mesh Gradient Background */
background: linear-gradient(-45deg, #1e293b, #0f172a, #1e1b4b, #2e1065);
background-size: 400% 400%;
animation: meshGradient 15s ease infinite;
padding: 1rem;
background-color: #000000;
position: relative;
overflow: hidden;
font-family: 'Inter', sans-serif;
color: #fff;
}
/* 1. Dynamic "Void" Background */
.login-page::before {
content: '';
position: absolute;
width: 150vw;
height: 150vw;
background: radial-gradient(circle at center, rgba(56, 189, 248, 0.08) 0%, rgba(0, 0, 0, 0) 50%);
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
animation: pulseLight 8s ease-in-out infinite alternate;
pointer-events: none;
}
/* Background Glowing Orbs */
.login-page::before,
.login-page::after {
content: '';
position: absolute;
width: 40vw;
height: 40vw;
border-radius: 50%;
filter: blur(80px);
z-index: 0;
opacity: 0.15;
top: -20%;
left: -10%;
width: 50vw;
height: 50vw;
background: radial-gradient(circle, rgba(168, 85, 247, 0.15) 0%, rgba(0, 0, 0, 0) 70%);
filter: blur(60px);
animation: floatOrb 15s ease-in-out infinite;
}
.login-page::before {
top: -10vw;
left: -10vw;
background: var(--accent-primary);
animation: float 20s ease-in-out infinite alternate;
}
.login-page::after {
bottom: -10vw;
right: -10vw;
background: #3b82f6;
animation: float 25s ease-in-out infinite alternate-reverse;
}
@keyframes float {
@keyframes pulseLight {
0% {
transform: translate(0, 0);
opacity: 0.5;
transform: translate(-50%, -50%) scale(1);
}
100% {
transform: translate(10vw, 10vw);
opacity: 1;
transform: translate(-50%, -50%) scale(1.2);
}
}
@keyframes floatOrb {
/* Glass Card */
0%,
100% {
transform: translate(0, 0);
}
50% {
transform: translate(20px, 40px);
}
}
/* 2. The Monolith Card */
.login-container {
background: var(--glass-panel-bg);
backdrop-filter: blur(24px);
-webkit-backdrop-filter: blur(24px);
border: 1px solid var(--glass-border);
border-radius: 2rem;
/* Larger radius */
padding: 3rem;
max-width: 440px;
width: 100%;
box-shadow: var(--shadow-2xl), var(--shadow-glow-primary);
animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1);
max-width: 400px;
padding: 3rem;
margin: 1rem;
position: relative;
z-index: 1;
z-index: 10;
/* Ultra-refined Glass */
background: rgba(10, 10, 10, 0.6);
backdrop-filter: blur(40px);
-webkit-backdrop-filter: blur(40px);
border-radius: 32px;
border: 1px solid var(--glass-border);
box-shadow:
0 0 0 1px rgba(0, 0, 0, 1),
/* inner black line */
0 20px 60px rgba(0, 0, 0, 0.8),
0 0 0 1px rgba(255, 255, 255, 0.05) inset;
/* subtle inner highlight */
animation: slideUpFade 1s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}
/* Top "Spotlight" Border Effect */
.login-container::after {
content: "";
position: absolute;
top: 0;
left: 20%;
right: 20%;
height: 1px;
background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
width: 60%;
}
@keyframes slideUpFade {
from {
opacity: 0;
transform: translateY(40px) scale(0.98);
}
to {
opacity: 1;
transform: translateY(0) scale(1);
}
}
/* 3. Minimalist Header */
.login-header {
text-align: center;
margin-bottom: 2.5rem;
margin-bottom: 3rem;
}
.login-logo {
width: 64px;
height: 64px;
background: linear-gradient(135deg, #2563eb 0%, #06b6d4 100%);
border-radius: 1rem;
margin: 0 auto 1.5rem;
display: flex;
align-items: center;
justify-content: center;
margin: 0 auto 1.5rem;
color: white;
box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
transform: rotate(-5deg);
transition: transform 0.3s ease;
/* Gem-like appearance */
background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.01));
border: 1px solid rgba(255, 255, 255, 0.2);
border-radius: 20px;
color: #fff;
position: relative;
}
.login-container:hover .login-logo {
transform: rotate(0deg) scale(1.05);
/* The neon ring */
.login-logo::before {
content: '';
position: absolute;
inset: -1px;
z-index: -1;
border-radius: 21px;
background: var(--primary-glow);
opacity: 0.5;
filter: blur(8px);
}
.login-title {
font-family: 'Space Grotesk', sans-serif;
font-size: 1.75rem;
font-weight: 700;
color: var(--text-primary);
font-weight: 600;
color: white;
margin-bottom: 0.5rem;
letter-spacing: -0.5px;
letter-spacing: -0.03em;
}
.login-subtitle {
color: var(--text-secondary);
font-size: 0.95rem;
color: #8899a6;
font-size: 0.9rem;
letter-spacing: 0.01em;
}
/* 4. "Carved" Inputs */
.login-form {
display: flex;
flex-direction: column;
gap: 1.5rem;
}
.login-error {
background: rgba(239, 68, 68, 0.1);
color: #ef4444;
padding: 0.875rem 1rem;
border-radius: 0.75rem;
font-size: 0.875rem;
text-align: center;
border: 1px solid rgba(239, 68, 68, 0.2);
gap: 1.25rem;
}
.login-field {
display: flex;
flex-direction: column;
gap: 0.5rem;
gap: 0.6rem;
}
.login-label {
display: flex;
align-items: center;
gap: 0.5rem;
font-size: 0.875rem;
font-weight: 600;
color: var(--text-secondary);
font-size: 0.8rem;
font-weight: 500;
font-family: 'Space Grotesk', sans-serif;
text-transform: uppercase;
letter-spacing: 0.05em;
color: #6b7280;
margin-left: 4px;
}
.login-input {
width: 100%;
padding: 0.875rem 1rem;
border: 1px solid var(--border-color);
border-radius: 0.75rem;
padding: 1rem 1.25rem;
font-size: 0.95rem;
background: rgba(255, 255, 255, 0.5);
color: var(--text-primary);
transition: all 0.2s;
font-family: 'Inter', sans-serif;
/* Seamless dark background */
background: rgba(0, 0, 0, 0.4);
color: #fff;
/* No visible border initially, just depth */
border: 1px solid transparent;
border-radius: 16px;
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2) inset;
/* Inner shadow depth */
transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.login-input:focus {
outline: none;
background: white;
border-color: var(--accent-primary);
box-shadow: 0 0 0 4px var(--bg-hover);
background: rgba(0, 0, 0, 0.6);
border-color: rgba(255, 255, 255, 0.1);
box-shadow:
0 4px 12px rgba(0, 0, 0, 0.4) inset,
0 0 0 1px rgba(255, 255, 255, 0.05);
/* Subtle ring */
color: #fff;
}
/* Password Toggle */
.login-password-wrapper {
position: relative;
}
.login-password-toggle {
position: absolute;
right: 1rem;
right: 1.25rem;
top: 50%;
transform: translateY(-50%);
background: none;
border: none;
color: var(--text-muted);
color: #4b5563;
cursor: pointer;
padding: 0;
display: flex;
align-items: center;
padding: 4px;
transition: color 0.2s;
}
.login-password-toggle:hover {
color: var(--text-primary);
color: #e5e7eb;
}
/* 5. Holographic Button */
.login-button {
display: flex;
align-items: center;
justify-content: center;
gap: 0.5rem;
padding: 1rem;
gap: 0.75rem;
padding: 1.1rem;
border: none;
border-radius: 0.75rem;
font-size: 1rem;
border-radius: 16px;
font-size: 0.95rem;
font-weight: 600;
font-family: 'Space Grotesk', sans-serif;
cursor: pointer;
transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
margin-top: 0.5rem;
}
.login-button:disabled {
opacity: 0.7;
cursor: not-allowed;
margin-top: 1rem;
position: relative;
overflow: hidden;
transition: all 0.3s;
}
/* Primary "Glow" Button */
.login-button--primary {
background: linear-gradient(135deg, #2563eb 0%, #06b6d4 100%);
color: white;
box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
background: #fff;
color: #000;
z-index: 1;
}
/* The gradient hover effect sits behind */
.login-button--primary::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: linear-gradient(135deg, #3b82f6, #8b5cf6, #ec4899);
z-index: -1;
opacity: 0;
transition: opacity 0.3s ease;
}
.login-button--primary:hover:not(:disabled) {
transform: translateY(-2px);
box-shadow: 0 8px 16px rgba(37, 99, 235, 0.4);
}
.login-button--github {
background: #1f2937;
color: white;
margin-top: 0;
}
.login-button--github:hover:not(:disabled) {
background: #111827;
transform: translateY(-2px);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
box-shadow: 0 10px 30px -4px rgba(139, 92, 246, 0.5);
}
.login-button--primary:hover:not(:disabled)::before {
opacity: 1;
}
/* Minimal GitHub Button */
.login-button--github {
background: transparent;
color: #94a3b8;
border: 1px dashed rgba(255, 255, 255, 0.2);
margin-top: 0.5rem;
padding: 0.9rem;
}
.login-button--github:hover {
background: rgba(255, 255, 255, 0.03);
border-color: rgba(255, 255, 255, 0.5);
border-style: solid;
color: #fff;
}
/* 6. Refined Footer */
.login-divider {
display: flex;
align-items: center;
gap: 1rem;
color: var(--text-muted);
font-size: 0.875rem;
margin: 0.5rem 0;
gap: 1.5rem;
color: #4b5563;
font-size: 0.75rem;
margin: 1rem 0;
font-weight: 500;
text-transform: uppercase;
}
.login-divider::before,
@@ -236,60 +330,41 @@
content: '';
flex: 1;
height: 1px;
background: var(--border-color);
background: #1f2937;
}
.login-footer {
text-align: center;
margin-top: 2rem;
padding-top: 1.5rem;
border-top: 1px solid var(--border-color);
font-size: 0.9rem;
}
.login-footer p {
color: var(--text-secondary);
font-size: 0.95rem;
color: #6b7280;
}
.login-footer a {
color: var(--accent-primary);
color: white;
font-weight: 500;
text-decoration: none;
font-weight: 600;
margin-left: 0.25rem;
border-bottom: 1px solid rgba(255, 255, 255, 0.3);
padding-bottom: 2px;
transition: border-color 0.2s;
margin-left: 4px;
}
.login-footer a:hover {
text-decoration: underline;
border-color: white;
}
/* Dark Mode Adjustments */
@media (prefers-color-scheme: dark) {
.login-container {
background: rgba(30, 41, 59, 0.7);
border-color: rgba(255, 255, 255, 0.1);
box-shadow:
0 20px 40px -10px rgba(0, 0, 0, 0.3),
0 0 0 1px rgba(255, 255, 255, 0.05) inset;
}
.login-input {
background: rgba(0, 0, 0, 0.2);
border-color: rgba(255, 255, 255, 0.1);
}
.login-input:focus {
background: rgba(0, 0, 0, 0.4);
}
}
@keyframes slideUp {
from {
opacity: 0;
transform: translateY(20px);
}
to {
opacity: 1;
transform: translateY(0);
}
/* Errors */
.login-error {
background: rgba(255, 59, 48, 0.1);
color: #ff3b30;
padding: 0.8rem;
border-radius: 12px;
font-size: 0.85rem;
text-align: center;
margin-bottom: 0.5rem;
border: 1px solid rgba(255, 59, 48, 0.2);
}

View File

@@ -74,7 +74,7 @@ export default function Login({ mode = 'login' }: LoginProps) {
<div className="login-container">
<div className="login-header">
<div className="login-logo">
<div className="login-logo-inner"></div>
<Icon icon="solar:wallet-2-bold-duotone" width="36" height="36" />
</div>
<h1 className="login-title">
{isLogin ? '欢迎回来' : '创建账户'}