/* ============================================ 英雄联盟通行证 — 白灰简约风 ============================================ */ * { margin: 0; padding: 0; box-sizing: border-box; outline: none; } :root { --bg: #f0f2f5; --white: #ffffff; --gray-1: #f7f8fa; --gray-2: #eaecef; --gray-3: #c9cdd4; --gray-4: #86909c; --gray-5: #4e5969; --text: #1d2129; --text-sub: #86909c; --primary: #165dff; --primary-h: #4080ff; --primary-bg: #e8f0fe; --border: #e5e6eb; --border-focus:#165dff; --radius: 8px; --shadow: 0 4px 24px rgba(0,0,0,0.08); --shadow-sm: 0 2px 8px rgba(0,0,0,0.06); --trans: 0.18s ease; } /* login.css 不设置 body,由 style.css 统一控制 */ /* 登录层:铺满全屏,flex居中内容 */ #login-layer { width: 100%; height: 100%; flex: 1; min-height: 0; position: relative; z-index: 9999; overflow-y: auto; display: flex; flex-direction: column; align-items: center; justify-content: center; background: #eef1f8; } /* 主界面层:铺满全屏 */ #main-layer { width: 100%; height: 100%; flex: 1; min-height: 0; overflow: hidden; display: none; flex-direction: column; } /* ── 背景画布 ── */ #bg-canvas { position: absolute; inset: 0; z-index: 0; pointer-events: none; } .topbar, .card, .bottom-nav, #toast { position: relative; z-index: 10; } /* ── 主内容包裹 ── */ .page-wrap { display: flex; flex-direction: column; align-items: center; justify-content: center; flex: 1; padding-top: 0; padding-bottom: 10px; position: relative; z-index: 10; width: 100%; min-height: 100vh; } /* ── 顶部栏 ── */ .topbar { position: fixed; top: 0; left: 0; right: 0; height: 46px; background: var(--white); border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; padding: 0 18px; z-index: 100; user-select: none; } .topbar-left { display: flex; align-items: center; gap: 9px; } .topbar-logo { width: 24px; height: 24px; border-radius: 5px; object-fit: contain; display: block; flex-shrink: 0; } .topbar-title { font-size: 16px; font-weight: 700; color: var(--text); } .topbar-title em { font-style: italic; color: var(--primary); } .topbar-right { display: flex; gap: 2px; } .tb-btn { width: 30px; height: 26px; border: none; background: transparent; color: var(--text-sub); border-radius: 4px; cursor: pointer; font-size: 13px; display: flex; align-items: center; justify-content: center; transition: background var(--trans), color var(--trans); } .tb-btn:hover { background: var(--gray-1); color: var(--text); } .tb-btn.tb-close:hover { background: #fff0f0; color: #f53f3f; } /* ── 卡片 ── */ .card { width: min(400px, 92vw); background: var(--white); border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; display: none; animation: fadeUp .22s cubic-bezier(.4,0,.2,1); } .card.active { display: block; } @keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } } .card-head { padding: 26px 28px 20px; display: flex; align-items: center; gap: 14px; border-bottom: 1px solid var(--border); } .head-icon { width: 42px; height: 42px; border-radius: 10px; background: var(--primary-bg); display: flex; align-items: center; justify-content: center; flex-shrink: 0; } .head-icon svg { width: 20px; height: 20px; fill: var(--primary); } .head-info .h-name { font-size: 16px; font-weight: 700; color: var(--text); line-height: 1.3; } .head-info .h-desc { font-size: 12px; color: var(--text-sub); margin-top: 3px; } .card-body { padding: 22px 28px 26px; } .field { margin-bottom: 16px; } .field > label { display: block; font-size: 13px; font-weight: 500; color: var(--gray-5); margin-bottom: 7px; } .ipt-wrap { display: flex; align-items: center; height: 40px; background: var(--gray-1); border: 1.5px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: border-color var(--trans), background var(--trans), box-shadow var(--trans); } .ipt-wrap:focus-within { border-color: var(--border-focus); background: var(--white); box-shadow: 0 0 0 3px rgba(22,93,255,0.1); } .ipt-wrap .i-icon { padding: 0 8px 0 12px; display: flex; align-items: center; flex-shrink: 0; } .ipt-wrap .i-icon svg { width: 15px; height: 15px; fill: var(--gray-3); transition: fill var(--trans); } .ipt-wrap:focus-within .i-icon svg { fill: var(--primary); } .ipt-wrap input { flex: 1; height: 100%; border: none; background: transparent; outline: none; font-size: 13px; color: var(--text); padding-right: 12px; min-width: 0; } .ipt-wrap input::placeholder { color: var(--gray-3); font-size: 12px; } /* ── 协议行 ── */ .agree-row { display: flex; align-items: center; gap: 8px; margin-bottom: 18px; font-size: 12px; color: var(--text-sub); } .agree-row input[type=checkbox] { appearance: none; -webkit-appearance: none; width: 16px; height: 16px; border: 1.5px solid var(--gray-3); border-radius: 3px; background: var(--white); cursor: pointer; flex-shrink: 0; position: relative; transition: all var(--trans); } .agree-row input[type=checkbox]:checked { background: var(--primary); border-color: var(--primary); } .agree-row input[type=checkbox]:checked::after { content: ''; position: absolute; left: 4px; top: 1.5px; width: 5px; height: 9px; border: 2px solid #fff; border-top: none; border-left: none; transform: rotate(45deg); } .agree-row a { color: var(--primary); text-decoration: none; } .agree-row a:hover { text-decoration: underline; } /* ── 提示框 ── */ .hint-box { display: flex; align-items: flex-start; gap: 8px; background: #fffbe6; border: 1px solid #ffe58f; border-radius: var(--radius); padding: 10px 13px; margin-bottom: 18px; font-size: 12px; color: #7d5a00; line-height: 1.6; } .hint-box svg { width: 14px; height: 14px; fill: #faad14; flex-shrink: 0; margin-top: 1px; } /* ── 分隔线 ── */ .divider { height: 1px; background: var(--border); margin: 4px 0 18px; } /* ── 主按钮 ── */ .btn-main { width: 100%; height: 42px; background: var(--primary); color: #fff; border: none; border-radius: var(--radius); font-size: 15px; font-weight: 600; letter-spacing: 3px; cursor: pointer; transition: background var(--trans), transform var(--trans), box-shadow var(--trans); } .btn-main:hover { background: var(--primary-h); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(22,93,255,0.28); } .btn-main:active { background: var(--primary); transform: none; box-shadow: none; } .btn-main:disabled { opacity: 0.55; cursor: not-allowed; transform: none; box-shadow: none; } /* ── 底部导航 — 跟随卡片 ── */ .bottom-nav { width: min(400px, 92vw); display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 12px; color: var(--text-sub); margin-top: 14px; padding-bottom: 24px; user-select: none; position: relative; z-index: 10; flex-wrap: wrap; } .bottom-nav a { color: var(--primary); text-decoration: none; cursor: pointer; font-weight: 500; } .bottom-nav a:hover { text-decoration: underline; } .bottom-nav .sep { color: var(--gray-3); } /* ══════════════════════════════════════ Toast 通知系统 ══════════════════════════════════════ */ #toast-container { position: fixed; top: 58px; left: 50%; transform: translateX(-50%); z-index: 9999; display: flex; flex-direction: column; align-items: center; gap: 10px; pointer-events: none; width: auto; } .toast-item { display: inline-flex; align-items: center; gap: 10px; padding: 14px 20px 14px 14px; border-radius: 10px; font-size: 13px; font-weight: 500; border-left: 4px solid transparent; box-shadow: 0 6px 24px rgba(0,0,0,0.10), 0 2px 6px rgba(0,0,0,0.06); pointer-events: auto; position: relative; overflow: hidden; white-space: nowrap; background: #f0f6ff; border-color: var(--primary); color: #1240ab; } /* ── 进场:从右侧飞入 + 模糊清晰 + 弹性落位 ── */ @keyframes toastSlideIn { 0% { opacity: 0; transform: translateX(60px) translateY(-10px) scale(0.80) rotate(5deg); filter: blur(8px); } 50% { opacity: 1; transform: translateX(-8px) translateY(4px) scale(1.05) rotate(-0.6deg); filter: blur(0); } 68% { transform: translateX(4px) translateY(-2px) scale(0.98) rotate(0.2deg); } 82% { transform: translateX(-2px) translateY(1px) scale(1.01); } 100% { opacity: 1; transform: translateX(0) translateY(0) scale(1) rotate(0deg); filter: blur(0); } } /* 进场时光晕扫过 */ @keyframes toastShine { 0% { transform: translateX(-130%) skewX(-15deg); opacity: 0.8; } 100% { transform: translateX(230%) skewX(-15deg); opacity: 0; } } .toast-item.entering { animation: toastSlideIn 0.55s cubic-bezier(.22,.68,0,1.4) forwards; } .toast-item.entering::before { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 20%, rgba(255,255,255,0.55) 50%, transparent 80%); border-radius: inherit; pointer-events: none; animation: toastShine 0.55s ease 0.1s forwards; } /* ── 离场:慢慢上升淡出 ── */ @keyframes toastSlideOut { 0% { opacity: 1; transform: translateY(0) scale(1); max-height: 80px; } 40% { opacity: 0.6; transform: translateY(-8px) scale(0.97); } 100% { opacity: 0; transform: translateY(-22px) scale(0.91); max-height: 0; margin-bottom: -10px; } } .toast-item.leaving { animation: toastSlideOut 0.58s cubic-bezier(.4,0,.2,1) forwards; } /* ── 错误抖动 ── */ @keyframes toastShake { 0%,100% { transform: translateX(0); } 18% { transform: translateX(-8px); } 36% { transform: translateX(8px); } 54% { transform: translateX(-5px); } 72% { transform: translateX(5px); } } .toast-item.shake { animation: toastShake 0.40s ease; } /* 图标圆点 */ .toast-item .t-icon { width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 900; flex-shrink: 0; background: var(--primary); color: #fff; } /* 进度条 */ .toast-item .t-bar { position: absolute; bottom: 0; left: 0; height: 3px; width: 100%; background: var(--primary); transform-origin: left; border-radius: 0 0 6px 6px; } /* 错误 */ .toast-item.toast-error { background: #fff2f0; border-color: #ff4d4f; color: #a8071a; } .toast-item.toast-error .t-icon { background: #ff4d4f; } .toast-item.toast-error .t-bar { background: #ff4d4f; } /* 成功 */ .toast-item.toast-success { background: #f6ffed; border-color: #52c41a; color: #135200; } .toast-item.toast-success .t-icon { background: #52c41a; } .toast-item.toast-success .t-bar { background: #52c41a; } /* ══════════════════════════════════════ 协议弹窗 ══════════════════════════════════════ */ .modal-overlay { position: fixed; inset: 0; background: rgba(15,20,35,0); z-index: 2000; display: flex; align-items: center; justify-content: center; pointer-events: none; transition: background 0.25s ease; } .modal-overlay.show { background: rgba(15,20,35,0.55); pointer-events: auto; } .modal-overlay.hiding { background: rgba(15,20,35,0); transition: background 0.2s ease; } .modal-card { width: min(560px, 94vw); max-height: 78vh; background: var(--white); border-radius: 14px; box-shadow: 0 8px 40px rgba(0,0,0,0.22), 0 2px 8px rgba(0,0,0,0.10); display: flex; flex-direction: column; overflow: hidden; opacity: 0; transform: translateY(20px); transition: opacity 0.22s ease-out, transform 0.22s ease-out; } .modal-overlay.show .modal-card { opacity: 1; transform: translateY(0); } .modal-overlay.hiding .modal-card { opacity: 0; transform: translateY(12px); transition: opacity 0.18s ease, transform 0.18s ease; } .modal-top-bar { height: 3px; background: linear-gradient(90deg, var(--primary), #4080ff, #60a5fa); flex-shrink: 0; } .modal-head { padding: 20px 24px 16px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border); flex-shrink: 0; } .modal-head-left { display: flex; align-items: center; gap: 11px; } .modal-head-icon { width: 36px; height: 36px; border-radius: 8px; background: var(--primary-bg); display: flex; align-items: center; justify-content: center; flex-shrink: 0; } .modal-head-icon svg { width: 18px; height: 18px; fill: var(--primary); } .modal-head-title { font-size: 15px; font-weight: 700; color: var(--text); } .modal-head-sub { font-size: 11px; color: var(--text-sub); margin-top: 2px; } .modal-close { width: 30px; height: 30px; border: none; background: var(--gray-1); border-radius: 6px; cursor: pointer; font-size: 14px; color: var(--text-sub); display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: background var(--trans), color var(--trans); } .modal-close:hover { background: #fff0f0; color: #f53f3f; } .modal-body { padding: 20px 24px; overflow-y: auto; flex: 1; line-height: 1.85; font-size: 13px; color: var(--gray-5); scrollbar-width: thin; scrollbar-color: var(--gray-2) transparent; } .modal-body::-webkit-scrollbar { width: 5px; } .modal-body::-webkit-scrollbar-thumb { background: var(--gray-2); border-radius: 4px; } .modal-body h3 { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 12px; text-align: center; letter-spacing: 1px; } .modal-body p { margin-bottom: 12px; text-align: justify; } .modal-body .section-title { font-weight: 700; color: var(--primary); margin: 16px 0 6px; font-size: 13px; } .modal-foot { padding: 14px 24px; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; background: var(--gray-1); } .modal-foot-tip { font-size: 12px; color: var(--text-sub); } .modal-foot-tip span { color: var(--primary); font-weight: 600; } .btn-agree { height: 36px; padding: 0 24px; background: var(--primary); color: #fff; border: none; border-radius: var(--radius); font-size: 13px; font-weight: 600; cursor: pointer; letter-spacing: 1px; transition: background var(--trans), transform var(--trans), box-shadow var(--trans); } .btn-agree:hover { background: var(--primary-h); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(22,93,255,0.25); } .btn-agree:active { transform: none; } /* 登录页暗色主题 */ [data-theme="dark"] #login-layer { background: #0f1117; } [data-theme="dark"] .topbar { background: #1a1d27; border-bottom-color: #2e3347; } [data-theme="dark"] .card { background: #1e2130; box-shadow: 0 4px 24px rgba(0,0,0,0.3); } [data-theme="dark"] .card-head { border-bottom-color: #2e3347; } [data-theme="dark"] .head-info .h-name { color: #e8eaf0; } [data-theme="dark"] .head-info .h-desc { color: #8b92a8; } [data-theme="dark"] .field > label { color: #8b92a8; } [data-theme="dark"] .ipt-wrap { background: #252840; border-color: #2e3347; } [data-theme="dark"] .ipt-wrap input { color: #e8eaf0; } [data-theme="dark"] .ipt-wrap:focus-within { background: #2e3347; border-color: #4d8fff; } [data-theme="dark"] .divider { background: #2e3347; } [data-theme="dark"] .agree-row { color: #8b92a8; } [data-theme="dark"] .bottom-nav { color: #8b92a8; } /* 协议弹窗暗色主题 */ [data-theme="dark"] .modal-overlay.show { background: rgba(0,0,0,0.65); } [data-theme="dark"] .modal-card { background: #1e2130; box-shadow: 0 24px 80px rgba(0,0,0,0.5); } [data-theme="dark"] .modal-head { border-bottom-color: #2e3347; } [data-theme="dark"] .modal-head-title { color: #e8eaf0; } [data-theme="dark"] .modal-head-sub { color: #8b92a8; } [data-theme="dark"] .modal-head-icon { background: #252840; } [data-theme="dark"] .modal-close { background: #252840; color: #8b92a8; } [data-theme="dark"] .modal-close:hover { background: #3a1a1f; color: #ff7875; } [data-theme="dark"] .modal-body { color: #8b92a8; scrollbar-color: #2e3347 transparent; } [data-theme="dark"] .modal-body h3 { color: #e8eaf0; } [data-theme="dark"] .modal-body p { color: #8b92a8; } [data-theme="dark"] .modal-body strong { color: #e8eaf0; } [data-theme="dark"] .modal-body .section-title { color: #4d8fff; } [data-theme="dark"] .modal-foot { background: #252840; border-top-color: #2e3347; } [data-theme="dark"] .modal-foot-tip { color: #8b92a8; } /* ── 小窗口自适应 ── */ @media (max-width: 480px) { .card-body { padding: 16px 18px 20px; } .card-head { padding: 18px 18px 14px; } .ipt-wrap { height: 36px; } .btn-main { height: 38px; font-size: 14px; } .head-icon { width: 36px; height: 36px; } .head-info .h-name { font-size: 14px; } } @media (max-height: 600px) { .page-wrap { justify-content: flex-start; padding-top: 56px; } .card-head { padding: 14px 20px 10px; } .card-body { padding: 14px 20px 16px; } .field { margin-bottom: 10px; } } /* ── 登录页全局自适应 ── */ html, body { width: 100%; height: 100%; } @media (max-width: 480px) { .card { width: 96vw; } .bottom-nav { width: 96vw; font-size: 11px; } .card-body { padding: 14px 14px 18px; } .card-head { padding: 14px 14px 10px; gap: 10px; } .head-icon { width: 36px; height: 36px; } .btn-main { height: 38px; letter-spacing: 2px; font-size: 14px; } .ipt-wrap { height: 38px; } .modal-card { width: 96vw; } } @media (max-height: 580px) { .page-wrap { justify-content: flex-start; padding-top: 52px; padding-bottom: 6px; } .field { margin-bottom: 8px; } .card-head { padding: 10px 18px 8px; } .card-body { padding: 10px 18px 14px; } .divider { margin: 2px 0 10px; } }