french-journey/style.css
2026-07-10 18:17:02 +03:00

803 lines
17 KiB
CSS
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

* { margin: 0; padding: 0; box-sizing: border-box; }
[hidden] { display: none !important; }
:root {
--bg: #ffffff;
--text: #1a1a1a;
--muted: #6b7280;
--line: #e5e7eb;
--accent: #2563eb;
--soft: #f8f9fa;
--surface: #ffffff;
--code-bg: #f3f4f6;
--ok: #16a34a;
--new-soft: #eff6ff;
--new-line: #2563eb;
--new-border: #bfdbfe;
--ok-soft: #f0fdf4;
--ok-border: #bbf7d0;
--danger-soft: #fef2f2;
--danger-line: #fecaca;
--danger: #dc2626;
}
:root[data-theme="dark"] {
--bg: #090909;
--text: #eeeeee;
--muted: #a3a3a3;
--line: #2b2b2b;
--accent: #7eb6ff;
--soft: #161616;
--surface: #101010;
--code-bg: #1c1c1c;
--ok: #4ade80;
--new-soft: #171717;
--new-line: #7eb6ff;
--new-border: #294f78;
--ok-soft: #102116;
--ok-border: #27653c;
--danger-soft: #261313;
--danger-line: #743232;
--danger: #f87171;
color-scheme: dark;
}
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
background: var(--bg);
color: var(--text);
line-height: 1.6;
font-size: 15px;
}
/* Topbar */
.topbar {
display: flex;
align-items: center;
justify-content: space-between;
height: 52px;
padding: 0 24px;
border-bottom: 1px solid var(--line);
position: sticky;
top: 0;
background: var(--bg);
z-index: 10;
}
.brand { font-weight: 600; font-size: 15px; }
.brand span { color: var(--muted); margin: 0 4px; }
.topbar-meta { color: var(--muted); font-size: 13px; }
.topnav { display: flex; gap: 4px; margin-left: 28px; margin-right: auto; }
.topnav a {
font-size: 13.5px;
color: var(--muted);
text-decoration: none;
padding: 4px 12px;
border-radius: 6px;
}
.topnav a:hover { background: var(--soft); color: var(--text); }
.topnav a.active { color: var(--accent); background: var(--soft); font-weight: 500; }
.theme-toggle {
font-family: inherit;
font-size: 12.5px;
color: var(--muted);
background: var(--surface);
border: 1px solid var(--line);
border-radius: 6px;
padding: 4px 10px;
cursor: pointer;
margin-right: 14px;
}
.theme-toggle:hover {
color: var(--accent);
border-color: var(--accent);
}
/* Layout */
.layout { display: flex; align-items: flex-start; }
/* Sidebar */
.sidebar {
width: 280px;
flex-shrink: 0;
border-right: 1px solid var(--line);
height: calc(100vh - 52px);
overflow-y: auto;
position: sticky;
top: 52px;
padding: 16px 12px;
}
.search {
width: 100%;
padding: 8px 10px;
border: 1px solid var(--line);
border-radius: 6px;
font-size: 13px;
margin-bottom: 14px;
outline: none;
background: var(--surface);
color: var(--text);
}
.search::placeholder { color: var(--muted); }
.search:focus { border-color: var(--accent); }
.nav .level-group { margin-bottom: 14px; }
.nav .level-label {
font-size: 12px;
font-weight: 700;
color: var(--muted);
text-transform: uppercase;
letter-spacing: .04em;
padding: 4px 10px;
display: flex;
justify-content: space-between;
align-items: baseline;
}
.nav .level-label .lvl-name { font-weight: 500; text-transform: none; letter-spacing: 0; }
.nav .lvl-count {
font-weight: 600;
font-size: 11px;
color: var(--muted);
background: var(--soft);
border: 1px solid var(--line);
border-radius: 10px;
padding: 0 7px;
}
.nav a {
display: flex;
align-items: center;
gap: 8px;
padding: 5px 10px 5px 14px;
color: var(--text);
text-decoration: none;
font-size: 13.5px;
border-radius: 5px;
}
.nav a:hover { background: var(--soft); }
.nav a.active { color: var(--accent); background: var(--soft); font-weight: 500; }
.nav a .dot {
width: 7px; height: 7px;
border-radius: 50%;
border: 1.5px solid var(--line);
flex-shrink: 0;
}
.nav a .dot.on { background: var(--ok); border-color: var(--ok); }
/* Content */
.content {
flex: 1;
max-width: 760px;
padding: 40px 48px 120px;
}
.level-header { margin-bottom: 36px; }
.level-header .badge {
display: inline-block;
background: var(--accent);
color: #fff;
font-size: 12px;
font-weight: 700;
padding: 2px 8px;
border-radius: 4px;
margin-bottom: 8px;
}
.level-header h1 { font-size: 26px; font-weight: 700; margin-bottom: 6px; }
.level-header p { color: var(--muted); font-size: 14px; }
.progress {
display: flex;
align-items: center;
gap: 12px;
margin-top: 14px;
}
.progress-bar {
flex: 1;
max-width: 280px;
height: 6px;
background: var(--soft);
border: 1px solid var(--line);
border-radius: 4px;
overflow: hidden;
}
.progress-bar span {
display: block;
height: 100%;
background: var(--ok);
transition: width .25s ease;
}
.progress-text { font-size: 12.5px; color: var(--muted); }
.chapter {
padding: 22px 0;
border-top: 1px solid var(--line);
}
.chapter-head {
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 16px;
margin-bottom: 12px;
}
.chapter h2 { font-size: 18px; font-weight: 600; scroll-margin-top: 70px; }
.mark {
flex-shrink: 0;
display: inline-flex;
align-items: center;
gap: 6px;
font-size: 12.5px;
font-family: inherit;
color: var(--muted);
background: var(--surface);
border: 1px solid var(--line);
border-radius: 6px;
padding: 5px 11px;
cursor: pointer;
white-space: nowrap;
transition: all .15s ease;
}
.mark:hover { border-color: var(--accent); color: var(--accent); }
.mark .check { font-weight: 700; }
.chapter.done .mark {
color: var(--ok);
border-color: var(--ok);
background: var(--ok-soft);
}
.chapter.done h2 { color: var(--muted); }
.chapter ul { list-style: none; margin-bottom: 14px; }
.chapter ul li {
position: relative;
padding-left: 16px;
margin-bottom: 5px;
font-size: 14px;
}
.chapter ul li::before {
content: "";
position: absolute;
left: 0;
color: var(--muted);
}
.examples {
background: var(--soft);
border: 1px solid var(--line);
border-radius: 8px;
padding: 12px 14px;
}
.examples .ex-label {
font-size: 11px;
font-weight: 700;
text-transform: uppercase;
letter-spacing: .05em;
color: var(--muted);
margin-bottom: 6px;
}
.examples .ex {
font-size: 14px;
padding: 3px 0;
display: flex;
flex-wrap: wrap;
align-items: baseline;
gap: 4px 10px;
}
.examples .ex code {
background: transparent;
font-family: "SF Mono", Menlo, Consolas, monospace;
font-size: 13.5px;
color: var(--text);
}
.examples .ex-en {
font-size: 13px;
color: var(--muted);
font-style: italic;
}
.empty { color: var(--muted); padding: 40px 0; }
/* Mobile */
@media (max-width: 720px) {
.sidebar { display: none; }
.content { padding: 24px 18px 80px; }
}
/* ---------- Flashcards ---------- */
.fc-shell {
display: grid;
grid-template-columns: 280px minmax(0, 1fr);
align-items: start;
}
.fc-sidebar {
position: sticky;
top: 52px;
width: 280px;
height: calc(100vh - 52px);
overflow-y: auto;
border-right: 1px solid var(--line);
padding: 16px 12px;
}
.fc-wrap {
max-width: 640px;
width: 100%;
margin: 0 auto;
padding: 40px 48px 100px;
}
.fc-head { text-align: center; margin-bottom: 24px; }
.fc-head h1 { font-size: 24px; font-weight: 700; margin-bottom: 8px; }
.fc-head p { color: var(--muted); font-size: 14px; }
.fc-head code {
background: var(--code-bg);
padding: 1px 5px;
border-radius: 4px;
font-size: 13px;
}
.fc-tabs {
display: flex;
justify-content: center;
gap: 4px;
margin-bottom: 18px;
}
.fc-tab {
font-family: inherit;
font-size: 13.5px;
color: var(--muted);
background: transparent;
border: 0;
border-radius: 6px;
padding: 5px 14px;
cursor: pointer;
}
.fc-tab:hover {
background: var(--soft);
color: var(--text);
}
.fc-tab.active {
color: var(--accent);
background: var(--soft);
font-weight: 500;
}
.fc-today {
border: 1px solid var(--line);
border-radius: 14px;
background: var(--surface);
padding: 16px;
margin-bottom: 16px;
}
.fc-list-head {
margin-bottom: 14px;
padding: 0 4px;
}
.fc-section-label {
display: block;
font-size: 11px;
font-weight: 700;
text-transform: uppercase;
letter-spacing: .06em;
color: var(--muted);
margin-bottom: 4px;
}
.fc-list-head p,
.fc-today p {
margin: 0;
color: var(--muted);
font-size: 13px;
}
.fc-list-head .fc-btn {
width: 100%;
margin-top: 10px;
justify-content: center;
}
.fc-list-grid {
display: block;
}
.fc-list-item {
width: 100%;
font-family: inherit;
text-align: left;
border: 0;
border-radius: 5px;
background: transparent;
padding: 5px 8px 5px 12px;
cursor: pointer;
color: var(--text);
display: flex;
align-items: center;
gap: 8px;
transition: background .15s, color .15s;
}
.fc-list-item:hover,
.fc-list-item.active {
background: var(--soft);
}
.fc-list-item.active {
color: var(--accent);
font-weight: 500;
}
.fc-list-item .dot {
width: 7px;
height: 7px;
border-radius: 50%;
border: 1.5px solid var(--line);
flex-shrink: 0;
}
.fc-list-item .dot.on {
background: var(--ok);
border-color: var(--ok);
}
.fc-list-title {
min-width: 0;
flex: 1;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-size: 13.5px;
}
.fc-list-count {
flex-shrink: 0;
font-weight: 600;
font-size: 11px;
color: var(--muted);
background: var(--soft);
border: 1px solid var(--line);
border-radius: 10px;
padding: 0 7px;
}
.fc-today {
display: flex;
justify-content: center;
text-align: center;
}
.fc-counts {
display: flex;
justify-content: center;
gap: 22px;
font-size: 13px;
margin-bottom: 16px;
}
.fc-counts .cnt { color: var(--muted); }
.fc-counts .cnt b { font-weight: 700; margin-left: 3px; }
.fc-counts .new b { color: var(--new-line); }
.fc-counts .learn b { color: var(--danger); }
.fc-counts .rev b { color: var(--ok); }
.fc-card {
position: relative;
min-height: 280px;
border: 1px solid var(--line);
border-radius: 14px;
background: var(--surface);
box-shadow: 0 1px 3px rgba(0,0,0,.04);
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
user-select: none;
transition: border-color .15s, box-shadow .15s;
}
.fc-card:hover { box-shadow: 0 4px 14px rgba(0,0,0,.07); }
.fc-card.is-known { border-color: var(--ok); }
.fc-face {
display: flex;
flex-direction: column;
align-items: center;
gap: 10px;
padding: 32px;
text-align: center;
width: 100%;
}
.fc-label {
font-size: 11px;
font-weight: 700;
text-transform: uppercase;
letter-spacing: .06em;
color: var(--muted);
}
.fc-term { font-size: 40px; font-weight: 700; }
.fc-term.en { font-size: 30px; font-weight: 600; color: var(--accent); }
.fc-hint { font-size: 12px; color: var(--muted); margin-top: 6px; }
.fc-listen {
position: absolute;
top: 12px;
right: 14px;
width: 34px;
height: 34px;
display: inline-flex;
align-items: center;
justify-content: center;
border: 1px solid var(--line);
border-radius: 50%;
background: var(--soft);
color: var(--muted);
font-family: inherit;
padding: 0;
cursor: pointer;
transition: border-color .15s, color .15s, background .15s;
}
.fc-listen:hover {
border-color: var(--accent);
color: var(--accent);
background: var(--surface);
}
.fc-listen-icon {
font-size: 15px;
line-height: 1;
}
.fc-example {
margin-top: 14px;
background: var(--soft);
border: 1px solid var(--line);
border-radius: 8px;
padding: 12px 16px;
display: flex;
flex-direction: column;
gap: 4px;
}
.fc-example code { font-family: "SF Mono", Menlo, Consolas, monospace; font-size: 15px; }
.fc-ex-en { font-size: 13px; color: var(--muted); font-style: italic; }
/* present-tense conjugation table */
.fc-conj {
width: 100%;
max-width: 360px;
margin-top: 8px;
}
.fc-conj-label {
font-size: 11px;
font-weight: 700;
text-transform: uppercase;
letter-spacing: .06em;
color: var(--muted);
margin-bottom: 8px;
}
.fc-conj-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 6px 18px;
text-align: left;
}
.cj-cell {
font-size: 14.5px;
border-bottom: 1px solid var(--line);
padding-bottom: 4px;
}
.cj-p { color: var(--muted); }
.fc-tag {
position: absolute;
top: 13px; right: 56px;
font-size: 11px;
font-weight: 700;
text-transform: uppercase;
letter-spacing: .04em;
color: var(--ok);
background: var(--ok-soft);
border: 1px solid var(--ok);
border-radius: 20px;
padding: 2px 10px;
}
.fc-controls {
display: flex;
gap: 10px;
justify-content: center;
margin-top: 18px;
}
.fc-controls-2 { margin-top: 10px; }
.fc-btn {
font-family: inherit;
font-size: 14px;
padding: 9px 18px;
border: 1px solid var(--line);
background: var(--surface);
border-radius: 8px;
cursor: pointer;
color: var(--text);
transition: all .15s;
}
.fc-btn:hover { border-color: var(--accent); color: var(--accent); }
.fc-btn:disabled {
opacity: .45;
cursor: not-allowed;
}
.fc-btn:disabled:hover {
border-color: var(--line);
color: var(--muted);
}
.fc-btn.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.fc-btn.primary:hover { opacity: .9; color: #fff; }
.fc-btn.wide { min-width: 240px; }
.fc-btn.ghost { color: var(--muted); font-size: 12.5px; padding: 6px 12px; }
.fc-btn.ghost:hover { border-color: var(--danger); color: var(--danger); }
/* Anki-style grade buttons */
.fc-grades { gap: 8px; }
.fc-btn.grade {
display: flex;
flex-direction: column;
align-items: center;
gap: 2px;
min-width: 92px;
padding: 8px 10px;
}
.fc-btn.grade .g-label { font-weight: 600; font-size: 14px; }
.fc-btn.grade .g-int { font-size: 11px; color: var(--muted); }
.fc-btn.grade:hover { color: var(--text); }
.fc-btn.grade.again:hover { border-color: var(--danger); }
.fc-btn.grade.again .g-label { color: var(--danger); }
.fc-btn.grade.hard:hover { border-color: #d97706; }
.fc-btn.grade.hard .g-label { color: #d97706; }
.fc-btn.grade.good:hover { border-color: var(--ok); }
.fc-btn.grade.good .g-label { color: var(--ok); }
.fc-btn.grade.easy:hover { border-color: var(--new-line); }
.fc-btn.grade.easy .g-label { color: var(--new-line); }
.fc-tools { display: flex; justify-content: center; margin-top: 22px; }
.fc-card.done { border-style: dashed; cursor: default; }
.fc-card.done:hover { box-shadow: 0 1px 3px rgba(0,0,0,.04); }
.fc-done-check {
font-size: 40px;
color: var(--ok);
line-height: 1;
}
.new-tag { color: var(--new-line) !important; background: var(--new-soft) !important; border-color: var(--new-line) !important; }
.fc-loading { color: var(--muted); font-size: 14px; }
.fc-error { text-align: center; padding: 24px; }
.fc-error code {
display: inline-block;
background: var(--code-bg);
padding: 6px 12px;
border-radius: 6px;
margin: 8px 0;
font-size: 13px;
}
.fc-err-detail { font-size: 12px; color: var(--muted); }
.fc-explorer {
border-top: 1px solid var(--line);
padding-top: 20px;
}
.fc-explorer-head {
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 16px;
margin-bottom: 12px;
}
.fc-explorer-head p,
.fc-explorer-meta,
.fc-explorer-empty {
color: var(--muted);
font-size: 13px;
}
.fc-explorer-search {
width: 220px;
padding: 8px 10px;
border: 1px solid var(--line);
border-radius: 6px;
font-size: 13px;
outline: none;
}
.fc-explorer-search:focus { border-color: var(--accent); }
.fc-explorer-meta { margin-bottom: 14px; }
.explorer-main-search {
max-width: 360px;
margin-top: 16px;
margin-bottom: 0;
}
.explorer-controls {
display: flex;
flex-wrap: wrap;
gap: 10px;
margin-top: 12px;
}
.explorer-controls label {
display: flex;
align-items: center;
gap: 8px;
color: var(--muted);
font-size: 12.5px;
}
.explorer-controls select {
font: inherit;
font-size: 13px;
color: var(--text);
background: var(--surface);
border: 1px solid var(--line);
border-radius: 6px;
padding: 6px 9px;
outline: none;
}
.explorer-controls select:focus { border-color: var(--accent); }
.fc-explorer-list {
display: grid;
gap: 12px;
}
.fc-explorer-card {
display: grid;
grid-template-columns: minmax(130px, .8fr) minmax(0, 1.4fr);
gap: 0;
border: 1px solid var(--line);
border-radius: 12px;
background: var(--surface);
overflow: hidden;
}
.fc-explorer-side {
padding: 16px;
}
.fc-explorer-side.front {
display: flex;
flex-direction: column;
justify-content: center;
gap: 8px;
background: var(--soft);
border-right: 1px solid var(--line);
}
.fc-explorer-side strong {
font-size: 18px;
line-height: 1.25;
}
.fc-explorer-side.back strong {
display: block;
color: var(--accent);
margin-top: 6px;
}
.fc-explorer-side .fc-conj {
max-width: none;
margin-top: 12px;
}
.fc-explorer-side .fc-example {
margin-top: 12px;
}
.fc-srs-pill {
align-self: flex-start;
color: var(--muted);
background: var(--surface);
border: 1px solid var(--line);
border-radius: 999px;
font-size: 11px;
font-weight: 700;
padding: 2px 8px;
text-transform: uppercase;
letter-spacing: .03em;
}
.fc-srs-pill.new { color: var(--new-line); border-color: var(--new-border); background: var(--new-soft); }
.fc-srs-pill.learning,
.fc-srs-pill.relearning { color: var(--danger); border-color: var(--danger-line); background: var(--danger-soft); }
.fc-srs-pill.review { color: var(--ok); border-color: var(--ok-border); background: var(--ok-soft); }
.fc-study-card {
align-self: flex-start;
margin-top: 4px;
}
@media (max-width: 720px) {
.topnav { margin-left: 12px; }
.fc-shell {
display: block;
}
.fc-sidebar {
display: none;
}
.fc-wrap {
padding: 24px 18px 80px;
}
.fc-term { font-size: 32px; }
.fc-explorer-head,
.fc-explorer-card {
display: block;
}
.fc-explorer-search {
width: 100%;
margin-top: 12px;
}
.fc-explorer-side.front {
border-right: 0;
border-bottom: 1px solid var(--line);
}
}