Enhance Analytics Panel styles: improve layout, spacing, and hover effects for better user experience

This commit is contained in:
MayaTheShy
2026-03-21 19:30:10 -04:00
parent 3884b850c8
commit ba8acc1c27

View File

@@ -1,88 +1,173 @@
/* ============================================
Analytics Panel — Minecraft Dashboard
============================================ */
.analytics-panel {
height: 100%;
overflow-y: auto;
padding: 0.75rem;
padding: 1rem;
display: flex;
flex-direction: column;
gap: 0.75rem;
gap: 1rem;
}
.analytics-header {
/* ===== Hero Stats Row ===== */
.analytics-hero {
display: flex;
justify-content: space-between;
align-items: center;
padding-bottom: 0.5rem;
border-bottom: 2px solid var(--mc-dark);
}
.analytics-header h2 {
font-size: 1rem;
color: var(--mc-text-yellow);
text-shadow: 2px 2px 0 var(--mc-dark);
}
/* Quick Stats */
.analytics-stats {
display: flex;
gap: 0.375rem;
gap: 0.5rem;
flex-wrap: wrap;
}
.analytics-stat {
.hero-stat {
display: flex;
align-items: center;
gap: 0.625rem;
padding: 0.625rem 0.875rem;
background: linear-gradient(135deg, #2a2a2a 0%, #1e1e1e 100%);
border: 2px solid #333;
border-radius: 2px;
flex: 1;
min-width: 120px;
position: relative;
overflow: hidden;
transition: border-color 0.2s, transform 0.15s;
}
.hero-stat::before {
content: '';
position: absolute;
top: 0;
left: 0;
width: 3px;
height: 100%;
}
.hero-stat--items::before { background: var(--mc-text-green); }
.hero-stat--types::before { background: var(--mc-text-aqua); }
.hero-stat--chests::before { background: var(--mc-text-gold); }
.hero-stat--furnaces::before { background: var(--mc-text-red); }
.hero-stat--recipes::before { background: var(--mc-text-light-purple); }
.hero-stat:hover {
border-color: #555;
transform: translateY(-1px);
}
.hero-stat-icon {
font-size: 1.25rem;
filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}
.hero-stat-content {
display: flex;
flex-direction: column;
padding: 0.5rem 0.75rem;
background: var(--mc-dark);
border: 2px solid #333;
flex: 1;
min-width: 80px;
gap: 0;
}
.analytics-stat .stat-label {
font-size: 0.5rem;
color: var(--mc-text-gray);
font-weight: 700;
text-transform: uppercase;
}
.analytics-stat .stat-value {
font-size: 0.85rem;
.hero-stat-value {
font-size: 1rem;
color: var(--mc-text-white);
font-weight: 700;
text-shadow: 1px 1px 0 #000;
line-height: 1.2;
}
/* Chart Grid */
.hero-stat-label {
font-size: 0.45rem;
color: var(--mc-text-gray);
text-transform: uppercase;
letter-spacing: 0.08em;
font-weight: 700;
}
.hero-stat-delta {
font-size: 0.45rem;
font-weight: 700;
letter-spacing: 0.03em;
}
.hero-stat-delta.positive {
color: var(--mc-text-green);
}
.hero-stat-delta.negative {
color: var(--mc-text-red);
}
.hero-active {
color: var(--mc-text-green);
}
/* ===== Analytics Grid ===== */
.analytics-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
gap: 0.75rem;
}
/* ===== Cards ===== */
.analytics-card {
padding: 0.75rem;
background: #3b3b3b;
border: 3px solid var(--mc-dark);
padding: 0.875rem;
background: linear-gradient(180deg, #3b3b3b 0%, #333 100%);
border: 2px solid #444;
border-radius: 2px;
box-shadow:
inset 0 2px 0 #555,
inset 0 -2px 0 #2a2a2a;
inset 0 1px 0 #555,
inset 0 -1px 0 #2a2a2a,
0 4px 12px rgba(0, 0, 0, 0.4);
transition: border-color 0.2s, box-shadow 0.2s;
position: relative;
}
.analytics-card:hover {
border-color: #555;
box-shadow:
inset 0 1px 0 #555,
inset 0 -1px 0 #2a2a2a,
0 6px 20px rgba(0, 0, 0, 0.5);
}
.analytics-card-wide {
grid-column: 1 / -1;
}
.analytics-card h3 {
font-size: 0.75rem;
color: var(--mc-text-gold);
font-weight: 700;
margin-bottom: 0.5rem;
text-shadow: 1px 1px 0 var(--mc-dark);
text-transform: uppercase;
letter-spacing: 0.05em;
.card-header {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 0.625rem;
padding-bottom: 0.5rem;
border-bottom: 1px solid #444;
}
.card-header h3 {
font-size: 0.7rem;
color: var(--mc-text-gold);
font-weight: 700;
text-shadow: 1px 1px 0 var(--mc-dark);
text-transform: uppercase;
letter-spacing: 0.06em;
}
.card-badge {
font-size: 0.45rem;
color: var(--mc-text-gray);
background: #2a2a2a;
padding: 0.15rem 0.4rem;
border: 1px solid #444;
border-radius: 1px;
text-transform: uppercase;
letter-spacing: 0.04em;
}
/* ===== Chart Area ===== */
.chart-wrapper {
background: #2a2a2a;
border: 1px solid #333;
border-radius: 1px;
padding: 0.5rem 0.25rem 0.25rem;
}
/* SVG Charts */
.svg-chart {
display: block;
width: 100%;
@@ -95,37 +180,193 @@
align-items: center;
justify-content: center;
color: var(--mc-text-gray);
font-size: 0.7rem;
gap: 0.25rem;
background: #2a2a2a;
border: 1px solid #333;
font-size: 0.65rem;
gap: 0.375rem;
background: #222;
border: 1px dashed #444;
border-radius: 2px;
padding: 1.5rem;
min-height: 120px;
}
.chart-empty--compact {
min-height: 140px;
}
.chart-empty-icon {
font-size: 1.5rem;
opacity: 0.5;
margin-bottom: 0.25rem;
}
.chart-empty-sub {
font-size: 0.55rem;
font-size: 0.5rem;
color: #555;
}
/* Bar Chart */
.bar-chart {
/* ===== Storage Health Card ===== */
.analytics-card--overview {
display: flex;
flex-direction: column;
}
.overview-split {
display: flex;
align-items: center;
gap: 1rem;
}
.overview-stats-col {
display: flex;
flex-direction: column;
gap: 0.375rem;
flex: 1;
}
.mini-stat {
display: flex;
justify-content: space-between;
align-items: center;
padding: 0.375rem 0.5rem;
background: #2a2a2a;
border: 1px solid #333;
border-radius: 1px;
}
.mini-stat-label {
font-size: 0.5rem;
color: var(--mc-text-gray);
text-transform: uppercase;
font-weight: 700;
}
.mini-stat-value {
font-size: 0.7rem;
color: var(--mc-text-white);
font-weight: 700;
text-shadow: 1px 1px 0 #000;
}
/* ===== Capacity Gauge ===== */
.capacity-gauge {
display: flex;
flex-direction: column;
align-items: center;
gap: 0.25rem;
}
.capacity-gauge svg {
filter: drop-shadow(0 0 6px rgba(0, 0, 0, 0.4));
}
.capacity-gauge-detail {
font-size: 0.45rem;
color: var(--mc-text-gray);
text-transform: uppercase;
text-align: center;
}
/* ===== Category Donut ===== */
.analytics-card--categories {
display: flex;
flex-direction: column;
}
.donut-container {
display: flex;
align-items: center;
gap: 0.75rem;
}
.donut-chart {
flex-shrink: 0;
filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4));
}
.donut-legend {
display: flex;
flex-direction: column;
gap: 0.25rem;
flex: 1;
min-width: 0;
}
.donut-legend-item {
display: flex;
align-items: center;
gap: 0.375rem;
font-size: 0.5rem;
padding: 0.2rem 0;
}
.donut-dot {
width: 8px;
height: 8px;
border-radius: 1px;
flex-shrink: 0;
box-shadow: 0 0 4px rgba(0, 0, 0, 0.3);
}
.donut-legend-label {
color: var(--mc-text-gray);
flex: 1;
text-transform: uppercase;
font-weight: 700;
letter-spacing: 0.03em;
}
.donut-legend-value {
color: var(--mc-text-white);
font-weight: 700;
text-shadow: 1px 1px 0 #000;
}
/* ===== Bar Chart ===== */
.bar-chart {
display: flex;
flex-direction: column;
gap: 0.3rem;
width: 100% !important;
}
.bar-row {
display: flex;
align-items: center;
gap: 0.375rem;
animation: bar-slide-in 0.4s ease both;
}
@keyframes bar-slide-in {
from {
opacity: 0;
transform: translateX(-8px);
}
to {
opacity: 1;
transform: translateX(0);
}
}
.bar-rank {
min-width: 24px;
text-align: center;
font-size: 0.75rem;
line-height: 1;
}
.bar-rank-num {
font-size: 0.5rem;
color: #555;
font-weight: 700;
}
.bar-label {
display: flex;
align-items: center;
gap: 0.25rem;
gap: 0.3rem;
font-size: 0.5rem;
color: var(--mc-text-gray);
min-width: 100px;
min-width: 90px;
max-width: 100px;
overflow: hidden;
white-space: nowrap;
@@ -139,43 +380,69 @@
.bar-track {
flex: 1;
height: 16px;
background: #2a2a2a;
height: 18px;
background: #222;
border: 1px solid #333;
border-radius: 1px;
overflow: hidden;
}
.bar-fill {
height: 100%;
transition: width 0.3s;
transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
border-radius: 0 1px 1px 0;
box-shadow: 0 0 8px rgba(255, 170, 0, 0.15);
}
.bar-value {
font-size: 0.55rem;
color: var(--mc-text-white);
min-width: 30px;
min-width: 32px;
text-align: right;
font-weight: 700;
text-shadow: 1px 1px 0 #000;
}
/* Item History Search */
/* ===== Item History Search ===== */
.item-history-search {
position: relative;
margin-bottom: 0.5rem;
margin-bottom: 0.625rem;
}
.search-input-wrapper {
position: relative;
display: flex;
align-items: center;
}
.search-icon {
position: absolute;
left: 0.5rem;
font-size: 0.65rem;
opacity: 0.5;
pointer-events: none;
}
.item-history-search .search-input {
width: 100%;
background: var(--mc-dark);
border: 2px solid #333;
background: #222;
border: 2px solid #444;
color: var(--mc-text-white);
font-family: 'Silkscreen', 'Courier New', monospace;
font-size: 0.65rem;
padding: 0.375rem 0.5rem;
font-size: 0.6rem;
padding: 0.5rem 0.5rem 0.5rem 1.75rem;
outline: none;
border-radius: 1px;
transition: border-color 0.2s, box-shadow 0.2s;
}
.item-history-search .search-input:focus {
border-color: var(--mc-text-aqua);
box-shadow: 0 0 8px rgba(85, 255, 255, 0.15);
}
.item-history-search .search-input::placeholder {
color: #555;
}
.item-history-dropdown {
@@ -183,22 +450,29 @@
top: 100%;
left: 0;
right: 0;
background: #2a2a2a;
border: 2px solid #444;
background: #222;
border: 2px solid #555;
border-top: none;
z-index: 50;
max-height: 200px;
overflow-y: auto;
box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5);
}
.item-history-option {
display: flex;
align-items: center;
gap: 0.375rem;
padding: 0.375rem 0.5rem;
padding: 0.4rem 0.5rem;
cursor: pointer;
font-size: 0.6rem;
font-size: 0.55rem;
color: var(--mc-text-white);
transition: background 0.05s;
transition: background 0.1s;
border-bottom: 1px solid #2a2a2a;
}
.item-history-option:last-child {
border-bottom: none;
}
.item-history-option:hover {
@@ -208,36 +482,69 @@
.option-count {
margin-left: auto;
color: var(--mc-text-gray);
font-size: 0.5rem;
font-size: 0.45rem;
font-weight: 700;
}
.item-history-chart {
display: flex;
flex-direction: column;
gap: 0.375rem;
gap: 0.5rem;
}
.item-history-label {
display: flex;
align-items: center;
gap: 0.375rem;
gap: 0.5rem;
font-size: 0.7rem;
color: var(--mc-text-white);
font-weight: 700;
text-shadow: 1px 1px 0 var(--mc-dark);
padding: 0.375rem 0.5rem;
background: #2a2a2a;
border: 1px solid #333;
border-radius: 1px;
}
/* Responsive */
@media (max-width: 768px) {
/* ===== Responsive ===== */
@media (max-width: 900px) {
.analytics-grid {
grid-template-columns: 1fr;
}
.analytics-stats {
.analytics-hero {
flex-wrap: wrap;
}
.analytics-stat {
min-width: 60px;
.hero-stat {
min-width: 100px;
}
.overview-split {
flex-direction: column;
}
.donut-container {
flex-direction: column;
}
}
@media (max-width: 600px) {
.analytics-panel {
padding: 0.5rem;
}
.hero-stat {
min-width: 80px;
padding: 0.5rem;
}
.hero-stat-value {
font-size: 0.85rem;
}
.bar-label {
min-width: 70px;
max-width: 70px;
}
}