WarTracker / client /src /index.css
skander101's picture
initial commit: vibes only, probably bloated
6512187
Raw
History Blame Contribute Delete
7.08 kB
*, *::before, *::after {
box-sizing: border-box;
margin: 0;
padding: 0;
}
:root {
--bg: #0d1117;
--bg-card: #161b22;
--bg-hover: #1c2128;
--border: #30363d;
--text: #e6edf3;
--text-muted: #8b949e;
--accent: #f0b232;
--accent-dim: #b8860b;
--green: #3fb950;
--red: #f85149;
--blue: #58a6ff;
--radius: 8px;
}
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
background: var(--bg);
color: var(--text);
line-height: 1.5;
}
.app {
max-width: 1280px;
margin: 0 auto;
padding: 16px;
}
header {
display: flex;
align-items: center;
gap: 16px;
margin-bottom: 24px;
border-bottom: 1px solid var(--border);
padding-bottom: 16px;
}
header h1 {
font-size: 1.5rem;
color: var(--accent);
}
/* Tabs */
.tabs {
display: flex;
gap: 4px;
margin-bottom: 20px;
}
.tab-btn {
padding: 8px 20px;
border: 1px solid var(--border);
border-radius: var(--radius);
background: var(--bg-card);
color: var(--text-muted);
cursor: pointer;
font-size: 0.9rem;
transition: all 0.15s;
}
.tab-btn:hover {
background: var(--bg-hover);
color: var(--text);
}
.tab-btn.active {
background: var(--accent);
color: #000;
border-color: var(--accent);
font-weight: 600;
}
/* Controls bar */
.controls {
display: flex;
gap: 12px;
margin-bottom: 16px;
flex-wrap: wrap;
align-items: center;
}
.search-box {
padding: 8px 12px;
border: 1px solid var(--border);
border-radius: var(--radius);
background: var(--bg-card);
color: var(--text);
font-size: 0.9rem;
width: 260px;
}
.search-box:focus {
outline: none;
border-color: var(--accent);
}
.tag-filters {
display: flex;
flex-wrap: wrap;
gap: 4px;
}
.tag-btn {
padding: 4px 10px;
border-radius: 12px;
border: 1px solid var(--border);
background: transparent;
color: var(--text-muted);
cursor: pointer;
font-size: 0.75rem;
transition: all 0.15s;
}
.tag-btn:hover {
border-color: var(--accent);
color: var(--text);
}
.tag-btn.active {
background: var(--accent);
color: #000;
border-color: var(--accent);
}
/* Tables */
.table-wrap {
overflow-x: auto;
}
table {
width: 100%;
border-collapse: collapse;
font-size: 0.9rem;
}
th, td {
text-align: left;
padding: 10px 12px;
border-bottom: 1px solid var(--border);
}
th {
color: var(--text-muted);
font-weight: 600;
cursor: pointer;
user-select: none;
white-space: nowrap;
}
th:hover {
color: var(--accent);
}
th .sort-arrow {
margin-left: 4px;
font-size: 0.7rem;
}
td {
white-space: nowrap;
}
tr:hover td {
background: var(--bg-hover);
}
.item-name {
display: flex;
align-items: center;
gap: 8px;
}
.item-thumb {
width: 32px;
height: 32px;
border-radius: 4px;
background: var(--bg-hover);
}
.tag-badge {
display: inline-block;
padding: 2px 8px;
border-radius: 10px;
background: var(--bg-hover);
color: var(--text-muted);
font-size: 0.75rem;
margin: 1px 2px;
}
/* Watchlist star */
.star-btn {
background: none;
border: none;
font-size: 1.2rem;
cursor: pointer;
color: var(--text-muted);
transition: color 0.15s;
padding: 0 4px;
}
.star-btn.starred {
color: var(--accent);
}
.star-btn:hover {
color: var(--accent);
}
/* Prices */
.price-sell { color: var(--green); }
.price-buy { color: var(--blue); }
.price-spread { color: var(--text-muted); }
/* Loading / Error */
.loading {
display: flex;
align-items: center;
gap: 8px;
padding: 20px;
color: var(--text-muted);
}
.spinner {
width: 20px;
height: 20px;
border: 2px solid var(--border);
border-top-color: var(--accent);
border-radius: 50%;
animation: spin 0.8s linear infinite;
}
@keyframes spin {
to { transform: rotate(360deg); }
}
.error-box {
padding: 16px;
background: rgba(248, 81, 73, 0.1);
border: 1px solid var(--red);
border-radius: var(--radius);
color: var(--red);
margin-bottom: 16px;
}
.error-box button {
margin-top: 8px;
padding: 6px 14px;
background: var(--red);
color: #fff;
border: none;
border-radius: var(--radius);
cursor: pointer;
}
.empty-msg {
padding: 40px 20px;
text-align: center;
color: var(--text-muted);
}
/* Detail panel */
.detail-panel {
background: var(--bg-card);
border: 1px solid var(--border);
border-radius: var(--radius);
padding: 20px;
margin-bottom: 20px;
}
.detail-header {
display: flex;
align-items: center;
gap: 16px;
margin-bottom: 20px;
}
.detail-header img {
width: 64px;
height: 64px;
border-radius: 8px;
background: var(--bg-hover);
}
.detail-header h2 {
font-size: 1.3rem;
}
.back-btn {
padding: 6px 14px;
background: var(--bg-card);
border: 1px solid var(--border);
border-radius: var(--radius);
color: var(--text);
cursor: pointer;
margin-bottom: 16px;
}
.back-btn:hover {
background: var(--bg-hover);
}
.stats-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
gap: 12px;
margin-bottom: 20px;
}
.stat-card {
background: var(--bg);
border: 1px solid var(--border);
border-radius: var(--radius);
padding: 12px;
text-align: center;
}
.stat-card .stat-label {
font-size: 0.75rem;
color: var(--text-muted);
text-transform: uppercase;
}
.stat-card .stat-value {
font-size: 1.2rem;
font-weight: 700;
margin-top: 4px;
}
.orders-section h3 {
margin-bottom: 10px;
font-size: 1rem;
}
/* Range slider */
.range-filter {
display: flex;
align-items: center;
gap: 8px;
}
.range-filter label {
font-size: 0.8rem;
color: var(--text-muted);
}
.range-filter input[type="number"] {
width: 70px;
padding: 4px 8px;
border: 1px solid var(--border);
border-radius: var(--radius);
background: var(--bg-card);
color: var(--text);
font-size: 0.8rem;
}
/* Chart */
.chart-wrap {
background: var(--bg-card);
border: 1px solid var(--border);
border-radius: var(--radius);
padding: 20px;
}
.chart-wrap h3 {
margin-bottom: 16px;
}
/* Pagination */
.pagination {
display: flex;
align-items: center;
justify-content: center;
gap: 12px;
margin-top: 16px;
padding: 12px 0;
}
.page-info {
color: var(--text-muted);
font-size: 0.85rem;
min-width: 180px;
text-align: center;
}
/* Progress bar */
.progress-bar-wrap {
position: sticky;
top: 0;
z-index: 10;
background: var(--bg);
padding: 8px 0 4px;
margin-bottom: 8px;
}
.progress-bar {
width: 100%;
height: 8px;
background: var(--bg-hover);
border-radius: 4px;
overflow: hidden;
margin-bottom: 6px;
border: 1px solid var(--border);
}
.progress-bar-fill {
height: 100%;
background: linear-gradient(90deg, var(--accent-dim), var(--accent));
border-radius: 4px;
transition: width 0.3s ease;
animation: progress-pulse 1.5s ease-in-out infinite;
}
@keyframes progress-pulse {
0%, 100% { opacity: 1; }
50% { opacity: 0.7; }
}
.progress-text {
font-size: 0.8rem;
color: var(--accent);
font-weight: 600;
}
/* Responsive */
@media (max-width: 640px) {
.controls { flex-direction: column; }
.search-box { width: 100%; }
}