FactSight / static /css /style.css
DeepActionPotential's picture
Initial project upload via Python API for Flask Space
e0f2d0e verified
/* Dark Theme Core */
:root {
--bg-primary: #0a0a0a;
--bg-secondary: #111111;
--bg-surface: #161616;
--bg-card: #1d1d1d;
--bg-input: #232323;
--text-primary: #ffffff;
--text-secondary: #a0a0a0;
--text-muted: #6e6e6e;
--accent-primary: #3b82f6;
--accent-primary-hover: #2563eb;
--accent-success: #10b981;
--accent-warning: #f59e0b;
--accent-error: #ef4444;
--accent-info: #3b82f6;
--border-color: #2a2a2a;
--border-light: #3a3a3a;
--shadow-xl: 0 10px 16px rgba(0,0,0,0.35);
/* sharper borders */
--radius-xs: 4px;
--radius-sm: 6px;
--radius-md: 8px;
}
* { margin:0; padding:0; box-sizing:border-box; }
body {
font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
background: var(--bg-primary);
color: var(--text-primary);
line-height: 1.6;
}
.container { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }
/* Header */
.header {
background: var(--bg-secondary);
border-bottom: 1px solid var(--border-color);
padding: 1rem 0;
position: sticky; top: 0; z-index: 10;
}
.header-content { display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 1.25rem; font-weight: 700; color: var(--text-primary); }
/* Form Section (intro) */
.analysis-form-section { padding: 3rem 0; background: var(--bg-secondary); }
.form-container {
background: var(--bg-card);
border: 1px solid var(--border-color);
border-radius: var(--radius-sm);
padding: 2rem;
box-shadow: var(--shadow-xl);
}
.form-header { text-align: center; margin-bottom: 2rem; }
.form-header h2 { font-size: 1.75rem; margin-bottom: 0.5rem; }
.form-header p { color: var(--text-secondary); }
.form-group { margin-bottom: 1.5rem; }
.form-label {
display: flex; justify-content: space-between; align-items: center;
font-weight: 600; margin-bottom: 0.5rem; color: var(--text-primary);
}
.char-counter { color: var(--text-muted); font-size: 0.9rem; font-weight: 400; }
.form-textarea {
width: 100%; min-height: 200px; background: var(--bg-input);
border: 1px solid var(--border-light); border-radius: var(--radius-xs);
padding: 1rem; color: var(--text-primary); font-size: 1rem; resize: vertical;
}
.form-textarea:focus { outline: none; border-color: var(--accent-primary); }
.upload-container { display: flex; flex-direction: column; gap: 1rem; }
.upload-zone {
border: 2px dashed var(--border-light); border-radius: var(--radius-sm);
padding: 2rem 1rem; background: var(--bg-input);
transition: border-color .2s, background .2s; cursor: pointer;
}
.upload-zone:hover, .upload-zone.drag-over {
border-color: var(--accent-primary); background: var(--bg-surface);
}
.upload-content { display: flex; flex-direction: column; gap: 1rem; align-items: center; text-align: center; }
.upload-text h4 { font-size: 1.1rem; margin-bottom: 0.25rem; }
.upload-text p { color: var(--text-secondary); margin-bottom: 0.25rem; }
.upload-info { font-size: 0.85rem; color: var(--text-muted); }
.upload-btn {
background: var(--accent-primary); color: #fff; border: none;
padding: 0.6rem 1.1rem; border-radius: var(--radius-xs); font-weight: 600; cursor: pointer;
}
.upload-btn:hover { background: var(--accent-primary-hover); }
.file-input { display: none; }
.image-previews {
display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 0.75rem;
}
.preview-item {
position: relative; border-radius: var(--radius-xs); overflow: hidden;
background: var(--bg-input); border: 1px solid var(--border-light);
}
.preview-image { width: 100%; height: 100px; object-fit: cover; }
.remove-btn {
position: absolute; top: 0.5rem; right: 0.5rem;
background: rgba(239, 68, 68, 0.95); color: #fff; border: none;
width: 22px; height: 22px; border-radius: 2px; font-size: 0.8rem; cursor: pointer;
opacity: 0; transition: opacity .15s;
}
.preview-item:hover .remove-btn { opacity: 1; }
/* Actions */
.form-actions { display: flex; gap: 0.75rem; justify-content: center; margin-top: 1rem; }
.btn-primary, .btn-secondary {
padding: 0.85rem 1.3rem; border-radius: var(--radius-xs); font-weight: 700; cursor: pointer; border: none; min-width: 140px;
}
.btn-primary { background: var(--accent-primary); color: #fff; position: relative; }
.btn-primary:hover:not(:disabled) { background: var(--accent-primary-hover); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-secondary { background: transparent; color: var(--text-secondary); border: 1px solid var(--border-light); }
.btn-secondary:hover { color: var(--text-primary); }
.btn-loader { display: none; }
.btn-loader.active { display: inline-block; }
.spinner {
width: 16px; height: 16px; border: 2px solid transparent; border-top: 2px solid currentColor;
border-radius: 50%; animation: spin 1s linear infinite;
}
@keyframes spin { 0%{transform:rotate(0)} 100%{transform:rotate(360deg)} }
/* Toasts */
.message-container { position: fixed; top: 1rem; right: 1rem; z-index: 1000; }
.message {
background: var(--bg-surface); border: 1px solid var(--border-color);
border-left: 3px solid var(--accent-info);
border-radius: var(--radius-xs); padding: 0.7rem 1rem; margin-bottom: 0.5rem;
display: flex; gap: 0.75rem; transform: translateX(400px); transition: transform .25s ease-out;
}
.message.show { transform: translateX(0); }
.message.success { border-left-color: var(--accent-success); }
.message.error { border-left-color: var(--accent-error); }
.message.warning { border-left-color: var(--accent-warning); }
.message-title { font-weight: 700; font-size: 0.95rem; }
.message-text { color: var(--text-secondary); font-size: 0.85rem; }
.message-close { margin-left: auto; background: none; color: var(--text-muted); border: none; cursor: pointer; font-size: 1rem; }
/* Analysis page */
.analysis-header {
background: var(--bg-secondary);
border-bottom: 1px solid var(--border-color);
padding: 1rem 0;
}
.analysis-header .header-content {
display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.75rem;
}
.back-button {
color: var(--accent-primary); text-decoration: none; font-weight: 700;
padding: 0.35rem 0.7rem; border: 1px solid var(--border-light); border-radius: var(--radius-xs);
}
.back-button:hover { background: var(--bg-surface); }
.analysis-meta { display: flex; gap: 0.75rem; color: var(--text-secondary); font-size: 0.9rem; }
.overview-cards {
display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
gap: 1rem; margin: 1.5rem 0 2rem;
}
.overview-card {
background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-sm);
padding: 1rem; transition: transform .15s; display: flex; align-items: center;
}
.overview-card:hover { transform: translateY(-1px); }
.card-success { border-left: 3px solid var(--accent-success); }
.card-warning { border-left: 3px solid var(--accent-warning); }
.card-danger { border-left: 3px solid var(--accent-error); }
.card-content h3 { font-size: 0.9rem; color: var(--text-secondary); margin-bottom: 0.35rem; }
.card-value { font-size: 1.35rem; font-weight: 800; margin-bottom: 0.15rem; }
.card-description { font-size: 0.8rem; color: var(--text-muted); }
.analysis-dashboard { padding: 1rem 0 2.5rem; }
.dashboard-grid {
display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-bottom: 2rem;
}
.dashboard-column { display: flex; flex-direction: column; gap: 1.25rem; }
.analysis-section {
background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-sm); overflow: hidden;
}
.section-header {
background: var(--bg-surface); padding: 1rem 1.25rem; border-bottom: 1px solid var(--border-color);
display: flex; justify-content: space-between; align-items: center;
}
.section-header h3 { font-size: 1.05rem; font-weight: 800; }
.section-badge {
background: var(--bg-input); color: var(--text-secondary);
padding: 0.2rem 0.6rem; border-radius: var(--radius-xs); font-size: 0.8rem; font-weight: 700;
}
.content-card { padding: 1rem 1.25rem; }
.content-text { color: var(--text-primary); margin-bottom: 0.75rem; }
.content-meta { display: flex; gap: 1rem; color: var(--text-muted); font-size: 0.9rem; }
.emotion-card { padding: 1rem 1.25rem; }
.dominant-emotion { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1rem; }
.emotion-tag { background: var(--accent-primary); color: #fff; padding: 0.3rem 0.6rem; border-radius: var(--radius-xs); font-weight: 800; }
.emotion-breakdown { display: flex; flex-direction: column; gap: 0.6rem; }
.emotion-item { display: flex; align-items: center; gap: 0.75rem; }
.emotion-label { min-width: 80px; color: var(--text-secondary); font-size: 0.9rem; }
.emotion-bar { flex: 1; height: 8px; background: var(--bg-input); border-radius: var(--radius-xs); overflow: hidden; }
.emotion-fill { height: 100%; background: linear-gradient(90deg, var(--accent-primary), var(--accent-info)); }
.emotion-score { min-width: 40px; text-align: right; color: var(--text-muted); font-size: 0.9rem; }
.queries-card { padding: 1rem 1.25rem; }
.queries-grid { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.query-chip {
background: var(--bg-input); color: var(--text-primary);
padding: 0.4rem 0.7rem; border-radius: var(--radius-xs); font-size: 0.85rem; border: 1px solid var(--border-light);
}
/* Fact checks */
.fact-checks { padding: 1rem 1.25rem; display: flex; flex-direction: column; gap: 1rem; }
.fact-check-card { border-radius: var(--radius-xs); overflow: hidden; }
.fact-unverified { background: rgba(239, 68, 68, 0.05); border: 1px solid rgba(239, 68, 68, 0.35); }
.fact-verified { background: rgba(16, 185, 129, 0.05); border: 1px solid rgba(16, 185, 129, 0.35); }
.fact-check-header {
display: flex; justify-content: space-between; align-items: center;
padding: 0.8rem 1rem; background: var(--bg-surface);
}
.fact-verdict { font-weight: 800; }
.fact-status { padding: 0.3rem 0.6rem; border-radius: var(--radius-xs); font-weight: 800; font-size: 0.8rem; }
.status-verified { background: var(--accent-success); color: #fff; }
.status-unverified { background: var(--accent-error); color: #fff; }
.fact-check-results { padding: 0.8rem 1rem; }
.fact-item { margin-bottom: 0.9rem; padding-bottom: 0.9rem; border-bottom: 1px solid var(--border-light); }
.fact-item:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
.fact-source { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.35rem; }
.claim-date { color: var(--text-muted); font-size: 0.8rem; }
.fact-details { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 0.35rem; }
.fact-text { flex: 1; color: var(--text-secondary); font-size: 0.95rem; line-height: 1.4; }
.fact-rating { padding: 0.25rem 0.6rem; border-radius: var(--radius-xs); font-weight: 800; font-size: 0.8rem; white-space: nowrap; }
.fact-rating.false, .fact-rating.deceptive { background: var(--accent-error); color: #fff; }
.fact-rating.unsubstantiated { background: var(--accent-warning); color: #fff; }
.fact-link { color: var(--accent-primary); text-decoration: none; font-size: 0.85rem; }
.fact-link:hover { text-decoration: underline; }
/* Uploaded images with overlays */
.uploaded-images-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
gap: 1rem;
padding: 1rem 1.25rem;
}
.vision-card {
background: var(--bg-surface);
border: 1px solid var(--border-light);
border-radius: var(--radius-sm);
padding: 0.9rem;
}
.vision-header {
display: flex; justify-content: space-between; align-items: center;
margin-bottom: 0.6rem; border-bottom: 1px solid var(--border-light); padding-bottom: 0.4rem;
}
.image-type { padding: 0.2rem 0.55rem; border-radius: var(--radius-xs); font-size: 0.8rem; font-weight: 800; }
.ai-image { background: var(--accent-warning); color: #fff; }
.real-image { background: var(--accent-success); color: #fff; }
.image-canvas-wrap {
position: relative;
width: 100%;
background: #111;
border: 1px solid var(--border-color);
border-radius: var(--radius-xs);
overflow: hidden;
}
.image-canvas-wrap img { display: block; width: 100%; height: auto; }
.overlay-canvas {
position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none;
}
.no-image { color: var(--text-secondary); padding: 1rem; text-align: center; }
.faces-count { margin-top: 0.6rem; color: var(--text-secondary); }
/* Export */
.export-section {
background: var(--bg-card); border: 1px solid var(--border-color);
border-radius: var(--radius-sm); padding: 1.2rem; text-align: center;
}
.export-actions { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }
.export-btn {
background: var(--bg-surface); color: var(--text-primary); border: 1px solid var(--border-light);
padding: 0.7rem 1.0rem; border-radius: var(--radius-xs); cursor: pointer; transition: background .15s, border-color .15s;
font-size: 0.9rem; font-weight: 800;
}
.export-btn:hover { background: var(--bg-input); border-color: var(--accent-primary); }
/* Responsive */
@media (max-width: 820px) {
.dashboard-grid { grid-template-columns: 1fr; }
.form-container { padding: 1.25rem; }
.export-actions { flex-direction: column; }
}
/* ... keep your existing CSS exactly as-is ... */
/* NEW: inline/compact header inside the analysis form-container */
.form-header-inline {
display: flex;
align-items: center;
justify-content: space-between;
gap: .75rem;
padding-bottom: .25rem;
border-bottom: 1px solid var(--border-color);
}
.form-header-inline .inline-left {
display: flex;
align-items: center;
gap: .75rem;
}
.form-header-inline h2 {
margin: 0;
}
.form-header-inline .analysis-meta {
display: flex;
gap: .75rem;
color: var(--text-secondary);
font-size: 0.9rem;
}
/* NEW: analysis container block spacing (inside the shared card) */
.analysis-card-block {
margin-top: 1rem;
}