pcb-defect-detector-project/new-version
0
1/* Reset and Base Styles */2* { margin: 0; padding: 0; box-sizing: border-box; }3body { font-family: 'Cairo', 'Inter', sans-serif; line-height: 1.6; color: #1e293b; overflow-x: hidden; background: #f8fafc; }4.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }5 6/* Navigation */7.navbar { position: fixed; top: 0; width: 100%; background: rgba(255, 255, 255, 0.98); backdrop-filter: blur(10px); z-index: 1000; padding: 1rem 0; transition: all 0.3s ease; box-shadow: 0 2px 20px rgba(0,0,0,0.05); }8.nav-container { max-width: 1200px; margin: 0 auto; padding: 0 20px; display: flex; justify-content: space-between; align-items: center; }9.nav-logo h2 { color: #1e293b; font-weight: 800; }10.nav-menu { display: flex; list-style: none; gap: 2rem; }11.nav-menu a { text-decoration: none; color: #475569; font-weight: 600; transition: color 0.3s ease; }12.nav-menu a:hover { color: #2563eb; }13.nav-cta .btn-primary { background: linear-gradient(135deg, #2563eb, #1d4ed8); color: white; border: none; padding: 0.75rem 1.5rem; border-radius: 50px; font-weight: 600; cursor: pointer; transition: transform 0.3s ease; }14.nav-cta .btn-primary:hover { transform: translateY(-2px); }15.hamburger { display: none; flex-direction: column; cursor: pointer; }16.hamburger span { width: 25px; height: 3px; background: #333; margin: 3px 0; transition: 0.3s; }17 18/* Buttons */19.btn-primary { background: linear-gradient(135deg, #2563eb, #1d4ed8); color: white; border: none; padding: 1rem 2rem; border-radius: 50px; font-weight: 600; cursor: pointer; transition: all 0.3s ease; text-decoration: none; display: inline-block; }20.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 25px rgba(37,99,235,0.3); }21.btn-secondary { background: transparent; color: #2563eb; border: 2px solid #2563eb; padding: 1rem 2rem; border-radius: 50px; font-weight: 600; cursor: pointer; transition: all 0.3s ease; }22.btn-secondary:hover { background: #2563eb; color: white; transform: translateY(-2px); }23.btn-large { padding: 1.25rem 2.5rem; font-size: 1.1rem; }24.btn-full { width: 100%; }25 26/* Hero Section */27.hero { min-height: 100vh; display: flex; align-items: center; background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%); padding: 120px 0 80px; position: relative; overflow: hidden; }28.hero-badge { display: inline-block; background: rgba(37,99,235,0.1); color: #2563eb; padding: 0.5rem 1rem; border-radius: 50px; font-weight: 600; margin-bottom: 1.5rem; }29.hero-container { max-width: 1200px; margin: 0 auto; padding: 0 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; z-index: 1; }30.hero-title { font-size: 3.5rem; font-weight: 800; line-height: 1.2; margin-bottom: 1.5rem; color: #1e293b; }31.gradient-text { background: linear-gradient(135deg, #2563eb, #1d4ed8); -webkit-background-clip: text; background-clip: text; color: transparent; }32.hero-subtitle { font-size: 1.25rem; color: #64748b; margin-bottom: 2.5rem; line-height: 1.6; }33.hero-buttons { display: flex; gap: 1rem; margin-bottom: 3rem; }34.hero-stats { display: flex; gap: 2rem; }35.stat { text-align: center; }36.stat h3 { font-size: 2rem; font-weight: 800; color: #2563eb; margin-bottom: 0.5rem; }37.stat p { color: #64748b; font-weight: 500; }38 39/* Hero Visual */40.hero-image { position: relative; height: 500px; }41.floating-card { position: absolute; background: white; padding: 1rem; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.1); display: flex; align-items: center; gap: 0.5rem; font-weight: 600; color: #2563eb; animation: float 6s ease-in-out infinite; }42.floating-card i { font-size: 1.2rem; }43.card-1 { top: 10%; left: 10%; animation-delay: 0s; }44.card-2 { top: 20%; right: 15%; animation-delay: 2s; }45.card-3 { bottom: 30%; left: 5%; animation-delay: 4s; }46@keyframes float { 0%,100% { transform: translateY(0px); } 50% { transform: translateY(-20px); } }47.main-dashboard { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); background: white; border-radius: 20px; box-shadow: 0 20px 60px rgba(0,0,0,0.1); padding: 1.5rem; width: 280px; height: 200px; }48.dashboard-header { display: flex; justify-content: space-between; margin-bottom: 1rem; }49.dashboard-title { font-weight: 700; color: #1e293b; }50.metric-value { display: block; font-weight: 800; color: #2563eb; font-size: 1.1rem; }51 52/* Defects Showcase */53.defects-showcase-section { padding: 100px 0; background: white; }54.section-header { text-align: center; margin-bottom: 4rem; }55.section-header h2 { font-size: 2.5rem; font-weight: 800; color: #1e293b; margin-bottom: 1rem; }56.defects-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }57.defect-card { background: linear-gradient(135deg, #fff, #f8fafc); padding: 2rem; border-radius: 20px; text-align: center; transition: all 0.3s; border: 1px solid rgba(37,99,235,0.1); cursor: pointer; }58.defect-card:hover { transform: translateY(-10px); box-shadow: 0 20px 40px rgba(37,99,235,0.15); border-color: #2563eb; }59.defect-card h3 { font-size: 1.3rem; font-weight: 700; color: #2563eb; margin-bottom: 0.75rem; }60 61/* Detector Section */62.detector-section { padding: 100px 0; background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%); }63.detector-wrapper { background: white; border-radius: 30px; padding: 40px; box-shadow: 0 20px 60px rgba(0,0,0,0.1); }64.upload-area { border: 3px dashed #2563eb; border-radius: 30px; padding: 50px 20px; text-align: center; cursor: pointer; transition: all 0.3s; background: rgba(37,99,235,0.05); }65.upload-area:hover { background: rgba(37,99,235,0.1); border-color: #60a5fa; }66.upload-icon { font-size: 3rem; margin-bottom: 1rem; }67.upload-btn, .defectBtn { background: linear-gradient(135deg, #2563eb, #1d4ed8); border: none; padding: 12px 30px; font-size: 1rem; font-weight: bold; color: white; border-radius: 50px; cursor: pointer; margin-top: 20px; }68.upload-btn:hover, .defectBtn:hover { transform: scale(1.02); }69#previewImg { max-width: 100%; max-height: 300px; border-radius: 20px; margin-top: 20px; display: none; border: 3px solid #2563eb; }70 71/* Loading */72.loading { display: none; text-align: center; padding: 40px; }73.spinner { width: 60px; height: 60px; border: 5px solid rgba(37,99,235,0.2); border-top: 5px solid #2563eb; border-radius: 50%; animation: spin 1s linear infinite; margin: 0 auto 20px; }74@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }75 76/* Results */77.results-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 25px; margin-top: 30px; }78@media (max-width: 800px) { .results-grid { grid-template-columns: 1fr; } }79.result-card { background: rgba(0,0,0,0.05); border-radius: 25px; padding: 20px; border-right: 5px solid #2563eb; }80.defect-item { background: rgba(37,99,235,0.08); border-radius: 20px; padding: 15px; margin-bottom: 15px; border-right: 4px solid #2563eb; }81.defect-item.severity-critical { border-right-color: #ef4444; background: rgba(239,68,68,0.05); }82.defect-item.severity-high { border-right-color: #f59e0b; background: rgba(245,158,11,0.05); }83.defect-item.severity-medium { border-right-color: #8b5cf6; background: rgba(139,92,246,0.05); }84.defect-item.severity-low { border-right-color: #10b981; background: rgba(16,185,129,0.05); }85.confidence-box { padding: 5px 15px; border-radius: 30px; font-size: 0.8rem; font-weight: bold; }86.confidence-low { background: #f9a825; color: #1a1a2e; }87.confidence-medium { background: #ff6f00; color: white; }88.confidence-high { background: #d32f2f; color: white; }89.annotated-img { width: 100%; border-radius: 20px; margin-top: 15px; border: 2px solid #2563eb; }90 91/* Auth Modal */92.modal { position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center; }93.modal-content { background: white; border-radius: 20px; padding: 30px; width: 90%; max-width: 400px; position: relative; animation: slideDown 0.3s ease; }94.close-auth { position: absolute; top: 15px; left: 20px; font-size: 28px; cursor: pointer; color: #64748b; }95.close-auth:hover { color: #2563eb; }96.auth-switch { text-align: center; margin-top: 15px; }97.auth-switch a { color: #2563eb; cursor: pointer; text-decoration: underline; }98.user-bar { background: #1e293b; padding: 10px 20px; display: flex; justify-content: flex-end; align-items: center; gap: 20px; position: sticky; top: 0; z-index: 99; }99.user-info { display: flex; align-items: center; gap: 15px; color: white; }100.logout-btn, .boards-btn { background: #2563eb; border: none; padding: 5px 15px; border-radius: 20px; color: white; cursor: pointer; }101 102/* Boards Panel */103.boards-panel { position: fixed; top: 0; left: -350px; width: 350px; height: 100%; background: #0f172a; z-index: 1001; transition: left 0.3s; box-shadow: 2px 0 10px rgba(0,0,0,0.3); border-left: 1px solid #2563eb; }104.boards-panel.show { left: 0; }105.boards-panel-header { display: flex; justify-content: space-between; align-items: center; padding: 15px; background: #1e293b; border-bottom: 1px solid #2563eb; }106.board-item { background: #1e293b; border-radius: 12px; padding: 12px; margin-bottom: 10px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; }107.board-item:hover { background: #334155; }108.delete-board-btn { background: #ef4444; border: none; padding: 5px 10px; border-radius: 8px; color: white; cursor: pointer; }109 110/* Report Buttons */111.report-buttons { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 15px; justify-content: center; }112.report-btn { background: linear-gradient(135deg, #1e293b, #0f172a); color: white; border: none; padding: 10px 20px; border-radius: 12px; cursor: pointer; font-weight: 600; transition: all 0.3s; display: inline-flex; align-items: center; gap: 8px; }113.report-btn:hover { background: linear-gradient(135deg, #2563eb, #1d4ed8); transform: translateY(-2px); }114 115/* Footer */116.footer { background: #1e293b; color: white; padding: 60px 0 20px; }117.footer-content { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; margin-bottom: 2rem; }118.footer-bottom { border-top: 1px solid #334155; padding-top: 2rem; text-align: center; color: #94a3b8; }119 120/* Responsive */121@media (max-width: 768px) { .nav-menu { display: none; } .hamburger { display: flex; } .hero-container { grid-template-columns: 1fr; text-align: center; } .hero-title { font-size: 2.5rem; } .footer-content { grid-template-columns: 1fr; text-align: center; } .defects-grid { grid-template-columns: 1fr; } }122@media (max-width: 480px) { .hero-title { font-size: 2rem; } .section-header h2 { font-size: 2rem; } }123 124/* Toast Notification */125.toast-notification { position: fixed; bottom: 30px; left: 30px; background: #1e293b; color: white; padding: 12px 20px; border-radius: 12px; display: flex; align-items: center; gap: 10px; z-index: 1000; animation: slideInLeft 0.3s ease; box-shadow: 0 5px 15px rgba(0,0,0,0.2); }126.toast-notification.success { background: #10b981; }127.toast-notification.error { background: #ef4444; }128@keyframes slideInLeft { from { opacity: 0; transform: translateX(-100px); } to { opacity: 1; transform: translateX(0); } }129@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }130 131/* ========== Dashboard Styles ========== */132.dashboard-container {133 background: #1e293b;134 border-radius: 20px;135 padding: 20px;136 margin-bottom: 30px;137}138 139.stats-grid {140 display: grid;141 grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));142 gap: 20px;143 margin-bottom: 30px;144}145 146.stat-card {147 background: linear-gradient(135deg, #2563eb, #1d4ed8);148 border-radius: 16px;149 padding: 20px;150 text-align: center;151 color: white;152}153 154.stat-card h3 {155 font-size: 2rem;156 margin-bottom: 5px;157}158 159.charts-grid {160 display: grid;161 grid-template-columns: 1fr 1fr;162 gap: 20px;163 margin-bottom: 30px;164}165 166.chart-card {167 background: #0f172a;168 border-radius: 16px;169 padding: 20px;170 border: 1px solid #334155;171}172 173.chart-card h4 {174 color: #2563eb;175 margin-bottom: 15px;176}177 178.defects-list {179 background: #0f172a;180 border-radius: 16px;181 padding: 20px;182}183 184.defect-stat-item {185 display: flex;186 justify-content: space-between;187 align-items: center;188 padding: 12px;189 border-bottom: 1px solid #334155;190}191 192.dashboard-toggle {193 background: #2563eb;194 border: none;195 padding: 10px 20px;196 border-radius: 30px;197 color: white;198 cursor: pointer;199 margin-bottom: 20px;200 display: flex;201 align-items: center;202 gap: 10px;203}204 205@media (max-width: 768px) {206 .charts-grid {207 grid-template-columns: 1fr;208 }209}210 211/* ========== Batch Processing Styles ========== */212.batch-container {213 margin-top: 20px;214 padding: 20px;215 background: #1e293b;216 border-radius: 16px;217}218 219.batch-header {220 display: flex;221 justify-content: space-between;222 align-items: center;223 flex-wrap: wrap;224 gap: 15px;225 margin-bottom: 20px;226}227 228.batch-upload-area {229 border: 2px dashed #2563eb;230 border-radius: 12px;231 padding: 20px;232 text-align: center;233 cursor: pointer;234 transition: all 0.3s;235 background: rgba(37, 99, 235, 0.05);236}237 238.batch-upload-area:hover {239 background: rgba(37, 99, 235, 0.1);240}241 242.batch-preview-list {243 display: flex;244 flex-wrap: wrap;245 gap: 10px;246 margin-top: 15px;247 max-height: 200px;248 overflow-y: auto;249}250 251.batch-preview-item {252 position: relative;253 width: 80px;254 height: 80px;255 border-radius: 8px;256 overflow: hidden;257 border: 2px solid #334155;258 cursor: pointer;259}260 261.batch-preview-item img {262 width: 100%;263 height: 100%;264 object-fit: cover;265}266 267.batch-preview-item .remove-preview {268 position: absolute;269 top: -8px;270 right: -8px;271 width: 20px;272 height: 20px;273 background: #ef4444;274 border-radius: 50%;275 display: flex;276 align-items: center;277 justify-content: center;278 font-size: 12px;279 cursor: pointer;280}281 282.progress-container {283 margin: 20px 0;284}285 286.progress-bar {287 width: 100%;288 height: 8px;289 background: #334155;290 border-radius: 4px;291 overflow: hidden;292}293 294.progress-fill {295 height: 100%;296 background: #2563eb;297 border-radius: 4px;298 transition: width 0.3s ease;299}300 301.batch-results-grid {302 display: grid;303 grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));304 gap: 15px;305 margin-top: 20px;306 max-height: 500px;307 overflow-y: auto;308}309 310.batch-result-card {311 background: #0f172a;312 border-radius: 12px;313 padding: 12px;314 border: 1px solid #334155;315}316 317.batch-result-card.success {318 border-left: 4px solid #10b981;319}320 321.batch-result-card.failed {322 border-left: 4px solid #ef4444;323}324 325.batch-result-header {326 display: flex;327 justify-content: space-between;328 align-items: center;329 margin-bottom: 8px;330}331 332.batch-result-filename {333 font-size: 12px;334 color: #94a3b8;335 word-break: break-all;336}337 338.batch-result-defects {339 font-size: 14px;340 font-weight: bold;341 color: #2563eb;342}343 344.batch-result-decision {345 font-size: 12px;346 margin-top: 8px;347 padding: 4px 8px;348 border-radius: 20px;349 text-align: center;350}351 352.batch-summary {353 background: #0f172a;354 border-radius: 12px;355 padding: 15px;356 margin-bottom: 15px;357}358 359.batch-summary-stats {360 display: flex;361 gap: 20px;362 flex-wrap: wrap;363}364 365.batch-summary-stat {366 flex: 1;367 text-align: center;368 padding: 10px;369 background: #1e293b;370 border-radius: 8px;371}372 373.batch-export-btn {374 background: #2563eb;375 border: none;376 padding: 8px 16px;377 border-radius: 8px;378 color: white;379 cursor: pointer;380 margin-top: 10px;381}382 383/* ========== Dark Mode Styles ========== */384body.dark-mode {385 background: #0f172a;386 color: #f1f5f9;387}388 389body.dark-mode .navbar {390 background: #1e293b;391 box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);392}393 394body.dark-mode .navbar .nav-logo h2,395body.dark-mode .navbar .nav-menu a {396 color: #f1f5f9;397}398 399body.dark-mode .hero {400 background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);401}402 403body.dark-mode .hero-title,404body.dark-mode .section-header h2,405body.dark-mode .about-text h2 {406 color: #f1f5f9;407}408 409body.dark-mode .defect-card {410 background: linear-gradient(135deg, #1e293b, #0f172a);411 border-color: #334155;412}413 414body.dark-mode .defect-card h3 {415 color: #60a5fa;416}417 418body.dark-mode .detector-section {419 background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);420}421 422body.dark-mode .detector-wrapper,423body.dark-mode .contact-form {424 background: #1e293b;425}426 427body.dark-mode .result-card {428 background: #0f172a;429}430 431body.dark-mode .modal-content {432 background: #1e293b;433 color: #f1f5f9;434}435 436body.dark-mode .form-group input {437 background: #334155;438 border-color: #475569;439 color: #f1f5f9;440}441 442body.dark-mode .boards-panel {443 background: #0f172a;444 border-left-color: #3b82f6;445}446 447body.dark-mode .board-item {448 background: #1e293b;449}450 451body.dark-mode .footer {452 background: #0f172a;453}454 455/* Dark Mode Toggle Button */456.dark-mode-toggle {457 background: transparent;458 border: 1px solid #2563eb;459 padding: 8px 16px;460 border-radius: 30px;461 cursor: pointer;462 display: flex;463 align-items: center;464 gap: 8px;465 color: #2563eb;466}467 468.dark-mode-toggle:hover {469 background: #2563eb;470 color: white;471}472 473body.dark-mode .dark-mode-toggle {474 border-color: #60a5fa;475 color: #60a5fa;476}477 478body.dark-mode .dark-mode-toggle:hover {479 background: #60a5fa;480 color: #0f172a;481}482 483/* Dark Mode Dashboard Styles */484body.dark-mode .dashboard-container {485 background: #1e293b;486}487 488body.dark-mode .chart-card {489 background: #0f172a;490 border-color: #334155;491}492 493body.dark-mode .stat-card {494 background: linear-gradient(135deg, #1e293b, #0f172a);495 border: 1px solid #334155;496}497 498body.dark-mode .batch-container {499 background: #1e293b;500}501 502body.dark-mode .batch-result-card {503 background: #0f172a;504}