feat: beautify login, register and 404 pages with dark gaming theme

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
congsh
2026-04-17 17:37:15 +08:00
parent e4b3340ffb
commit 5c007ac069
3 changed files with 380 additions and 80 deletions
+143 -30
View File
@@ -40,8 +40,17 @@ function goToRegister() {
<template>
<div class="login-page">
<!-- CSS 星星背景 -->
<div class="stars" aria-hidden="true"></div>
<div class="stars stars--sm" aria-hidden="true"></div>
<div class="login-card">
<h1 class="title">登录 Game Group</h1>
<div class="card-header">
<h1 class="brand">
<span class="brand-text">Game Group</span>
</h1>
<p class="subtitle">登录你的账号</p>
</div>
<form class="login-form" @submit.prevent="handleLogin">
<div class="form-group">
@@ -66,6 +75,7 @@ function goToRegister() {
</div>
<button type="submit" class="submit-btn" :disabled="loading">
<span v-if="loading" class="btn-loader"></span>
{{ loading ? '登录中...' : '登录' }}
</button>
</form>
@@ -79,36 +89,104 @@ function goToRegister() {
</template>
<style scoped>
/* ── 深空背景 ── */
.login-page {
position: relative;
display: flex;
align-items: center;
justify-content: center;
min-height: 100vh;
padding: 20px;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
padding: 24px;
background: linear-gradient(160deg, #0f172a 0%, #1e1b4b 50%, #0f172a 100%);
overflow: hidden;
}
/* ── CSS 星星 ── */
.stars {
position: fixed;
inset: 0;
background-image:
radial-gradient(1px 1px at 10% 20%, rgba(255,255,255,0.8) 50%, transparent 100%),
radial-gradient(1px 1px at 30% 65%, rgba(255,255,255,0.6) 50%, transparent 100%),
radial-gradient(1.5px 1.5px at 50% 10%, rgba(255,255,255,0.9) 50%, transparent 100%),
radial-gradient(1px 1px at 70% 40%, rgba(255,255,255,0.5) 50%, transparent 100%),
radial-gradient(1px 1px at 85% 75%, rgba(255,255,255,0.7) 50%, transparent 100%),
radial-gradient(1.5px 1.5px at 15% 80%, rgba(255,255,255,0.6) 50%, transparent 100%),
radial-gradient(1px 1px at 55% 90%, rgba(255,255,255,0.5) 50%, transparent 100%),
radial-gradient(1px 1px at 92% 15%, rgba(255,255,255,0.7) 50%, transparent 100%),
radial-gradient(1.2px 1.2px at 40% 45%, rgba(255,255,255,0.6) 50%, transparent 100%),
radial-gradient(1px 1px at 25% 35%, rgba(255,255,255,0.4) 50%, transparent 100%);
animation: twinkle 4s ease-in-out infinite alternate;
pointer-events: none;
}
.stars--sm {
background-image:
radial-gradient(0.8px 0.8px at 5% 50%, rgba(255,255,255,0.4) 50%, transparent 100%),
radial-gradient(0.8px 0.8px at 20% 10%, rgba(255,255,255,0.3) 50%, transparent 100%),
radial-gradient(0.8px 0.8px at 45% 70%, rgba(255,255,255,0.35) 50%, transparent 100%),
radial-gradient(0.8px 0.8px at 60% 25%, rgba(255,255,255,0.3) 50%, transparent 100%),
radial-gradient(0.8px 0.8px at 78% 85%, rgba(255,255,255,0.4) 50%, transparent 100%),
radial-gradient(0.8px 0.8px at 95% 55%, rgba(255,255,255,0.3) 50%, transparent 100%),
radial-gradient(0.8px 0.8px at 35% 95%, rgba(255,255,255,0.35) 50%, transparent 100%),
radial-gradient(0.8px 0.8px at 65% 5%, rgba(255,255,255,0.3) 50%, transparent 100%);
animation: twinkle 6s ease-in-out 1s infinite alternate;
}
@keyframes twinkle {
0% { opacity: 0.6; }
100% { opacity: 1; }
}
/* ── 毛玻璃卡片 ── */
.login-card {
position: relative;
z-index: 1;
width: 100%;
max-width: 400px;
padding: 40px;
background: white;
border-radius: 16px;
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
max-width: 420px;
padding: 48px 40px 40px;
background: rgba(30, 41, 59, 0.55);
backdrop-filter: blur(16px);
-webkit-backdrop-filter: blur(16px);
border: 1px solid rgba(99, 102, 241, 0.2);
border-radius: var(--gg-radius-xl);
box-shadow:
0 8px 32px rgba(0, 0, 0, 0.4),
inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.title {
font-size: 28px;
font-weight: 700;
/* ── 头部品牌 ── */
.card-header {
text-align: center;
margin: 0 0 32px;
color: #333;
margin-bottom: 36px;
}
.brand {
margin: 0 0 8px;
}
.brand-text {
font-size: 32px;
font-weight: 800;
letter-spacing: -0.5px;
background: var(--gg-gradient);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}
.subtitle {
margin: 0;
font-size: 15px;
color: var(--gg-text-secondary);
font-weight: 400;
}
/* ── 表单 ── */
.login-form {
display: flex;
flex-direction: column;
gap: 20px;
gap: 22px;
}
.form-group {
@@ -118,59 +196,94 @@ function goToRegister() {
}
.form-group label {
font-size: 14px;
font-size: 13px;
font-weight: 500;
color: #555;
color: var(--gg-text-secondary);
letter-spacing: 0.02em;
}
.form-group input {
padding: 12px 16px;
border: 1px solid #ddd;
border-radius: 8px;
background: var(--gg-bg);
border: 1px solid var(--gg-border);
border-radius: var(--gg-radius-sm);
color: var(--gg-text);
font-size: 14px;
transition: border-color 0.2s;
transition: border-color 0.25s, box-shadow 0.25s;
}
.form-group input::placeholder {
color: var(--gg-text-muted);
}
.form-group input:focus {
outline: none;
border-color: #667eea;
border-color: var(--gg-primary);
box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
}
/* ── 提交按钮 ── */
.submit-btn {
position: relative;
padding: 14px;
margin-top: 4px;
border: none;
border-radius: 8px;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
border-radius: var(--gg-radius-sm);
background: var(--gg-gradient);
color: #fff;
font-size: 16px;
font-weight: 600;
cursor: pointer;
transition: opacity 0.2s;
transition: box-shadow 0.3s, transform 0.15s;
}
.submit-btn:hover:not(:disabled) {
opacity: 0.9;
box-shadow: 0 0 24px rgba(99, 102, 241, 0.45), 0 0 8px rgba(168, 85, 247, 0.3);
transform: translateY(-1px);
}
.submit-btn:active:not(:disabled) {
transform: translateY(0);
}
.submit-btn:disabled {
opacity: 0.6;
opacity: 0.55;
cursor: not-allowed;
}
.btn-loader {
display: inline-block;
width: 14px;
height: 14px;
margin-right: 8px;
border: 2px solid rgba(255,255,255,0.3);
border-top-color: #fff;
border-radius: 50%;
animation: spin 0.6s linear infinite;
vertical-align: middle;
}
@keyframes spin {
to { transform: rotate(360deg); }
}
/* ── 底部链接 ── */
.footer-links {
margin-top: 24px;
margin-top: 28px;
text-align: center;
font-size: 14px;
color: #666;
color: var(--gg-text-muted);
}
.footer-links a {
color: #667eea;
color: var(--gg-primary-light);
cursor: pointer;
font-weight: 500;
margin-left: 4px;
transition: color 0.2s;
}
.footer-links a:hover {
text-decoration: underline;
color: var(--gg-accent-light);
}
</style>
+95 -21
View File
@@ -11,56 +11,130 @@ function goHome() {
<template>
<div class="not-found">
<!-- CSS 星星背景 -->
<div class="stars" aria-hidden="true"></div>
<div class="content">
<h1>404</h1>
<p>抱歉您访问的页面不存在</p>
<div class="error-code">404</div>
<h1 class="error-title">迷失在星域之中</h1>
<p class="error-desc">你访问的页面已消失在浩瀚宇宙中或许它从未存在过</p>
<button class="home-btn" @click="goHome">
返回首页
<span class="btn-icon">&#10148;</span>
返回基地
</button>
</div>
</div>
</template>
<style scoped>
/* ── 深空背景 ── */
.not-found {
position: relative;
display: flex;
align-items: center;
justify-content: center;
min-height: 60vh;
min-height: 100vh;
padding: 24px;
background: linear-gradient(160deg, #0f172a 0%, #1e1b4b 50%, #0f172a 100%);
overflow: hidden;
}
/* ── CSS 星星 ── */
.stars {
position: fixed;
inset: 0;
background-image:
radial-gradient(1px 1px at 10% 20%, rgba(255,255,255,0.8) 50%, transparent 100%),
radial-gradient(1px 1px at 30% 65%, rgba(255,255,255,0.6) 50%, transparent 100%),
radial-gradient(1.5px 1.5px at 50% 10%, rgba(255,255,255,0.9) 50%, transparent 100%),
radial-gradient(1px 1px at 70% 40%, rgba(255,255,255,0.5) 50%, transparent 100%),
radial-gradient(1px 1px at 85% 75%, rgba(255,255,255,0.7) 50%, transparent 100%),
radial-gradient(1.5px 1.5px at 15% 80%, rgba(255,255,255,0.6) 50%, transparent 100%),
radial-gradient(1px 1px at 55% 90%, rgba(255,255,255,0.5) 50%, transparent 100%),
radial-gradient(1px 1px at 92% 15%, rgba(255,255,255,0.7) 50%, transparent 100%),
radial-gradient(1.2px 1.2px at 40% 45%, rgba(255,255,255,0.6) 50%, transparent 100%),
radial-gradient(1px 1px at 25% 35%, rgba(255,255,255,0.4) 50%, transparent 100%);
animation: twinkle 4s ease-in-out infinite alternate;
pointer-events: none;
}
@keyframes twinkle {
0% { opacity: 0.6; }
100% { opacity: 1; }
}
/* ── 内容区 ── */
.content {
position: relative;
z-index: 1;
text-align: center;
max-width: 480px;
}
.content h1 {
font-size: 72px;
font-weight: 700;
margin: 0 0 16px;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
/* ── 404 数字 ── */
.error-code {
font-size: 140px;
font-weight: 900;
line-height: 1;
margin-bottom: 16px;
background: var(--gg-gradient);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
text-shadow: none;
filter: drop-shadow(0 0 40px rgba(99, 102, 241, 0.35));
animation: pulse-glow 3s ease-in-out infinite alternate;
user-select: none;
}
.content p {
font-size: 16px;
color: var(--el-text-color-secondary);
margin: 0 0 24px;
@keyframes pulse-glow {
0% { filter: drop-shadow(0 0 30px rgba(99, 102, 241, 0.25)); }
100% { filter: drop-shadow(0 0 50px rgba(168, 85, 247, 0.4)); }
}
/* ── 标题 ── */
.error-title {
font-size: 28px;
font-weight: 700;
color: var(--gg-text);
margin: 0 0 12px;
}
/* ── 描述文字 ── */
.error-desc {
font-size: 15px;
color: var(--gg-text-secondary);
margin: 0 0 36px;
line-height: 1.6;
}
/* ── 返回按钮 ── */
.home-btn {
padding: 12px 32px;
display: inline-flex;
align-items: center;
gap: 8px;
padding: 14px 36px;
border: none;
border-radius: 8px;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
font-size: 14px;
font-weight: 500;
border-radius: var(--gg-radius-sm);
background: var(--gg-gradient);
color: #fff;
font-size: 15px;
font-weight: 600;
cursor: pointer;
transition: opacity 0.2s;
transition: box-shadow 0.3s, transform 0.15s;
}
.home-btn:hover {
opacity: 0.9;
box-shadow: 0 0 24px rgba(99, 102, 241, 0.45), 0 0 8px rgba(168, 85, 247, 0.3);
transform: translateY(-1px);
}
.home-btn:active {
transform: translateY(0);
}
.btn-icon {
font-size: 16px;
display: inline-flex;
}
</style>
+142 -29
View File
@@ -56,8 +56,17 @@ function goToLogin() {
<template>
<div class="register-page">
<!-- CSS 星星背景 -->
<div class="stars" aria-hidden="true"></div>
<div class="stars stars--sm" aria-hidden="true"></div>
<div class="register-card">
<h1 class="title">注册 Game Group</h1>
<div class="card-header">
<h1 class="brand">
<span class="brand-text">Game Group</span>
</h1>
<p class="subtitle">创建你的账号</p>
</div>
<form class="register-form" @submit.prevent="handleRegister">
<div class="form-group">
@@ -103,6 +112,7 @@ function goToLogin() {
</div>
<button type="submit" class="submit-btn" :disabled="loading">
<span v-if="loading" class="btn-loader"></span>
{{ loading ? '注册中...' : '注册' }}
</button>
</form>
@@ -116,36 +126,104 @@ function goToLogin() {
</template>
<style scoped>
/* ── 深空背景 ── */
.register-page {
position: relative;
display: flex;
align-items: center;
justify-content: center;
min-height: 100vh;
padding: 20px;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
padding: 24px;
background: linear-gradient(160deg, #0f172a 0%, #1e1b4b 50%, #0f172a 100%);
overflow: hidden;
}
/* ── CSS 星星 ── */
.stars {
position: fixed;
inset: 0;
background-image:
radial-gradient(1px 1px at 10% 20%, rgba(255,255,255,0.8) 50%, transparent 100%),
radial-gradient(1px 1px at 30% 65%, rgba(255,255,255,0.6) 50%, transparent 100%),
radial-gradient(1.5px 1.5px at 50% 10%, rgba(255,255,255,0.9) 50%, transparent 100%),
radial-gradient(1px 1px at 70% 40%, rgba(255,255,255,0.5) 50%, transparent 100%),
radial-gradient(1px 1px at 85% 75%, rgba(255,255,255,0.7) 50%, transparent 100%),
radial-gradient(1.5px 1.5px at 15% 80%, rgba(255,255,255,0.6) 50%, transparent 100%),
radial-gradient(1px 1px at 55% 90%, rgba(255,255,255,0.5) 50%, transparent 100%),
radial-gradient(1px 1px at 92% 15%, rgba(255,255,255,0.7) 50%, transparent 100%),
radial-gradient(1.2px 1.2px at 40% 45%, rgba(255,255,255,0.6) 50%, transparent 100%),
radial-gradient(1px 1px at 25% 35%, rgba(255,255,255,0.4) 50%, transparent 100%);
animation: twinkle 4s ease-in-out infinite alternate;
pointer-events: none;
}
.stars--sm {
background-image:
radial-gradient(0.8px 0.8px at 5% 50%, rgba(255,255,255,0.4) 50%, transparent 100%),
radial-gradient(0.8px 0.8px at 20% 10%, rgba(255,255,255,0.3) 50%, transparent 100%),
radial-gradient(0.8px 0.8px at 45% 70%, rgba(255,255,255,0.35) 50%, transparent 100%),
radial-gradient(0.8px 0.8px at 60% 25%, rgba(255,255,255,0.3) 50%, transparent 100%),
radial-gradient(0.8px 0.8px at 78% 85%, rgba(255,255,255,0.4) 50%, transparent 100%),
radial-gradient(0.8px 0.8px at 95% 55%, rgba(255,255,255,0.3) 50%, transparent 100%),
radial-gradient(0.8px 0.8px at 35% 95%, rgba(255,255,255,0.35) 50%, transparent 100%),
radial-gradient(0.8px 0.8px at 65% 5%, rgba(255,255,255,0.3) 50%, transparent 100%);
animation: twinkle 6s ease-in-out 1s infinite alternate;
}
@keyframes twinkle {
0% { opacity: 0.6; }
100% { opacity: 1; }
}
/* ── 毛玻璃卡片 ── */
.register-card {
position: relative;
z-index: 1;
width: 100%;
max-width: 400px;
padding: 40px;
background: white;
border-radius: 16px;
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
max-width: 420px;
padding: 44px 40px 40px;
background: rgba(30, 41, 59, 0.55);
backdrop-filter: blur(16px);
-webkit-backdrop-filter: blur(16px);
border: 1px solid rgba(99, 102, 241, 0.2);
border-radius: var(--gg-radius-xl);
box-shadow:
0 8px 32px rgba(0, 0, 0, 0.4),
inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.title {
font-size: 28px;
font-weight: 700;
/* ── 头部品牌 ── */
.card-header {
text-align: center;
margin: 0 0 32px;
color: #333;
margin-bottom: 32px;
}
.brand {
margin: 0 0 8px;
}
.brand-text {
font-size: 32px;
font-weight: 800;
letter-spacing: -0.5px;
background: var(--gg-gradient);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}
.subtitle {
margin: 0;
font-size: 15px;
color: var(--gg-text-secondary);
font-weight: 400;
}
/* ── 表单 ── */
.register-form {
display: flex;
flex-direction: column;
gap: 20px;
gap: 18px;
}
.form-group {
@@ -155,59 +233,94 @@ function goToLogin() {
}
.form-group label {
font-size: 14px;
font-size: 13px;
font-weight: 500;
color: #555;
color: var(--gg-text-secondary);
letter-spacing: 0.02em;
}
.form-group input {
padding: 12px 16px;
border: 1px solid #ddd;
border-radius: 8px;
background: var(--gg-bg);
border: 1px solid var(--gg-border);
border-radius: var(--gg-radius-sm);
color: var(--gg-text);
font-size: 14px;
transition: border-color 0.2s;
transition: border-color 0.25s, box-shadow 0.25s;
}
.form-group input::placeholder {
color: var(--gg-text-muted);
}
.form-group input:focus {
outline: none;
border-color: #667eea;
border-color: var(--gg-primary);
box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
}
/* ── 提交按钮 ── */
.submit-btn {
position: relative;
padding: 14px;
margin-top: 4px;
border: none;
border-radius: 8px;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
border-radius: var(--gg-radius-sm);
background: var(--gg-gradient);
color: #fff;
font-size: 16px;
font-weight: 600;
cursor: pointer;
transition: opacity 0.2s;
transition: box-shadow 0.3s, transform 0.15s;
}
.submit-btn:hover:not(:disabled) {
opacity: 0.9;
box-shadow: 0 0 24px rgba(99, 102, 241, 0.45), 0 0 8px rgba(168, 85, 247, 0.3);
transform: translateY(-1px);
}
.submit-btn:active:not(:disabled) {
transform: translateY(0);
}
.submit-btn:disabled {
opacity: 0.6;
opacity: 0.55;
cursor: not-allowed;
}
.btn-loader {
display: inline-block;
width: 14px;
height: 14px;
margin-right: 8px;
border: 2px solid rgba(255,255,255,0.3);
border-top-color: #fff;
border-radius: 50%;
animation: spin 0.6s linear infinite;
vertical-align: middle;
}
@keyframes spin {
to { transform: rotate(360deg); }
}
/* ── 底部链接 ── */
.footer-links {
margin-top: 24px;
text-align: center;
font-size: 14px;
color: #666;
color: var(--gg-text-muted);
}
.footer-links a {
color: #667eea;
color: var(--gg-primary-light);
cursor: pointer;
font-weight: 500;
margin-left: 4px;
transition: color 0.2s;
}
.footer-links a:hover {
text-decoration: underline;
color: var(--gg-accent-light);
}
</style>