Spaces:
Running
Running
| /* ============================================ | |
| 智能垃圾分类系统 - 高级简约风格 v2 | |
| ============================================ */ | |
| /* ----- 变量 ----- */ | |
| :root { | |
| --bg-primary: #0a0a0f; | |
| --bg-card: rgba(255, 255, 255, 0.04); | |
| --bg-card-hover: rgba(255, 255, 255, 0.07); | |
| --glass-border: rgba(255, 255, 255, 0.06); | |
| --glass-border-hover: rgba(255, 255, 255, 0.12); | |
| --text-primary: #f0f0f2; | |
| --text-secondary: rgba(255, 255, 255, 0.55); | |
| --text-tertiary: rgba(255, 255, 255, 0.3); | |
| --color-blue: #5b9cf5; | |
| --color-red: #f56b6b; | |
| --color-green: #5bd68a; | |
| --color-gray: #8a8a9a; | |
| --accent: #5bd68a; | |
| --accent-glow: rgba(91, 214, 138, 0.2); | |
| --radius-sm: 10px; | |
| --radius-md: 16px; | |
| --radius-lg: 24px; | |
| --radius-xl: 32px; | |
| --shadow-card: 0 8px 40px rgba(0, 0, 0, 0.3); | |
| --shadow-glow: 0 0 60px var(--accent-glow); | |
| --font: 'Noto Sans SC', -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif; | |
| --ease-out: cubic-bezier(0.16, 1, 0.3, 1); | |
| --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1); | |
| --transition: 0.4s var(--ease-out); | |
| } | |
| /* ----- 基础重置 ----- */ | |
| *, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; } | |
| html { | |
| font-size: 16px; | |
| -webkit-text-size-adjust: 100%; | |
| -webkit-tap-highlight-color: transparent; | |
| } | |
| body { | |
| font-family: var(--font); | |
| background: var(--bg-primary); | |
| color: var(--text-primary); | |
| line-height: 1.6; | |
| min-height: 100vh; | |
| overflow-x: hidden; | |
| -webkit-font-smoothing: antialiased; | |
| -moz-osx-font-smoothing: grayscale; | |
| } | |
| /* ============================================ | |
| 背景装饰 | |
| ============================================ */ | |
| .bg-orb { | |
| position: fixed; | |
| border-radius: 50%; | |
| filter: blur(80px); | |
| pointer-events: none; | |
| z-index: 0; | |
| opacity: 0.3; | |
| } | |
| .bg-orb--1 { | |
| width: 400px; height: 400px; | |
| background: radial-gradient(circle, rgba(91, 214, 138, 0.15), transparent); | |
| top: -120px; right: -100px; | |
| animation: orbFloat 20s ease-in-out infinite; | |
| } | |
| .bg-orb--2 { | |
| width: 350px; height: 350px; | |
| background: radial-gradient(circle, rgba(91, 156, 245, 0.1), transparent); | |
| bottom: -80px; left: -120px; | |
| animation: orbFloat 25s ease-in-out infinite reverse; | |
| } | |
| .bg-orb--3 { | |
| width: 250px; height: 250px; | |
| background: radial-gradient(circle, rgba(245, 107, 107, 0.06), transparent); | |
| top: 50%; left: 50%; | |
| transform: translate(-50%, -50%); | |
| animation: orbFloat 18s ease-in-out infinite 5s; | |
| } | |
| @keyframes orbFloat { | |
| 0%, 100% { transform: translate(0, 0) scale(1); } | |
| 33% { transform: translate(30px, -30px) scale(1.05); } | |
| 66% { transform: translate(-20px, 20px) scale(0.95); } | |
| } | |
| .bg-noise { | |
| position: fixed; | |
| inset: 0; | |
| z-index: 0; | |
| opacity: 0.03; | |
| background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); | |
| background-repeat: repeat; | |
| background-size: 256px 256px; | |
| pointer-events: none; | |
| } | |
| /* ============================================ | |
| App 容器 | |
| ============================================ */ | |
| .app-container { | |
| max-width: 420px; | |
| margin: 0 auto; | |
| min-height: 100vh; | |
| min-height: 100dvh; | |
| display: flex; | |
| flex-direction: column; | |
| position: relative; | |
| z-index: 1; | |
| padding: 0 16px; | |
| } | |
| /* ============================================ | |
| 头部 | |
| ============================================ */ | |
| .app-header { | |
| padding: 48px 0 8px; | |
| position: relative; | |
| } | |
| .header-content { | |
| display: flex; | |
| align-items: center; | |
| gap: 14px; | |
| } | |
| .header-icon { | |
| width: 44px; | |
| height: 44px; | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| border-radius: 14px; | |
| background: var(--bg-card); | |
| border: 1px solid var(--glass-border); | |
| color: var(--accent); | |
| } | |
| .header-icon svg { width: 22px; height: 22px; } | |
| .header-text h1 { | |
| font-size: 1.35rem; | |
| font-weight: 700; | |
| letter-spacing: -0.3px; | |
| line-height: 1.2; | |
| } | |
| .header-subtitle { | |
| font-size: 0.8rem; | |
| color: var(--text-secondary); | |
| margin-top: 2px; | |
| font-weight: 400; | |
| letter-spacing: 0.3px; | |
| } | |
| /* ============================================ | |
| 主内容 | |
| ============================================ */ | |
| .main-content { | |
| flex: 1; | |
| padding: 20px 0 80px; | |
| display: flex; | |
| flex-direction: column; | |
| gap: 16px; | |
| } | |
| /* ============================================ | |
| 上传区 | |
| ============================================ */ | |
| .upload-section { | |
| background: var(--bg-card); | |
| border: 1px solid var(--glass-border); | |
| border-radius: var(--radius-xl); | |
| backdrop-filter: blur(20px); | |
| -webkit-backdrop-filter: blur(20px); | |
| overflow: hidden; | |
| transition: var(--transition); | |
| } | |
| .upload-section:has(.dragover) { | |
| border-color: var(--accent); | |
| box-shadow: var(--shadow-glow); | |
| } | |
| .upload-area { | |
| padding: 24px 20px 20px; | |
| display: flex; | |
| flex-direction: column; | |
| gap: 14px; | |
| } | |
| /* 占位 */ | |
| .upload-placeholder { | |
| width: 100%; | |
| min-height: 160px; | |
| border-radius: var(--radius-md); | |
| display: flex; | |
| flex-direction: column; | |
| align-items: center; | |
| justify-content: center; | |
| gap: 12px; | |
| cursor: pointer; | |
| transition: var(--transition); | |
| padding: 28px 20px; | |
| background: rgba(255,255,255,0.02); | |
| border: 1.5px dashed rgba(255,255,255,0.08); | |
| position: relative; | |
| overflow: hidden; | |
| } | |
| .upload-placeholder::before { | |
| content: ''; | |
| position: absolute; | |
| inset: 0; | |
| background: radial-gradient(600px circle at var(--mx, 50%) var(--my, 50%), rgba(91,214,138,0.06), transparent); | |
| opacity: 0; | |
| transition: opacity 0.4s; | |
| } | |
| .upload-placeholder:hover::before, | |
| .upload-placeholder.dragover::before { opacity: 1; } | |
| .upload-placeholder:hover, | |
| .upload-placeholder.dragover { | |
| border-color: rgba(91,214,138,0.3); | |
| background: rgba(255,255,255,0.03); | |
| } | |
| .upload-icon { | |
| width: 52px; height: 52px; | |
| color: var(--text-secondary); | |
| transition: var(--transition); | |
| } | |
| .upload-icon svg { width: 100%; height: 100%; } | |
| .upload-placeholder.dragover .upload-icon { | |
| color: var(--accent); | |
| transform: scale(1.08); | |
| } | |
| .upload-text { | |
| display: flex; | |
| flex-direction: column; | |
| align-items: center; | |
| gap: 4px; | |
| } | |
| .upload-title { | |
| font-size: 0.95rem; | |
| font-weight: 500; | |
| color: var(--text-primary); | |
| letter-spacing: 0.5px; | |
| } | |
| .upload-hint { | |
| font-size: 0.78rem; | |
| color: var(--text-tertiary); | |
| } | |
| /* 预览 */ | |
| .upload-preview { | |
| width: 100%; | |
| position: relative; | |
| border-radius: var(--radius-md); | |
| overflow: hidden; | |
| background: #000; | |
| max-height: 280px; | |
| } | |
| .upload-preview img { | |
| width: 100%; | |
| height: auto; | |
| display: block; | |
| max-height: 280px; | |
| object-fit: contain; | |
| } | |
| .btn-remove { | |
| position: absolute; | |
| top: 10px; right: 10px; | |
| width: 34px; height: 34px; | |
| border-radius: 50%; | |
| border: none; | |
| background: rgba(0,0,0,0.5); | |
| color: #fff; | |
| cursor: pointer; | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| transition: var(--transition); | |
| backdrop-filter: blur(8px); | |
| -webkit-backdrop-filter: blur(8px); | |
| } | |
| .btn-remove:active { transform: scale(0.9); } | |
| .btn-remove svg { width: 16px; height: 16px; } | |
| /* 操作按钮组 */ | |
| .upload-actions { | |
| display: grid; | |
| grid-template-columns: 1fr 1fr; | |
| gap: 10px; | |
| } | |
| .btn-action { | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| gap: 8px; | |
| padding: 12px; | |
| border-radius: var(--radius-sm); | |
| border: 1px solid var(--glass-border); | |
| background: var(--bg-card); | |
| color: var(--text-secondary); | |
| font-size: 0.85rem; | |
| font-weight: 500; | |
| cursor: pointer; | |
| transition: var(--transition); | |
| font-family: var(--font); | |
| position: relative; | |
| overflow: hidden; | |
| } | |
| .btn-action:hover { | |
| border-color: var(--glass-border-hover); | |
| color: var(--text-primary); | |
| background: var(--bg-card-hover); | |
| } | |
| .btn-action:active { transform: scale(0.97); } | |
| .btn-action-icon { | |
| width: 18px; height: 18px; | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| } | |
| .btn-action-icon svg { width: 100%; height: 100%; } | |
| /* 提交按钮 */ | |
| .btn-submit { | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| gap: 8px; | |
| width: 100%; | |
| padding: 14px 24px; | |
| border: none; | |
| border-radius: var(--radius-sm); | |
| background: linear-gradient(135deg, #2d8a4e, #1a6b3a); | |
| color: #fff; | |
| font-size: 0.95rem; | |
| font-weight: 600; | |
| cursor: pointer; | |
| transition: var(--transition); | |
| font-family: var(--font); | |
| position: relative; | |
| overflow: hidden; | |
| opacity: 0.35; | |
| transform: translateY(0); | |
| } | |
| .btn-submit:not(:disabled) { | |
| opacity: 1; | |
| box-shadow: 0 4px 20px rgba(45, 138, 78, 0.3); | |
| } | |
| .btn-submit:not(:disabled):hover { | |
| box-shadow: 0 6px 30px rgba(45, 138, 78, 0.4); | |
| transform: translateY(-1px); | |
| } | |
| .btn-submit:not(:disabled):active { transform: translateY(0) scale(0.98); } | |
| .btn-submit:disabled { cursor: not-allowed; } | |
| .btn-submit-icon { | |
| width: 18px; height: 18px; | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| transition: transform 0.3s var(--ease-out); | |
| } | |
| .btn-submit:not(:disabled):hover .btn-submit-icon { | |
| transform: translateX(3px); | |
| } | |
| .btn-submit-icon svg { width: 100%; height: 100%; } | |
| /* ============================================ | |
| 加载状态 | |
| ============================================ */ | |
| .loading-section { | |
| display: flex; | |
| flex-direction: column; | |
| align-items: center; | |
| padding: 48px 20px; | |
| gap: 20px; | |
| animation: fadeIn 0.4s var(--ease-out); | |
| } | |
| .loader-ring { | |
| width: 56px; height: 56px; | |
| position: relative; | |
| } | |
| .loader-ring-segment { | |
| width: 100%; height: 100%; | |
| border: 3px solid transparent; | |
| border-top-color: var(--accent); | |
| border-right-color: rgba(91, 214, 138, 0.3); | |
| border-radius: 50%; | |
| animation: spin 0.8s linear infinite; | |
| } | |
| @keyframes spin { to { transform: rotate(360deg); } } | |
| .loader-text { | |
| text-align: center; | |
| display: flex; | |
| flex-direction: column; | |
| gap: 4px; | |
| } | |
| .loading-title { | |
| font-size: 1rem; | |
| font-weight: 600; | |
| color: var(--text-primary); | |
| } | |
| .loading-subtitle { | |
| font-size: 0.82rem; | |
| color: var(--text-secondary); | |
| } | |
| .loading-steps { | |
| display: flex; | |
| gap: 20px; | |
| margin-top: 8px; | |
| } | |
| .loading-step { | |
| display: flex; | |
| flex-direction: column; | |
| align-items: center; | |
| gap: 6px; | |
| opacity: 0.3; | |
| animation: stepPulse 2s ease-in-out infinite; | |
| animation-delay: calc(var(--i, 0) * 0.6s); | |
| } | |
| .step-dot { | |
| width: 6px; height: 6px; | |
| border-radius: 50%; | |
| background: var(--accent); | |
| } | |
| .loading-step span { | |
| font-size: 0.7rem; | |
| color: var(--text-secondary); | |
| white-space: nowrap; | |
| } | |
| @keyframes stepPulse { | |
| 0%, 100% { opacity: 0.3; transform: scale(0.95); } | |
| 50% { opacity: 1; transform: scale(1); } | |
| } | |
| /* ============================================ | |
| 结果卡片 | |
| ============================================ */ | |
| .result-section { | |
| display: flex; | |
| flex-direction: column; | |
| gap: 14px; | |
| animation: resultIn 0.6s var(--ease-out); | |
| } | |
| @keyframes resultIn { | |
| 0% { opacity: 0; transform: translateY(24px) scale(0.96); } | |
| 100% { opacity: 1; transform: translateY(0) scale(1); } | |
| } | |
| .result-card { | |
| background: var(--bg-card); | |
| border: 1px solid var(--glass-border); | |
| border-radius: var(--radius-xl); | |
| backdrop-filter: blur(20px); | |
| -webkit-backdrop-filter: blur(20px); | |
| overflow: hidden; | |
| box-shadow: var(--shadow-card); | |
| } | |
| /* 顶部彩条 */ | |
| .result-accent { | |
| height: 4px; | |
| transition: background 0.5s var(--ease-out); | |
| } | |
| .bg-blue .result-accent { background: var(--color-blue); } | |
| .bg-red .result-accent { background: var(--color-red); } | |
| .bg-green .result-accent { background: var(--color-green); } | |
| .bg-gray .result-accent { background: var(--color-gray); } | |
| /* 分类徽章 */ | |
| .result-badge { | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| gap: 10px; | |
| padding: 20px 20px 16px; | |
| position: relative; | |
| } | |
| .badge-glow { | |
| position: absolute; | |
| width: 80px; height: 80px; | |
| border-radius: 50%; | |
| opacity: 0.15; | |
| transition: background 0.5s var(--ease-out); | |
| animation: badgePulse 2s ease-in-out infinite; | |
| } | |
| .bg-blue .badge-glow { background: var(--color-blue); } | |
| .bg-red .badge-glow { background: var(--color-red); } | |
| .bg-green .badge-glow { background: var(--color-green); } | |
| .bg-gray .badge-glow { background: var(--color-gray); } | |
| @keyframes badgePulse { | |
| 0%, 100% { transform: scale(1); opacity: 0.15; } | |
| 50% { transform: scale(1.2); opacity: 0.25; } | |
| } | |
| .badge-icon { | |
| font-size: 1.6rem; | |
| position: relative; | |
| z-index: 1; | |
| animation: iconBounce 0.6s var(--ease-spring) 0.2s both; | |
| } | |
| @keyframes iconBounce { | |
| 0% { transform: scale(0); } | |
| 60% { transform: scale(1.2); } | |
| 100% { transform: scale(1); } | |
| } | |
| .badge-text { | |
| font-size: 1.15rem; | |
| font-weight: 700; | |
| letter-spacing: 1px; | |
| position: relative; | |
| z-index: 1; | |
| } | |
| .bg-blue .badge-text { color: var(--color-blue); } | |
| .bg-red .badge-text { color: var(--color-red); } | |
| .bg-green .badge-text { color: var(--color-green); } | |
| .bg-gray .badge-text { color: var(--color-gray); } | |
| /* 🔍 物品识别 */ | |
| .identify-section { | |
| display: none; | |
| flex-direction: column; | |
| padding: 4px 20px 8px; | |
| gap: 8px; | |
| animation: fadeIn 0.4s var(--ease-out) 0.15s both; | |
| } | |
| .identify-divider-top, | |
| .identify-divider-bottom { | |
| height: 1px; | |
| background: linear-gradient(90deg, transparent, rgba(255,255,255,0.06), transparent); | |
| } | |
| .identify-header { | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| gap: 6px; | |
| } | |
| .identify-badge-icon { | |
| font-size: 0.85rem; | |
| } | |
| .identify-title { | |
| font-size: 0.75rem; | |
| color: var(--text-tertiary); | |
| letter-spacing: 2px; | |
| text-transform: uppercase; | |
| font-weight: 500; | |
| } | |
| .identify-result { | |
| display: flex; | |
| flex-direction: column; | |
| align-items: center; | |
| gap: 4px; | |
| padding: 6px 0 2px; | |
| } | |
| .identify-label { | |
| font-size: 0.72rem; | |
| color: var(--text-tertiary); | |
| letter-spacing: 1px; | |
| } | |
| .identify-name-wrap { | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| gap: 6px; | |
| max-width: 100%; | |
| } | |
| .identify-icon-display { | |
| font-size: 1.3rem; | |
| animation: iconBounce 0.6s var(--ease-spring) 0.25s both; | |
| } | |
| .identify-name { | |
| font-size: 1.1rem; | |
| font-weight: 700; | |
| color: var(--text-primary); | |
| letter-spacing: 0.5px; | |
| } | |
| .identify-confidence-wrap { | |
| display: flex; | |
| align-items: center; | |
| gap: 4px; | |
| } | |
| .identify-confidence-label { | |
| font-size: 0.68rem; | |
| color: var(--text-tertiary); | |
| } | |
| .identify-confidence { | |
| font-size: 0.8rem; | |
| font-weight: 600; | |
| transition: color 0.3s var(--ease-out); | |
| } | |
| /* 垃圾桶视觉 */ | |
| .bin-section { | |
| padding: 4px 20px 20px; | |
| display: flex; | |
| flex-direction: column; | |
| align-items: center; | |
| gap: 16px; | |
| } | |
| .bin-can { | |
| display: flex; | |
| flex-direction: column; | |
| align-items: center; | |
| } | |
| .bin-can-body { | |
| width: 72px; height: 100px; | |
| border-radius: 8px 8px 4px 4px; | |
| position: relative; | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| transition: background 0.5s var(--ease-out); | |
| animation: binDrop 0.6s var(--ease-spring) 0.3s both; | |
| } | |
| @keyframes binDrop { | |
| 0% { transform: translateY(-30px) scaleY(0.8); opacity: 0; } | |
| 100% { transform: translateY(0) scaleY(1); opacity: 1; } | |
| } | |
| .bin-can-lid { | |
| position: absolute; | |
| top: -5px; left: -4px; right: -4px; | |
| height: 14px; | |
| border-radius: 4px; | |
| background: inherit; | |
| filter: brightness(0.8); | |
| animation: lidSlide 0.5s var(--ease-spring) 0.5s both; | |
| } | |
| @keyframes lidSlide { | |
| 0% { transform: translateY(-10px) rotate(-5deg); opacity: 0; } | |
| 100% { transform: translateY(0) rotate(0); opacity: 1; } | |
| } | |
| .bin-can-label { | |
| color: #fff; | |
| font-size: 0.7rem; | |
| font-weight: 700; | |
| text-align: center; | |
| padding: 2px 6px; | |
| line-height: 1.2; | |
| } | |
| .bin-can-shadow { | |
| width: 60px; height: 6px; | |
| background: rgba(0,0,0,0.2); | |
| border-radius: 50%; | |
| margin-top: 4px; | |
| filter: blur(4px); | |
| animation: shadowGrow 0.5s var(--ease-out) 0.3s both; | |
| } | |
| @keyframes shadowGrow { | |
| 0% { transform: scaleX(0.5); opacity: 0; } | |
| 100% { transform: scaleX(1); opacity: 1; } | |
| } | |
| /* 垃圾桶颜色 */ | |
| .bg-blue .bin-can-body { background: var(--color-blue); } | |
| .bg-red .bin-can-body { background: var(--color-red); } | |
| .bg-green .bin-can-body { background: var(--color-green); } | |
| .bg-gray .bin-can-body { background: var(--color-gray); } | |
| /* 详情文字 */ | |
| .bin-details { | |
| width: 100%; | |
| display: flex; | |
| flex-direction: column; | |
| gap: 10px; | |
| animation: fadeIn 0.5s var(--ease-out) 0.4s both; | |
| } | |
| .bin-desc { | |
| font-size: 0.85rem; | |
| color: var(--text-secondary); | |
| text-align: center; | |
| line-height: 1.5; | |
| } | |
| .bin-examples { | |
| display: flex; | |
| flex-direction: column; | |
| align-items: center; | |
| gap: 2px; | |
| } | |
| .examples-label { | |
| font-size: 0.72rem; | |
| color: var(--text-tertiary); | |
| letter-spacing: 1px; | |
| text-transform: uppercase; | |
| } | |
| .examples-text { | |
| font-size: 0.82rem; | |
| color: var(--text-secondary); | |
| text-align: center; | |
| } | |
| .bin-tip { | |
| display: flex; | |
| align-items: center; | |
| gap: 8px; | |
| padding: 10px 14px; | |
| background: rgba(255, 255, 255, 0.03); | |
| border-radius: var(--radius-sm); | |
| border: 1px solid rgba(255,255,255,0.04); | |
| margin-top: 4px; | |
| } | |
| .tip-icon { | |
| width: 16px; height: 16px; | |
| color: var(--text-tertiary); | |
| flex-shrink: 0; | |
| } | |
| .tip-icon svg { width: 100%; height: 100%; } | |
| .tip-text { | |
| font-size: 0.78rem; | |
| color: var(--text-secondary); | |
| flex: 1; | |
| } | |
| /* 检测详情 */ | |
| .detail-section { | |
| padding: 16px 20px; | |
| border-top: 1px solid rgba(255,255,255,0.04); | |
| display: flex; | |
| flex-direction: column; | |
| gap: 12px; | |
| animation: fadeIn 0.5s var(--ease-out) 0.5s both; | |
| } | |
| .detail-row { | |
| display: flex; | |
| justify-content: space-between; | |
| align-items: center; | |
| } | |
| .detail-label { | |
| font-size: 0.82rem; | |
| color: var(--text-tertiary); | |
| } | |
| .detail-value { | |
| font-size: 0.9rem; | |
| font-weight: 600; | |
| color: var(--text-primary); | |
| } | |
| .detail-divider { | |
| height: 1px; | |
| background: rgba(255,255,255,0.04); | |
| } | |
| /* 其他可能分类 */ | |
| .other-section { | |
| padding: 16px 20px 20px; | |
| border-top: 1px solid rgba(255,255,255,0.04); | |
| animation: fadeIn 0.5s var(--ease-out) 0.6s both; | |
| } | |
| .other-header { | |
| display: flex; | |
| align-items: center; | |
| justify-content: space-between; | |
| margin-bottom: 10px; | |
| } | |
| .other-title { | |
| font-size: 0.82rem; | |
| color: var(--text-tertiary); | |
| } | |
| .other-badge { | |
| font-size: 0.68rem; | |
| padding: 2px 8px; | |
| border-radius: 20px; | |
| background: rgba(255,255,255,0.04); | |
| color: var(--text-tertiary); | |
| border: 1px solid rgba(255,255,255,0.04); | |
| } | |
| .prediction-list { | |
| display: flex; | |
| flex-direction: column; | |
| gap: 8px; | |
| } | |
| .prediction-item { | |
| display: flex; | |
| align-items: center; | |
| gap: 10px; | |
| animation: fadeIn 0.4s var(--ease-out) both; | |
| } | |
| .prediction-label { | |
| font-size: 0.8rem; | |
| color: var(--text-secondary); | |
| min-width: 64px; | |
| flex-shrink: 0; | |
| } | |
| .prediction-bar { | |
| flex: 1; | |
| height: 4px; | |
| background: rgba(255,255,255,0.05); | |
| border-radius: 2px; | |
| overflow: hidden; | |
| } | |
| .prediction-bar-fill { | |
| height: 100%; | |
| border-radius: 2px; | |
| background: linear-gradient(90deg, rgba(91,214,138,0.4), var(--accent)); | |
| width: 0%; | |
| transition: width 1s var(--ease-out); | |
| } | |
| .prediction-score { | |
| font-size: 0.8rem; | |
| font-weight: 600; | |
| color: var(--text-secondary); | |
| min-width: 40px; | |
| text-align: right; | |
| } | |
| /* 重新识别按钮 */ | |
| .btn-retry { | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| gap: 8px; | |
| width: 100%; | |
| padding: 14px 24px; | |
| border-radius: var(--radius-sm); | |
| border: 1px solid var(--glass-border); | |
| background: var(--bg-card); | |
| color: var(--text-secondary); | |
| font-size: 0.9rem; | |
| font-weight: 500; | |
| cursor: pointer; | |
| transition: var(--transition); | |
| font-family: var(--font); | |
| position: relative; | |
| overflow: hidden; | |
| backdrop-filter: blur(20px); | |
| -webkit-backdrop-filter: blur(20px); | |
| } | |
| .btn-retry:hover { | |
| border-color: var(--glass-border-hover); | |
| color: var(--text-primary); | |
| background: var(--bg-card-hover); | |
| } | |
| .btn-retry:active { transform: scale(0.98); } | |
| .retry-icon { | |
| width: 16px; height: 16px; | |
| transition: transform 0.3s var(--ease-out); | |
| } | |
| .btn-retry:hover .retry-icon { transform: rotate(-90deg); } | |
| /* ============================================ | |
| 错误状态 | |
| ============================================ */ | |
| .error-section { | |
| animation: fadeIn 0.3s var(--ease-out); | |
| } | |
| .error-card { | |
| background: var(--bg-card); | |
| border: 1px solid rgba(245, 107, 107, 0.15); | |
| border-radius: var(--radius-xl); | |
| backdrop-filter: blur(20px); | |
| -webkit-backdrop-filter: blur(20px); | |
| padding: 40px 24px; | |
| display: flex; | |
| flex-direction: column; | |
| align-items: center; | |
| gap: 12px; | |
| text-align: center; | |
| box-shadow: var(--shadow-card); | |
| } | |
| .error-icon { | |
| width: 48px; height: 48px; | |
| color: var(--color-red); | |
| opacity: 0.7; | |
| } | |
| .error-icon svg { width: 100%; height: 100%; } | |
| .error-title { | |
| font-size: 1.05rem; | |
| font-weight: 600; | |
| color: var(--color-red); | |
| } | |
| .error-detail { | |
| font-size: 0.85rem; | |
| color: var(--text-secondary); | |
| margin-bottom: 8px; | |
| } | |
| /* ============================================ | |
| 分类指南 | |
| ============================================ */ | |
| .guide-section { | |
| background: var(--bg-card); | |
| border: 1px solid var(--glass-border); | |
| border-radius: var(--radius-xl); | |
| backdrop-filter: blur(20px); | |
| -webkit-backdrop-filter: blur(20px); | |
| padding: 20px; | |
| transition: var(--transition); | |
| } | |
| .guide-header { | |
| display: flex; | |
| align-items: center; | |
| justify-content: space-between; | |
| margin-bottom: 16px; | |
| } | |
| .guide-section-title { | |
| font-size: 0.9rem; | |
| font-weight: 600; | |
| color: var(--text-primary); | |
| } | |
| .guide-badge { | |
| font-size: 0.65rem; | |
| padding: 2px 8px; | |
| border-radius: 20px; | |
| background: rgba(255,255,255,0.04); | |
| color: var(--text-tertiary); | |
| border: 1px solid rgba(255,255,255,0.04); | |
| } | |
| .guide-grid { | |
| display: grid; | |
| grid-template-columns: 1fr 1fr; | |
| gap: 8px; | |
| } | |
| .guide-card { | |
| display: flex; | |
| flex-direction: column; | |
| gap: 10px; | |
| padding: 14px; | |
| border-radius: var(--radius-sm); | |
| background: rgba(255,255,255,0.02); | |
| border: 1px solid rgba(255,255,255,0.04); | |
| transition: var(--transition); | |
| position: relative; | |
| overflow: hidden; | |
| } | |
| .guide-card:hover { | |
| background: var(--bg-card-hover); | |
| transform: translateY(-2px); | |
| } | |
| .guide-card-accent { | |
| position: absolute; | |
| top: 0; left: 0; right: 0; | |
| height: 2px; | |
| transition: background 0.3s; | |
| } | |
| .guide-card[data-color="blue"] .guide-card-accent { background: var(--color-blue); } | |
| .guide-card[data-color="red"] .guide-card-accent { background: var(--color-red); } | |
| .guide-card[data-color="green"] .guide-card-accent { background: var(--color-green); } | |
| .guide-card[data-color="gray"] .guide-card-accent { background: var(--color-gray); } | |
| .guide-icon-wrap { | |
| font-size: 1.2rem; | |
| line-height: 1; | |
| } | |
| .guide-body h3 { | |
| font-size: 0.82rem; | |
| font-weight: 600; | |
| color: var(--text-primary); | |
| margin-bottom: 2px; | |
| } | |
| .guide-card[data-color="blue"] .guide-body h3 { color: var(--color-blue); } | |
| .guide-card[data-color="red"] .guide-body h3 { color: var(--color-red); } | |
| .guide-card[data-color="green"] .guide-body h3 { color: var(--color-green); } | |
| .guide-card[data-color="gray"] .guide-body h3 { color: var(--color-gray); } | |
| .guide-body p { | |
| font-size: 0.7rem; | |
| color: var(--text-tertiary); | |
| line-height: 1.4; | |
| } | |
| /* ============================================ | |
| 底部 | |
| ============================================ */ | |
| .app-footer { | |
| text-align: center; | |
| padding: 20px 0 32px; | |
| display: flex; | |
| flex-direction: column; | |
| align-items: center; | |
| gap: 10px; | |
| } | |
| .footer-line { | |
| width: 40px; height: 1px; | |
| background: rgba(255,255,255,0.08); | |
| } | |
| .app-footer p { | |
| font-size: 0.72rem; | |
| color: var(--text-tertiary); | |
| letter-spacing: 1px; | |
| } | |
| /* ============================================ | |
| 涟漪效果 | |
| ============================================ */ | |
| .ripple-container { | |
| position: fixed; | |
| inset: 0; | |
| pointer-events: none; | |
| z-index: 999; | |
| } | |
| .ripple-effect { | |
| position: absolute; | |
| border-radius: 50%; | |
| background: rgba(255,255,255,0.15); | |
| transform: scale(0); | |
| animation: rippleAnim 0.6s ease-out forwards; | |
| pointer-events: none; | |
| } | |
| @keyframes rippleAnim { | |
| to { transform: scale(4); opacity: 0; } | |
| } | |
| /* ============================================ | |
| 通用动画 | |
| ============================================ */ | |
| @keyframes fadeIn { | |
| from { opacity: 0; } | |
| to { opacity: 1; } | |
| } | |
| /* ============================================ | |
| 响应式适配 | |
| ============================================ */ | |
| @media (min-width: 480px) { | |
| .app-container { padding: 0 20px; } | |
| .app-header { padding-top: 56px; } | |
| } | |
| @media (min-width: 768px) { | |
| .app-container { max-width: 480px; padding: 0; } | |
| .guide-grid { grid-template-columns: repeat(4, 1fr); } | |
| } | |
| /* ============================================ | |
| 暗色模式(原生就是暗色,仅适配亮色系统) | |
| ============================================ */ | |
| @media (prefers-color-scheme: light) { | |
| :root { | |
| --bg-primary: #f5f5f7; | |
| --bg-card: rgba(255,255,255,0.7); | |
| --bg-card-hover: rgba(255,255,255,0.85); | |
| --glass-border: rgba(0,0,0,0.06); | |
| --glass-border-hover: rgba(0,0,0,0.12); | |
| --text-primary: #1a1a2e; | |
| --text-secondary: rgba(0,0,0,0.55); | |
| --text-tertiary: rgba(0,0,0,0.28); | |
| --shadow-card: 0 8px 40px rgba(0,0,0,0.06); | |
| --bg-orb-linear: linear-gradient(135deg, #e8f5e9, #e3f2fd); | |
| } | |
| .bg-orb { opacity: 0.15; } | |
| .bg-orb--1 { background: radial-gradient(circle, rgba(91,214,138,0.12), transparent); } | |
| .bg-orb--2 { background: radial-gradient(circle, rgba(91,156,245,0.08), transparent); } | |
| .upload-placeholder { border-color: rgba(0,0,0,0.08); } | |
| .guide-card { background: rgba(0,0,0,0.02); border-color: rgba(0,0,0,0.04); } | |
| .guide-card:hover { background: rgba(0,0,0,0.04); } | |
| .bin-tip { background: rgba(0,0,0,0.02); border-color: rgba(0,0,0,0.04); } | |
| .ripple-effect { background: rgba(0,0,0,0.1); } | |
| } | |
| /* 工具类 */ | |
| .hidden { display: none ; } | |
| /* ============================================ | |
| 垃圾 DNA 知识卡片 | |
| ============================================ */ | |
| .dna-section { | |
| margin-top: 16px; | |
| padding: 0 16px 4px; | |
| animation: dnaSlideUp 0.5s ease-out; | |
| } | |
| .dna-card { | |
| background: rgba(255,255,255,0.04); | |
| border: 1px solid rgba(255,255,255,0.06); | |
| border-radius: 16px; | |
| overflow: hidden; | |
| backdrop-filter: blur(8px); | |
| -webkit-backdrop-filter: blur(8px); | |
| } | |
| .dna-header { | |
| display: flex; align-items: center; gap: 8px; | |
| padding: 14px 16px; | |
| background: rgba(255,255,255,0.03); | |
| border-bottom: 1px solid rgba(255,255,255,0.05); | |
| } | |
| .dna-icon { font-size: 1.1rem; line-height: 1; } | |
| .dna-title { | |
| font-size: 0.85rem; font-weight: 600; color: var(--text-primary); | |
| letter-spacing: 0.02em; | |
| } | |
| .dna-badge { | |
| margin-left: auto; | |
| font-size: 0.65rem; color: rgba(255,255,255,0.4); | |
| background: rgba(255,255,255,0.06); | |
| padding: 2px 8px; border-radius: 20px; white-space: nowrap; | |
| } | |
| .dna-body { padding: 10px 16px 16px; } | |
| .dna-row { | |
| display: flex; gap: 10px; | |
| padding: 8px 0; | |
| border-bottom: 1px solid rgba(255,255,255,0.03); | |
| animation: dnaFadeIn 0.5s ease-out both; | |
| } | |
| .dna-row:last-child { border-bottom: none; } | |
| .dna-row-icon { | |
| width: 24px; font-size: 0.95rem; flex-shrink: 0; | |
| text-align: center; padding-top: 1px; | |
| } | |
| .dna-row-content { flex: 1; min-width: 0; } | |
| .dna-row-label { | |
| font-size: 0.7rem; font-weight: 500; color: rgba(255,255,255,0.35); | |
| text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 3px; | |
| } | |
| .dna-row-value { | |
| font-size: 0.82rem; color: var(--text-primary); line-height: 1.5; | |
| } | |
| .dna-row-sub { | |
| font-size: 0.72rem; color: rgba(255,255,255,0.45); | |
| line-height: 1.4; margin-top: 2px; | |
| } | |
| /* 各行特色颜色 */ | |
| .dna-row-material .dna-row-value { color: var(--color-blue); font-weight: 500; } | |
| .dna-row-decomposition .dna-row-value { | |
| color: var(--color-yellow); font-weight: 600; font-size: 0.95rem; | |
| } | |
| .dna-row-process .dna-row-value { | |
| font-size: 0.75rem; color: rgba(255,255,255,0.6); line-height: 1.5; | |
| } | |
| .dna-row-co2 .dna-row-value { color: var(--color-green); font-weight: 500; font-size: 0.8rem; } | |
| /* Tag 标签 */ | |
| .dna-row-tags { | |
| display: flex; flex-wrap: wrap; gap: 5px; margin-top: 2px; | |
| } | |
| .dna-tag { | |
| display: inline-block; | |
| font-size: 0.7rem; color: var(--text-primary); | |
| background: rgba(255,255,255,0.06); | |
| border: 1px solid rgba(255,255,255,0.08); | |
| padding: 3px 8px; border-radius: 12px; | |
| animation: dnaTagPop 0.35s ease-out both; | |
| white-space: nowrap; | |
| } | |
| /* 列表样式 */ | |
| .dna-tips-list, .dna-facts-list { list-style: none; padding: 0; margin: 2px 0 0; } | |
| .dna-tips-list li, .dna-facts-list li { | |
| position: relative; | |
| font-size: 0.75rem; line-height: 1.5; | |
| padding-left: 14px; margin-bottom: 3px; | |
| animation: dnaFadeIn 0.4s ease-out both; | |
| } | |
| .dna-tips-list li { color: rgba(255,255,255,0.55); } | |
| .dna-tips-list li::before { | |
| content: '\2726'; position: absolute; left: 0; | |
| color: var(--color-blue); font-size: 0.55rem; top: 2px; | |
| } | |
| .dna-facts-list li { color: rgba(255,255,255,0.65); } | |
| .dna-facts-list li::before { | |
| content: '\25CF'; position: absolute; left: 0; | |
| color: var(--color-yellow); font-size: 0.4rem; top: 4px; | |
| } | |
| /* 动效 */ | |
| @keyframes dnaFadeIn { | |
| from { opacity: 0; transform: translateY(8px); } | |
| to { opacity: 1; transform: translateY(0); } | |
| } | |
| @keyframes dnaSlideUp { | |
| from { opacity: 0; transform: translateY(16px); } | |
| to { opacity: 1; transform: translateY(0); } | |
| } | |
| @keyframes dnaTagPop { | |
| from { opacity: 0; transform: scale(0.85); } | |
| to { opacity: 1; transform: scale(1); } | |
| } | |
| /* ============================================ | |
| 图鉴 (Collection Atlas) | |
| ============================================ */ | |
| .atlas-section { | |
| background: var(--bg-card); | |
| border: 1px solid var(--glass-border); | |
| border-radius: var(--radius-xl); | |
| backdrop-filter: blur(20px); | |
| -webkit-backdrop-filter: blur(20px); | |
| padding: 16px 16px 12px; | |
| animation: fadeIn 0.4s ease-out; | |
| } | |
| .atlas-header { | |
| display: flex; align-items: center; gap: 8px; | |
| margin-bottom: 12px; | |
| } | |
| .atlas-title { | |
| font-size: 0.9rem; font-weight: 700; color: var(--text-primary); | |
| } | |
| .atlas-count { | |
| font-size: 0.7rem; color: var(--text-tertiary); | |
| margin-right: auto; | |
| } | |
| .atlas-clear { | |
| font-size: 0.68rem; padding: 3px 10px; | |
| border-radius: 12px; border: 1px solid rgba(255,255,255,0.1); | |
| background: rgba(255,255,255,0.04); color: var(--text-tertiary); | |
| cursor: pointer; transition: var(--transition); | |
| font-family: var(--font); | |
| } | |
| .atlas-clear:hover { | |
| border-color: var(--color-red); color: var(--color-red); | |
| background: rgba(245,107,107,0.1); | |
| } | |
| .atlas-grid { | |
| display: grid; | |
| grid-template-columns: repeat(3, 1fr); | |
| gap: 8px; | |
| max-height: 400px; | |
| overflow-y: auto; | |
| scrollbar-width: thin; | |
| scrollbar-color: rgba(255,255,255,0.1) transparent; | |
| } | |
| .atlas-grid::-webkit-scrollbar { width: 3px; } | |
| .atlas-grid::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 3px; } | |
| .atlas-item { | |
| position: relative; | |
| border-radius: var(--radius-sm); | |
| overflow: hidden; | |
| aspect-ratio: 1; | |
| background: rgba(255,255,255,0.03); | |
| border: 1px solid rgba(255,255,255,0.06); | |
| cursor: pointer; | |
| transition: var(--transition); | |
| } | |
| .atlas-item:hover { transform: scale(1.03); border-color: var(--accent); } | |
| .atlas-item img { | |
| width: 100%; height: 100%; | |
| object-fit: cover; | |
| display: block; | |
| } | |
| .atlas-item-overlay { | |
| position: absolute; | |
| bottom: 0; left: 0; right: 0; | |
| padding: 6px 6px 5px; | |
| background: linear-gradient(transparent, rgba(0,0,0,0.7)); | |
| display: flex; | |
| flex-direction: column; | |
| gap: 1px; | |
| } | |
| .atlas-item-cat { | |
| font-size: 0.55rem; font-weight: 700; color: #fff; | |
| text-shadow: 0 1px 4px rgba(0,0,0,0.5); | |
| } | |
| .atlas-item-name { | |
| font-size: 0.6rem; color: rgba(255,255,255,0.8); | |
| text-shadow: 0 1px 3px rgba(0,0,0,0.5); | |
| white-space: nowrap; overflow: hidden; text-overflow: ellipsis; | |
| } | |
| /* 空状态 */ | |
| .atlas-empty { | |
| display: none; | |
| flex-direction: column; | |
| align-items: center; | |
| gap: 6px; | |
| padding: 32px 16px; | |
| } | |
| .atlas-empty-icon { font-size: 2rem; opacity: 0.4; } | |
| .atlas-empty-text { | |
| font-size: 0.78rem; color: var(--text-tertiary); | |
| text-align: center; line-height: 1.5; | |
| } | |
| /* 亮色模式 */ | |
| @media (prefers-color-scheme: light) { | |
| .atlas-item { border-color: rgba(0,0,0,0.08); } | |
| .atlas-item-overlay { background: linear-gradient(transparent, rgba(0,0,0,0.6)); } | |
| .atlas-clear { border-color: rgba(0,0,0,0.1); background: rgba(0,0,0,0.02); } | |
| } | |
| /* ============================================ | |
| 每日挑战 — 入口卡片 | |
| ============================================ */ | |
| .challenge-entry { | |
| animation: fadeIn 0.5s ease-out; | |
| } | |
| .challenge-entry-card { | |
| display: flex; | |
| align-items: center; | |
| gap: 14px; | |
| padding: 16px 18px; | |
| background: linear-gradient(135deg, rgba(91, 214, 138, 0.08), rgba(91, 156, 245, 0.08)); | |
| border: 1px solid rgba(91, 214, 138, 0.15); | |
| border-radius: var(--radius-lg); | |
| cursor: pointer; | |
| transition: var(--transition); | |
| position: relative; | |
| overflow: hidden; | |
| } | |
| .challenge-entry-card:hover { | |
| border-color: rgba(91, 214, 138, 0.35); | |
| background: linear-gradient(135deg, rgba(91, 214, 138, 0.12), rgba(91, 156, 245, 0.12)); | |
| transform: translateY(-2px); | |
| } | |
| .challenge-entry-card:active { transform: scale(0.98); } | |
| .challenge-entry-icon { | |
| font-size: 1.8rem; | |
| width: 48px; height: 48px; | |
| display: flex; align-items: center; justify-content: center; | |
| background: rgba(255,255,255,0.04); | |
| border-radius: 14px; | |
| flex-shrink: 0; | |
| } | |
| .challenge-entry-body { flex: 1; min-width: 0; } | |
| .challenge-entry-title { | |
| font-size: 0.95rem; font-weight: 700; color: var(--text-primary); | |
| letter-spacing: 0.3px; | |
| display: flex; align-items: center; gap: 8px; | |
| } | |
| .challenge-entry-badge { | |
| font-size: 0.6rem; | |
| font-weight: 700; | |
| padding: 2px 7px; | |
| border-radius: 20px; | |
| background: linear-gradient(135deg, var(--accent), var(--color-blue)); | |
| color: #fff; | |
| white-space: nowrap; | |
| } | |
| .challenge-entry-desc { | |
| font-size: 0.75rem; color: var(--text-secondary); | |
| margin-top: 2px; | |
| } | |
| /* 入口环形进度 */ | |
| .challenge-entry-progress { | |
| position: relative; | |
| width: 44px; height: 44px; | |
| flex-shrink: 0; | |
| } | |
| .challenge-entry-ring { | |
| width: 100%; height: 100%; | |
| transform: rotate(-90deg); | |
| } | |
| .challenge-entry-pct { | |
| position: absolute; | |
| inset: 0; | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| font-size: 0.65rem; | |
| font-weight: 700; | |
| color: var(--accent); | |
| } | |
| /* 亮色模式 */ | |
| @media (prefers-color-scheme: light) { | |
| .challenge-entry-card { | |
| background: linear-gradient(135deg, rgba(91, 214, 138, 0.06), rgba(91, 156, 245, 0.06)); | |
| } | |
| .challenge-entry-card:hover { | |
| background: linear-gradient(135deg, rgba(91, 214, 138, 0.1), rgba(91, 156, 245, 0.1)); | |
| } | |
| } | |
| /* ============================================ | |
| 每日挑战 — 结果界面 | |
| ============================================ */ | |
| .challenge-result { | |
| animation: resultIn 0.6s ease-out; | |
| } | |
| .challenge-result-card { | |
| background: var(--bg-card); | |
| border: 1px solid var(--glass-border); | |
| border-radius: var(--radius-xl); | |
| backdrop-filter: blur(20px); | |
| -webkit-backdrop-filter: blur(20px); | |
| padding: 28px 20px 20px; | |
| text-align: center; | |
| box-shadow: var(--shadow-card); | |
| } | |
| .challenge-result-header { | |
| margin-bottom: 20px; | |
| } | |
| .challenge-result-icon { font-size: 3rem; margin-bottom: 8px; } | |
| .challenge-result-title { | |
| font-size: 1.2rem; | |
| font-weight: 700; | |
| color: var(--text-primary); | |
| } | |
| .challenge-result-sub { | |
| font-size: 0.82rem; | |
| color: var(--text-secondary); | |
| margin-top: 4px; | |
| } | |
| /* 统计 */ | |
| .challenge-result-stats { | |
| display: grid; | |
| grid-template-columns: 1fr 1fr; | |
| gap: 12px; | |
| margin-bottom: 20px; | |
| } | |
| .result-stat-icon { | |
| font-size: 1.2rem; | |
| line-height: 1; | |
| } | |
| .result-stat { | |
| display: flex; | |
| flex-direction: column; | |
| align-items: center; | |
| gap: 4px; | |
| padding: 14px 8px; | |
| background: rgba(255,255,255,0.02); | |
| border-radius: var(--radius-sm); | |
| border: 1px solid rgba(255,255,255,0.04); | |
| } | |
| .result-stat-num { | |
| font-size: 1.5rem; | |
| font-weight: 800; | |
| color: var(--text-primary); | |
| } | |
| .result-stat-label { | |
| font-size: 0.7rem; | |
| color: var(--text-tertiary); | |
| letter-spacing: 1px; | |
| text-transform: uppercase; | |
| } | |
| /* 勋章 */ | |
| .challenge-medals { | |
| margin-bottom: 16px; | |
| } | |
| .medals-title { | |
| font-size: 0.8rem; | |
| color: var(--text-tertiary); | |
| text-align: left; | |
| margin-bottom: 8px; | |
| letter-spacing: 0.5px; | |
| } | |
| .medals-list { | |
| display: flex; | |
| flex-direction: column; | |
| gap: 6px; | |
| } | |
| .medal-item { | |
| display: flex; | |
| align-items: center; | |
| gap: 10px; | |
| padding: 10px 12px; | |
| background: rgba(255,255,255,0.02); | |
| border-radius: var(--radius-sm); | |
| border: 1px solid rgba(255,255,255,0.04); | |
| animation: medalIn 0.4s ease-out both; | |
| transition: var(--transition); | |
| } | |
| .medal-item.medal-new { | |
| border-color: rgba(255, 215, 0, 0.3); | |
| background: linear-gradient(135deg, rgba(255, 215, 0, 0.06), rgba(255, 165, 0, 0.06)); | |
| } | |
| .medal-item.medal-locked { | |
| opacity: 0.4; | |
| } | |
| .medal-icon { font-size: 1.3rem; width: 28px; text-align: center; } | |
| .medal-info { | |
| flex: 1; | |
| display: flex; | |
| flex-direction: column; | |
| text-align: left; | |
| } | |
| .medal-name { | |
| font-size: 0.8rem; | |
| font-weight: 600; | |
| color: var(--text-primary); | |
| } | |
| .medal-desc { | |
| font-size: 0.68rem; | |
| color: var(--text-tertiary); | |
| } | |
| .medal-new-badge { | |
| font-size: 0.6rem; | |
| font-weight: 700; | |
| padding: 2px 6px; | |
| border-radius: 10px; | |
| background: linear-gradient(135deg, #ffd700, #ff8c00); | |
| color: #000; | |
| animation: medalNewPulse 1s ease-in-out infinite; | |
| } | |
| @keyframes medalIn { | |
| from { opacity: 0; transform: translateX(-10px); } | |
| to { opacity: 1; transform: translateX(0); } | |
| } | |
| @keyframes medalNewPulse { | |
| 0%, 100% { transform: scale(1); } | |
| 50% { transform: scale(1.1); } | |
| } | |
| /* 分享按钮 */ | |
| .challenge-btn-share { | |
| margin-bottom: 8px; | |
| border-color: rgba(91, 156, 245, 0.2); | |
| color: var(--color-blue); | |
| } | |
| .challenge-btn-share:hover { | |
| border-color: var(--color-blue) ; | |
| background: rgba(91, 156, 245, 0.06) ; | |
| color: var(--color-blue) ; | |
| } | |
| /* 亮色模式适配 */ | |
| @media (prefers-color-scheme: light) { | |
| .challenge-entry-card { | |
| background: linear-gradient(135deg, rgba(91, 214, 138, 0.06), rgba(91, 156, 245, 0.06)); | |
| } | |
| .challenge-entry-card:hover { | |
| background: linear-gradient(135deg, rgba(91, 214, 138, 0.1), rgba(91, 156, 245, 0.1)); | |
| } | |
| } | |
| /* ============================================ | |
| 识别模式切换 (单物体/多物体) | |
| ============================================ */ | |
| .mode-selector { | |
| display: grid; | |
| grid-template-columns: 1fr 1fr; | |
| gap: 8px; | |
| } | |
| .mode-btn { | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| gap: 6px; | |
| padding: 10px; | |
| border-radius: var(--radius-sm); | |
| border: 1px solid var(--glass-border); | |
| background: var(--bg-card); | |
| color: var(--text-tertiary); | |
| font-size: 0.82rem; | |
| font-weight: 500; | |
| cursor: pointer; | |
| transition: var(--transition); | |
| font-family: var(--font); | |
| position: relative; | |
| overflow: hidden; | |
| opacity: 0.6; | |
| } | |
| .mode-btn:hover { | |
| border-color: var(--glass-border-hover); | |
| color: var(--text-secondary); | |
| opacity: 0.8; | |
| } | |
| .mode-btn:active { transform: scale(0.97); } | |
| .mode-btn--active { | |
| border-color: var(--accent); | |
| color: var(--accent); | |
| opacity: 1; | |
| background: rgba(91, 214, 138, 0.08); | |
| box-shadow: 0 0 20px rgba(91, 214, 138, 0.1); | |
| } | |
| .mode-icon { font-size: 1rem; line-height: 1; } | |
| /* ============================================ | |
| Bounding Box 画布 | |
| ============================================ */ | |
| .preview-img-wrap { | |
| position: relative; | |
| width: 100%; | |
| } | |
| .bbox-canvas { | |
| position: absolute; | |
| top: 0; left: 0; | |
| width: 100%; | |
| height: 100%; | |
| pointer-events: none; | |
| z-index: 2; | |
| } | |
| .bbox-canvas--multi { | |
| pointer-events: auto; | |
| cursor: pointer; | |
| } | |
| /* ============================================ | |
| 多物体识别结果 | |
| ============================================ */ | |
| .multi-result-section { | |
| display: flex; | |
| flex-direction: column; | |
| gap: 12px; | |
| animation: resultIn 0.6s var(--ease-out); | |
| } | |
| .multi-image-wrap { | |
| position: relative; | |
| border-radius: var(--radius-md); | |
| overflow: hidden; | |
| background: #000; | |
| border: 1px solid var(--glass-border); | |
| } | |
| .multi-image-wrap img { | |
| width: 100%; | |
| height: auto; | |
| display: block; | |
| max-height: 300px; | |
| object-fit: contain; | |
| } | |
| /* 物体切换标签 */ | |
| .multi-tabs { | |
| display: flex; | |
| gap: 8px; | |
| overflow-x: auto; | |
| padding: 4px 0; | |
| scrollbar-width: thin; | |
| scrollbar-color: rgba(255,255,255,0.1) transparent; | |
| -webkit-overflow-scrolling: touch; | |
| } | |
| .multi-tabs::-webkit-scrollbar { height: 3px; } | |
| .multi-tabs::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 3px; } | |
| .multi-tab { | |
| display: flex; | |
| align-items: center; | |
| gap: 6px; | |
| padding: 8px 14px; | |
| border-radius: 20px; | |
| border: 1.5px solid rgba(255,255,255,0.08); | |
| background: rgba(255,255,255,0.02); | |
| color: var(--text-secondary); | |
| font-size: 0.78rem; | |
| font-weight: 500; | |
| cursor: pointer; | |
| transition: var(--transition); | |
| white-space: nowrap; | |
| font-family: var(--font); | |
| flex-shrink: 0; | |
| } | |
| .multi-tab:hover { | |
| background: rgba(255,255,255,0.05); | |
| border-color: rgba(255,255,255,0.15); | |
| } | |
| .multi-tab--active { | |
| background: rgba(255,255,255,0.06); | |
| border-color: var(--accent); | |
| color: var(--text-primary); | |
| } | |
| .multi-tab-index { | |
| width: 20px; height: 20px; | |
| border-radius: 50%; | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| font-size: 0.65rem; | |
| font-weight: 700; | |
| color: #fff; | |
| flex-shrink: 0; | |
| } | |
| /* 多物体详情卡片 */ | |
| .multi-detail-card { | |
| background: var(--bg-card); | |
| border: 1px solid var(--glass-border); | |
| border-radius: var(--radius-xl); | |
| backdrop-filter: blur(20px); | |
| -webkit-backdrop-filter: blur(20px); | |
| overflow: hidden; | |
| box-shadow: var(--shadow-card); | |
| } | |
| .multi-detail-accent { | |
| height: 4px; | |
| transition: background 0.4s var(--ease-out); | |
| } | |
| .multi-detail-badge { | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| gap: 10px; | |
| padding: 16px 20px 12px; | |
| } | |
| .multi-detail-card .identify-section { | |
| display: flex; | |
| } | |
| .multi-dna-section { | |
| margin: 0 16px; | |
| animation: dnaSlideUp 0.5s ease-out; | |
| } | |
| .multi-dna-card { | |
| background: rgba(255,255,255,0.03); | |
| border: 1px solid rgba(255,255,255,0.05); | |
| border-radius: 14px; | |
| overflow: hidden; | |
| } | |
| /* ============================================ | |
| 碳足迹仪表板 | |
| ============================================ */ | |
| .carbon-section { | |
| animation: fadeIn 0.5s var(--ease-out); | |
| } | |
| .carbon-card { | |
| background: linear-gradient(135deg, rgba(46, 125, 50, 0.08), rgba(27, 94, 32, 0.05)); | |
| border: 1px solid rgba(76, 175, 80, 0.15); | |
| border-radius: var(--radius-xl); | |
| backdrop-filter: blur(20px); | |
| -webkit-backdrop-filter: blur(20px); | |
| overflow: hidden; | |
| box-shadow: var(--shadow-card); | |
| transition: var(--transition); | |
| } | |
| .carbon-card:hover { | |
| border-color: rgba(76, 175, 80, 0.25); | |
| } | |
| .carbon-header { | |
| display: flex; | |
| align-items: center; | |
| gap: 10px; | |
| padding: 16px 18px; | |
| cursor: pointer; | |
| user-select: none; | |
| } | |
| .carbon-icon { font-size: 1.3rem; line-height: 1; } | |
| .carbon-title { | |
| font-size: 0.95rem; | |
| font-weight: 700; | |
| color: var(--color-green); | |
| flex: 1; | |
| } | |
| .carbon-toggle { | |
| background: none; | |
| border: none; | |
| color: var(--text-tertiary); | |
| cursor: pointer; | |
| padding: 4px; | |
| border-radius: 6px; | |
| transition: var(--transition); | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| } | |
| .carbon-toggle:hover { color: var(--text-secondary); } | |
| .carbon-toggle--open svg { | |
| transform: rotate(180deg); | |
| } | |
| .carbon-toggle svg { | |
| transition: transform 0.3s var(--ease-out); | |
| } | |
| .carbon-body { | |
| padding: 0 18px 18px; | |
| overflow: hidden; | |
| max-height: 800px; | |
| transition: max-height 0.4s var(--ease-out); | |
| } | |
| .carbon-body--collapsed { | |
| max-height: 0 ; | |
| padding: 0 18px; | |
| } | |
| /* 主要指标 */ | |
| .carbon-metrics { | |
| display: grid; | |
| grid-template-columns: 1fr 1fr 1fr; | |
| gap: 8px; | |
| margin-bottom: 16px; | |
| } | |
| .carbon-metric { | |
| display: flex; | |
| flex-direction: column; | |
| align-items: center; | |
| padding: 16px 6px; | |
| border-radius: var(--radius-sm); | |
| background: rgba(255,255,255,0.03); | |
| border: 1px solid rgba(255,255,255,0.04); | |
| text-align: center; | |
| } | |
| .carbon-metric-value { | |
| font-size: 1.4rem; | |
| font-weight: 800; | |
| line-height: 1.2; | |
| } | |
| .carbon-metric--co2 .carbon-metric-value { color: var(--color-green); } | |
| .carbon-metric--trees .carbon-metric-value { color: #4caf50; } | |
| .carbon-metric--items .carbon-metric-value { color: var(--color-blue); } | |
| .carbon-metric-unit { | |
| font-size: 0.68rem; | |
| color: var(--text-tertiary); | |
| margin-top: 1px; | |
| } | |
| .carbon-metric-label { | |
| font-size: 0.7rem; | |
| color: var(--text-tertiary); | |
| margin-top: 4px; | |
| letter-spacing: 0.5px; | |
| } | |
| /* 等效对比 */ | |
| .carbon-equivalents { | |
| margin-bottom: 14px; | |
| } | |
| .carbon-equiv-title { | |
| font-size: 0.78rem; | |
| font-weight: 600; | |
| color: var(--text-secondary); | |
| margin-bottom: 8px; | |
| } | |
| .carbon-equiv-grid { | |
| display: grid; | |
| grid-template-columns: 1fr; | |
| gap: 6px; | |
| } | |
| .carbon-equiv-item { | |
| display: flex; | |
| align-items: center; | |
| gap: 8px; | |
| padding: 8px 12px; | |
| background: rgba(255,255,255,0.02); | |
| border-radius: var(--radius-sm); | |
| border: 1px solid rgba(255,255,255,0.03); | |
| } | |
| .carbon-equiv-icon { font-size: 1rem; width: 24px; text-align: center; } | |
| .carbon-equiv-detail { | |
| font-size: 0.78rem; | |
| color: var(--text-secondary); | |
| } | |
| /* 月份统计 */ | |
| .carbon-monthly { | |
| margin-bottom: 14px; | |
| } | |
| .carbon-monthly-title { | |
| font-size: 0.78rem; | |
| font-weight: 600; | |
| color: var(--text-secondary); | |
| margin-bottom: 10px; | |
| } | |
| .carbon-bars { | |
| display: flex; | |
| align-items: flex-end; | |
| gap: 4px; | |
| height: 60px; | |
| padding: 4px 0; | |
| } | |
| .carbon-bar { | |
| flex: 1; | |
| border-radius: 3px 3px 0 0; | |
| min-height: 4px; | |
| transition: height 0.6s var(--ease-out); | |
| position: relative; | |
| cursor: pointer; | |
| } | |
| .carbon-bar:hover .carbon-bar-tooltip { | |
| opacity: 1; | |
| transform: translateY(0); | |
| } | |
| .carbon-bar-tooltip { | |
| position: absolute; | |
| bottom: 100%; | |
| left: 50%; | |
| transform: translateX(-50%) translateY(4px); | |
| background: rgba(0,0,0,0.8); | |
| color: #fff; | |
| font-size: 0.6rem; | |
| padding: 2px 6px; | |
| border-radius: 4px; | |
| white-space: nowrap; | |
| opacity: 0; | |
| transition: 0.2s; | |
| pointer-events: none; | |
| } | |
| /* 成就徽章 */ | |
| .carbon-achievements { | |
| margin-top: 4px; | |
| } | |
| .carbon-achievement-title { | |
| font-size: 0.78rem; | |
| font-weight: 600; | |
| color: var(--text-secondary); | |
| margin-bottom: 8px; | |
| } | |
| .carbon-achievement-list { | |
| display: flex; | |
| flex-wrap: wrap; | |
| gap: 6px; | |
| } | |
| .carbon-achievement { | |
| display: flex; | |
| align-items: center; | |
| gap: 5px; | |
| padding: 5px 10px; | |
| border-radius: 16px; | |
| font-size: 0.72rem; | |
| font-weight: 500; | |
| background: rgba(255,255,255,0.04); | |
| border: 1px solid rgba(255,255,255,0.06); | |
| color: var(--text-secondary); | |
| transition: var(--transition); | |
| cursor: default; | |
| } | |
| .carbon-achievement--unlocked { | |
| background: rgba(76, 175, 80, 0.1); | |
| border-color: rgba(76, 175, 80, 0.2); | |
| color: var(--color-green); | |
| } | |
| .carbon-achievement--locked { | |
| opacity: 0.4; | |
| } | |
| .carbon-achievement-icon { font-size: 0.9rem; } | |
| .carbon-achievement-name { font-size: 0.7rem; } | |
| /* 亮色模式适配 */ | |
| @media (prefers-color-scheme: light) { | |
| .mode-btn--active { | |
| background: rgba(91, 214, 138, 0.1); | |
| } | |
| .carbon-card { | |
| background: linear-gradient(135deg, rgba(76, 175, 80, 0.04), rgba(27, 94, 32, 0.02)); | |
| border-color: rgba(76, 175, 80, 0.12); | |
| } | |
| .multi-tab { | |
| border-color: rgba(0,0,0,0.08); | |
| background: rgba(0,0,0,0.02); | |
| } | |
| .multi-tab--active { | |
| border-color: var(--accent); | |
| background: rgba(91, 214, 138, 0.08); | |
| } | |
| .carbon-metric { background: rgba(0,0,0,0.02); border-color: rgba(0,0,0,0.04); } | |
| .carbon-equiv-item { background: rgba(0,0,0,0.01); border-color: rgba(0,0,0,0.03); } | |
| .carbon-achievement { background: rgba(0,0,0,0.02); border-color: rgba(0,0,0,0.04); } | |
| .carbon-achievement--unlocked { background: rgba(76, 175, 80, 0.06); } | |
| /* 游戏亮色模式 */ | |
| .gamecenter-entry-card { | |
| background: linear-gradient(135deg, rgba(156, 39, 176, 0.04), rgba(103, 58, 183, 0.04)); | |
| border-color: rgba(156, 39, 176, 0.1); | |
| } | |
| .gamecenter-entry-card:hover { | |
| background: linear-gradient(135deg, rgba(156, 39, 176, 0.08), rgba(103, 58, 183, 0.08)); | |
| border-color: rgba(156, 39, 176, 0.2); | |
| } | |
| .gamecenter-overlay { background: linear-gradient(160deg, #f0f0f5 0%, #e8e8f0 50%, #e0e8f0 100%); } | |
| .gamecenter-game-card { background: rgba(255,255,255,0.7); border-color: rgba(0,0,0,0.08); } | |
| .gamecenter-game-card:hover { background: rgba(255,255,255,0.85); } | |
| .gamecard-title { color: #1a1a2e; text-shadow: none; } | |
| .gamecard-desc { color: rgba(0,0,0,0.5); } | |
| .gamecard-play-btn { background: rgba(0,0,0,0.06); color: var(--text-secondary); } | |
| .gamecard-play-btn:hover { background: rgba(0,0,0,0.1); } | |
| .tq-btn { background: rgba(0,0,0,0.03); border-color: rgba(0,0,0,0.08); } | |
| .tq-item-card { background: rgba(0,0,0,0.02); border-color: rgba(0,0,0,0.06); } | |
| .tq-feedback { background: rgba(0,0,0,0.04); } | |
| .tq-result-btn--back { border-color: rgba(0,0,0,0.1); color: var(--text-secondary); } | |
| .mem-grid .memory-card { background: rgba(0,0,0,0.03); border-color: rgba(0,0,0,0.08); } | |
| } | |
| /* ============================================ | |
| 游戏中心 — 入口卡片 | |
| ============================================ */ | |
| .gamecenter-entry { animation: fadeIn 0.5s ease-out; } | |
| .gamecenter-entry-card { | |
| display: flex; | |
| align-items: center; | |
| gap: 14px; | |
| padding: 16px 18px; | |
| background: linear-gradient(135deg, rgba(156, 39, 176, 0.08), rgba(103, 58, 183, 0.08)); | |
| border: 1px solid rgba(156, 39, 176, 0.15); | |
| border-radius: var(--radius-lg); | |
| cursor: pointer; | |
| transition: var(--transition); | |
| position: relative; | |
| overflow: hidden; | |
| } | |
| .gamecenter-entry-card:hover { | |
| border-color: rgba(156, 39, 176, 0.35); | |
| background: linear-gradient(135deg, rgba(156, 39, 176, 0.12), rgba(103, 58, 183, 0.12)); | |
| transform: translateY(-2px); | |
| } | |
| .gamecenter-entry-card:active { transform: scale(0.98); } | |
| .gamecenter-entry-icon { | |
| font-size: 1.8rem; | |
| width: 48px; height: 48px; | |
| display: flex; align-items: center; justify-content: center; | |
| background: rgba(255,255,255,0.04); | |
| border-radius: 14px; | |
| flex-shrink: 0; | |
| } | |
| .gamecenter-entry-body { flex: 1; min-width: 0; } | |
| .gamecenter-entry-title { | |
| font-size: 0.95rem; font-weight: 700; color: var(--text-primary); | |
| letter-spacing: 0.3px; | |
| } | |
| .gamecenter-entry-desc { | |
| font-size: 0.75rem; color: var(--text-secondary); | |
| margin-top: 2px; | |
| } | |
| .gamecenter-entry-arrow { | |
| color: var(--text-tertiary); | |
| width: 24px; height: 24px; | |
| flex-shrink: 0; | |
| transition: transform 0.3s var(--ease-out); | |
| } | |
| .gamecenter-entry-card:hover .gamecenter-entry-arrow { | |
| transform: translateX(4px); | |
| } | |
| /* ============================================ | |
| 游戏中心 — 主界面 | |
| ============================================ */ | |
| .gamecenter-overlay { | |
| position: fixed; | |
| inset: 0; | |
| z-index: 100; | |
| background: linear-gradient(160deg, #0f0f1a 0%, #1a1a2e 50%, #16213e 100%); | |
| display: flex; | |
| flex-direction: column; | |
| animation: fadeIn 0.25s var(--ease-out); | |
| overflow-y: auto; | |
| } | |
| .gamecenter-header { | |
| display: flex; | |
| align-items: center; | |
| gap: 10px; | |
| padding: 16px 18px; | |
| border-bottom: 1px solid rgba(255,255,255,0.04); | |
| flex-shrink: 0; | |
| } | |
| .gamecenter-back { | |
| width: 36px; height: 36px; | |
| display: flex; align-items: center; justify-content: center; | |
| border-radius: 50%; | |
| border: none; | |
| background: rgba(255,255,255,0.04); | |
| color: var(--text-secondary); | |
| cursor: pointer; | |
| transition: var(--transition); | |
| font-family: var(--font); | |
| flex-shrink: 0; | |
| } | |
| .gamecenter-back:hover { | |
| background: rgba(255,255,255,0.08); | |
| color: var(--text-primary); | |
| } | |
| .gamecenter-back:active { transform: scale(0.9); } | |
| .gamecenter-header-title { | |
| font-size: 1rem; font-weight: 700; color: var(--text-primary); | |
| flex: 1; | |
| } | |
| .gamecenter-coins { | |
| font-size: 0.82rem; | |
| font-weight: 600; | |
| color: #ffd700; | |
| background: rgba(255, 215, 0, 0.1); | |
| padding: 4px 12px; | |
| border-radius: 20px; | |
| border: 1px solid rgba(255, 215, 0, 0.15); | |
| white-space: nowrap; | |
| } | |
| .gamecenter-body { | |
| padding: 16px 18px; | |
| display: flex; | |
| flex-direction: column; | |
| gap: 14px; | |
| flex: 1; | |
| } | |
| /* 游戏选择卡片 */ | |
| .gamecenter-game-card { | |
| display: flex; | |
| align-items: center; | |
| gap: 14px; | |
| padding: 20px; | |
| border-radius: var(--radius-lg); | |
| background: rgba(255,255,255,0.06); | |
| border: 1px solid rgba(255,255,255,0.10); | |
| cursor: pointer; | |
| transition: var(--transition); | |
| position: relative; | |
| overflow: hidden; | |
| } | |
| .gamecenter-game-card:hover { | |
| background: rgba(255,255,255,0.09); | |
| transform: translateY(-3px); | |
| box-shadow: 0 8px 30px rgba(0,0,0,0.3); | |
| } | |
| .gamecenter-game-card:active { transform: scale(0.98); } | |
| .gamecard-accent { | |
| position: absolute; | |
| top: 0; left: 0; right: 0; | |
| height: 3px; | |
| } | |
| .gamecard-icon { | |
| font-size: 2rem; | |
| width: 50px; height: 50px; | |
| display: flex; align-items: center; justify-content: center; | |
| flex-shrink: 0; | |
| } | |
| .gamecard-info { flex: 1; min-width: 0; } | |
| .gamecard-title { | |
| font-size: 1.05rem; font-weight: 800; color: #ffffff; | |
| margin-bottom: 4px; | |
| text-shadow: 0 1px 4px rgba(0,0,0,0.3); | |
| } | |
| .gamecard-desc { | |
| font-size: 0.78rem; color: rgba(255,255,255,0.65); | |
| } | |
| .gamecard-stats { | |
| text-align: center; | |
| flex-shrink: 0; | |
| } | |
| .gamecard-stat-value { | |
| font-size: 1.1rem; font-weight: 800; | |
| color: var(--accent); | |
| display: block; | |
| line-height: 1.2; | |
| } | |
| .gamecard-stat-label { | |
| font-size: 0.6rem; color: var(--text-tertiary); | |
| text-transform: uppercase; letter-spacing: 0.5px; | |
| } | |
| .gamecard-play-btn { | |
| width: 44px; height: 44px; | |
| border-radius: 50%; | |
| background: rgba(255,255,255,0.06); | |
| border: 1px solid rgba(255,255,255,0.08); | |
| display: flex; align-items: center; justify-content: center; | |
| font-size: 0.85rem; font-weight: 700; color: var(--accent); | |
| flex-shrink: 0; | |
| transition: var(--transition); | |
| } | |
| .gamecenter-game-card:hover .gamecard-play-btn { | |
| background: var(--accent); | |
| color: #fff; | |
| border-color: var(--accent); | |
| } | |
| /* ============================================ | |
| 限时分类挑战 — 开始界面 | |
| ============================================ */ | |
| .timedquiz-screen { | |
| position: fixed; | |
| inset: 0; | |
| z-index: 100; | |
| background: var(--bg-primary); | |
| display: flex; | |
| flex-direction: column; | |
| animation: fadeIn 0.2s ease-out; | |
| } | |
| .tq-start { display: flex; flex-direction: column; height: 100%; } | |
| .tq-start-header { | |
| display: flex; | |
| align-items: center; | |
| gap: 10px; | |
| padding: 16px 18px; | |
| border-bottom: 1px solid rgba(255,255,255,0.04); | |
| flex-shrink: 0; | |
| } | |
| .tq-start-body { | |
| flex: 1; | |
| display: flex; | |
| flex-direction: column; | |
| align-items: center; | |
| justify-content: center; | |
| padding: 40px 24px; | |
| text-align: center; | |
| gap: 14px; | |
| } | |
| .tq-start-icon { font-size: 3.5rem; animation: iconBounce 0.6s var(--ease-spring); } | |
| .tq-start-title { | |
| font-size: 1.3rem; font-weight: 800; color: var(--text-primary); | |
| } | |
| .tq-start-desc { | |
| text-align: left; | |
| background: rgba(255,255,255,0.02); | |
| border: 1px solid rgba(255,255,255,0.04); | |
| border-radius: var(--radius-md); | |
| padding: 16px 20px; | |
| width: 100%; | |
| max-width: 320px; | |
| } | |
| .tq-start-desc p { | |
| font-size: 0.82rem; color: var(--text-secondary); | |
| padding: 4px 0; | |
| line-height: 1.6; | |
| } | |
| .tq-start-record { | |
| font-size: 0.85rem; color: var(--text-tertiary); | |
| padding: 6px 16px; | |
| background: rgba(255,215,0,0.06); | |
| border: 1px solid rgba(255,215,0,0.1); | |
| border-radius: 20px; | |
| } | |
| .tq-start-record span { color: #ffd700; font-weight: 700; } | |
| .tq-start-btn { | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| gap: 8px; | |
| padding: 16px 40px; | |
| border: none; | |
| border-radius: var(--radius-md); | |
| background: linear-gradient(135deg, #f5a623, #f56b6b); | |
| color: #fff; | |
| font-size: 1.05rem; | |
| font-weight: 700; | |
| cursor: pointer; | |
| transition: var(--transition); | |
| font-family: var(--font); | |
| margin-top: 8px; | |
| box-shadow: 0 4px 20px rgba(245, 166, 35, 0.3); | |
| } | |
| .tq-start-btn:hover { | |
| transform: translateY(-2px); | |
| box-shadow: 0 6px 30px rgba(245, 166, 35, 0.4); | |
| } | |
| .tq-start-btn:active { transform: scale(0.97); } | |
| /* ============================================ | |
| 限时分类挑战 — 游戏界面 | |
| ============================================ */ | |
| .tq-game { | |
| display: flex; | |
| flex-direction: column; | |
| height: 100%; | |
| padding: 16px 18px; | |
| gap: 10px; | |
| } | |
| .tq-progress-bar { | |
| width: 100%; | |
| height: 3px; | |
| background: rgba(255,255,255,0.05); | |
| border-radius: 2px; | |
| overflow: hidden; | |
| flex-shrink: 0; | |
| } | |
| .tq-progress-fill { | |
| height: 100%; | |
| background: linear-gradient(90deg, var(--accent), var(--color-blue)); | |
| border-radius: 2px; | |
| transition: width 0.4s var(--ease-out); | |
| width: 0%; | |
| } | |
| .game-close-btn { | |
| width: 32px; height: 32px; | |
| border-radius: 50%; | |
| border: 1px solid rgba(255,255,255,0.1); | |
| background: rgba(255,255,255,0.04); | |
| color: var(--text-secondary); | |
| font-size: 0.9rem; | |
| cursor: pointer; | |
| transition: var(--transition); | |
| display: flex; align-items: center; justify-content: center; | |
| flex-shrink: 0; | |
| font-family: var(--font); | |
| line-height: 1; | |
| } | |
| .game-close-btn:hover { | |
| background: rgba(255,255,255,0.1); | |
| color: var(--text-primary); | |
| border-color: rgba(255,255,255,0.2); | |
| } | |
| .game-close-btn:active { transform: scale(0.9); } | |
| .tq-hud { | |
| display: grid; | |
| grid-template-columns: 32px 1fr 1fr 1fr; | |
| gap: 6px; | |
| flex-shrink: 0; | |
| align-items: center; | |
| } | |
| .tq-hud-item { | |
| text-align: center; | |
| font-size: 1.6rem; | |
| font-weight: 800; | |
| padding: 6px 0; | |
| border-radius: var(--radius-sm); | |
| transition: color 0.3s; | |
| } | |
| .tq-timer { color: var(--accent); } | |
| .tq-timer--warning { color: var(--color-red); animation: tqTimerPulse 0.5s ease-in-out infinite; } | |
| .tq-score { color: var(--color-blue); } | |
| .tq-streak { color: #f5a623; font-size: 1.1rem; } | |
| .tq-hud-labels { | |
| display: grid; | |
| grid-template-columns: 1fr 1fr 1fr; | |
| gap: 6px; | |
| flex-shrink: 0; | |
| margin-top: -6px; | |
| } | |
| .tq-hud-label { | |
| text-align: center; | |
| font-size: 0.65rem; | |
| color: var(--text-tertiary); | |
| letter-spacing: 1px; | |
| text-transform: uppercase; | |
| } | |
| @keyframes tqTimerPulse { | |
| 0%, 100% { opacity: 1; } | |
| 50% { opacity: 0.5; } | |
| } | |
| /* 物品卡片 */ | |
| .tq-item-card { | |
| flex: 1; | |
| display: flex; | |
| flex-direction: column; | |
| align-items: center; | |
| justify-content: center; | |
| gap: 8px; | |
| margin: 10px 0; | |
| border-radius: var(--radius-xl); | |
| background: rgba(255,255,255,0.03); | |
| border: 1px solid rgba(255,255,255,0.06); | |
| padding: 24px; | |
| animation: tqItemIn 0.35s var(--ease-out); | |
| } | |
| @keyframes tqItemIn { | |
| from { opacity: 0; transform: translateY(16px) scale(0.95); } | |
| to { opacity: 1; transform: translateY(0) scale(1); } | |
| } | |
| .tq-item-emoji { | |
| font-size: 3.5rem; | |
| line-height: 1; | |
| animation: iconBounce 0.5s var(--ease-spring); | |
| } | |
| .tq-item-name { | |
| font-size: 1.4rem; | |
| font-weight: 800; | |
| color: var(--text-primary); | |
| text-align: center; | |
| } | |
| .tq-item-hint { | |
| font-size: 0.8rem; | |
| color: var(--text-tertiary); | |
| letter-spacing: 2px; | |
| } | |
| /* 四个分类按钮 */ | |
| .tq-buttons { | |
| display: grid; | |
| grid-template-columns: 1fr 1fr; | |
| gap: 8px; | |
| flex-shrink: 0; | |
| } | |
| .tq-btn { | |
| display: flex; | |
| flex-direction: column; | |
| align-items: center; | |
| justify-content: center; | |
| gap: 4px; | |
| padding: 14px 8px; | |
| border-radius: var(--radius-md); | |
| border: 1.5px solid rgba(255,255,255,0.06); | |
| background: rgba(255,255,255,0.02); | |
| color: var(--text-primary); | |
| font-size: 0.85rem; | |
| font-weight: 600; | |
| cursor: pointer; | |
| transition: all 0.2s var(--ease-out); | |
| font-family: var(--font); | |
| position: relative; | |
| overflow: hidden; | |
| -webkit-tap-highlight-color: transparent; | |
| } | |
| .tq-btn:active { transform: scale(0.95); } | |
| .tq-btn-icon { font-size: 1.4rem; line-height: 1; } | |
| .tq-btn-label { font-size: 0.78rem; letter-spacing: 0.5px; } | |
| /* 按钮颜色 */ | |
| .tq-btn--blue { | |
| color: var(--color-blue); | |
| border-color: rgba(91, 156, 245, 0.15); | |
| background: rgba(91, 156, 245, 0.04); | |
| } | |
| .tq-btn--blue:active, | |
| .tq-btn--blue.tq-btn--correct { background: rgba(91, 156, 245, 0.2); border-color: var(--color-blue); } | |
| .tq-btn--red { | |
| color: var(--color-red); | |
| border-color: rgba(245, 107, 107, 0.15); | |
| background: rgba(245, 107, 107, 0.04); | |
| } | |
| .tq-btn--red:active, | |
| .tq-btn--red.tq-btn--correct { background: rgba(245, 107, 107, 0.2); border-color: var(--color-red); } | |
| .tq-btn--green { | |
| color: var(--color-green); | |
| border-color: rgba(91, 214, 138, 0.15); | |
| background: rgba(91, 214, 138, 0.04); | |
| } | |
| .tq-btn--green:active, | |
| .tq-btn--green.tq-btn--correct { background: rgba(91, 214, 138, 0.2); border-color: var(--color-green); } | |
| .tq-btn--gray { | |
| color: var(--color-gray); | |
| border-color: rgba(138, 138, 154, 0.15); | |
| background: rgba(138, 138, 154, 0.04); | |
| } | |
| .tq-btn--gray:active, | |
| .tq-btn--gray.tq-btn--correct { background: rgba(138, 138, 154, 0.2); border-color: var(--color-gray); } | |
| /* 错误闪烁 */ | |
| .tq-btn--wrong { | |
| animation: tqShake 0.4s ease-out; | |
| } | |
| .tq-btn--wrong.tq-btn--blue { background: rgba(245, 107, 107, 0.2); border-color: var(--color-red); color: var(--color-red); } | |
| .tq-btn--wrong.tq-btn--green { background: rgba(245, 107, 107, 0.2); border-color: var(--color-red); color: var(--color-red); } | |
| .tq-btn--wrong.tq-btn--gray { background: rgba(245, 107, 107, 0.2); border-color: var(--color-red); color: var(--color-red); } | |
| .tq-btn--wrong.tq-btn--red { background: rgba(245, 107, 107, 0.2); border-color: var(--color-red); color: var(--color-red); } | |
| /* 正确答案高亮 */ | |
| .tq-btn--show-correct.tq-btn--correct { | |
| background: rgba(91, 214, 138, 0.2) ; | |
| border-color: var(--accent) ; | |
| color: var(--accent) ; | |
| } | |
| @keyframes tqShake { | |
| 0%, 100% { transform: translateX(0); } | |
| 20% { transform: translateX(-8px); } | |
| 40% { transform: translateX(8px); } | |
| 60% { transform: translateX(-5px); } | |
| 80% { transform: translateX(5px); } | |
| } | |
| /* 反馈条 */ | |
| .tq-feedback { | |
| position: fixed; | |
| bottom: 0; | |
| left: 0; | |
| right: 0; | |
| padding: 16px 20px; | |
| padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px)); | |
| background: rgba(10,10,15,0.95); | |
| backdrop-filter: blur(20px); | |
| -webkit-backdrop-filter: blur(20px); | |
| border-top: 1px solid rgba(255,255,255,0.06); | |
| display: flex; | |
| flex-direction: column; | |
| align-items: center; | |
| gap: 4px; | |
| animation: tqFeedbackUp 0.3s var(--ease-out); | |
| z-index: 10; | |
| } | |
| @keyframes tqFeedbackUp { | |
| from { transform: translateY(100%); } | |
| to { transform: translateY(0); } | |
| } | |
| .tq-feedback-icon { font-size: 1.5rem; } | |
| .tq-feedback-text { | |
| font-size: 0.95rem; | |
| font-weight: 700; | |
| color: var(--text-primary); | |
| } | |
| .tq-feedback-sub { | |
| font-size: 0.75rem; | |
| color: var(--text-tertiary); | |
| text-align: center; | |
| max-width: 320px; | |
| line-height: 1.4; | |
| } | |
| /* ============================================ | |
| 限时分类挑战 — 结果界面 | |
| ============================================ */ | |
| .tq-result { display: flex; flex-direction: column; height: 100%; } | |
| .tq-result-header { | |
| display: flex; | |
| align-items: center; | |
| gap: 10px; | |
| padding: 16px 18px; | |
| border-bottom: 1px solid rgba(255,255,255,0.04); | |
| flex-shrink: 0; | |
| } | |
| .tq-result-body { | |
| flex: 1; | |
| display: flex; | |
| flex-direction: column; | |
| align-items: center; | |
| justify-content: center; | |
| padding: 32px 24px; | |
| text-align: center; | |
| gap: 10px; | |
| } | |
| .tq-result-icon { font-size: 3rem; animation: iconBounce 0.6s var(--ease-spring); } | |
| .tq-result-title { | |
| font-size: 1.2rem; font-weight: 800; color: var(--text-primary); | |
| } | |
| .tq-result-score { | |
| font-size: 2rem; font-weight: 900; | |
| background: linear-gradient(135deg, #f5a623, #f56b6b); | |
| -webkit-background-clip: text; | |
| -webkit-text-fill-color: transparent; | |
| background-clip: text; | |
| } | |
| .tq-result-newrecord { | |
| font-size: 0.9rem; | |
| font-weight: 700; | |
| color: #ffd700; | |
| background: rgba(255,215,0,0.1); | |
| padding: 4px 16px; | |
| border-radius: 20px; | |
| border: 1px solid rgba(255,215,0,0.2); | |
| animation: medalNewPulse 1s ease-in-out infinite; | |
| } | |
| .tq-result-stats { | |
| display: grid; | |
| grid-template-columns: 1fr 1fr; | |
| gap: 10px; | |
| width: 100%; | |
| max-width: 280px; | |
| margin: 8px 0; | |
| } | |
| .tq-stat-item { | |
| display: flex; | |
| flex-direction: column; | |
| align-items: center; | |
| gap: 2px; | |
| padding: 12px 8px; | |
| background: rgba(255,255,255,0.02); | |
| border-radius: var(--radius-sm); | |
| border: 1px solid rgba(255,255,255,0.04); | |
| } | |
| .tq-stat-value { | |
| font-size: 1.3rem; font-weight: 800; color: var(--text-primary); | |
| } | |
| .tq-stat-label { | |
| font-size: 0.65rem; color: var(--text-tertiary); | |
| letter-spacing: 1px; text-transform: uppercase; | |
| } | |
| .tq-result-coins { | |
| font-size: 0.9rem; | |
| color: #ffd700; | |
| background: rgba(255,215,0,0.06); | |
| padding: 6px 18px; | |
| border-radius: 20px; | |
| border: 1px solid rgba(255,215,0,0.1); | |
| } | |
| .tq-result-coins span { font-weight: 800; } | |
| .tq-result-buttons { | |
| display: flex; | |
| gap: 10px; | |
| margin-top: 10px; | |
| width: 100%; | |
| max-width: 320px; | |
| } | |
| .tq-result-btn { | |
| flex: 1; | |
| padding: 14px 16px; | |
| border-radius: var(--radius-sm); | |
| font-size: 0.9rem; | |
| font-weight: 600; | |
| cursor: pointer; | |
| transition: var(--transition); | |
| font-family: var(--font); | |
| text-align: center; | |
| border: none; | |
| } | |
| .tq-result-btn--again { | |
| background: linear-gradient(135deg, #f5a623, #f56b6b); | |
| color: #fff; | |
| box-shadow: 0 4px 16px rgba(245, 166, 35, 0.25); | |
| } | |
| .tq-result-btn--again:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(245, 166, 35, 0.35); } | |
| .tq-result-btn--again:active { transform: scale(0.97); } | |
| .tq-result-btn--back { | |
| background: transparent; | |
| border: 1px solid rgba(255,255,255,0.08); | |
| color: var(--text-secondary); | |
| } | |
| .tq-result-btn--back:hover { border-color: rgba(255,255,255,0.15); color: var(--text-primary); } | |
| .tq-result-btn--back:active { transform: scale(0.97); } | |
| /* ============================================ | |
| 垃圾分类连连看 — 开始界面 | |
| ============================================ */ | |
| .memory-screen { | |
| position: fixed; | |
| inset: 0; | |
| z-index: 100; | |
| background: var(--bg-primary); | |
| display: flex; | |
| flex-direction: column; | |
| animation: fadeIn 0.2s ease-out; | |
| } | |
| .mem-start { display: flex; flex-direction: column; height: 100%; } | |
| .mem-start-header { | |
| display: flex; | |
| align-items: center; | |
| gap: 10px; | |
| padding: 16px 18px; | |
| border-bottom: 1px solid rgba(255,255,255,0.04); | |
| flex-shrink: 0; | |
| } | |
| .mem-start-body { | |
| flex: 1; | |
| display: flex; | |
| flex-direction: column; | |
| align-items: center; | |
| justify-content: center; | |
| padding: 40px 24px; | |
| text-align: center; | |
| gap: 14px; | |
| } | |
| .mem-start-icon { font-size: 3.5rem; animation: iconBounce 0.6s var(--ease-spring); } | |
| .mem-start-title { font-size: 1.3rem; font-weight: 800; color: var(--text-primary); } | |
| .mem-start-desc { | |
| text-align: left; | |
| background: rgba(255,255,255,0.02); | |
| border: 1px solid rgba(255,255,255,0.04); | |
| border-radius: var(--radius-md); | |
| padding: 16px 20px; | |
| width: 100%; | |
| max-width: 320px; | |
| } | |
| .mem-start-desc p { | |
| font-size: 0.82rem; color: var(--text-secondary); | |
| padding: 4px 0; line-height: 1.6; | |
| } | |
| .mem-start-record { | |
| font-size: 0.85rem; color: var(--text-tertiary); | |
| padding: 6px 16px; | |
| background: rgba(91, 156, 245, 0.06); | |
| border: 1px solid rgba(91, 156, 245, 0.1); | |
| border-radius: 20px; | |
| } | |
| .mem-start-record span { color: var(--color-blue); font-weight: 700; } | |
| /* HUD */ | |
| .mem-game { display: flex; flex-direction: column; padding: 12px 12px 16px; height: 100%; gap: 10px; } | |
| .mem-hud { | |
| display: grid; | |
| grid-template-columns: 1fr 1fr 1fr; | |
| gap: 6px; | |
| flex-shrink: 0; | |
| } | |
| .mem-hud-item { | |
| text-align: center; | |
| padding: 8px 4px; | |
| background: rgba(255,255,255,0.02); | |
| border-radius: var(--radius-sm); | |
| border: 1px solid rgba(255,255,255,0.04); | |
| } | |
| .mem-hud-label { | |
| font-size: 0.6rem; color: var(--text-tertiary); | |
| letter-spacing: 1px; text-transform: uppercase; | |
| display: block; | |
| } | |
| .mem-hud-value { | |
| font-size: 1.1rem; font-weight: 800; color: var(--text-primary); | |
| display: block; margin-top: 1px; | |
| } | |
| /* 连连看网格 */ | |
| .mem-grid { | |
| display: grid; | |
| grid-template-columns: repeat(4, 1fr); | |
| gap: 8px; | |
| flex: 1; | |
| align-content: center; | |
| max-width: 400px; | |
| margin: 0 auto; | |
| width: 100%; | |
| } | |
| /* 卡牌 */ | |
| .memory-card { | |
| aspect-ratio: 1; | |
| perspective: 600px; | |
| cursor: pointer; | |
| position: relative; | |
| } | |
| .memory-card-inner { | |
| position: relative; | |
| width: 100%; | |
| height: 100%; | |
| transition: transform 0.5s var(--ease-out); | |
| transform-style: preserve-3d; | |
| } | |
| .memory-card--flipped .memory-card-inner, | |
| .memory-card--matched .memory-card-inner { | |
| transform: rotateY(180deg); | |
| } | |
| .memory-card-front, | |
| .memory-card-back { | |
| position: absolute; | |
| inset: 0; | |
| border-radius: var(--radius-sm); | |
| backface-visibility: hidden; | |
| -webkit-backface-visibility: hidden; | |
| display: flex; | |
| flex-direction: column; | |
| align-items: center; | |
| justify-content: center; | |
| padding: 4px; | |
| overflow: hidden; | |
| } | |
| .memory-card-front { | |
| background: linear-gradient(135deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01)); | |
| border: 1.5px solid rgba(255,255,255,0.06); | |
| z-index: 2; | |
| } | |
| .memory-card-front::after { | |
| content: '❓'; | |
| font-size: 1.8rem; | |
| opacity: 0.3; | |
| } | |
| .memory-card-back { | |
| transform: rotateY(180deg); | |
| border: 1.5px solid rgba(255,255,255,0.08); | |
| background: rgba(255,255,255,0.03); | |
| } | |
| .memory-card--matched .memory-card-inner { | |
| animation: memMatchPop 0.4s var(--ease-spring); | |
| } | |
| @keyframes memMatchPop { | |
| 0% { transform: rotateY(180deg) scale(1); } | |
| 50% { transform: rotateY(180deg) scale(1.08); } | |
| 100% { transform: rotateY(180deg) scale(1); } | |
| } | |
| .mem-card-item { font-size: 1.5rem; line-height: 1; } | |
| .mem-card-name { | |
| font-size: 0.65rem; | |
| font-weight: 700; | |
| color: var(--text-primary); | |
| text-align: center; | |
| margin-top: 2px; | |
| line-height: 1.2; | |
| } | |
| .mem-card-category-icon { font-size: 1.3rem; line-height: 1; } | |
| .mem-card-category-name { | |
| font-size: 0.6rem; | |
| font-weight: 700; | |
| text-align: center; | |
| margin-top: 2px; | |
| line-height: 1.2; | |
| } | |
| /* 连连看结果界面 */ | |
| .mem-result { display: flex; flex-direction: column; height: 100%; } | |
| .mem-result-header { | |
| display: flex; | |
| align-items: center; | |
| gap: 10px; | |
| padding: 16px 18px; | |
| border-bottom: 1px solid rgba(255,255,255,0.04); | |
| flex-shrink: 0; | |
| } | |
| .mem-result-body { | |
| flex: 1; | |
| display: flex; | |
| flex-direction: column; | |
| align-items: center; | |
| justify-content: center; | |
| padding: 32px 24px; | |
| text-align: center; | |
| gap: 10px; | |
| } | |
| .mem-result-icon { font-size: 3rem; animation: iconBounce 0.6s var(--ease-spring); } | |
| .mem-result-title { | |
| font-size: 1.2rem; font-weight: 800; color: var(--text-primary); | |
| } | |
| .mem-result-newrecord { | |
| font-size: 0.9rem; font-weight: 700; color: #ffd700; | |
| background: rgba(255,215,0,0.1); | |
| padding: 4px 16px; border-radius: 20px; | |
| border: 1px solid rgba(255,215,0,0.2); | |
| animation: medalNewPulse 1s ease-in-out infinite; | |
| } | |