diff --git a/static/suitbuilder.css b/static/suitbuilder.css index 3fe8a8d0..ef6bb4d2 100644 --- a/static/suitbuilder.css +++ b/static/suitbuilder.css @@ -520,20 +520,7 @@ body { min-width: 100px; } -/* Loading States */ -.loading { - display: flex; - align-items: center; - justify-content: center; - padding: 2rem; - font-style: italic; - color: #6b7280; -} - -.loading::before { - content: "đ "; - margin-right: 0.5rem; -} +/* Loading States - See Progressive Search Styles section below */ /* Error States */ .error { @@ -828,52 +815,718 @@ body { } /* Progressive Search Styles */ +.loading { + padding: 20px; + text-align: center; + background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%); + border: 1px solid #90caf9; + border-radius: 8px; + color: #1565c8; + font-weight: 500; + display: flex; + flex-direction: column; + align-items: center; + gap: 12px; +} + +.loading::before { + content: none; +} + +/* Spinning search indicator */ +.search-spinner { + width: 40px; + height: 40px; + border: 4px solid #bbdefb; + border-top: 4px solid #1976d2; + border-radius: 50%; + animation: spin 1s linear infinite; +} + +@keyframes spin { + 0% { transform: rotate(0deg); } + 100% { transform: rotate(360deg); } +} + +.search-status { + font-size: 16px; + font-weight: 600; + color: #1565c8; +} + .search-progress { - margin-top: 15px; - padding: 10px; - background: #f8f9fa; + margin-top: 8px; + padding: 12px 16px; + background: rgba(255, 255, 255, 0.8); border-radius: 6px; - border: 1px solid #e9ecef; + border: 1px solid #90caf9; + width: 100%; + max-width: 400px; } .progress-stats { - font-family: 'Courier New', monospace; + display: flex; + justify-content: center; + gap: 16px; + flex-wrap: wrap; + margin-bottom: 12px; +} + +.stat-item { font-size: 13px; - color: #495057; - margin-bottom: 10px; + color: #424242; +} + +.stat-value { + font-family: 'Courier New', monospace; + font-weight: bold; + color: #1565c8; } .stop-search-btn { - background: #dc3545; + background: linear-gradient(135deg, #ef5350 0%, #d32f2f 100%); color: white; border: none; - padding: 6px 12px; + padding: 8px 16px; border-radius: 4px; cursor: pointer; - font-size: 12px; + font-size: 13px; font-weight: bold; - transition: background-color 0.2s; + transition: all 0.2s; + box-shadow: 0 2px 4px rgba(211, 47, 47, 0.3); } .stop-search-btn:hover { - background: #c82333; + background: linear-gradient(135deg, #d32f2f 0%, #c62828 100%); + transform: translateY(-1px); + box-shadow: 0 3px 6px rgba(211, 47, 47, 0.4); } .stop-search-btn:active { - background: #bd2130; + transform: translateY(0); + box-shadow: 0 1px 2px rgba(211, 47, 47, 0.3); +} + +.search-complete { + font-size: 15px; + color: #2e7d32; + font-weight: 600; + padding: 8px; } #streamingResults { margin-top: 15px; } -/* Enhance loading messages */ -.loading { - padding: 20px; +/* ======================================== + ENHANCED SEARCH STATUS UI + ======================================== */ + +/* Search Status Container - Modern Dark Design */ +.search-status-container { + background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%); + border-radius: 12px; + padding: 24px; + color: #eee; + box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3); + margin-bottom: 20px; +} + +/* Phase Indicator */ +.phase-indicator { + display: flex; + align-items: center; + gap: 16px; + margin-bottom: 20px; +} + +.phase-icon { + font-size: 32px; + animation: pulse 1.5s infinite; + min-width: 40px; text-align: center; - background: #e3f2fd; - border: 1px solid #bbdefb; +} + +.phase-icon.complete { + animation: none; +} + +.phase-icon.searching { + animation: searchPulse 0.8s infinite; +} + +@keyframes pulse { + 0%, 100% { transform: scale(1); opacity: 1; } + 50% { transform: scale(1.1); opacity: 0.8; } +} + +@keyframes searchPulse { + 0%, 100% { transform: scale(1) rotate(0deg); } + 25% { transform: scale(1.1) rotate(-5deg); } + 75% { transform: scale(1.1) rotate(5deg); } +} + +.phase-text { + font-size: 18px; + font-weight: 600; + color: #4fc3f7; +} + +.phase-text.complete { + color: #66bb6a; +} + +/* Progress Bars */ +.progress-bars { + display: flex; + flex-direction: column; + gap: 12px; + margin-bottom: 20px; +} + +.progress-bar-container { + display: flex; + flex-direction: column; + gap: 4px; +} + +.progress-bar-container label { + font-size: 11px; + color: #888; + text-transform: uppercase; + letter-spacing: 1px; +} + +.progress-bar { + height: 8px; + background: rgba(255, 255, 255, 0.1); + border-radius: 4px; + overflow: hidden; +} + +.progress-fill { + height: 100%; + border-radius: 4px; + transition: width 0.3s ease; +} + +.phase-progress { + background: linear-gradient(90deg, #4fc3f7, #29b6f6); +} + +.bucket-progress { + background: linear-gradient(90deg, #66bb6a, #43a047); +} + +.progress-fill.indeterminate { + width: 30% !important; + animation: indeterminate 1.5s infinite linear; +} + +@keyframes indeterminate { + 0% { transform: translateX(-100%); } + 100% { transform: translateX(400%); } +} + +.progress-label { + font-size: 11px; + color: #aaa; + margin-top: 2px; +} + +/* Stats Grid */ +.stats-grid { + display: grid; + grid-template-columns: repeat(4, 1fr); + gap: 16px; + margin-bottom: 20px; +} + +.stat-card { + background: rgba(255, 255, 255, 0.05); + border-radius: 8px; + padding: 16px; + text-align: center; + border: 1px solid rgba(255, 255, 255, 0.1); + transition: transform 0.2s, border-color 0.2s; +} + +.stat-card:hover { + transform: translateY(-2px); + border-color: rgba(79, 195, 247, 0.3); +} + +.stat-card.highlight { + background: rgba(79, 195, 247, 0.15); + border-color: rgba(79, 195, 247, 0.3); +} + +.stat-label { + font-size: 11px; + color: #888; + text-transform: uppercase; + letter-spacing: 1px; + margin-bottom: 4px; +} + +.search-status-container .stat-value { + font-size: 28px; + font-weight: 700; + color: #fff; + font-family: 'Courier New', monospace; +} + +.stat-card.highlight .stat-value { + color: #4fc3f7; +} + +.stat-unit { + font-size: 10px; + color: #666; +} + +/* Verbose Log */ +.verbose-log-section { + margin-bottom: 16px; +} + +.verbose-log-section summary { + cursor: pointer; + padding: 8px 12px; + background: rgba(255, 255, 255, 0.05); border-radius: 6px; - color: #1976d2; + font-size: 13px; + color: #aaa; + display: flex; + align-items: center; + gap: 8px; + user-select: none; +} + +.verbose-log-section summary:hover { + background: rgba(255, 255, 255, 0.08); +} + +.verbose-log-section summary::marker { + color: #4fc3f7; +} + +.log-count { + background: rgba(79, 195, 247, 0.2); + color: #4fc3f7; + padding: 2px 8px; + border-radius: 10px; + font-size: 11px; + margin-left: auto; +} + +.verbose-log { + max-height: 200px; + overflow-y: auto; + background: rgba(0, 0, 0, 0.3); + border-radius: 6px; + padding: 8px; + margin-top: 8px; + font-family: 'Courier New', monospace; + font-size: 11px; +} + +.log-entry { + padding: 2px 4px; + border-radius: 2px; + margin-bottom: 2px; +} + +.log-entry .log-time { + color: #666; + margin-right: 8px; +} + +.log-info .log-message { color: #aaa; } +.log-debug .log-message { color: #888; } +.log-success .log-message { color: #66bb6a; } +.log-warning .log-message { color: #ffa726; } +.log-phase { background: rgba(79, 195, 247, 0.1); } +.log-phase .log-message { color: #4fc3f7; } + +/* Enhanced Stop Button for new container */ +.search-status-container .stop-search-btn { + width: 100%; + padding: 12px 24px; + background: linear-gradient(135deg, #e53935, #c62828); + border: none; + border-radius: 8px; + color: white; + font-size: 14px; + font-weight: 600; + cursor: pointer; + display: flex; + align-items: center; + justify-content: center; + gap: 8px; + transition: all 0.2s; + box-shadow: 0 4px 12px rgba(198, 40, 40, 0.3); +} + +.search-status-container .stop-search-btn:hover { + background: linear-gradient(135deg, #c62828, #b71c1c); + transform: translateY(-1px); + box-shadow: 0 6px 16px rgba(198, 40, 40, 0.4); +} + +.search-status-container .stop-search-btn:active { + transform: translateY(0); +} + +.stop-icon { + font-size: 16px; +} + +/* Responsive adjustments */ +@media (max-width: 768px) { + .stats-grid { + grid-template-columns: repeat(2, 1fr); + } + + .search-status-container { + padding: 16px; + } + + .phase-icon { + font-size: 24px; + } + + .phase-text { + font-size: 14px; + } +} + +/* ======================================== + SLOT LOCK FORM & LOCKED DISPLAY + ======================================== */ + +/* Slot configuring state */ +.slot-item.configuring { + border-color: #4fc3f7 !important; + background: rgba(79, 195, 247, 0.1) !important; +} + +/* Lock Form */ +.lock-form { + padding: 8px; + font-size: 12px; +} + +.lock-form-header { + font-weight: 600; + color: #333; + margin-bottom: 10px; + padding-bottom: 6px; + border-bottom: 1px solid #ddd; +} + +.lock-form-set { + margin-bottom: 10px; +} + +.lock-form-set label { + display: block; + font-size: 11px; + color: #666; + margin-bottom: 4px; +} + +.lock-set-select { + width: 100%; + padding: 6px 8px; + border: 1px solid #ccc; + border-radius: 4px; + font-size: 12px; + background: white; +} + +.lock-form-spells { + margin-bottom: 10px; +} + +.lock-form-spells > label { + display: block; + font-size: 11px; + color: #666; + margin-bottom: 6px; +} + +.lock-spell-checkboxes { + display: grid; + grid-template-columns: repeat(2, 1fr); + gap: 4px; + max-height: 150px; + overflow-y: auto; + padding: 4px; + background: #f8f8f8; + border-radius: 4px; +} + +.lock-spell-checkbox { + display: flex; + align-items: center; + gap: 4px; + font-size: 10px; + padding: 2px 4px; + border-radius: 3px; + cursor: pointer; +} + +.lock-spell-checkbox:hover { + background: rgba(0, 0, 0, 0.05); +} + +.lock-spell-checkbox input { + margin: 0; + width: 12px; + height: 12px; +} + +.lock-spell-checkbox span { + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} + +.lock-form-actions { + display: flex; + gap: 8px; + margin-top: 10px; +} + +.lock-save-btn, +.lock-cancel-btn { + flex: 1; + padding: 6px 12px; + border: none; + border-radius: 4px; + font-size: 12px; font-weight: 500; + cursor: pointer; + transition: all 0.2s; +} + +.lock-save-btn { + background: linear-gradient(135deg, #e53935, #c62828); + color: white; +} + +.lock-save-btn:hover { + background: linear-gradient(135deg, #c62828, #b71c1c); +} + +.lock-cancel-btn { + background: #e0e0e0; + color: #333; +} + +.lock-cancel-btn:hover { + background: #d0d0d0; +} + +/* Locked Slot Display */ +.locked-slot-info { + padding: 8px; + text-align: center; +} + +.locked-header { + font-weight: 600; + color: #c62828; + margin-bottom: 8px; + font-size: 13px; +} + +.locked-set-badge { + display: inline-block; + background: linear-gradient(135deg, #7b1fa2, #512da8); + color: white; + padding: 4px 12px; + border-radius: 12px; + font-size: 11px; + font-weight: 600; + margin-bottom: 8px; +} + +.locked-spells { + display: flex; + flex-wrap: wrap; + gap: 4px; + justify-content: center; + margin-bottom: 8px; +} + +.locked-spell { + display: inline-block; + background: rgba(79, 195, 247, 0.2); + color: #0277bd; + padding: 2px 8px; + border-radius: 10px; + font-size: 9px; + font-weight: 500; +} + +.locked-no-spells { + font-size: 10px; + color: #999; + font-style: italic; + margin-bottom: 8px; +} + +.unlock-btn { + padding: 4px 12px; + background: #f5f5f5; + border: 1px solid #ddd; + border-radius: 4px; + font-size: 11px; + color: #666; + cursor: pointer; + transition: all 0.2s; +} + +.unlock-btn:hover { + background: #e8e8e8; + border-color: #ccc; + color: #333; +} + +/* Override locked slot styling for better visibility */ +.slot-item.locked { + border-color: #c62828 !important; + background: linear-gradient(135deg, rgba(198, 40, 40, 0.1), rgba(198, 40, 40, 0.05)) !important; +} + +.slot-item.locked .slot-header { + color: #c62828; +} + +.slot-item.locked .lock-btn { + color: #c62828 !important; + opacity: 1 !important; +} + +/* ======================================== + CLEAR SLOT BUTTON + ======================================== */ + +.slot-content { + position: relative; +} + +.clear-slot-btn { + position: absolute; + top: 2px; + right: 2px; + background: rgba(220, 38, 38, 0.1); + border: 1px solid rgba(220, 38, 38, 0.3); + border-radius: 3px; + cursor: pointer; + font-size: 10px; + color: #dc2626; + opacity: 0.4; + padding: 1px 4px; + transition: all 0.2s; +} + +.clear-slot-btn:hover { + opacity: 1; + background: rgba(220, 38, 38, 0.2); +} + +/* ======================================== + SUIT SUMMARY SECTION + ======================================== */ + +.suit-summary-section { + margin-top: 15px; + padding: 12px; + background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%); + border-radius: 8px; + border: 1px solid #2d3748; +} + +.summary-header { + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 10px; + padding-bottom: 8px; + border-bottom: 1px solid #2d3748; +} + +.summary-header h4 { + color: #4fc3f7; + font-size: 14px; + margin: 0; +} + +.copy-summary-btn { + background: rgba(79, 195, 247, 0.2); + border: 1px solid rgba(79, 195, 247, 0.3); + color: #4fc3f7; + padding: 4px 10px; + border-radius: 4px; + cursor: pointer; + font-size: 11px; + transition: all 0.2s; +} + +.copy-summary-btn:hover { + background: rgba(79, 195, 247, 0.3); +} + +.suit-summary-content { + font-family: 'Courier New', monospace; + font-size: 11px; + max-height: 300px; + overflow-y: auto; +} + +.no-summary { + color: #666; + font-style: italic; + text-align: center; + padding: 10px; +} + +.summary-line { + padding: 4px 0; + border-bottom: 1px solid #2d3748; + color: #ccc; + display: flex; + flex-wrap: wrap; + gap: 4px; +} + +.summary-line:last-child { + border-bottom: none; +} + +.summary-slot { + color: #888; + min-width: 85px; + font-weight: 600; +} + +.summary-item { + color: #4ecdc4; + font-weight: 600; + flex: 1; + min-width: 150px; +} + +.summary-spells { + color: #ffe66d; + font-size: 10px; +} + +.summary-char { + color: #95a5a6; + font-size: 10px; + margin-left: auto; } \ No newline at end of file diff --git a/static/suitbuilder.html b/static/suitbuilder.html index 55d69b26..4a3b5c75 100644 --- a/static/suitbuilder.html +++ b/static/suitbuilder.html @@ -162,53 +162,53 @@