VashuTheGreat2's picture
Upload folder using huggingface_hub
243b4bc verified
Raw
History Blame Contribute Delete
6.98 kB
:root {
--bg: #0f172a;
--card: #1e293b;
--accent: #6366f1;
--accent-hover: #4f46e5;
--text: #e2e8f0;
--muted: #94a3b8;
--border: #334155;
--success: #10b981;
--error: #ef4444;
}
@keyframes skeleton-shimmer {
0% { background-position: -200% 0; }
100% { background-position: 200% 0; }
}
* { box-sizing: border-box; }
body {
margin: 0;
font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
background: var(--bg);
color: var(--text);
min-height: 100vh;
}
.container {
max-width: 960px;
margin: 0 auto;
padding: 2rem 1rem;
}
.btn {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 0.5rem;
padding: 0.6rem 1.1rem;
border-radius: 0.5rem;
background: var(--accent);
color: #fff;
font-weight: 600;
border: 0;
cursor: pointer;
transition: background 0.15s ease;
}
.btn:hover { background: var(--accent-hover); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.card {
background: var(--card);
border: 1px solid var(--border);
border-radius: 0.75rem;
padding: 1.5rem;
}
.input {
width: 100%;
padding: 0.6rem 0.85rem;
border-radius: 0.5rem;
background: #0b1220;
color: var(--text);
border: 1px solid var(--border);
outline: none;
}
.input:focus { border-color: var(--accent); }
.badge {
display: inline-block;
padding: 0.15rem 0.55rem;
border-radius: 9999px;
font-size: 0.75rem;
background: #0b1220;
border: 1px solid var(--border);
color: var(--muted);
}
.badge.success { color: var(--success); border-color: rgba(16,185,129,0.4); }
.badge.error { color: var(--error); border-color: rgba(239,68,68,0.4); }
.badge.warning { color: #f59e0b; border-color: rgba(245,158,11,0.4); }
.spinner {
width: 1rem;
height: 1rem;
border: 2px solid var(--border);
border-top-color: var(--accent);
border-radius: 50%;
animation: spin 0.8s linear infinite;
display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }
/* Markdown Content Styling inside Chat Bubble */
.markdown-body {
line-height: 1.6;
}
.markdown-body h1, .markdown-body h2, .markdown-body h3, .markdown-body h4 {
font-weight: 700;
margin-top: 1rem;
margin-bottom: 0.5rem;
color: #fff;
}
.markdown-body h1 { font-size: 1.35rem; }
.markdown-body h2 { font-size: 1.2rem; }
.markdown-body h3 { font-size: 1.05rem; }
.markdown-body p {
margin-bottom: 0.75rem;
}
.markdown-body ul, .markdown-body ol {
margin-left: 1.25rem;
margin-bottom: 0.75rem;
}
.markdown-body ul {
list-style-type: disc;
}
.markdown-body ol {
list-style-type: decimal;
}
.markdown-body li {
margin-bottom: 0.25rem;
}
.markdown-body a {
color: #818cf8;
text-decoration: underline;
}
.markdown-body a:hover {
color: #a5b4fc;
}
.markdown-body code {
background: rgba(0, 0, 0, 0.3);
padding: 0.15rem 0.35rem;
border-radius: 0.25rem;
font-family: monospace;
font-size: 0.9em;
}
.markdown-body pre {
background: #05070c;
padding: 0.75rem;
border-radius: 0.375rem;
overflow-x: auto;
border: 1px solid var(--border);
margin-top: 0.5rem;
margin-bottom: 0.75rem;
}
.markdown-body pre code {
background: transparent;
padding: 0;
font-size: 0.85rem;
}
/* ══════════════════════════════════════════
Product Cards — Amazon / Flipkart style
══════════════════════════════════════════ */
.product-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
gap: 0.85rem;
margin-top: 0.5rem;
}
.product-card {
background: #fff;
border: 1px solid #e5e7eb;
border-radius: 0.6rem;
overflow: hidden;
display: flex;
flex-direction: column;
position: relative;
cursor: pointer;
transition: transform 0.2s cubic-bezier(0.4,0,0.2,1),
box-shadow 0.2s cubic-bezier(0.4,0,0.2,1);
}
.product-card:hover {
transform: translateY(-4px);
box-shadow: 0 12px 32px -6px rgba(0, 0, 0, 0.35);
}
/* Image container — fixed square with shimmer loader */
.product-img-wrapper {
position: relative;
width: 100%;
padding-top: 100%;
background: linear-gradient(90deg, #f0f0f0 25%, #f8f8f8 50%, #f0f0f0 75%);
background-size: 200% 100%;
animation: skeleton-shimmer 1.4s infinite;
overflow: hidden;
}
.product-img {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
object-fit: contain; /* contain so no cropping — matches Amazon */
padding: 0.5rem;
background: #fff;
animation: none;
transition: transform 0.25s ease;
}
.product-card:hover .product-img {
transform: scale(1.04);
}
/* Discount badge — top-left corner, Amazon orange */
.product-discount-badge {
position: absolute;
top: 0;
left: 0;
background: #ff6161;
color: #fff;
font-size: 0.6rem;
font-weight: 800;
padding: 0.2rem 0.45rem;
border-bottom-right-radius: 0.4rem;
z-index: 3;
letter-spacing: 0.03em;
}
/* Match score badge — top-right */
.product-score-badge {
position: absolute;
top: 0.4rem;
right: 0.4rem;
z-index: 3;
font-size: 0.55rem;
font-weight: 700;
text-transform: uppercase;
background: rgba(16,185,129,0.15);
border: 1px solid rgba(16,185,129,0.4);
color: #059669;
padding: 0.15rem 0.4rem;
border-radius: 999px;
}
/* Text info area */
.product-info {
padding: 0.6rem 0.65rem 0.7rem;
display: flex;
flex-direction: column;
flex-grow: 1;
gap: 0.2rem;
background: #fff;
}
.product-brand {
font-size: 0.6rem;
text-transform: uppercase;
letter-spacing: 0.07em;
color: #6366f1;
font-weight: 700;
}
.product-title {
font-size: 0.82rem;
font-weight: 600;
color: #111827;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
line-height: 1.35;
min-height: 2.2rem;
}
.product-usage-tag {
display: inline-block;
font-size: 0.58rem;
background: #f3f4f6;
color: #6b7280;
border-radius: 999px;
padding: 0.1rem 0.45rem;
font-weight: 600;
width: fit-content;
}
/* Price row */
.product-price-row {
display: flex;
align-items: baseline;
flex-wrap: wrap;
gap: 0.35rem;
margin-top: 0.25rem;
}
.product-price {
font-size: 1rem;
font-weight: 800;
color: #111827;
letter-spacing: -0.02em;
}
.product-old-price {
font-size: 0.72rem;
text-decoration: line-through;
color: #9ca3af;
}
.product-saving {
font-size: 0.62rem;
color: #16a34a;
font-weight: 700;
}
/* CTA Button */
.product-link {
display: block;
text-align: center;
background: linear-gradient(135deg, #6366f1, #4f46e5);
color: #fff !important;
font-size: 0.72rem;
font-weight: 700;
text-decoration: none !important;
padding: 0.45rem 0.5rem;
border-radius: 0.35rem;
margin-top: auto;
padding-top: 0.5rem;
transition: opacity 0.15s, transform 0.15s;
letter-spacing: 0.02em;
}
.product-link:hover {
opacity: 0.88;
transform: scale(0.98);
}