feature-search / static /style.css
Mateen Ahmed
App v1
b831214
:root {
--primary: #6366f1;
--primary-dark: #4f46e5;
--background: #0f172a;
--surface: #1e293b;
--surface-light: #334155;
--border: #475569;
--text: #f1f5f9;
--text-secondary: #cbd5e1;
--success: #10b981;
--error: #ef4444;
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
color: var(--text);
min-height: 100vh;
padding: 2rem;
zoom: 65%;
}
.container {
max-width: 1400px;
margin: 0 auto;
}
header {
text-align: center;
margin-bottom: 3rem;
}
.header-content {
display: flex;
align-items: center;
justify-content: center;
gap: 1.5rem;
}
.header-logo {
width: 80px;
height: 80px;
filter: drop-shadow(0 4px 12px rgba(99, 102, 241, 0.3));
}
.header-text {
text-align: center;
}
h1 {
font-size: 2.5rem;
font-weight: 700;
background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
margin-bottom: 0.5rem;
}
.subtitle {
color: var(--text-secondary);
font-size: 1.1rem;
}
.card {
background: var(--surface);
border-radius: 1rem;
padding: 2rem;
margin-bottom: 2rem;
border: 1px solid var(--border);
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}
h3 {
font-size: 1.25rem;
margin-bottom: 1rem;
color: var(--text);
}
/* Upload Section */
.upload-section {
position: relative;
}
.drop-zone {
border: 2px dashed var(--border);
border-radius: 0.75rem;
padding: 3rem;
text-align: center;
cursor: pointer;
transition: all 0.3s ease;
background: rgba(99, 102, 241, 0.05);
}
.drop-zone:hover,
.drop-zone.drag-over {
border-color: var(--primary);
background: rgba(99, 102, 241, 0.1);
}
.upload-placeholder svg {
color: var(--primary);
margin-bottom: 1rem;
}
.upload-placeholder span {
display: block;
color: var(--text-secondary);
margin-top: 0.5rem;
}
/* Canvas Container */
.canvas-container {
position: relative;
margin-top: 1rem;
display: flex;
flex-direction: column;
align-items: center;
min-height: 300px;
}
.canvas-container canvas {
position: absolute;
top: 0;
left: 50%;
transform: translateX(-50%);
border-radius: 0.5rem;
}
#imageCanvas {
z-index: 1;
}
#drawCanvas {
z-index: 2;
pointer-events: none;
}
#bboxCanvas {
z-index: 3;
pointer-events: all;
cursor: crosshair !important;
}
/* Options */
.options {
display: flex;
gap: 2rem;
margin-top: 1.5rem;
flex-wrap: wrap;
align-items: center;
}
.checkbox-wrapper {
display: flex;
align-items: center;
gap: 0.5rem;
cursor: pointer;
user-select: none;
}
.checkbox-wrapper input[type="checkbox"] {
width: 1.25rem;
height: 1.25rem;
cursor: pointer;
accent-color: var(--primary);
}
.checkbox-wrapper span {
color: var(--text);
font-size: 0.95rem;
}
/* Process Button */
.process-btn {
background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
color: white;
border: none;
padding: 0.75rem 2rem;
border-radius: 0.5rem;
font-size: 1rem;
font-weight: 600;
cursor: pointer;
transition: all 0.3s ease;
box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}
.process-btn:hover {
transform: translateY(-2px);
box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
}
.process-btn:active {
transform: translateY(0);
}
/* Hint Text */
.hint-text {
margin-top: 1rem;
padding: 1rem;
background: rgba(99, 102, 241, 0.1);
border-left: 3px solid var(--primary);
border-radius: 0.5rem;
}
.hint-text p {
color: var(--text-secondary);
font-size: 0.95rem;
margin: 0;
}
.hint-text strong {
color: var(--primary);
}
/* Extracted Canvas */
#extractedCanvas {
max-width: 100%;
border-radius: 0.5rem;
border: 1px solid var(--border);
}
/* Loading */
.loading {
display: none;
text-align: center;
padding: 2rem;
background: var(--surface);
border-radius: 1rem;
border: 1px solid var(--border);
margin-bottom: 2rem;
}
.loading svg {
color: var(--primary);
margin-bottom: 1rem;
}
.loading span {
display: block;
color: var(--text-secondary);
font-size: 1rem;
}
@keyframes spin {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
.animate-spin {
animation: spin 1s linear infinite;
}
/* Results */
.result-image {
width: 100%;
border-radius: 0.5rem;
border: 1px solid var(--border);
}
.stats-list {
list-style: none;
}
.stat-item {
display: flex;
justify-content: space-between;
align-items: center;
padding: 0.75rem 0;
border-bottom: 1px solid var(--border);
}
.stat-item:last-child {
border-bottom: none;
}
.stat-item span:first-child {
color: var(--text-secondary);
font-size: 0.9rem;
}
.stat-item span:last-child {
color: var(--text);
font-weight: 600;
}
.badge {
background: var(--primary);
color: white;
padding: 0.25rem 0.75rem;
border-radius: 0.375rem;
font-size: 0.875rem;
font-weight: 600;
}
/* Top Matches Grid */
.top-matches-grid {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 1rem;
}
.match-grid-item {
position: relative;
aspect-ratio: 1;
border-radius: 0.5rem;
overflow: hidden;
border: 1px solid var(--border);
cursor: pointer;
transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.match-grid-item:hover {
transform: translateY(-4px);
box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
}
.match-thumbnail {
width: 100%;
height: 100%;
object-fit: cover;
}
.match-info-overlay {
position: absolute;
bottom: 0;
left: 0;
right: 0;
background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
padding: 0.75rem;
display: flex;
flex-direction: column;
gap: 0.25rem;
}
.match-rank {
font-weight: 700;
color: var(--primary);
font-size: 0.9rem;
}
.match-name {
color: var(--text);
font-size: 0.85rem;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.match-score {
color: var(--text-secondary);
font-size: 0.8rem;
}
/* Footer */
.footer {
text-align: center;
padding: 2rem 0;
margin-top: 2rem;
border-top: 1px solid var(--border);
}
.footer p {
color: var(--text-secondary);
font-size: 0.9rem;
}
.footer a {
color: var(--primary);
text-decoration: none;
font-weight: 600;
transition: color 0.3s ease;
}
.footer a:hover {
color: var(--primary-dark);
text-decoration: underline;
}
/* Responsive */
@media (max-width: 1200px) {
.top-matches-grid {
grid-template-columns: repeat(3, 1fr);
}
}
@media (max-width: 768px) {
body {
padding: 1rem;
}
h1 {
font-size: 2rem;
}
.card {
padding: 1.5rem;
}
.options {
flex-direction: column;
gap: 1rem;
}
.top-matches-grid {
grid-template-columns: repeat(2, 1fr);
}
}
/* Fullscreen Image Modal */
.fullscreen-modal {
display: none;
position: fixed;
z-index: 9999;
padding-top: 50px;
left: 0;
top: 0;
width: 100%;
height: 100%;
overflow: auto;
background-color: rgba(0, 0, 0, 0.95);
animation: fadeIn 0.3s;
}
@keyframes fadeIn {
from { opacity: 0; }
to { opacity: 1; }
}
.fullscreen-content {
margin: auto;
display: block;
max-width: 95%;
max-height: 90vh;
object-fit: contain;
animation: zoomIn 0.3s;
}
@keyframes zoomIn {
from { transform: scale(0.8); }
to { transform: scale(1); }
}
.fullscreen-close {
position: absolute;
top: 20px;
right: 40px;
color: #f1f1f1;
font-size: 48px;
font-weight: bold;
transition: 0.3s;
cursor: pointer;
z-index: 10000;
}
.fullscreen-close:hover,
.fullscreen-close:focus {
color: #bbb;
text-decoration: none;
cursor: pointer;
}
/* Make images clickable */
#extractedCanvas,
#bestMatchImage,
.top-matches-grid img {
cursor: pointer;
transition: transform 0.2s ease, box-shadow 0.2s ease;
}
#extractedCanvas:hover,
#bestMatchImage:hover,
.top-matches-grid img:hover {
transform: scale(1.02);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}