*,*:before,*:after{box-sizing:border-box;margin:0;padding:0}html,body{height:100%;overflow:hidden;font-family:system-ui,-apple-system,sans-serif;background:#0f172a;color:#f8fafc;-webkit-tap-highlight-color:transparent}#app{height:100%;position:relative}#camera-container{position:absolute;top:0;right:0;bottom:0;left:0;background:#0f172a}#camera-video{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;object-fit:cover}#camera-overlay{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;pointer-events:none}#camera-overlay>*{pointer-events:auto}#camera-overlay.hidden{display:none}.camera-controls{display:flex;align-items:center;gap:1rem;margin-bottom:max(2rem,env(safe-area-inset-bottom))}#settings-btn{width:48px;height:48px;border-radius:50%;border:2px solid rgba(248,250,252,.5);background:#fff3;color:#f8fafc;font-size:1.25rem;cursor:pointer;flex-shrink:0;transition:transform .1s,background .2s,border-color .2s;-webkit-tap-highlight-color:transparent}#settings-btn:hover{background:#ffffff4d}#settings-btn:active{transform:scale(.95)}#torch-btn{width:48px;height:48px;border-radius:50%;border:2px solid rgba(248,250,252,.5);background:#fff3;color:#f8fafc;font-size:1.5rem;cursor:pointer;flex-shrink:0;transition:transform .1s,background .2s,border-color .2s;-webkit-tap-highlight-color:transparent}#torch-btn:hover{background:#ffffff4d}#torch-btn.active{background:#facc15e6;border-color:#f8fafc;color:#0f172a}#torch-btn:active{transform:scale(.95)}#scan-btn{width:80px;height:80px;border-radius:50%;border:4px solid #f8fafc;background:#3b82f6e6;color:#fff;font-size:24px;line-height:1;cursor:pointer;flex-shrink:0;transition:transform .1s,background .2s;-webkit-tap-highlight-color:transparent}#scan-btn:active{transform:scale(.95)}#scan-btn:hover{background:#3b82f6}#result-overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:#0f172af2;display:flex;flex-direction:column;justify-content:center;align-items:center;padding:2rem;padding-top:max(2rem,env(safe-area-inset-top));padding-bottom:max(2rem,env(safe-area-inset-bottom));opacity:0;transition:opacity .2s;overflow-y:auto;-webkit-overflow-scrolling:touch}#result-overlay.visible{opacity:1}#result-overlay.hidden{display:none}#result-text{font-size:clamp(1.5rem,6vw,2.5rem);font-weight:700;line-height:1.3;text-align:center;max-width:90%;text-shadow:0 2px 4px rgba(0,0,0,.5);overflow-wrap:break-word;word-wrap:break-word;white-space:pre-wrap;flex-shrink:0}#result-text.error{color:#f87171}#loading-indicator{display:flex;align-items:center;justify-content:center;gap:.5rem;margin-bottom:1rem;flex-shrink:0}#loading-indicator.hidden{display:none}.loading-dot{width:10px;height:10px;border-radius:50%;background:#60a5fa;animation:loading-bounce .6s ease-in-out infinite}.loading-dot:nth-child(1){animation-delay:0s}.loading-dot:nth-child(2){animation-delay:.15s}.loading-dot:nth-child(3){animation-delay:.3s}@keyframes loading-bounce{0%,80%,to{transform:translateY(0)}40%{transform:translateY(-12px)}}#close-result{position:absolute;top:max(1rem,env(safe-area-inset-top));right:max(1rem,env(safe-area-inset-right));width:48px;height:48px;border:none;background:#fff3;color:#f8fafc;font-size:1.5rem;border-radius:50%;cursor:pointer;transition:background .2s}#close-result:hover{background:#ffffff4d}#log-overlay{position:fixed;top:0;right:0;bottom:0;left:0;background:#000000e6;z-index:9999;display:flex;align-items:center;justify-content:center;padding:1rem}.log-panel{background:#1e293b;border-radius:8px;max-width:100%;max-height:90vh;display:flex;flex-direction:column;overflow:hidden}.log-header{display:flex;align-items:center;gap:.5rem;padding:.75rem 1rem;background:#0f172a;flex-shrink:0}.log-header h3{flex:1;font-size:1rem;margin:0}.log-header button{padding:.4rem .75rem;border:none;border-radius:4px;background:#334155;color:#f8fafc;font-size:.85rem;cursor:pointer}.log-header button:hover{background:#475569}#log-content{flex:1;overflow:auto;padding:1rem;margin:0;font-size:.75rem;line-height:1.4;white-space:pre-wrap;word-break:break-all;color:#e2e8f0}#settings-overlay{position:fixed;top:0;right:0;bottom:0;left:0;background:#000000b3;z-index:9999;display:flex;align-items:center;justify-content:center;padding:1rem}.settings-panel{background:#1e293b;border-radius:8px;max-width:100%;width:320px;overflow:hidden}.settings-header{display:flex;align-items:center;justify-content:space-between;padding:1rem;background:#0f172a}.settings-header h3{margin:0;font-size:1.1rem}.settings-header button{width:36px;height:36px;border:none;background:#fff3;color:#f8fafc;font-size:1.2rem;border-radius:50%;cursor:pointer;transition:background .2s}.settings-header button:hover{background:#ffffff4d}.settings-body{padding:1rem}.settings-hint{font-size:.9rem;color:#94a3b8;margin-bottom:1rem;line-height:1.4}#lang-select{width:100%;padding:.75rem 1rem;font-size:1rem;border:2px solid #334155;border-radius:6px;background:#0f172a;color:#f8fafc;cursor:pointer}#lang-select:focus{outline:none;border-color:#60a5fa}
