diff --git a/frontend/flashcards.html b/frontend/flashcards.html index b745e23..dd80ffe 100644 --- a/frontend/flashcards.html +++ b/frontend/flashcards.html @@ -36,20 +36,20 @@ /* ── stats bar ── */ .fc-stats { display: flex; gap: 12px; margin-bottom: 28px; flex-wrap: wrap; } .fc-stat { background: #fff; border: 1.5px solid var(--border); border-radius: 14px; - padding: 14px 16px 12px; display: flex; flex-direction: column; gap: 3px; - min-width: 112px; position: relative; overflow: hidden; } - .fc-stat::before { content: ''; position: absolute; top: 0; left: 0; width: 3px; - height: 100%; background: var(--stat-color, var(--violet)); - border-radius: 0 2px 2px 0; } - .fc-stat-icon { width: 28px; height: 28px; border-radius: 8px; - background: var(--stat-bg, rgba(155,93,229,.1)); - display: flex; align-items: center; justify-content: center; - color: var(--stat-color, var(--violet)); margin-bottom: 4px; } - .fc-stat-icon .ic { width: 14px; height: 14px; } - .fc-stat-val { font-family: 'Unbounded', sans-serif; font-size: 1.5rem; font-weight: 800; - color: var(--text); line-height: 1; } - .fc-stat-lbl { font-size: .7rem; font-weight: 600; color: var(--text-3); - text-transform: uppercase; letter-spacing: .04em; } + padding: 16px 20px 14px; display: flex; flex-direction: column; gap: 4px; + min-width: 110px; position: relative; overflow: hidden; + transition: box-shadow .18s, transform .18s; } + .fc-stat::before { content: ''; position: absolute; inset: 0; + background: radial-gradient(ellipse at 110% -10%, + var(--stat-color-a, rgba(155,93,229,.09)) 0%, transparent 65%); + pointer-events: none; } + .fc-stat:hover { box-shadow: 0 4px 16px rgba(0,0,0,.08); transform: translateY(-1px); } + .fc-stat-val { font-family: 'Unbounded', sans-serif; font-size: 1.75rem; font-weight: 800; + color: var(--stat-color, var(--violet)); line-height: 1; position: relative; } + .fc-stat-lbl { font-size: .68rem; font-weight: 600; color: var(--text-3); + text-transform: uppercase; letter-spacing: .05em; + display: flex; align-items: center; gap: 5px; position: relative; } + .fc-stat-lbl .ic { width: 11px; height: 11px; color: var(--stat-color, var(--violet)); opacity: .7; flex-shrink: 0; } /* ── deck grid ── */ .deck-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; } @@ -546,18 +546,17 @@ function renderStats(s) { if (!s) return; const bar = document.getElementById('fc-stats-bar'); bar.innerHTML = [ - { val: s.decks_count, lbl: 'Колод', col: '#9B5DE5', bg: 'rgba(155,93,229,.1)', + { val: s.decks_count, lbl: 'Колод', col: '#9B5DE5', icon: '' }, - { val: s.cards_count, lbl: 'Карточек', col: '#3B82F6', bg: 'rgba(59,130,246,.1)', + { val: s.cards_count, lbl: 'Карточек', col: '#3B82F6', icon: '' }, - { val: s.due_count, lbl: 'К повторению', col: '#D97706', bg: 'rgba(217,119,6,.1)', + { val: s.due_count, lbl: 'К повторению', col: '#D97706', icon: '' }, - { val: s.reviewed_today, lbl: 'Сегодня', col: '#16A34A', bg: 'rgba(22,163,74,.1)', + { val: s.reviewed_today, lbl: 'Сегодня', col: '#16A34A', icon: '' }, - ].map(x => `
-
${x.icon}
+ ].map(x => `
${x.val} - ${x.lbl} + ${x.icon}${x.lbl}
`).join(''); }