*{margin:0;padding:0;box-sizing:border-box}body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;background:linear-gradient(135deg,#667eea,#764ba2);min-height:100vh;display:flex;align-items:center;justify-content:center;padding:20px;transition:all .3s ease;overflow-x:hidden;width:100%;max-width:100vw}body.drag-over{background:linear-gradient(135deg,#3b82f6,#8b5cf6)}body.drag-over:before{content:"Drop files anywhere to upload";position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);color:#fff;font-size:2rem;font-weight:700;text-shadow:0 2px 4px rgba(0,0,0,.3);z-index:1000;pointer-events:none}#root{width:100%;max-width:1200px}.app{background:#fff;border-radius:16px;box-shadow:0 20px 40px #0000001a;overflow:hidden;min-height:600px}.header{background:linear-gradient(135deg,#4f46e5,#7c3aed);color:#fff;padding:16px 24px;text-align:center}.header h1{font-size:1.8rem;font-weight:700;margin-bottom:4px}.header p{font-size:.95rem;opacity:.9}.content{padding:20px}.analysis-status{display:flex;align-items:center;justify-content:center;gap:12px;padding:16px;background:#f0f9ff;border:1px solid #bae6fd;border-radius:8px;color:#0c4a6e;font-weight:600;margin:16px 0}.main-content{display:grid;grid-template-columns:1fr 1fr;gap:24px;align-items:start}.preview-section,.results-section{display:flex;flex-direction:column}.preview-section .preview,.results-section .results{margin-top:0}.upload-area{border:2px dashed #d1d5db;border-radius:8px;padding:20px 24px;text-align:center;transition:all .3s ease;cursor:pointer;background:#f9fafb;margin-bottom:16px}.upload-area:hover{border-color:#4f46e5;background:#f0f9ff}.upload-area.drag-over{border-color:#4f46e5;background:#eff6ff;transform:scale(1.02)}.upload-area.has-file{border-color:#059669;background:#ecfdf5;padding:12px 16px}.upload-area.has-file .upload-icon{font-size:1.5rem;margin-bottom:4px}.upload-area.has-file h3{font-size:.95rem;margin-bottom:2px}.upload-area.has-file p{font-size:.8rem}.upload-icon{font-size:2.5rem;margin-bottom:8px;opacity:.6}.upload-area h3{font-size:1.1rem;color:#374151;margin-bottom:4px}.upload-area p{color:#6b7280;font-size:.9rem}.file-input{display:none}.preview{margin:16px 0;text-align:center}.preview img,.preview video{max-width:100%;max-height:250px;border-radius:6px;box-shadow:0 2px 4px #0000001a;display:block;margin:0 auto}.file-info{background:#f3f4f6;padding:12px;border-radius:6px;margin:12px 0}.file-info p{color:#374151;margin:2px 0;font-size:.85rem}.submit-button{width:100%;background:linear-gradient(135deg,#059669,#047857);color:#fff;border:none;padding:16px 32px;border-radius:8px;font-size:1.1rem;font-weight:600;cursor:pointer;transition:all .3s ease;margin-top:16px}.submit-button:hover:not(:disabled){transform:translateY(-2px);box-shadow:0 8px 16px #0596694d}.submit-button:disabled{opacity:.6;cursor:not-allowed;transform:none}.spinner{display:inline-block;width:20px;height:20px;border:2px solid #ffffff;border-radius:50%;border-top-color:transparent;animation:spin 1s linear infinite;margin-right:8px}@keyframes spin{to{transform:rotate(360deg)}}.results{margin-top:0;padding:24px;background:#f8fafc;border-radius:12px;border:1px solid #e2e8f0}.results h2{color:#1e293b;margin-bottom:16px;font-size:1.5rem}.classification{display:flex;align-items:center;margin-bottom:16px;padding:12px;border-radius:8px;font-weight:600}.classification.safe{background:#dcfce7;color:#166534}.classification.unsafe{background:#fef2f2;color:#991b1b}.classification-icon{margin-right:8px;font-size:1.2rem}.predictions{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:12px;margin-top:16px}.prediction{background:#fff;padding:12px;border-radius:8px;text-align:center;border:1px solid #e2e8f0;display:flex;flex-direction:column;justify-content:space-between;min-height:80px}.prediction-label{font-size:.875rem;color:#64748b;text-transform:uppercase;font-weight:600;margin-bottom:8px;line-height:1.2;flex-grow:1;display:flex;align-items:center;justify-content:center}.prediction-value{font-size:1.25rem;font-weight:700;color:#1e293b;line-height:1}.task-id{margin-top:16px;padding:12px;background:#f1f5f9;border-radius:6px;font-family:monospace;font-size:.875rem;color:#475569;word-break:break-all}.error{margin-top:32px;padding:16px;background:#fef2f2;border:1px solid #fecaca;border-radius:8px;color:#991b1b}.error h3{margin-bottom:8px;font-size:1.1rem}.reset-button{background:#6b7280;color:#fff;border:none;padding:12px 24px;border-radius:6px;font-size:.9rem;cursor:pointer;margin-top:16px;transition:background .3s ease}.reset-button:hover{background:#4b5563}.frames-container{margin-top:16px;display:flex;flex-direction:column;gap:16px}.frame-card{background:#fff;border:1px solid #e2e8f0;border-radius:12px;overflow:hidden;box-shadow:0 2px 4px #0000000d;transition:box-shadow .2s ease}.frame-card:hover{box-shadow:0 4px 8px #0000001a}.frame-header{background:linear-gradient(135deg,#f1f5f9,#e2e8f0);padding:12px 16px;border-bottom:1px solid #e2e8f0}.frame-header h4{color:#475569;font-size:1rem;font-weight:600;margin:0}.frame-predictions{padding:16px;display:grid;grid-template-columns:repeat(5,1fr);gap:12px}.frame-predictions .prediction{background:#f8fafc;border:1px solid #f1f5f9;transition:all .2s ease;display:flex;flex-direction:column;justify-content:space-between;min-height:80px}.frame-predictions .prediction:hover{background:#f1f5f9;border-color:#e2e8f0;transform:translateY(-1px)}.frame-predictions .prediction-label{font-size:.8rem;letter-spacing:.025em;line-height:1.2;flex-grow:1;display:flex;align-items:center;justify-content:center;margin-bottom:8px}.frame-predictions .prediction-value{font-size:1.1rem;line-height:1}.frame-predictions .prediction:nth-child(2),.frame-predictions .prediction:nth-child(3),.frame-predictions .prediction:nth-child(4),.frame-predictions .prediction:nth-child(5){border-left:3px solid #ef4444}.frame-predictions .prediction:nth-child(1){border-left:3px solid #22c55e}@media (max-width: 1024px){#root{max-width:100%;padding:0;width:100vw}.app{width:100%;margin:0;max-width:none}.main-content{grid-template-columns:1fr;gap:16px;width:100%;max-width:100%}.preview-section,.results-section{width:100%;max-width:100%;overflow:hidden}}@media (max-width: 768px){body{padding:10px;align-items:flex-start}.content{padding:12px;width:100%;box-sizing:border-box}body.drag-over:before{font-size:1.5rem}.preview,.results,.upload-area{width:100%;max-width:100%;box-sizing:border-box}.frame-predictions{display:grid;grid-template-columns:repeat(2,1fr);gap:12px;padding:12px;justify-items:center}.frame-predictions .prediction{width:100%;max-width:140px}.frame-predictions .prediction:nth-child(5){grid-column:1 / -1;max-width:140px;justify-self:center}}@media (max-width: 640px){.frame-header{padding:10px 12px}.frames-container{gap:12px}#root{padding:0;width:100vw}.header{padding:12px 16px}.content{padding:10px}.header h1{font-size:1.4rem}.header p{font-size:.85rem}body.drag-over:before{font-size:1.2rem}.frame-predictions .prediction{min-height:70px;padding:8px;max-width:120px}.frame-predictions .prediction:nth-child(5){max-width:120px}.frame-predictions .prediction-label{font-size:.7rem}.frame-predictions .prediction-value{font-size:1rem}.upload-area{padding:16px 20px}.upload-area.has-file{padding:10px 12px}.preview{margin:12px 0}.preview img,.preview video{max-height:200px;width:100%;object-fit:contain;border-radius:6px}.file-info{padding:10px}.file-info p{word-break:break-word;font-size:.8rem;overflow-wrap:break-word}.preview video{max-width:100%;height:auto}.results{padding:16px}.results h2{font-size:1.3rem}.classification{padding:10px;font-size:.9rem}.task-id{font-size:.75rem;padding:10px;word-break:break-all}}
