Deployables / frontend /src /App.css
skander101's picture
feat: replace Jinja2 template with React SPA (Vite + React 18)
7232589
Raw
History Blame Contribute Delete
10.9 kB
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
font-family: 'IBM Plex Serif', Georgia, 'Times New Roman', serif;
background: #000;
color: #a0a0a0;
min-height: 100vh;
overflow-x: hidden;
}
a { color: #d72924; text-decoration: none; }
a:hover, a:focus, a:active { color: #df5450; }
h1, h2, h3, h4, h5, h6 { font-family: Lora, Cambria, sans-serif; color: #fff; }
.header {
background: linear-gradient(0deg, rgba(0,0,0,0.92) 0%, rgba(215,41,36,0.92) 100%);
padding: 20px 32px;
position: sticky;
top: 0;
z-index: 50;
}
.header-inner {
max-width: 1400px;
margin: 0 auto;
display: flex;
align-items: center;
justify-content: space-between;
flex-wrap: wrap;
gap: 12px;
}
.header h1 {
font-size: 22px;
font-weight: 700;
font-family: Lora, Cambria, sans-serif;
color: #fff;
}
.header span { font-size: 13px; color: #c0c0c0; }
.status { color: #c0c0c0; font-size: 13px; display: flex; align-items: center; gap: 8px; }
.status-dot {
width: 8px; height: 8px; border-radius: 50%;
background: #22c55e; display: inline-block;
animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 0 0 rgba(34,197,94,0.6); }
50% { opacity: 0.7; transform: scale(0.85); box-shadow: 0 0 0 6px rgba(34,197,94,0); }
}
.container { max-width: 1400px; margin: 0 auto; padding: 20px 32px; }
.tabs {
display: flex; gap: 4px; margin-bottom: 24px;
border-bottom: 1px solid #333; overflow-x: auto; position: relative;
}
.tab {
padding: 10px 20px; border: none; background: none; color: #666;
font-family: 'IBM Plex Serif', Georgia, serif; font-size: 14px;
font-weight: 600; cursor: pointer; white-space: nowrap; position: relative;
transition: color 0.25s ease;
}
.tab:hover { color: #c0c0c0; }
.tab.active { color: #d72924; }
.tab-count { font-size: 11px; color: #555; margin-left: 4px; transition: color 0.25s; }
.tab.active .tab-count { color: rgba(215,41,36,0.7); }
.tab-underline {
position: absolute; bottom: -1px; height: 2px; background: #d72924;
transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1), width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
box-shadow: 0 0 8px rgba(215,41,36,0.5);
}
.card {
background: rgba(12, 12, 12, 0.92);
border-radius: 0; overflow: hidden; border: 1px solid #222;
display: flex; flex-direction: column;
box-shadow: 1px 2px 3px rgba(255,255,255,.1);
opacity: 0; transform: translateY(15px);
transition: transform 0.2s ease-out, box-shadow 0.2s ease-out, border-color 0.2s ease-out, opacity 0.3s ease-out;
}
.card.revealed { opacity: 1; transform: translateY(0); }
.card:hover {
transform: translateY(-3px) scale(1.02);
box-shadow: 0 0 20px rgba(215,41,36,0.15), 0 8px 24px rgba(255,255,255,.1);
border-color: rgba(215,41,36,0.3);
}
.card-image-wrap { overflow: hidden; height: 180px; }
.card-image {
width: 100%; height: 180px; object-fit: cover;
background: #111; display: block; transition: transform 0.3s ease-out;
}
.card:hover .card-image { transform: scale(1.05); }
.card-image-placeholder {
width: 100%; height: 180px;
background: linear-gradient(135deg, #111, #000);
display: flex; align-items: center; justify-content: center;
font-size: 40px; color: #333;
}
.card-body { padding: 14px 18px 18px; flex: 1; display: flex; flex-direction: column; }
.card-rank {
font-size: 10px; font-weight: 700; color: #666;
letter-spacing: .05em; margin-bottom: 4px;
}
.card-topic {
font-size: 10px; font-weight: 600; text-transform: uppercase;
letter-spacing: .08em; color: #d72924; margin-bottom: 6px;
}
.card-title {
font-size: 15px; font-weight: 600; font-family: Lora, Cambria, sans-serif;
line-height: 1.4; margin-bottom: 6px; color: #fff;
display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-summary {
font-size: 13px; color: #a0a0a0; line-height: 1.5; margin-bottom: 10px;
display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
flex: 1;
}
.card-meta { display: flex; align-items: center; gap: 10px; font-size: 12px; color: #c0c0c0; margin-bottom: 10px; flex-wrap: wrap; }
.card-meta .source { color: #c0c0c0; }
.sponsor { font-size: 10px; color: #fbbf24; background: rgba(251, 191, 36, 0.1); padding: 2px 6px; border-radius: 4px; }
.bias-badge { font-size: 10px; font-weight: 600; padding: 2px 6px; border-radius: 4px; letter-spacing: .03em; }
.bias-left { background: rgba(59,130,246,0.15); color: #60a5fa; }
.bias-left-center { background: rgba(99,102,241,0.15); color: #818cf8; }
.bias-center { background: rgba(148,163,184,0.15); color: #94a3b8; }
.bias-right-center { background: rgba(239,68,68,0.15); color: #f87171; }
.bias-right { background: rgba(220,38,38,0.15); color: #ef4444; }
.bias-satire { background: rgba(168,85,247,0.15); color: #c084fc; }
.factuality-badge { font-size: 10px; font-weight: 600; padding: 2px 6px; border-radius: 4px; letter-spacing: .03em; }
.factuality-high { background: rgba(34,197,94,0.15); color: #4ade80; }
.factuality-mixed { background: rgba(251,191,36,0.15); color: #fbbf24; }
.factuality-low { background: rgba(239,68,68,0.15); color: #f87171; }
.factuality-satire { background: rgba(168,85,247,0.15); color: #c084fc; }
.category-badge { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; padding: 3px 8px; }
.cat-government { background: rgba(239,68,68,0.15); color: #f87171; }
.cat-conglomerate { background: rgba(139,92,246,0.15); color: #a78bfa; }
.cat-private_equity { background: rgba(251,191,36,0.15); color: #fbbf24; }
.cat-wealthy_private { background: rgba(236,72,153,0.15); color: #f472b6; }
.cat-corporate { background: rgba(59,130,246,0.15); color: #60a5fa; }
.cat-independent { background: rgba(34,197,94,0.15); color: #4ade80; }
.score-bar-wrap { height: 4px; background: #222; border-radius: 2px; margin-bottom: 3px; overflow: hidden; }
.score-bar-fill {
height: 100%; border-radius: 2px;
background: linear-gradient(90deg, #d72924, #df5450);
width: 0%; transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.score-label { font-size: 10px; color: #666; display: flex; justify-content: space-between; }
.card-actions { display: flex; gap: 6px; margin-top: 6px; }
.btn {
display: inline-flex; align-items: center; gap: 4px;
padding: 6px 14px; border-radius: 4px; font-size: 12px;
font-weight: 600; font-family: 'IBM Plex Serif', Georgia, serif;
text-decoration: none; cursor: pointer; border: none;
transition: transform 0.15s ease, background 0.2s ease, filter 0.2s ease;
}
.btn:hover { filter: brightness(1.2); transform: scale(1.04); }
.btn:active { transform: scale(0.97) !important; }
.btn-primary {
background: linear-gradient(to right, #d72924 0%, #db3e3a 51%, #d72924 100%);
color: #fff;
}
.btn-secondary { background: #222; color: #c0c0c0; }
.btn-secondary:hover { background: #333; filter: brightness(1.2); color: #fff; }
.card-date {
margin-left: auto; font-size: 12px; font-weight: 700; color: #d72924;
background: rgba(215, 41, 36, 0.08); padding: 3px 10px;
border: 1px solid rgba(215, 41, 36, 0.2); transition: background 0.2s, border-color 0.2s;
}
.card:hover .card-date { background: rgba(215,41,36,0.15); border-color: rgba(215,41,36,0.4); }
.card-topics { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 10px; }
.topic-tag { font-size: 10px; padding: 2px 7px; background: #222; color: #c0c0c0; }
.date-group { margin-bottom: 16px; }
.date-header {
font-size: 12px; font-weight: 700; color: #d72924; text-transform: uppercase;
letter-spacing: .08em; margin-bottom: 10px; padding-bottom: 6px; border-bottom: 1px solid #333;
}
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 16px; }
.empty { text-align: center; padding: 60px 20px; color: #666; }
.empty h2 { font-size: 18px; margin-bottom: 6px; color: #fff; }
@keyframes shimmer {
0% { background-position: -200px 0; }
100% { background-position: calc(200px + 100%) 0; }
}
.skeleton {
background: linear-gradient(90deg, #1a1a1a 25%, #2a2a2a 50%, #1a1a1a 75%);
background-size: 200px 100%; animation: shimmer 1.5s ease-in-out infinite; border-radius: 2px;
}
.skeleton-img { height: 180px; width: 100%; }
.skeleton-text { height: 14px; margin-bottom: 8px; width: 80%; }
.skeleton-text-short { height: 14px; margin-bottom: 8px; width: 50%; }
.modal-overlay {
display: none; position: fixed; inset: 0;
background: rgba(0,0,0,0.85); z-index: 1000;
justify-content: center; align-items: center; padding: 20px;
opacity: 0; transition: opacity 0.25s ease;
}
.modal-overlay.active { display: flex; opacity: 1; }
.modal {
background: rgba(12,12,12,0.96); border: 1px solid #333;
max-width: 480px; width: 100%; padding: 28px; position: relative;
box-shadow: 0 0 40px rgba(215,41,36,0.15);
transform: translateY(20px) scale(0.95);
transition: transform 0.25s ease, opacity 0.25s ease;
opacity: 0;
}
.modal-overlay.active .modal { transform: translateY(0) scale(1); opacity: 1; }
.modal-close {
position: absolute; top: 12px; right: 16px;
background: none; border: none; color: #666;
font-size: 22px; cursor: pointer;
font-family: 'IBM Plex Serif', Georgia, serif;
transition: color 0.2s, transform 0.15s;
}
.modal-close:hover { color: #d72924; transform: rotate(90deg); }
.modal h2 { font-size: 18px; color: #d72924; margin-bottom: 4px; }
.modal .parent { font-size: 13px; color: #c0c0c0; margin-bottom: 12px; }
.modal-row { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.modal-section { margin-bottom: 14px; }
.modal-section h3 { font-size: 11px; font-weight: 600; color: #666; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px; }
.owner-list { display: flex; flex-wrap: wrap; gap: 6px; }
.owner-tag { font-size: 12px; padding: 4px 10px; background: rgba(215,41,36,0.08); color: #d72924; border: 1px solid rgba(215,41,36,0.2); }
.owner-wiki { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; font-size: 14px; background: rgba(215,41,36,0.08); color: #d72924; border: 1px solid rgba(215,41,36,0.2); text-decoration: none; transition: background 0.2s, transform 0.15s; }
.owner-wiki:hover { background: rgba(215,41,36,0.25); color: #df5450; transform: scale(1.1); }
.modal-wiki {
display: inline-block; margin-top: 6px; padding: 8px 16px;
background: linear-gradient(to right, #d72924 0%, #db3e3a 51%, #d72924 100%);
color: #fff; text-decoration: none; font-size: 13px;
font-weight: 600; font-family: 'IBM Plex Serif', Georgia, serif;
transition: opacity 0.2s, transform 0.15s;
}
.modal-wiki:hover { opacity: .85; color: #fff; transform: scale(1.03); }
@media (max-width: 640px) {
.header { padding: 14px; }
.container { padding: 14px; }
.grid { grid-template-columns: 1fr; }
}