feat: 新增登录页面的样式文件。

This commit is contained in:
2026-01-28 16:09:03 +08:00
parent d0ffdae94e
commit d122d11ad5

View File

@@ -1,100 +1,144 @@
/* "Morning Mist" Premium Light Theme */
/* "Aurora Borealis" Ultra Premium Login Theme */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');
:root {
--glass-bg: rgba(255, 255, 255, 0.7);
--glass-border: rgba(255, 255, 255, 0.8);
--glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
--text-primary: #1e293b;
--glass-bg: rgba(255, 255, 255, 0.85);
--glass-border: rgba(255, 255, 255, 0.9);
--glass-shadow: 0 20px 60px -10px rgba(31, 38, 135, 0.12);
--text-primary: #0f172a;
--text-secondary: #64748b;
--accent-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
--accent-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
--accent-primary: #667eea;
--accent-secondary: #764ba2;
}
/* ===================== PAGE LAYOUT ===================== */
.login-page {
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
/* Luxurious light gradient */
background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 50%, #f5f3ff 100%);
padding: 2rem;
/* Premium Gradient Background */
background:
radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.15) 0%, transparent 50%),
radial-gradient(circle at 80% 20%, rgba(255, 140, 183, 0.12) 0%, transparent 50%),
radial-gradient(circle at 40% 40%, rgba(102, 126, 234, 0.08) 0%, transparent 50%),
linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%);
position: relative;
overflow: hidden;
font-family: 'Plus Jakarta Sans', sans-serif;
font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
color: var(--text-primary);
}
/* 1. Artistic Background Elements */
/* Floating Orbs Animation */
.login-page::before {
content: '';
position: absolute;
top: -10%;
right: -5%;
width: 50vw;
height: 50vw;
background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, rgba(255, 255, 255, 0) 70%);
filter: blur(60px);
animation: floatBlue 20s ease-in-out infinite alternate;
top: -20%;
right: -10%;
width: 600px;
height: 600px;
background: radial-gradient(circle, rgba(102, 126, 234, 0.25) 0%, transparent 70%);
filter: blur(80px);
animation: floatOrb1 15s ease-in-out infinite;
pointer-events: none;
}
.login-page::after {
content: '';
position: absolute;
bottom: -10%;
bottom: -20%;
left: -10%;
width: 60vw;
height: 60vw;
background: radial-gradient(circle, rgba(236, 72, 153, 0.1) 0%, rgba(255, 255, 255, 0) 70%);
filter: blur(80px);
animation: floatPink 25s ease-in-out infinite alternate-reverse;
width: 700px;
height: 700px;
background: radial-gradient(circle, rgba(240, 147, 251, 0.2) 0%, transparent 70%);
filter: blur(100px);
animation: floatOrb2 20s ease-in-out infinite;
pointer-events: none;
}
@keyframes floatBlue {
0% {
transform: translate(0, 0);
}
@keyframes floatOrb1 {
0%,
100% {
transform: translate(-30px, 50px);
transform: translate(0, 0) rotate(0deg);
}
25% {
transform: translate(-30px, 40px) rotate(90deg);
}
50% {
transform: translate(-50px, -20px) rotate(180deg);
}
75% {
transform: translate(20px, 30px) rotate(270deg);
}
}
@keyframes floatPink {
0% {
transform: translate(0, 0);
}
@keyframes floatOrb2 {
0%,
100% {
transform: translate(30px, -50px);
transform: translate(0, 0) scale(1);
}
33% {
transform: translate(40px, -30px) scale(1.05);
}
66% {
transform: translate(-20px, 50px) scale(0.95);
}
}
/* 2. Frosted Glass Card */
/* Decorative Grid Pattern */
.login-page>.login-container::before {
content: '';
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-image:
linear-gradient(rgba(102, 126, 234, 0.03) 1px, transparent 1px),
linear-gradient(90deg, rgba(102, 126, 234, 0.03) 1px, transparent 1px);
background-size: 60px 60px;
pointer-events: none;
z-index: -1;
}
/* ===================== GLASS CARD ===================== */
.login-container {
width: 100%;
max-width: 420px;
padding: 3rem;
margin: 1rem;
max-width: 440px;
padding: 2.5rem 2.75rem;
/* Lighter, brighter glass */
/* Premium Frosted Glass */
background: var(--glass-bg);
backdrop-filter: blur(20px);
-webkit-backdrop-filter: blur(20px);
backdrop-filter: blur(30px) saturate(150%);
-webkit-backdrop-filter: blur(30px) saturate(150%);
border-radius: 24px;
border-radius: 28px;
border: 1px solid var(--glass-border);
box-shadow:
var(--glass-shadow),
0 1px 2px 0 rgba(255, 255, 255, 0.5) inset;
0 0 0 1px rgba(255, 255, 255, 0.4) inset,
0 -20px 40px -20px rgba(255, 255, 255, 0.8) inset;
animation: cardEntrance 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
animation: cardFloat 0.8s cubic-bezier(0.34, 1.3, 0.64, 1) backwards;
position: relative;
z-index: 10;
}
@keyframes cardEntrance {
@keyframes cardFloat {
from {
opacity: 0;
transform: translateY(20px) scale(0.98);
transform: translateY(40px) scale(0.95);
}
to {
@@ -103,60 +147,96 @@
}
}
/* 3. Header & Logo */
/* Subtle Glow Effect */
.login-container::after {
content: '';
position: absolute;
inset: -1px;
border-radius: 29px;
padding: 1px;
background: linear-gradient(135deg, rgba(102, 126, 234, 0.3), rgba(240, 147, 251, 0.2), rgba(255, 255, 255, 0));
-webkit-mask:
linear-gradient(#fff 0 0) content-box,
linear-gradient(#fff 0 0);
mask:
linear-gradient(#fff 0 0) content-box,
linear-gradient(#fff 0 0);
-webkit-mask-composite: xor;
mask-composite: exclude;
opacity: 0;
transition: opacity 0.4s ease;
pointer-events: none;
}
.login-container:hover::after {
opacity: 1;
}
/* ===================== HEADER ===================== */
.login-header {
text-align: center;
margin-bottom: 2.5rem;
margin-bottom: 2.25rem;
}
.login-logo {
width: 68px;
height: 68px;
width: 72px;
height: 72px;
margin: 0 auto 1.5rem;
display: flex;
align-items: center;
justify-content: center;
background: white;
border-radius: 18px;
color: #6366f1;
/* Indigo 500 */
border: 1px solid rgba(226, 232, 240, 0.8);
/* 3D Effect Logo */
background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
border-radius: 20px;
color: var(--accent-primary);
box-shadow: 0 10px 25px -5px rgba(99, 102, 241, 0.15);
transform: rotate(-3deg);
transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
box-shadow:
8px 8px 20px rgba(102, 126, 234, 0.12),
-4px -4px 12px rgba(255, 255, 255, 0.8),
inset 0 1px 0 rgba(255, 255, 255, 0.9);
transform: perspective(500px) rotateY(-5deg) rotateX(3deg);
transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.login-container:hover .login-logo {
transform: rotate(0deg) scale(1.05);
box-shadow: 0 15px 30px -5px rgba(99, 102, 241, 0.25);
transform: perspective(500px) rotateY(0deg) rotateX(0deg) scale(1.08);
background: var(--accent-gradient);
color: white;
border-color: transparent;
box-shadow:
0 15px 35px rgba(102, 126, 234, 0.35),
0 5px 15px rgba(118, 75, 162, 0.25);
}
.login-logo svg {
filter: drop-shadow(0 2px 4px rgba(102, 126, 234, 0.2));
}
.login-title {
font-size: 1.875rem;
font-size: 2rem;
font-weight: 700;
background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
background: linear-gradient(135deg, #0f172a 0%, #334155 50%, #475569 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
margin-bottom: 0.5rem;
letter-spacing: -0.025em;
background-clip: text;
margin-bottom: 0.625rem;
letter-spacing: -0.03em;
line-height: 1.2;
}
.login-subtitle {
color: var(--text-secondary);
font-size: 0.95rem;
font-weight: 400;
line-height: 1.5;
}
/* 4. Soft Form Inputs */
/* ===================== FORM ===================== */
.login-form {
display: flex;
flex-direction: column;
gap: 1.25rem;
gap: 1.125rem;
}
.login-field {
@@ -169,121 +249,183 @@
display: flex;
align-items: center;
gap: 0.5rem;
font-size: 0.85rem;
font-size: 0.875rem;
font-weight: 600;
color: #475569;
margin-left: 0.25rem;
color: #374151;
margin-left: 0.125rem;
}
.login-label svg {
color: var(--accent-primary);
opacity: 0.8;
}
/* Premium Input Fields */
.login-input {
width: 100%;
padding: 0.875rem 1rem;
font-size: 0.95rem;
padding: 0.9375rem 1.125rem;
font-size: 0.9375rem;
font-family: inherit;
font-weight: 450;
background: white;
border: 1px solid #e2e8f0;
border-radius: 12px;
color: #1e293b;
background: rgba(255, 255, 255, 0.9);
border: 1.5px solid #e5e7eb;
border-radius: 14px;
color: #0f172a;
transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
box-shadow:
0 2px 4px rgba(0, 0, 0, 0.02),
inset 0 1px 2px rgba(0, 0, 0, 0.02);
}
.login-input::placeholder {
color: #9ca3af;
font-weight: 400;
}
.login-input:hover {
border-color: #c7d2fe;
background: #fff;
}
.login-input:focus {
outline: none;
border-color: #8b5cf6;
border-color: var(--accent-primary);
background: #fff;
box-shadow:
0 0 0 4px rgba(139, 92, 246, 0.1),
0 4px 12px rgba(0, 0, 0, 0.05);
0 0 0 4px rgba(102, 126, 234, 0.12),
0 4px 16px rgba(102, 126, 234, 0.08);
transform: translateY(-1px);
}
/* Password Toggle */
/* Password Field */
.login-password-wrapper {
position: relative;
}
.login-password-wrapper .login-input {
padding-right: 3rem;
}
.login-password-toggle {
position: absolute;
right: 1rem;
right: 0.875rem;
top: 50%;
transform: translateY(-50%);
background: none;
border: none;
color: #94a3b8;
cursor: pointer;
padding: 4px;
transition: color 0.2s;
padding: 6px;
border-radius: 8px;
transition: all 0.2s;
display: flex;
align-items: center;
justify-content: center;
}
.login-password-toggle:hover {
color: #64748b;
color: var(--accent-primary);
background: rgba(102, 126, 234, 0.08);
}
/* 5. Elegant Buttons */
/* ===================== BUTTONS ===================== */
.login-button {
display: flex;
align-items: center;
justify-content: center;
gap: 0.6rem;
padding: 0.875rem;
gap: 0.625rem;
padding: 0.9375rem 1.25rem;
border: none;
border-radius: 12px;
font-size: 1rem;
border-radius: 14px;
font-size: 0.9375rem;
font-weight: 600;
font-family: inherit;
cursor: pointer;
transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
margin-top: 0.5rem;
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
margin-top: 0.625rem;
position: relative;
overflow: hidden;
}
/* Gradient Primary */
/* Primary Gradient Button */
.login-button--primary {
color: white;
background: var(--accent-gradient);
background-size: 200% auto;
box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
background-size: 200% 200%;
box-shadow:
0 4px 15px rgba(102, 126, 234, 0.35),
0 1px 3px rgba(118, 75, 162, 0.2);
}
.login-button--primary::before {
content: '';
position: absolute;
inset: 0;
background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, transparent 50%);
opacity: 0;
transition: opacity 0.3s;
}
.login-button--primary:hover:not(:disabled) {
background-position: right center;
transform: translateY(-1px);
box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
background-position: 100% 100%;
transform: translateY(-2px);
box-shadow:
0 8px 25px rgba(102, 126, 234, 0.45),
0 4px 10px rgba(118, 75, 162, 0.25);
}
.login-button--primary:hover:not(:disabled)::before {
opacity: 1;
}
.login-button--primary:active:not(:disabled) {
transform: translateY(0);
}
.login-button--primary:disabled {
opacity: 0.7;
opacity: 0.6;
cursor: not-allowed;
filter: grayscale(0.5);
filter: grayscale(0.3);
}
/* Clean GitHub Button */
/* GitHub Button */
.login-button--github {
background: #ffffff;
color: #1e293b;
border: 1px solid #e2e8f0;
color: #1f2937;
border: 1.5px solid #e5e7eb;
margin-top: 0;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}
.login-button--github:hover {
background: #f8fafc;
border-color: #cbd5e1;
color: #0f172a;
transform: translateY(-1px);
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
background: #f9fafb;
border-color: #d1d5db;
color: #111827;
transform: translateY(-2px);
box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}
/* 6. Footer & Utils */
.login-button--github svg {
transition: transform 0.3s;
}
.login-button--github:hover svg {
transform: rotate(-8deg) scale(1.1);
}
/* ===================== DIVIDER ===================== */
.login-divider {
display: flex;
align-items: center;
gap: 1rem;
color: #94a3b8;
font-size: 0.85rem;
margin: 0.75rem 0;
color: #9ca3af;
font-size: 0.8125rem;
margin: 0.875rem 0;
font-weight: 500;
letter-spacing: 0.025em;
text-transform: uppercase;
}
.login-divider::before,
@@ -291,50 +433,118 @@
content: '';
flex: 1;
height: 1px;
background: #e2e8f0;
background: linear-gradient(90deg, transparent, #e5e7eb, transparent);
}
/* ===================== FOOTER ===================== */
.login-footer {
text-align: center;
margin-top: 2rem;
margin-top: 1.75rem;
padding-top: 1.5rem;
border-top: 1px solid #f1f5f9;
border-top: 1px solid rgba(229, 231, 235, 0.6);
}
.login-footer p {
color: #64748b;
font-size: 0.95rem;
color: var(--text-secondary);
font-size: 0.9375rem;
}
.login-footer a {
color: #6366f1;
color: var(--accent-primary);
text-decoration: none;
font-weight: 600;
margin-left: 0.4rem;
margin-left: 0.375rem;
position: relative;
transition: color 0.2s;
}
.login-footer a:hover {
color: #4f46e5;
text-decoration: underline;
text-decoration-color: rgba(79, 70, 229, 0.4);
text-underline-offset: 4px;
.login-footer a::after {
content: '';
position: absolute;
bottom: -2px;
left: 0;
width: 100%;
height: 2px;
background: var(--accent-gradient);
transform: scaleX(0);
transform-origin: right;
transition: transform 0.3s ease;
border-radius: 1px;
}
/* Error Message */
.login-footer a:hover {
color: var(--accent-secondary);
}
.login-footer a:hover::after {
transform: scaleX(1);
transform-origin: left;
}
/* ===================== ERROR & HINTS ===================== */
.login-error {
background: #fef2f2;
background: linear-gradient(135deg, #fef2f2 0%, #fff1f2 100%);
border: 1px solid #fecaca;
color: #ef4444;
padding: 0.75rem 1rem;
border-radius: 10px;
color: #dc2626;
padding: 0.875rem 1rem;
border-radius: 12px;
font-size: 0.875rem;
font-weight: 500;
text-align: center;
box-shadow: 0 2px 4px rgba(239, 68, 68, 0.05);
display: flex;
align-items: center;
justify-content: center;
gap: 0.5rem;
animation: shakeError 0.4s ease;
}
@keyframes shakeError {
0%,
100% {
transform: translateX(0);
}
20%,
60% {
transform: translateX(-6px);
}
40%,
80% {
transform: translateX(6px);
}
}
.login-hint {
font-size: 0.8rem;
color: #94a3b8;
margin-top: 0.25rem;
font-size: 0.8125rem;
color: #9ca3af;
margin-top: 0.375rem;
margin-left: 0.125rem;
}
/* ===================== RESPONSIVE ===================== */
@media (max-width: 480px) {
.login-page {
padding: 1rem;
}
.login-container {
padding: 2rem 1.5rem;
border-radius: 24px;
}
.login-logo {
width: 64px;
height: 64px;
}
.login-title {
font-size: 1.75rem;
}
}
/* Dark Mode Support (if needed) */
@media (prefers-color-scheme: dark) {
/* Keep light theme for login - looks more premium */
}