ecom-qa-bert-2 / static /css /style.css
rnyx's picture
Deploy
923a582
Raw
History Blame Contribute Delete
14.4 kB
/* ════════════════════════════════════════════════════════════
EcomQA — Main Stylesheet
════════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
--bg: #0f1117;
--bg-card: #1a1d2e;
--bg-input: #12141f;
--border: #2a2d3e;
--accent: #6366f1;
--accent-dark: #4f46e5;
--accent-glow: rgba(99,102,241,0.25);
--text: #e2e8f0;
--text-muted: #94a3b8;
--text-dim: #64748b;
--success: #22c55e;
--warn: #f59e0b;
--danger: #ef4444;
--radius: 12px;
--radius-sm: 8px;
--shadow: 0 4px 24px rgba(0,0,0,0.4);
}
html { scroll-behavior: smooth; }
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
background: var(--bg);
color: var(--text);
min-height: 100vh;
display: flex;
flex-direction: column;
}
/* ── Navbar ── */
.navbar {
display: flex;
align-items: center;
justify-content: space-between;
padding: 0.9rem 2rem;
background: var(--bg-card);
border-bottom: 1px solid var(--border);
position: sticky;
top: 0;
z-index: 100;
backdrop-filter: blur(12px);
}
.brand { display: flex; align-items: center; gap: 0.5rem; text-decoration: none; font-weight: 700; font-size: 1.2rem; color: var(--text); }
.brand-icon { font-size: 1.4rem; }
.nav-links { display: flex; align-items: center; gap: 0.25rem; }
.nav-link { color: var(--text-muted); text-decoration: none; padding: 0.4rem 0.9rem; border-radius: var(--radius-sm); transition: all 0.15s; font-size: 0.9rem; }
.nav-link:hover, .nav-link.active { color: var(--text); background: rgba(255,255,255,0.06); }
.nav-btn { background: var(--accent); color: #fff; padding: 0.4rem 1rem; border-radius: var(--radius-sm); text-decoration: none; font-size: 0.88rem; font-weight: 600; transition: background 0.15s; }
.nav-btn:hover { background: var(--accent-dark); }
/* ── Layout ── */
.main-content { flex: 1; max-width: 860px; width: 100%; margin: 0 auto; padding: 2rem 1.5rem; }
.footer { text-align: center; padding: 1.5rem; color: var(--text-dim); font-size: 0.8rem; border-top: 1px solid var(--border); }
/* ── Hero ── */
.hero { text-align: center; padding: 2.5rem 0 1.5rem; }
.hero h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); font-weight: 800; background: linear-gradient(135deg, #a5b4fc, #818cf8); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero-sub { color: var(--text-muted); margin-top: 0.5rem; font-size: 1rem; }
/* ── Card ── */
.card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; margin-bottom: 1.25rem; box-shadow: var(--shadow); }
.section-title { font-size: 1rem; font-weight: 600; color: var(--text-muted); margin-bottom: 1rem; text-transform: uppercase; letter-spacing: 0.06em; }
/* ── Tabs ── */
.tab-group { display: flex; gap: 0.5rem; margin-bottom: 1rem; border-bottom: 1px solid var(--border); padding-bottom: 0.5rem; }
.tab { background: none; border: none; color: var(--text-muted); cursor: pointer; padding: 0.4rem 1rem; border-radius: var(--radius-sm); font-size: 0.9rem; transition: all 0.15s; }
.tab.active { background: var(--accent); color: #fff; font-weight: 600; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
/* ── Inputs ── */
.input-field {
width: 100%; background: var(--bg-input); border: 1px solid var(--border);
border-radius: var(--radius-sm); color: var(--text); padding: 0.65rem 0.9rem;
font-size: 0.95rem; outline: none; transition: border-color 0.15s;
}
.input-field:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.input-field::placeholder { color: var(--text-dim); }
.input-row { display: flex; gap: 0.6rem; align-items: center; }
.input-row .input-field { flex: 1; }
textarea.input-field { resize: vertical; min-height: 120px; font-family: inherit; }
.char-count { font-size: 0.78rem; color: var(--text-dim); text-align: right; margin-top: 0.25rem; }
.input-sm { font-size: 0.85rem; padding: 0.5rem 0.75rem; }
.select-field { background: var(--bg-input); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); padding: 0.5rem 0.75rem; font-size: 0.85rem; outline: none; }
/* ── Buttons ── */
.btn { display: inline-flex; align-items: center; justify-content: center; border: none; border-radius: var(--radius-sm); cursor: pointer; font-size: 0.9rem; font-weight: 600; padding: 0.65rem 1.25rem; transition: all 0.15s; text-decoration: none; white-space: nowrap; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-secondary { background: rgba(255,255,255,0.08); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: rgba(255,255,255,0.12); }
.btn-ghost { background: none; color: var(--text-muted); border: 1px solid var(--border); }
.btn-ghost:hover { background: rgba(255,255,255,0.05); }
.btn-sm { padding: 0.4rem 0.8rem; font-size: 0.82rem; }
.btn-full { width: 100%; }
/* ── Badges ── */
.badge { display: inline-block; padding: 0.2rem 0.6rem; border-radius: 99px; font-size: 0.75rem; font-weight: 600; }
.badge-neutral { background: rgba(255,255,255,0.08); color: var(--text-muted); }
.badge-high { background: rgba(34,197,94,0.15); color: var(--success); }
.badge-medium { background: rgba(245,158,11,0.15); color: var(--warn); }
.badge-low { background: rgba(239,68,68,0.15); color: var(--danger); }
.badge-source { background: rgba(99,102,241,0.15); color: #a5b4fc; }
.badge-lang { background: rgba(20,184,166,0.15); color: #2dd4bf; }
.badge-intent { background: rgba(168,85,247,0.12); color: #c084fc; }
/* ── Intent badge row ── */
.intent-badge-row { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.75rem; font-size: 0.85rem; color: var(--text-muted); }
/* ── Answer ── */
.answer-box { background: linear-gradient(135deg, rgba(99,102,241,0.08), rgba(79,70,229,0.04)); border: 1px solid rgba(99,102,241,0.25); border-radius: var(--radius-sm); padding: 1rem 1.25rem; font-size: 1.05rem; line-height: 1.6; margin-bottom: 0.75rem; }
.meta-row { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.75rem; }
/* ── Context highlight ── */
.highlight-section { margin-top: 0.75rem; }
.section-label { font-size: 0.8rem; color: var(--text-dim); margin-bottom: 0.4rem; text-transform: uppercase; letter-spacing: 0.04em; }
.context-box { background: var(--bg-input); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0.75rem; font-size: 0.85rem; line-height: 1.6; max-height: 200px; overflow-y: auto; color: var(--text-muted); }
.context-box mark { background: rgba(99,102,241,0.35); color: var(--text); border-radius: 3px; padding: 0 2px; }
/* ── Sentiment ── */
.sentiment-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
.sentiment-card { background: var(--bg-input); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 1rem; text-align: center; }
.sentiment-stars { font-size: 1.6rem; margin-bottom: 0.25rem; }
.sentiment-overall { font-size: 1.4rem; font-weight: 700; }
.sentiment-label { font-size: 0.78rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.05em; }
.star-distribution { margin-bottom: 1rem; }
.star-row { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.35rem; font-size: 0.85rem; }
.star-bar-bg { flex: 1; height: 8px; background: var(--border); border-radius: 4px; overflow: hidden; }
.star-bar-fill { height: 100%; background: var(--accent); border-radius: 4px; transition: width 0.4s; }
.star-pct { min-width: 34px; text-align: right; color: var(--text-muted); font-size: 0.78rem; }
.aspect-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0.75rem; }
.aspect-card { background: var(--bg-input); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0.75rem; }
.aspect-name { font-weight: 600; font-size: 0.88rem; margin-bottom: 0.4rem; }
.aspect-bar-row { display: flex; gap: 2px; height: 6px; border-radius: 3px; overflow: hidden; margin-bottom: 0.3rem; }
.aspect-bar-pos { background: var(--success); }
.aspect-bar-neu { background: var(--warn); }
.aspect-bar-neg { background: var(--danger); }
/* ── History ── */
.history-list { display: flex; flex-direction: column; gap: 0.5rem; }
.history-item { background: var(--bg-input); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0.75rem 1rem; }
.history-q { font-size: 0.9rem; font-weight: 600; }
.history-a { font-size: 0.83rem; color: var(--text-muted); margin-top: 0.2rem; }
.history-meta { display: flex; gap: 0.4rem; margin-top: 0.4rem; }
/* ── History table (full page) ── */
.page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.page-header h1 { font-size: 1.4rem; }
.history-filters { display: flex; gap: 0.75rem; margin-bottom: 1rem; }
.history-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.history-table th { text-align: left; padding: 0.6rem 0.75rem; border-bottom: 2px solid var(--border); color: var(--text-dim); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; }
.history-table td { padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.history-table tr:hover td { background: rgba(255,255,255,0.02); }
.col-date { white-space: nowrap; color: var(--text-dim); font-size: 0.78rem; }
.col-question { font-weight: 600; max-width: 220px; }
.col-answer { color: var(--text-muted); max-width: 260px; }
.history-meta-row { font-size: 0.78rem; color: var(--text-dim); margin-top: 0.5rem; }
/* ── Compare ── */
.compare-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; margin-top: 1rem; }
.compare-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; transition: border-color 0.2s; }
.compare-card.winner { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 4px 24px var(--accent-glow); }
.compare-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.75rem; }
.product-num { font-weight: 700; font-size: 0.9rem; }
.winner-badge { background: rgba(99,102,241,0.2); color: #a5b4fc; padding: 0.2rem 0.6rem; border-radius: 99px; font-size: 0.75rem; font-weight: 600; }
.compare-url-display { font-size: 0.75rem; color: var(--text-dim); margin-bottom: 1rem; word-break: break-all; }
.compare-answer { margin-bottom: 0.75rem; }
.compare-answer-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-dim); margin-bottom: 0.35rem; }
.compare-answer-text { font-size: 0.9rem; line-height: 1.5; margin-bottom: 0.5rem; }
.compare-sentiment { border-top: 1px solid var(--border); padding-top: 0.75rem; margin-top: 0.75rem; font-size: 0.85rem; }
.stars-display { font-size: 1.2rem; color: var(--warn); }
.winner-banner { display: flex; align-items: center; gap: 0.75rem; background: linear-gradient(135deg, rgba(99,102,241,0.15), rgba(79,70,229,0.08)); border: 1px solid rgba(99,102,241,0.3); border-radius: var(--radius); padding: 1rem 1.25rem; margin-bottom: 1rem; font-size: 1rem; font-weight: 600; }
.trophy { font-size: 1.4rem; }
.url-row { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.6rem; }
.url-label { min-width: 70px; font-size: 0.85rem; color: var(--text-muted); font-weight: 600; }
/* ── Auth ── */
.auth-wrapper { display: flex; justify-content: center; padding: 2rem 1rem; }
.auth-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 2rem; width: 100%; max-width: 420px; box-shadow: var(--shadow); }
.auth-title { font-size: 1.5rem; font-weight: 800; margin-bottom: 0.25rem; }
.auth-sub { color: var(--text-muted); margin-bottom: 1.5rem; font-size: 0.9rem; }
.auth-form { display: flex; flex-direction: column; gap: 0.75rem; }
.form-label { font-size: 0.85rem; font-weight: 600; color: var(--text-muted); }
.form-hint { font-weight: 400; color: var(--text-dim); }
.auth-footer { margin-top: 1.25rem; text-align: center; font-size: 0.87rem; color: var(--text-muted); }
.auth-footer a { color: var(--accent); text-decoration: none; }
/* ── Alerts ── */
.alert { padding: 0.7rem 1rem; border-radius: var(--radius-sm); font-size: 0.88rem; margin-bottom: 1rem; }
.alert-error { background: rgba(239,68,68,0.12); border: 1px solid rgba(239,68,68,0.3); color: #fca5a5; }
.alert-success { background: rgba(34,197,94,0.12); border: 1px solid rgba(34,197,94,0.3); color: #86efac; }
.error-msg { color: var(--danger); font-size: 0.85rem; padding: 0.5rem 0; }
/* ── Empty state ── */
.empty-state { text-align: center; padding: 4rem 1rem; }
.empty-icon { font-size: 3rem; margin-bottom: 1rem; }
.empty-state h2 { font-size: 1.3rem; margin-bottom: 0.5rem; }
.empty-state p { color: var(--text-muted); margin-bottom: 1.5rem; }
/* ── Loader ── */
.loader { position: fixed; inset: 0; background: rgba(15,17,23,0.85); display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 999; gap: 1rem; }
.spinner { width: 44px; height: 44px; border: 3px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
/* ── Misc ── */
.status-msg { font-size: 0.82rem; color: var(--text-muted); margin-top: 0.4rem; min-height: 1.2rem; }
.hidden { display: none !important; }
@media (max-width: 600px) {
.navbar { padding: 0.75rem 1rem; }
.nav-links .nav-link { padding: 0.35rem 0.6rem; font-size: 0.82rem; }
.main-content { padding: 1rem; }
.sentiment-grid { grid-template-columns: 1fr; }
.compare-grid { grid-template-columns: 1fr; }
}