Spaces:
Runtime error
Runtime error
| /* Stage switching: only the active stage shows. */ | |
| .stage { display: none; flex-direction: column; flex: 1; min-height: 100%; } | |
| #app[data-stage="capture"] .stage.capture { display: flex; } | |
| #app[data-stage="processing"] .stage.processing { display: flex; } | |
| #app[data-stage="result"] .stage.result { display: flex; } | |
| /* Hide bottom nav on processing/result (immersive) */ | |
| #app[data-stage="processing"] .bottom-nav, | |
| #app[data-stage="result"] .bottom-nav { display: none; } | |
| /* ββ Capture βββββββββββββββββββββββββββββββββββββββββββββ */ | |
| .cap-body { display: flex; flex-direction: column; gap: 14px; padding-top: 8px; } | |
| .cap-prompt { font-weight: 600; color: var(--ink-soft); font-size: .95rem; } | |
| .cap-options { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; } | |
| .cap-card { | |
| display: flex; flex-direction: column; align-items: center; gap: 6px; | |
| padding: 30px 16px; border: 1.5px solid var(--line); border-radius: var(--radius); | |
| background: var(--surface); cursor: pointer; text-align: center; | |
| box-shadow: var(--shadow-sm); | |
| transition: var(--t-ui), background var(--t-morph), border-color var(--t-morph); | |
| position: relative; overflow: hidden; | |
| animation: liftIn .45s cubic-bezier(.4,0,.2,1) both; | |
| -webkit-tap-highlight-color: transparent; | |
| } | |
| .cap-card:nth-child(2) { animation-delay: .07s; } | |
| .cap-card::after { | |
| content: ''; position: absolute; inset: auto 18px 14px; | |
| height: 3px; border-radius: 999px; background: var(--accent); | |
| opacity: 0; transform: scaleX(.4); transition: var(--t-ui), background var(--t-morph); | |
| } | |
| .cap-card:active { transform: scale(.97); } | |
| .cap-card:hover { border-color: var(--accent); transform: translateY(-2px); } | |
| .cap-card:hover::after { opacity: .75; transform: scaleX(1); } | |
| .cap-ico { color: var(--accent); transition: color var(--t-morph); } | |
| .cap-ico .ic { width: 40px; height: 40px; filter: drop-shadow(0 6px 10px var(--bg-tint)); } | |
| .cap-card strong { font-size: 1rem; } | |
| .cap-card em { font-style: normal; font-size: .78rem; color: var(--ink-soft); } | |
| .preview { width: 100%; border-radius: var(--radius); max-height: 300px; object-fit: cover; } | |
| .errbox { background: #fdecea; color: #b3261e; border-radius: 14px; padding: 12px 16px; font-size: .9rem; } | |
| /* ββ Processing ββββββββββββββββββββββββββββββββββββββββββ */ | |
| .proc-body { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px; } | |
| .scan-frame { position: relative; width: 240px; height: 240px; } | |
| .scan-frame::before, | |
| .scan-frame::after { | |
| content: ''; position: absolute; inset: -20px; border-radius: 50%; | |
| border: 1px solid var(--accent); opacity: .22; | |
| animation: scanPulse 1.8s ease-out infinite; | |
| } | |
| .scan-frame::after { animation-delay: .45s; } | |
| .scan-img { | |
| width: 100%; height: 100%; object-fit: cover; border-radius: 50%; | |
| animation: pop .5s cubic-bezier(.34,1.56,.64,1) both; | |
| } | |
| .scan-ring { | |
| position: absolute; inset: -10px; border-radius: 50%; | |
| border: 3px solid var(--accent); border-top-color: transparent; | |
| animation: spin 1s linear infinite; transition: border-color var(--t-morph); | |
| will-change: transform; | |
| } | |
| @keyframes spin { to { transform: rotate(360deg); } } | |
| .scan-sweep { | |
| position: absolute; inset: 0; border-radius: 50%; overflow: hidden; pointer-events: none; | |
| background: linear-gradient(transparent 0%, var(--bg-tint) 50%, transparent 100%); | |
| background-size: 100% 60px; animation: sweep 1.6s ease-in-out infinite; | |
| will-change: background-position; | |
| } | |
| @keyframes sweep { 0%{ background-position: 0 -60px } 100%{ background-position: 0 280px } } | |
| .proc-text { font-weight: 600; color: var(--ink-soft); animation: rise .4s both; } | |
| /* ββ Result ββββββββββββββββββββββββββββββββββββββββββββββ */ | |
| .result-head { | |
| background: var(--grad-hero); | |
| color: var(--on-accent); padding-bottom: 64px; | |
| border-bottom-left-radius: 44px; border-bottom-right-radius: 44px; | |
| text-align: center; position: relative; | |
| transition: background var(--t-morph); | |
| animation: resultDrop .45s cubic-bezier(.4,0,.2,1) both; | |
| } | |
| .result-head .icon-btn { background: rgba(255,255,255,.18); border: none; color: var(--on-accent); } | |
| .plate-wrap { display: flex; justify-content: center; margin: 4px 0 14px; } | |
| .plate { | |
| width: 200px; height: 200px; object-fit: cover; border-radius: 50%; | |
| border: 6px solid rgba(255,255,255,.25); | |
| box-shadow: 0 16px 40px rgba(0,0,0,.25); | |
| animation: pop .55s cubic-bezier(.34,1.56,.64,1) both; | |
| will-change: transform; | |
| } | |
| .dish-name { font-size: 1.7rem; font-weight: 800; } | |
| .dish-sub { opacity: .9; font-weight: 500; margin-top: 2px; } | |
| .result-body { | |
| margin-top: -18px; | |
| display: flex; | |
| flex-direction: column; | |
| gap: 18px; | |
| position: relative; | |
| z-index: 2; | |
| padding-top: 0; | |
| padding-bottom: 28px; | |
| } | |
| .row { | |
| background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-sm); | |
| padding: 18px; display: flex; align-items: center; justify-content: space-between; | |
| animation: liftIn .42s cubic-bezier(.4,0,.2,1) both; | |
| } | |
| .lbl { font-size: .75rem; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 8px; } | |
| /* confidence ring */ | |
| .conf { text-align: center; position: relative; } | |
| .conf-ring { width: 80px; height: 80px; transform: rotate(-90deg); } | |
| .conf-ring circle { fill: none; stroke-width: 7; } | |
| .conf-ring .track { stroke: var(--bg-tint); } | |
| .conf-ring .bar { | |
| stroke: var(--accent); stroke-linecap: round; | |
| stroke-dasharray: 213.6; stroke-dashoffset: 213.6; | |
| transition: stroke-dashoffset 1s cubic-bezier(.4,0,.2,1), stroke var(--t-morph); | |
| } | |
| .conf-val { position: absolute; top: 30px; left: 0; right: 0; font-weight: 700; font-size: .95rem; } | |
| .conf .lbl { margin: 2px 0 0; } | |
| /* correction */ | |
| .correct-toggle { | |
| width: 100%; display: flex; align-items: center; gap: 10px; | |
| text-align: left; background: var(--bg-tint); color: var(--ink); | |
| border: none; border-radius: 16px; padding: 14px 18px; font: inherit; font-weight: 500; | |
| cursor: pointer; transition: background var(--t-morph); | |
| animation: liftIn .42s cubic-bezier(.4,0,.2,1) .08s both; | |
| -webkit-tap-highlight-color: transparent; | |
| } | |
| .correct-toggle .ic { color: var(--accent); } | |
| .correct-panel { margin-top: 12px; } | |
| #search { | |
| width: 100%; font: inherit; padding: 14px 16px; border: 1.5px solid var(--line); | |
| border-radius: 14px; outline: none; margin-bottom: 10px; | |
| } | |
| #search:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--bg-tint); } | |
| .suggestions { display: flex; flex-direction: column; gap: 8px; max-height: 260px; overflow-y: auto; } | |
| .sugg { | |
| display: flex; align-items: center; justify-content: space-between; | |
| padding: 12px 16px; border: 1px solid var(--line); border-radius: 14px; | |
| cursor: pointer; transition: var(--t-ui); | |
| animation: liftIn .28s cubic-bezier(.4,0,.2,1) both; | |
| -webkit-tap-highlight-color: transparent; | |
| } | |
| .sugg:active { transform: scale(.98); } | |
| .sugg b { font-weight: 600; } | |
| .sugg small { color: var(--ink-soft); } | |
| .sugg .tag { font-size: .72rem; color: var(--accent); font-weight: 600; } | |
| /* toast */ | |
| .toast { | |
| position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); | |
| background: var(--ink); color: #fff; padding: 12px 22px; border-radius: 999px; | |
| font-size: .9rem; font-weight: 500; z-index: 50; animation: pop .3s both; | |
| } | |
| @keyframes liftIn { | |
| from { opacity: 0; transform: translateY(12px); } | |
| to { opacity: 1; transform: translateY(0); } | |
| } | |
| @keyframes resultDrop { | |
| from { opacity: 0; transform: translateY(-18px); } | |
| to { opacity: 1; transform: translateY(0); } | |
| } | |
| @keyframes scanPulse { | |
| 0% { transform: scale(.86); opacity: .28; } | |
| 100% { transform: scale(1.18); opacity: 0; } | |
| } | |