Files
speaking-practice/styles.css
T

1357 lines
20 KiB
CSS

:root {
color-scheme: light;
--bg: #f4f7fb;
--panel: #ffffff;
--panel-soft: #f7fafc;
--ink: #172033;
--muted: #667085;
--line: #dfe6ef;
--accent: #0f2742;
--brand: #0f766e;
--brand-soft: #e4f5f1;
--gold: #c98a12;
--danger: #b42318;
--shadow: 0 12px 30px rgba(25, 37, 59, 0.08);
}
* {
box-sizing: border-box;
}
[hidden] {
display: none !important;
}
body {
margin: 0;
min-height: 100vh;
background: var(--bg);
color: var(--ink);
font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
button,
input,
select,
textarea {
font: inherit;
}
button {
min-height: 34px;
border: 1px solid var(--line);
border-radius: 7px;
padding: 0 11px;
color: var(--ink);
background: #fff;
cursor: pointer;
}
button:hover {
border-color: #b8c0cc;
background: #f9fafb;
}
button:disabled {
color: #a4acb8;
background: #eef1f4;
cursor: not-allowed;
}
input,
select,
textarea {
width: 100%;
border: 1px solid var(--line);
border-radius: 7px;
color: var(--ink);
background: #fff;
outline: none;
}
input,
select {
min-height: 34px;
padding: 0 10px;
}
textarea {
min-height: 72px;
padding: 9px 10px;
resize: vertical;
}
input:focus,
select:focus,
textarea:focus {
border-color: var(--brand);
box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}
.topbar {
height: 62px;
display: flex;
align-items: center;
justify-content: space-between;
gap: 18px;
padding: 0 18px;
border-bottom: 1px solid var(--line);
background: rgba(255, 255, 255, 0.9);
backdrop-filter: blur(14px);
position: sticky;
top: 0;
z-index: 20;
}
.brand,
.top-actions,
.login-form,
.user-menu,
.library-strip,
.tag-filters,
.tabs,
.video-actions,
.tool-row,
.lesson-meta,
.recording-line {
display: flex;
align-items: center;
}
.brand {
gap: 10px;
min-width: 250px;
}
.brand h1 {
margin: 0;
font-size: 17px;
line-height: 1.1;
}
.top-actions {
flex: 1;
justify-content: flex-end;
gap: 12px;
min-width: 0;
}
.library-strip {
flex: 1;
justify-content: flex-end;
gap: 8px;
min-width: 260px;
}
.search-input {
max-width: 250px;
}
.tag-filters {
gap: 6px;
max-width: 420px;
overflow: hidden;
}
.chip {
min-height: 30px;
border-radius: 999px;
padding: 0 10px;
font-size: 12px;
white-space: nowrap;
}
.chip.active {
color: #fff;
background: var(--accent);
border-color: var(--accent);
}
.login-form,
.user-menu {
gap: 8px;
flex-shrink: 0;
}
.login-form input {
width: 150px;
}
.login-form button,
.admin-form button[type="submit"] {
color: #fff;
background: var(--brand);
border-color: var(--brand);
}
.user-menu {
color: var(--muted);
font-size: 13px;
}
.study-shell {
display: grid;
grid-template-columns: minmax(680px, 1.18fr) minmax(440px, 0.82fr);
gap: 16px;
height: calc(100vh - 62px);
padding: 14px 16px 76px;
}
.left-stage {
min-width: 0;
min-height: 0;
display: grid;
grid-template-columns: minmax(0, 1fr);
}
.lesson-rail,
.video-panel,
.transcript-panel {
background: var(--panel);
border: 1px solid #dce5ee;
border-radius: 8px;
box-shadow: var(--shadow);
}
.lesson-rail {
min-height: 0;
overflow: hidden;
display: grid;
grid-template-rows: auto minmax(0, 1fr);
}
.rail-heading {
display: flex;
justify-content: space-between;
align-items: center;
padding: 12px;
border-bottom: 1px solid var(--line);
}
.rail-title {
display: flex;
align-items: center;
gap: 8px;
min-width: 0;
}
.rail-heading span {
color: var(--muted);
font-size: 12px;
}
.icon-button.admin-entry {
min-height: 28px;
border-radius: 6px;
padding: 0 8px;
color: var(--muted);
background: var(--panel);
border-color: var(--line);
font-size: 12px;
white-space: nowrap;
}
.icon-button.admin-entry:hover {
color: var(--ink);
border-color: var(--brand);
background: var(--brand-soft);
}
.video-list {
overflow: auto;
padding: 8px;
}
.video-item {
width: 100%;
min-height: 0;
display: block;
text-align: left;
padding: 10px;
background: transparent;
border: 1px solid transparent;
border-radius: 7px;
}
.video-item:hover,
.video-item.active {
border-color: #b9dcd5;
background: var(--brand-soft);
}
.video-item strong,
.video-item span,
.video-item small {
display: block;
}
.video-item strong {
line-height: 1.35;
}
.video-item span,
.video-item small {
margin-top: 4px;
color: var(--muted);
font-size: 12px;
line-height: 1.35;
}
.video-progress {
color: var(--brand);
font-weight: 700;
}
.video-panel {
min-width: 0;
min-height: 0;
overflow: hidden;
display: grid;
grid-template-rows: minmax(320px, 1fr) auto auto auto auto;
}
.video-frame {
position: relative;
min-height: 320px;
background: #0b1220;
}
video {
display: block;
width: 100%;
height: 100%;
object-fit: contain;
background: #0b1220;
}
.empty-video {
position: absolute;
inset: 0;
display: grid;
place-content: center;
gap: 8px;
color: #e6e9ef;
text-align: center;
padding: 24px;
}
.empty-video span {
color: #aab2bf;
}
.tool-row {
gap: 8px;
padding: 9px 12px;
border-top: 1px solid var(--line);
background: #fff;
overflow-x: auto;
}
.tool-row button {
min-width: 40px;
border-color: #d8e2ec;
background: #f8fafc;
font-weight: 650;
white-space: nowrap;
}
.tool-row button:hover {
border-color: #b9dcd5;
background: var(--brand-soft);
}
.subtitle-card {
display: grid;
align-content: center;
gap: 8px;
min-height: 116px;
padding: 18px 28px;
border-top: 1px solid var(--line);
background: #f8fbfb;
}
.subtitle-card p {
margin: 0;
text-align: center;
line-height: 1.45;
}
#primarySubtitle {
font-size: 22px;
font-weight: 750;
letter-spacing: 0;
}
#secondarySubtitle {
color: #667085;
font-size: 15px;
}
.lesson-meta {
justify-content: space-between;
gap: 14px;
padding: 13px 16px;
border-top: 1px solid var(--line);
}
.lesson-meta h2 {
margin: 0;
font-size: 18px;
}
.lesson-meta p {
margin: 4px 0 0;
color: var(--muted);
font-size: 12px;
}
.video-actions {
gap: 8px;
flex-shrink: 0;
}
.recording-line {
justify-content: space-between;
gap: 12px;
min-height: 42px;
padding: 8px 16px;
border-top: 1px solid var(--line);
color: var(--muted);
background: var(--panel-soft);
font-size: 12px;
}
.recording-status-danger {
color: var(--danger);
font-weight: 700;
}
.toggle {
display: inline-flex;
align-items: center;
gap: 5px;
color: var(--muted);
font-size: 12px;
white-space: nowrap;
}
.toggle input {
width: auto;
min-height: 0;
}
.transcript-panel {
min-width: 0;
min-height: 0;
overflow: hidden;
display: grid;
grid-template-rows: auto minmax(0, 1fr);
}
.transcript-toolbar {
display: flex;
justify-content: space-between;
align-items: center;
gap: 10px;
padding: 12px 14px;
border-bottom: 1px solid var(--line);
}
.tabs {
gap: 2px;
}
.tab {
min-height: 30px;
padding: 0 11px;
border-color: transparent;
background: transparent;
font-size: 12px;
}
.tab.active {
background: var(--accent);
color: #fff;
}
.transcript-list {
min-height: 0;
overflow: auto;
padding: 10px 12px 24px;
}
.line-button {
width: 100%;
min-height: 0;
display: grid;
grid-template-columns: minmax(0, 1fr) auto;
align-items: start;
gap: 10px;
text-align: left;
border: 1px solid transparent;
border-radius: 8px;
background: transparent;
padding: 13px 10px;
}
.line-jump {
min-height: 0;
display: grid;
grid-template-columns: 54px minmax(0, 1fr);
gap: 10px;
padding: 0;
border: 0;
background: transparent;
text-align: left;
}
.line-jump:hover {
background: transparent;
border-color: transparent;
}
.line-button:hover,
.line-button.active {
background: #f4fbf9;
border-color: var(--line);
}
.line-button.active {
border-color: #b9dcd5;
box-shadow: inset 4px 0 0 var(--brand);
}
.line-button.is-practiced {
background: #f7fdf9;
border-color: #ccebdd;
}
.line-button.is-difficult {
background: #fffaf0;
box-shadow: inset 3px 0 0 var(--gold);
}
.line-button.active.is-difficult {
box-shadow: inset 3px 0 0 var(--gold);
}
.line-time {
color: var(--muted);
font-size: 12px;
font-variant-numeric: tabular-nums;
padding-top: 3px;
}
.line-primary {
margin: 0;
line-height: 1.5;
font-weight: 650;
}
.line-secondary {
margin: 5px 0 0;
color: var(--muted);
font-size: 13px;
line-height: 1.45;
}
.line-status {
display: flex;
gap: 5px;
justify-content: flex-end;
align-items: center;
}
.line-status-button {
min-height: 26px;
padding: 0 7px;
border-radius: 6px;
font-size: 12px;
white-space: nowrap;
}
.line-status-button.practiced.active {
color: #047857;
border-color: #9bd8c0;
background: #ecfdf5;
}
.line-status-button.difficult.active {
color: #92400e;
border-color: #f5c56f;
background: #fffbeb;
}
.line-primary mark,
.line-secondary mark {
background: rgba(201, 138, 18, 0.18);
color: #7a4d00;
border-radius: 3px;
padding: 0 2px;
}
.empty-state {
padding: 18px;
color: var(--muted);
line-height: 1.6;
}
.admin-form {
display: grid;
grid-template-columns: repeat(4, minmax(0, 1fr));
gap: 9px;
}
.admin-form textarea {
grid-row: span 2;
}
.file-input {
min-height: 34px;
display: flex;
align-items: center;
justify-content: center;
border: 1px dashed #aeb7c4;
border-radius: 7px;
color: var(--muted);
background: var(--panel-soft);
cursor: pointer;
padding: 0 10px;
}
.file-input span {
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.file-input.is-selected {
border-color: #5bb9a9;
color: #075e54;
background: var(--brand-soft);
}
.file-input input {
display: none;
}
.admin-form .secondary-action {
color: var(--ink);
background: #fff;
border-color: var(--line);
}
.admin-page {
min-height: 100vh;
background: var(--bg);
color: var(--ink);
}
.admin-topbar {
gap: 16px;
}
.admin-topbar h1 {
margin: 0;
font-size: 20px;
}
.admin-topbar p {
margin: 4px 0 0;
color: var(--muted);
font-size: 13px;
}
.admin-shell {
display: grid;
grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
gap: 16px;
padding: 16px 24px 32px;
}
.admin-panel,
.admin-locked {
background: var(--panel);
border: 1px solid var(--line);
border-radius: 8px;
box-shadow: var(--shadow);
}
.admin-panel {
padding: 16px;
}
.admin-form-heading {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
margin-bottom: 12px;
}
.admin-panel h2,
.admin-locked h2 {
margin: 0 0 12px;
font-size: 17px;
}
.admin-form-heading h2 {
margin: 0;
}
.admin-locked {
max-width: 520px;
margin: 48px auto;
}
.admin-page .admin-form {
grid-template-columns: 1fr;
gap: 10px;
}
.admin-page .admin-form textarea {
grid-row: auto;
}
.admin-subtitle-editor {
display: grid;
gap: 12px;
}
.admin-ai-panel {
display: grid;
gap: 10px;
padding: 12px;
border: 1px solid var(--line);
border-radius: 8px;
background: var(--panel-soft);
}
.admin-ai-panel h3,
.admin-ai-panel p {
margin: 0;
}
.admin-ai-panel h3 {
font-size: 14px;
}
.admin-ai-panel p {
color: var(--muted);
font-size: 13px;
line-height: 1.45;
}
.admin-ai-actions {
display: flex;
flex-wrap: wrap;
gap: 8px;
}
.admin-ai-report {
color: var(--muted);
font-size: 13px;
}
.admin-subtitle-section {
display: grid;
gap: 8px;
padding: 10px;
border: 1px solid var(--line);
border-radius: 8px;
background: var(--panel-soft);
}
.admin-subtitle-heading {
display: flex;
align-items: center;
justify-content: space-between;
gap: 10px;
}
.admin-subtitle-heading h3 {
margin: 0;
font-size: 14px;
}
.admin-subtitle-heading span {
color: var(--muted);
font-size: 12px;
}
.admin-subtitle-cues {
display: grid;
gap: 7px;
max-height: 320px;
overflow: auto;
}
.admin-subtitle-cue {
display: grid;
grid-template-columns: minmax(0, 1fr) auto;
align-items: start;
gap: 8px;
padding: 8px;
border: 1px solid var(--line);
border-radius: 7px;
background: var(--panel);
}
.admin-subtitle-cue strong {
display: block;
font-size: 12px;
font-variant-numeric: tabular-nums;
}
.admin-subtitle-cue p {
margin: 4px 0 0;
color: var(--muted);
font-size: 12px;
line-height: 1.45;
}
.admin-list-heading {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
margin-bottom: 12px;
}
.admin-list-heading h2 {
margin: 0;
}
.admin-message {
margin: 0 0 12px;
padding: 10px 12px;
border: 1px solid #b7e4d8;
border-radius: 6px;
color: #047857;
background: #ecfdf5;
line-height: 1.45;
}
.admin-message.error {
border-color: #fecaca;
color: var(--danger);
background: #fef2f2;
}
.admin-video-list {
display: grid;
gap: 10px;
}
.admin-video-item {
display: grid;
grid-template-columns: minmax(0, 1fr) auto;
align-items: center;
gap: 12px;
padding: 12px;
border: 1px solid var(--line);
border-radius: 8px;
background: var(--panel-soft);
}
.admin-video-item.is-editing {
border-color: var(--brand);
background: var(--brand-soft);
}
.admin-video-item h3 {
margin: 0 0 6px;
font-size: 15px;
line-height: 1.35;
}
.admin-video-meta,
.admin-video-subtitles {
margin: 0;
color: var(--muted);
font-size: 12px;
line-height: 1.45;
}
.admin-video-subtitles {
margin-top: 3px;
}
.admin-video-actions {
display: flex;
gap: 8px;
}
.danger-action {
border-color: #fecaca;
border-radius: 6px;
color: #be123c;
background: #fff1f2;
white-space: nowrap;
}
.danger-action:hover {
border-color: #fda4af;
color: #9f1239;
background: #ffe4e6;
}
.primary-link,
.secondary-action {
display: inline-flex;
align-items: center;
justify-content: center;
min-height: 36px;
border: 1px solid var(--line);
border-radius: 6px;
padding: 0 12px;
color: var(--ink);
background: var(--panel);
text-decoration: none;
cursor: pointer;
white-space: nowrap;
}
.primary-link {
color: #fff;
background: var(--brand);
border-color: var(--brand);
}
.primary-link:hover {
color: #fff;
background: #0d625c;
border-color: #0d625c;
}
.secondary-action:hover {
border-color: #b8c0cc;
background: #f9fafb;
}
.home-page {
min-height: 100vh;
background: var(--bg);
}
.home-topbar .brand {
min-width: 180px;
}
.home-search {
max-width: 360px;
}
.home-shell {
display: grid;
grid-template-columns: 260px minmax(0, 1fr);
gap: 18px;
width: 100%;
margin: 0;
padding: 20px 24px 40px;
}
.home-dashboard,
.home-library {
min-width: 0;
}
.home-dashboard {
align-self: start;
position: sticky;
top: 82px;
display: grid;
gap: 12px;
}
.home-dashboard-title {
padding: 14px;
border: 1px solid var(--line);
border-radius: 8px;
background: var(--panel);
box-shadow: var(--shadow);
}
.home-dashboard-title span,
.home-dashboard-title strong {
display: block;
}
.home-dashboard-title span {
color: var(--muted);
font-size: 12px;
}
.home-dashboard-title strong {
margin-top: 4px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-size: 15px;
}
.home-metrics {
display: grid;
gap: 9px;
}
.home-metric {
min-height: 76px;
display: grid;
grid-template-columns: 38px minmax(0, 1fr) auto;
align-items: center;
gap: 10px;
padding: 12px;
text-align: left;
border-radius: 8px;
background: var(--panel);
box-shadow: var(--shadow);
}
.home-metric-icon {
width: 34px;
height: 34px;
display: grid;
place-items: center;
border-radius: 10px;
font-weight: 900;
}
.home-metric-copy,
.home-metric-label {
display: block;
min-width: 0;
}
.home-metric-label {
font-weight: 800;
}
.home-metric strong {
font-size: 24px;
line-height: 1;
font-variant-numeric: tabular-nums;
}
.home-metric small {
color: var(--muted);
font-size: 12px;
}
.home-metric.tone-blue .home-metric-icon {
color: #087ea4;
background: #e6f7fb;
}
.home-metric.tone-green .home-metric-icon {
color: #047857;
background: #e9f9f0;
}
.home-metric.tone-slate .home-metric-icon {
color: #475467;
background: #eef2f7;
}
.home-metric.tone-rose .home-metric-icon {
color: #be123c;
background: #fff1f4;
}
.home-metric.tone-amber .home-metric-icon {
color: #9a5c00;
background: #fff7df;
}
.home-metric.active {
border-color: #b9dcd5;
background: #f0fbf8;
}
.home-metric.active small {
color: var(--muted);
}
.home-heading {
display: flex;
justify-content: space-between;
align-items: flex-start;
gap: 16px;
margin-bottom: 16px;
}
.home-heading h2 {
margin: 0;
font-size: 24px;
}
.home-heading p {
margin: 6px 0 0;
color: var(--muted);
font-size: 13px;
}
.home-categories {
display: flex;
gap: 8px;
overflow-x: auto;
padding: 2px 0 12px;
}
.home-status {
min-height: 22px;
color: var(--muted);
font-size: 13px;
margin-bottom: 12px;
}
.home-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
gap: 14px;
}
.home-card {
min-width: 0;
overflow: hidden;
border: 1px solid var(--line);
border-radius: 8px;
background: var(--panel);
box-shadow: var(--shadow);
}
.home-card-link {
display: block;
color: inherit;
text-decoration: none;
}
.home-card:hover .home-cover {
filter: saturate(1.08);
}
.home-cover {
position: relative;
min-height: 138px;
display: grid;
align-content: space-between;
padding: 14px;
color: #fff;
background: #0f766e;
}
.home-favorite {
position: absolute;
top: 10px;
right: 10px;
min-height: 28px;
border-color: rgba(255, 255, 255, 0.38);
color: #fff;
background: rgba(17, 24, 39, 0.3);
font-size: 12px;
}
.home-favorite:hover,
.home-favorite.active {
color: #111827;
background: #fff;
border-color: #fff;
}
.home-cover.tone-1 {
background: linear-gradient(135deg, #0f766e, #1d6f8f);
}
.home-cover.tone-2 {
background: linear-gradient(135deg, #2563eb, #0f766e);
}
.home-cover.tone-3 {
background: linear-gradient(135deg, #475569, #2563eb);
}
.home-cover.tone-4 {
background: linear-gradient(135deg, #9a5c00, #be6b21);
}
.home-cover.tone-5 {
background: linear-gradient(135deg, #334155, #0f766e);
}
.home-cover-badge {
width: fit-content;
max-width: calc(100% - 86px);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
border: 1px solid rgba(255, 255, 255, 0.34);
border-radius: 999px;
padding: 4px 8px;
background: rgba(255, 255, 255, 0.14);
font-size: 12px;
}
.home-cover strong {
font-size: 34px;
line-height: 1;
}
.home-card-body {
padding: 12px;
}
.home-card-body h3 {
margin: 0;
font-size: 16px;
line-height: 1.35;
}
.home-card-meta,
.home-card-subtitles,
.home-progress {
margin: 6px 0 0;
color: var(--muted);
font-size: 12px;
line-height: 1.4;
}
.home-card-tags {
display: flex;
flex-wrap: wrap;
gap: 6px;
margin-top: 10px;
}
.home-card-tags span {
border-radius: 999px;
padding: 3px 7px;
color: #334155;
background: #eef2f7;
font-size: 12px;
}
.home-card-stats {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 6px;
margin: 12px 0 0;
}
.home-card-stats div {
min-width: 0;
padding: 8px;
border-radius: 7px;
background: var(--panel-soft);
}
.home-card-stats dt,
.home-card-stats dd {
margin: 0;
}
.home-card-stats dt {
color: var(--muted);
font-size: 11px;
}
.home-card-stats dd {
margin-top: 3px;
font-weight: 800;
font-size: 13px;
}
.home-progress {
color: var(--brand);
font-weight: 700;
}
@media (max-width: 1180px) {
.study-shell {
grid-template-columns: 1fr;
height: auto;
}
.transcript-panel {
min-height: 520px;
}
}
@media (max-width: 860px) {
.topbar,
.top-actions,
.library-strip,
.login-form {
height: auto;
align-items: stretch;
flex-direction: column;
}
.topbar {
padding: 12px;
}
.study-shell {
padding-top: 12px;
}
.admin-form {
grid-template-columns: 1fr;
}
}
@media (max-width: 900px) {
.admin-topbar {
height: auto;
align-items: stretch;
padding: 12px;
}
.admin-shell {
grid-template-columns: 1fr;
padding: 12px;
}
.admin-video-item {
grid-template-columns: 1fr;
align-items: stretch;
}
.admin-video-actions {
flex-direction: column;
}
.danger-action,
.admin-video-actions .secondary-action {
width: 100%;
}
}
@media (max-width: 720px) {
.home-shell {
grid-template-columns: 1fr;
padding: 14px 12px 28px;
}
.home-dashboard {
position: static;
}
.home-metrics {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
.home-heading {
align-items: stretch;
flex-direction: column;
}
.home-search {
max-width: none;
}
.home-grid {
grid-template-columns: 1fr;
}
}