diff --git a/css/index.css b/css/index.css index 8d3fc17..a560a93 100644 --- a/css/index.css +++ b/css/index.css @@ -76,17 +76,182 @@ color: #38BDF8; } -/* 首页登录按钮优化 */ -#index .btn-normal-light { - color: #E5E7EB; - background: rgba(15, 23, 42, 0.6); - border-color: rgba(148, 163, 184, 0.2); +/* ============================================ + Header 登录注册按钮重新设计 + ============================================ */ + +/* nav-right 按钮容器布局 */ +#index .nav-right { + display: flex; + align-items: center; + gap: 12px; } -#index .btn-normal-light:hover { - border-color: #38BDF8; +/* 文档、控制台按钮 */ +#index .nav-right .control { + color: #E5E7EB; + padding: 8px 16px; + font-size: 14px; + font-weight: 500; + transition: all 0.3s ease; + border-radius: 6px; +} + +#index .nav-right .control:hover { color: #38BDF8; - background: rgba(56, 189, 248, 0.1); + background: rgba(56, 189, 248, 0.08); +} + +/* 登录注册按钮容器 */ +#index .no-login { + display: flex; + align-items: center; + gap: 8px; + margin-left: 8px; +} + +/* 登录按钮 - 线框风格 */ +#index .btn-normal-light, +#index #loginBtn { + padding: 8px 20px; + font-size: 14px; + font-weight: 500; + color: #E5E7EB; + background: transparent; + border: 1px solid rgba(148, 163, 184, 0.3); + border-radius: 8px; + cursor: pointer; + transition: all 0.3s ease; + position: relative; + overflow: hidden; +} + +#index .btn-normal-light::before, +#index #loginBtn::before { + content: ''; + position: absolute; + top: 50%; + left: 50%; + width: 0; + height: 0; + border-radius: 50%; + background: rgba(56, 189, 248, 0.15); + transform: translate(-50%, -50%); + transition: width 0.6s ease, height 0.6s ease; +} + +#index .btn-normal-light:hover, +#index #loginBtn:hover { + border-color: rgba(56, 189, 248, 0.6); + color: #38BDF8; + box-shadow: 0 0 20px rgba(56, 189, 248, 0.2); + transform: translateY(-2px); +} + +#index .btn-normal-light:hover::before, +#index #loginBtn:hover::before { + width: 300px; + height: 300px; +} + +/* 注册按钮 - 渐变填充风格 */ +#index .btn-normal, +#index #registBtn { + padding: 8px 20px; + font-size: 14px; + font-weight: 600; + color: #ffffff; + background: linear-gradient(135deg, #38BDF8 0%, #6366F1 100%); + border: 1px solid transparent; + border-radius: 8px; + cursor: pointer; + transition: all 0.3s ease; + position: relative; + overflow: hidden; +} + +#index .btn-normal::before, +#index #registBtn::before { + content: ''; + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + background: linear-gradient(135deg, #6366F1 0%, #38BDF8 100%); + opacity: 0; + transition: opacity 0.3s ease; +} + +#index .btn-normal:hover, +#index #registBtn:hover { + box-shadow: + 0 6px 20px rgba(56, 189, 248, 0.4), + 0 0 30px rgba(56, 189, 248, 0.3); + transform: translateY(-2px); +} + +#index .btn-normal:hover::before, +#index #registBtn:hover::before { + opacity: 1; +} + +#index .btn-normal span, +#index #registBtn span { + position: relative; + z-index: 1; +} + +/* 已登录状态样式 */ +#index .login-in { + display: flex; + align-items: center; + gap: 8px; + padding: 6px 12px; + border-radius: 8px; + cursor: pointer; + transition: all 0.3s ease; + position: relative; +} + +#index .login-in:hover { + background: rgba(56, 189, 248, 0.08); +} + +#index .login-in .head-img { + width: 32px; + height: 32px; + border-radius: 50%; + background: linear-gradient(135deg, #38BDF8 0%, #6366F1 100%); + border: 2px solid rgba(148, 163, 184, 0.3); + transition: all 0.3s ease; +} + +#index .login-in:hover .head-img { + border-color: rgba(56, 189, 248, 0.6); + box-shadow: 0 0 15px rgba(56, 189, 248, 0.4); +} + +#index .login-in .name { + color: #E5E7EB; + font-size: 14px; + font-weight: 500; +} + +/* 响应式适配 */ +@media (max-width: 768px) { + #index .nav-right .control { + padding: 6px 12px; + font-size: 13px; + } + + #index .btn-normal-light, + #index #loginBtn, + #index .btn-normal, + #index #registBtn { + padding: 6px 16px; + font-size: 13px; + } } /* 首页下拉菜单优化 - 确保高层级 */