/* ============================================================
CHARACTER MODAL STYLES
============================================================ */
/* Base modal overlay */
.modal {
position: fixed;
inset: 0;
top: 0 !important;
left: 0 !important;
right: 0 !important;
bottom: 0 !important;
z-index: 9999;
display: none;
align-items: center;
justify-content: center;
padding: 1rem;
overflow: hidden;
}
.modal.active {
display: flex;
}
.modal-backdrop {
position: absolute;
inset: 0;
background: rgba(0, 0, 0, 0.6);
backdrop-filter: blur(4px);
-webkit-backdrop-filter: blur(4px);
}
/* Character modal specific styles */
.char-modal .modal-content,
.char-modal-content {
position: relative;
z-index: 1;
background: var(--bg-primary, #ffffff);
border-radius: 16px;
max-width: 600px;
width: 100%;
/* Use flex-basis or height control to prevent layout shifts */
max-height: 90vh; 
margin: auto;
overflow: hidden;
display: flex;
flex-direction: column;
box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
animation: modalFadeIn 0.3s ease;
/* Ensure it doesn't shrink aggressively */
flex-shrink: 0;
}
@keyframes modalFadeIn {
from {
opacity: 0;
transform: scale(0.95) translateY(20px);
}
to {
opacity: 1;
transform: scale(1) translateY(0);
}
}
.char-modal-body {
padding: 1.5rem;
overflow-y: auto;
flex: 1;
}
/* Close button */
.char-modal .modal-close {
position: absolute;
top: 1rem;
right: 1rem;
width: 2.5rem;
height: 2.5rem;
border: none;
background: var(--bg-secondary, #f3f4f6);
border-radius: 50%;
font-size: 1.5rem;
cursor: pointer;
color: var(--text-secondary, #6b7280);
transition: all 0.2s;
z-index: 10;
display: flex;
align-items: center;
justify-content: center;
}
.char-modal .modal-close:hover {
background: var(--danger-color, #ef4444);
color: white;
}
/* Character header */
.char-header {
text-align: center;
padding-bottom: 1rem;
border-bottom: 1px solid var(--border-color, #e5e7eb);
margin-bottom: 1rem;
}
.char-main {
display: flex;
align-items: center;
justify-content: center;
gap: 1rem;
}
.char-display {
font-size: 4rem;
line-height: 1;
font-family: var(--font-chinese, 'Noto Sans SC', sans-serif);
}
.char-speak-btn,
.char-favorite-btn {
width: 2.5rem;
height: 2.5rem;
border: none;
background: var(--bg-secondary, #f3f4f6);
border-radius: 50%;
font-size: 1.25rem;
cursor: pointer;
transition: all 0.2s;
}
.char-speak-btn:hover {
background: var(--primary-color, #3b82f6);
color: white;
}
.char-favorite-btn:hover,
.char-favorite-btn.active {
background: #fbbf24;
color: white;
}
.char-variant {
font-size: 0.875rem;
color: var(--text-secondary, #6b7280);
margin-top: 0.5rem;
}
.char-variant span {
font-weight: 600;
color: var(--text-primary, #1f2937);
}
/* Info grid */
.char-info-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 1rem;
margin-bottom: 1rem;
}
.char-info-section {
background: var(--bg-secondary, #f9fafb);
padding: 1rem;
border-radius: 12px;
}
.char-info-section h4 {
font-size: 0.875rem;
color: var(--text-secondary, #6b7280);
margin-bottom: 0.75rem;
font-weight: 500;
}
/* Readings */
.readings-container {
display: flex;
flex-direction: column;
gap: 0.75rem;
}
.reading-group {
display: flex;
flex-direction: column;
gap: 0.25rem;
}
.reading-label {
font-size: 0.75rem;
color: var(--text-tertiary, #9ca3af);
}
.pinyin-list,
.hanviet-list {
display: flex;
flex-wrap: wrap;
gap: 0.5rem;
}
.pinyin-item {
padding: 0.25rem 0.75rem;
background: var(--primary-color, #3b82f6);
color: white;
border: none;
border-radius: 20px;
font-size: 0.875rem;
cursor: pointer;
transition: all 0.2s;
}
.pinyin-item:hover {
filter: brightness(1.1);
}
.hanviet-item {
padding: 0.25rem 0.75rem;
background: var(--bg-tertiary, #e5e7eb);
color: var(--text-primary, #1f2937);
border-radius: 20px;
font-size: 0.875rem;
font-weight: 500;
}
.play-all-btn {
margin-top: 0.5rem;
padding: 0.375rem 0.75rem;
background: transparent;
border: 1px solid var(--primary-color, #3b82f6);
color: var(--primary-color, #3b82f6);
border-radius: 20px;
font-size: 0.75rem;
cursor: pointer;
transition: all 0.2s;
}
.play-all-btn:hover {
background: var(--primary-color, #3b82f6);
color: white;
}
/* Basic info */
.char-basic-info {
display: flex;
flex-direction: column;
gap: 0.5rem;
}
.info-row {
display: flex;
justify-content: space-between;
font-size: 0.875rem;
}
.info-label {
color: var(--text-secondary, #6b7280);
}
.info-value {
font-weight: 500;
color: var(--text-primary, #1f2937);
}
/* Tabs */
.char-tabs {
display: flex;
gap: 0.25rem;
border-bottom: 1px solid var(--border-color, #e5e7eb);
padding: 0 0.5rem;
overflow-x: auto;
flex-wrap: nowrap;
}
.char-tab {
padding: 0.75rem 1rem;
border: none;
background: transparent;
color: var(--text-secondary, #6b7280);
font-size: 0.875rem;
font-weight: 500;
cursor: pointer;
white-space: nowrap;
transition: all 0.2s;
border-bottom: 2px solid transparent;
margin-bottom: -1px;
}
.char-tab:hover {
color: var(--text-primary, #1f2937);
}
.char-tab.active {
color: var(--primary-color, #3b82f6);
border-bottom-color: var(--primary-color, #3b82f6);
}
/* Tab content */
.char-tab-content {
padding-top: 1rem;
}
.tab-pane {
display: none;
}
.tab-pane.active {
display: block;
}
/* Loading & Error states */
.loading-indicator {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 3rem;
gap: 1rem;
}
.spinner {
width: 2rem;
height: 2rem;
border: 3px solid var(--bg-secondary, #f3f4f6);
border-top-color: var(--primary-color, #3b82f6);
border-radius: 50%;
animation: spin 0.8s linear infinite;
}
@keyframes spin {
to { transform: rotate(360deg); }
}
.loading-text,
.no-data,
.error-text {
text-align: center;
padding: 2rem 1rem;
color: var(--text-secondary, #6b7280);
}
.error-text {
color: var(--danger-color, #ef4444);
}
.error-message {
text-align: center;
padding: 2rem;
}
.error-icon {
font-size: 2rem;
display: block;
margin-bottom: 1rem;
}
.error-detail {
font-size: 0.875rem;
color: var(--text-tertiary, #9ca3af);
margin-top: 0.5rem;
}
.retry-btn {
margin-top: 1rem;
padding: 0.5rem 1.5rem;
background: var(--primary-color, #3b82f6);
color: white;
border: none;
border-radius: 8px;
cursor: pointer;
transition: all 0.2s;
}
.retry-btn:hover {
filter: brightness(1.1);
}
/* Examples grid */
.examples-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
gap: 0.5rem;
}
.example-word {
display: flex;
flex-direction: column;
padding: 0.75rem;
background: var(--bg-secondary, #f9fafb);
border: 1px solid var(--border-color, #e5e7eb);
border-radius: 8px;
cursor: pointer;
transition: all 0.2s;
text-align: center;
}
.example-word:hover {
border-color: var(--primary-color, #3b82f6);
background: var(--bg-hover, #f3f4f6);
}
.example-char {
font-size: 1.25rem;
font-weight: 500;
color: var(--text-primary, #1f2937);
}
.example-pinyin {
font-size: 0.75rem;
color: var(--text-secondary, #6b7280);
margin-top: 0.25rem;
}
/* Meanings */
.meanings-list {
display: flex;
flex-direction: column;
gap: 0.5rem;
}
.meaning-item {
padding: 0.5rem 0;
border-bottom: 1px solid var(--border-color-light, #f3f4f6);
}
.meaning-number {
font-weight: 600;
color: var(--primary-color, #3b82f6);
margin-right: 0.5rem;
}
.meaning-source {
font-size: 0.75rem;
color: var(--text-tertiary, #9ca3af);
margin-left: 0.5rem;
}
.meaning-source-block {
margin-bottom: 1rem;
padding: 1rem;
background: var(--bg-secondary, #f9fafb);
border-radius: 8px;
}
.source-title {
font-size: 0.875rem;
font-weight: 600;
color: var(--text-secondary, #6b7280);
margin-bottom: 0.5rem;
}
/* Stroke container */
.stroke-container {
display: flex;
flex-direction: column;
align-items: center;
gap: 1rem;
}
#strokeWriter {
width: 200px;
height: 200px;
background: var(--bg-secondary, #f9fafb);
border-radius: 8px;
}
.stroke-controls {
display: flex;
gap: 0.5rem;
}
.stroke-btn {
padding: 0.5rem 1rem;
background: var(--bg-secondary, #f3f4f6);
border: 1px solid var(--border-color, #e5e7eb);
border-radius: 8px;
cursor: pointer;
font-size: 0.875rem;
transition: all 0.2s;
}
.stroke-btn:hover {
border-color: var(--primary-color, #3b82f6);
color: var(--primary-color, #3b82f6);
}
/* Shuowen, Nom, Buddhist sections */
.shuowen-info,
.nom-info,
.buddhist-info {
display: flex;
flex-direction: column;
gap: 1rem;
}
.shuowen-section,
.nom-section,
.buddhist-section {
padding: 1rem;
background: var(--bg-secondary, #f9fafb);
border-radius: 8px;
}
.shuowen-section h5,
.nom-section h5,
.buddhist-section h5 {
font-size: 0.875rem;
font-weight: 600;
color: var(--text-secondary, #6b7280);
margin-bottom: 0.5rem;
}
.original-text {
font-family: var(--font-chinese, serif);
font-size: 1rem;
line-height: 1.8;
}
.liushu-badge,
.nom-type-badge {
display: inline-block;
padding: 0.25rem 0.75rem;
background: var(--primary-color, #3b82f6);
color: white;
border-radius: 20px;
font-size: 0.875rem;
font-weight: 500;
}
.comp-char {
font-size: 1.5rem;
font-weight: 500;
margin-right: 0.5rem;
}
.comp-reading {
color: var(--text-secondary, #6b7280);
}
/* Buddhist terms list */
.buddhist-terms-list {
display: flex;
flex-direction: column;
gap: 0.5rem;
}
.buddhist-term-item {
display: flex;
flex-wrap: wrap;
gap: 0.5rem;
padding: 0.75rem;
background: var(--bg-primary, #ffffff);
border: 1px solid var(--border-color, #e5e7eb);
border-radius: 8px;
cursor: pointer;
transition: all 0.2s;
}
.buddhist-term-item:hover {
border-color: var(--primary-color, #3b82f6);
}
.bt-word {
font-weight: 600;
font-size: 1.1rem;
}
.bt-sanskrit,
.bt-pali {
font-style: italic;
color: var(--text-secondary, #6b7280);
}
.bt-meaning {
flex: 1;
color: var(--text-secondary, #6b7280);
}
.more-hint {
font-size: 0.875rem;
color: var(--text-tertiary, #9ca3af);
text-align: center;
margin-top: 0.5rem;
}
/* Nom infer table */
.nom-infer-table {
width: 100%;
border-collapse: collapse;
font-size: 0.875rem;
}
.nom-infer-table th,
.nom-infer-table td {
padding: 0.5rem;
text-align: left;
border-bottom: 1px solid var(--border-color, #e5e7eb);
}
.nom-infer-table th {
font-weight: 500;
color: var(--text-secondary, #6b7280);
background: var(--bg-tertiary, #f3f4f6);
}
.nom-readings-list {
display: flex;
flex-wrap: wrap;
gap: 0.5rem;
}
.nom-reading-badge {
padding: 0.25rem 0.75rem;
background: #ff9800;
color: white;
border-radius: 20px;
font-size: 0.875rem;
font-weight: 500;
}
/* Sources list */
.sources-list {
display: flex;
flex-wrap: wrap;
gap: 0.5rem;
}
.source-badge {
padding: 0.375rem 0.75rem;
background: var(--bg-secondary, #f3f4f6);
border-radius: 20px;
font-size: 0.75rem;
color: var(--text-secondary, #6b7280);
}
/* Phonetic info */
.phonetic-info {
display: flex;
flex-direction: column;
gap: 1rem;
}
.phonetic-section h5 {
font-size: 0.875rem;
font-weight: 600;
color: var(--text-secondary, #6b7280);
margin-bottom: 0.5rem;
}
.phonetic-item {
display: flex;
gap: 0.5rem;
padding: 0.25rem 0;
}
.phonetic-label {
color: var(--text-tertiary, #9ca3af);
min-width: 80px;
}
.phonetic-placeholder {
text-align: center;
padding: 2rem;
}
.load-phonetic-btn {
margin-top: 1rem;
padding: 0.5rem 1.5rem;
background: var(--primary-color, #3b82f6);
color: white;
border: none;
border-radius: 8px;
cursor: pointer;
}
/* Dark mode */
[data-theme="dark"] .modal-backdrop {
background: rgba(0, 0, 0, 0.8);
}
[data-theme="dark"] .char-modal-content {
background: var(--bg-secondary, #1f2937);
}
[data-theme="dark"] .char-info-section,
[data-theme="dark"] .shuowen-section,
[data-theme="dark"] .nom-section,
[data-theme="dark"] .buddhist-section,
[data-theme="dark"] .meaning-source-block {
background: var(--bg-tertiary, #374151);
}
[data-theme="dark"] .example-word,
[data-theme="dark"] .buddhist-term-item {
background: var(--bg-tertiary, #374151);
border-color: var(--border-color, #4b5563);
}
/* Responsive */
@media (max-width: 640px) {
.char-modal-content {
max-width: 100%;
max-height: 100%;
border-radius: 0;
}
.char-info-grid {
grid-template-columns: 1fr;
}
.char-tabs {
padding: 0;
}
.char-tab {
padding: 0.5rem 0.75rem;
font-size: 0.8rem;
}
.char-display {
font-size: 3rem;
}
}
/* ============================================================
Enhanced Styles (V2.1)
============================================================ */
.nom-classify-injected {
background: #fff8e1;
border: 1px solid #ffe082;
}
[data-theme="dark"] .nom-classify-injected {
background: #3e2e1e;
border-color: #5d4037;
}
.nom-classify-info p {
margin-bottom: 0.5rem;
font-size: 0.95rem;
}
/* Historical Forms Grid Enhancements */
.hist-forms-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
gap: 1rem;
}
.hist-item {
display: flex;
flex-direction: column;
align-items: center;
gap: 0.5rem;
padding: 0.5rem;
background: var(--bg-primary, white);
border-radius: 8px;
border: 1px solid var(--border-color, #e5e7eb);
transition: transform 0.2s;
}
.hist-item:hover {
transform: translateY(-2px);
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}
.hist-img {
width: 64px;
height: 64px;
object-fit: contain;
/* Invert filter for dark mode if SVG is black-on-transparent? 
Usually historical forms are black ink. 
In dark mode, we might want to invert them or give them a white background.
*/
}
[data-theme="dark"] .hist-img {
filter: invert(1);
}
/* Fix fanqie list style */
.fanqie-list {
list-style: none;
padding: 0;
}
.fanqie-list li {
padding: 0.5rem;
border-bottom: 1px solid var(--border-color-light, #f3f4f6);
font-family: var(--font-chinese, serif);
}
.fq-reading {
font-weight: bold;
color: var(--primary-color, #3b82f6);
}
/* Tabs Scrollbar */
.char-tabs::-webkit-scrollbar {
height: 4px;
}
.char-tabs::-webkit-scrollbar-thumb {
background: var(--border-color, #e5e7eb);
border-radius: 2px;
}
/* Source Details Summary */
.source-details summary {
cursor: pointer;
font-weight: 500;
padding: 0.5rem;
background: var(--bg-hover, #f3f4f6);
border-radius: 4px;
margin-bottom: 0.5rem;
}
.source-details[open] summary {
margin-bottom: 1rem;
background: var(--bg-active, #e5e7eb);
}
.source-body {
padding-left: 1rem;
border-left: 2px solid var(--border-color, #e5e7eb);
}
/* ============================================================
V2 TAB STYLES (New Implementation)
============================================================ */
/* Overview Tab */
.overview-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 1rem;
}
.info-card {
background: var(--bg-secondary, #f9fafb);
padding: 1rem;
border-radius: 12px;
border: 1px solid var(--border-color-light, #f3f4f6);
}
.info-card h5 {
font-size: 0.875rem;
color: var(--text-secondary, #6b7280);
margin-bottom: 0.75rem;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.05em;
}
.readings-list .reading-row {
display: flex;
justify-content: space-between;
align-items: center;
padding: 0.25rem 0;
font-size: 0.95rem;
}
.reading-row .label {
color: var(--text-tertiary, #9ca3af);
font-size: 0.85rem;
}
.reading-row .value {
font-weight: 500;
}
.reading-row .highlight {
color: var(--primary-color, #3b82f6);
font-weight: 600;
}
.meaning-summary p {
margin-bottom: 0.5rem;
line-height: 1.5;
}
.meaning-vi, .meaning-en {
display: flex;
gap: 0.5rem;
align-items: baseline;
}
/* Examples (Chips) */
.examples-section {
margin-top: 1.5rem;
padding-top: 1rem;
border-top: 1px solid var(--border-color-light, #f3f4f6);
}
.examples-section h5 {
font-size: 0.9rem;
margin-bottom: 0.75rem;
color: var(--text-secondary, #6b7280);
}
.example-chip {
display: flex;
flex-direction: column;
align-items: center;
padding: 0.5rem 0.75rem;
background: var(--bg-primary, #ffffff);
border: 1px solid var(--border-color, #e5e7eb);
border-radius: 8px;
cursor: pointer;
transition: all 0.2s;
min-width: 80px;
text-align: center;
}
.example-chip:hover {
border-color: var(--primary-color, #3b82f6);
transform: translateY(-2px);
box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.example-chip .wc {
font-size: 1.1rem;
font-weight: 500;
color: var(--text-primary, #1f2937);
}
.example-chip .wp {
font-size: 0.75rem;
color: var(--text-tertiary, #9ca3af);
margin-top: 2px;
}
/* Phonetics Tab */
.phonetics-container {
display: flex;
flex-direction: column;
gap: 1rem;
}
.phonetic-card {
background: var(--bg-secondary, #f9fafb);
padding: 1rem;
border-radius: 8px;
}
.phonetic-table {
width: 100%;
border-collapse: collapse;
font-size: 0.9rem;
}
.phonetic-table th, .phonetic-table td {
padding: 0.5rem;
text-align: left;
border-bottom: 1px solid var(--border-color, #e5e7eb);
}
.phonetic-table th {
color: var(--text-secondary, #6b7280);
font-weight: 500;
width: 30%;
}
.layers-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
gap: 0.5rem;
}
.layer-item {
padding: 0.5rem;
background: var(--bg-primary, #ffffff);
border-radius: 6px;
display: flex;
flex-direction: column;
align-items: center;
text-align: center;
}
.layer-label {
font-size: 0.75rem;
color: var(--text-tertiary, #9ca3af);
margin-bottom: 2px;
}
.layer-value {
font-weight: 500;
}
.fanqie-list {
list-style: none;
padding: 0;
margin: 0;
}
.fanqie-list li {
padding: 0.5rem 0;
border-bottom: 1px solid var(--border-color-light, #e5e7eb);
display: flex;
align-items: center;
gap: 0.5rem;
flex-wrap: wrap;
}
.fq-initial, .fq-final, .fq-reading {
font-weight: bold;
color: var(--primary-color, #3b82f6);
}
/* Origins Tab */
.origins-container {
display: flex;
flex-direction: column;
gap: 1rem;
}
.origin-section {
background: var(--bg-secondary, #f9fafb);
padding: 1rem;
border-radius: 8px;
}
.hist-forms-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
gap: 0.75rem;
margin-top: 0.5rem;
}
.hist-item {
display: flex;
flex-direction: column;
align-items: center;
gap: 0.25rem;
padding: 0.5rem;
background: var(--bg-primary, #ffffff);
border-radius: 6px;
border: 1px solid var(--border-color-light, #e5e7eb);
}
.hist-img {
width: 48px;
height: 48px;
object-fit: contain;
filter: invert(0); /* Ensure readability in light mode */
}
[data-theme="dark"] .hist-img {
filter: invert(1);
}
.hist-label {
font-size: 0.7rem;
color: var(--text-secondary, #6b7280);
text-align: center;
}
.dict-refs-list {
list-style: none;
padding: 0;
margin: 0;
font-size: 0.9rem;
}
.dict-refs-list li {
padding: 0.25rem 0;
}
/* Chinese-English / Ref Tab */
.ref-container {
display: flex;
flex-direction: column;
gap: 1rem;
}
.ref-block {
border: 1px solid var(--border-color, #e5e7eb);
border-radius: 8px;
overflow: hidden;
background: var(--bg-secondary, #f9fafb);
}
.ref-block summary {
padding: 0.75rem 1rem;
cursor: pointer;
font-weight: 500;
background: var(--bg-tertiary, #f3f4f6);
user-select: none;
}
.ref-block summary:hover {
background: var(--bg-hover, #e5e7eb);
}
.ref-content {
padding: 1rem;
font-size: 0.95rem;
line-height: 1.6;
background: var(--bg-primary, #ffffff);
white-space: pre-wrap; /* For raw text content */
}
/* Meanings Tab specific */
.meanings-container {
display: flex;
flex-direction: column;
gap: 1rem;
}
.meaning-section {
background: var(--bg-secondary, #f9fafb);
padding: 1rem;
border-radius: 8px;
}
.bilingual-list {
list-style: none;
padding: 0;
}
.bilingual-list li {
margin-bottom: 0.75rem;
padding-bottom: 0.75rem;
border-bottom: 1px solid var(--border-color-light, #e5e7eb);
}
.bilingual-list li:last-child {
border-bottom: none;
}
.ex-zh {
display: block;
font-size: 1.1rem;
color: var(--text-primary, #1f2937);
margin-bottom: 0.25rem;
}
.ex-vi {
display: block;
color: var(--text-secondary, #6b7280);
font-style: italic;
}
.source-details {
margin-bottom: 0.5rem;
border: 1px solid var(--border-color-light, #e5e7eb);
border-radius: 6px;
background: var(--bg-primary, #ffffff);
}
.source-details summary {
padding: 0.5rem;
cursor: pointer;
font-size: 0.9rem;
font-weight: 500;
}
.source-body {
padding: 0.5rem;
border-top: 1px solid var(--border-color-light, #e5e7eb);
font-size: 0.9rem;
color: var(--text-primary, #1f2937);
}
/* Dark Mode Overrides for V2 Styles */
[data-theme="dark"] .info-card,
[data-theme="dark"] .phonetic-card,
[data-theme="dark"] .origin-section,
[data-theme="dark"] .meaning-section,
[data-theme="dark"] .ref-block {
background: var(--bg-secondary, #1f2937);
border-color: var(--border-color, #374151);
}
[data-theme="dark"] .layer-item,
[data-theme="dark"] .hist-item,
[data-theme="dark"] .ref-content,
[data-theme="dark"] .source-details {
background: var(--bg-tertiary, #374151);
border-color: var(--border-color, #4b5563);
}
[data-theme="dark"] .example-chip {
background: var(--bg-tertiary, #374151);
border-color: var(--border-color, #4b5563);
}
[data-theme="dark"] .ref-block summary {
background: #374151; /* specific shade for dark headers */
color: #e5e7eb;
}
/* ============================================================
MISSING CSS CLASSES (Added for char-ui.js compatibility)
============================================================ */
/* Small play button for inline audio */
.play-sm {
background: transparent;
border: none;
cursor: pointer;
font-size: 1rem;
padding: 0.25rem;
margin-left: 0.5rem;
opacity: 0.7;
transition: opacity 0.2s, transform 0.2s;
}
.play-sm:hover {
opacity: 1;
transform: scale(1.1);
}
/* Chinese content styling */
.chinese-content {
font-family: var(--font-chinese, 'Noto Sans SC', 'Source Han Sans CN', sans-serif);
font-size: 1rem;
line-height: 1.8;
color: var(--text-primary, #1f2937);
}
/* MoeDict entries */
.moe-entry {
padding: 0.75rem;
margin-bottom: 0.5rem;
background: var(--bg-primary, #ffffff);
border-radius: 8px;
border-left: 3px solid var(--primary-color, #3b82f6);
}
.moe-pinyin {
font-size: 0.85rem;
color: var(--text-secondary, #6b7280);
margin-bottom: 0.25rem;
}
.moe-def {
font-size: 0.95rem;
color: var(--text-primary, #1f2937);
line-height: 1.5;
}
/* Xinhua dictionary items */
.xh-item {
padding: 0.5rem 0;
border-bottom: 1px solid var(--border-color-light, #f3f4f6);
}
.xh-item:last-child {
border-bottom: none;
}
/* Kangxi phonetics */
.kx-line {
padding: 0.5rem 0;
border-bottom: 1px solid var(--border-color-light, #f3f4f6);
}
.kx-item {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 0.5rem;
margin-bottom: 0.25rem;
}
.kx-label {
font-size: 0.85rem;
color: var(--text-tertiary, #9ca3af);
min-width: 70px;
}
.kx-val {
font-weight: 500;
color: var(--text-primary, #1f2937);
}
.kx-hv {
font-size: 0.85rem;
color: var(--primary-color, #3b82f6);
background: rgba(59, 130, 246, 0.1);
padding: 0.125rem 0.5rem;
border-radius: 4px;
}
/* Nom meanings list */
.nom-meanings-list {
list-style: none;
padding: 0;
margin: 0;
}
.nom-meanings-list li {
display: flex;
flex-wrap: wrap;
align-items: baseline;
gap: 0.5rem;
padding: 0.5rem 0;
border-bottom: 1px solid var(--border-color-light, #f3f4f6);
}
.nom-meanings-list li:last-child {
border-bottom: none;
}
.nm-reading {
font-weight: 600;
color: var(--primary-color, #3b82f6);
min-width: 60px;
}
.nm-def {
flex: 1;
color: var(--text-primary, #1f2937);
}
.nm-source {
font-size: 0.8rem;
color: var(--text-tertiary, #9ca3af);
}
/* Nom tags */
.nom-tag {
display: inline-block;
padding: 0.25rem 0.75rem;
margin: 0.125rem;
background: linear-gradient(135deg, #ff9800, #ff5722);
color: white;
border-radius: 20px;
font-size: 0.9rem;
font-weight: 500;
}
.nom-readings {
display: flex;
flex-wrap: wrap;
gap: 0.5rem;
}
/* Dialect definitions (Minnan, Cantonese) */
.dialect-defs {
margin-top: 0.75rem;
display: flex;
flex-direction: column;
gap: 0.5rem;
}
.dialect-def-item {
display: flex;
flex-wrap: wrap;
align-items: baseline;
gap: 0.5rem;
padding: 0.5rem;
background: var(--bg-primary, #ffffff);
border-radius: 6px;
}
.dd-reading {
font-weight: 600;
color: var(--primary-color, #3b82f6);
min-width: 80px;
}
.dd-meaning {
flex: 1;
color: var(--text-primary, #1f2937);
}
.dd-source {
font-size: 0.8rem;
color: var(--text-tertiary, #9ca3af);
}
/* Bullet list for meanings */
.bullet-list {
list-style: disc;
padding-left: 1.5rem;
margin: 0;
}
.bullet-list li {
padding: 0.25rem 0;
line-height: 1.5;
}
/* Text content wrapper */
.text-content {
line-height: 1.6;
}
/* Struct info styling */
.struct-info p {
margin-bottom: 0.5rem;
}
.struct-info .analysis {
font-style: italic;
color: var(--text-secondary, #6b7280);
margin-top: 0.75rem;
padding-top: 0.75rem;
border-top: 1px solid var(--border-color-light, #f3f4f6);
}
/* Shuowen box enhanced */
.shuowen-box {
padding: 1rem;
background: var(--bg-primary, #ffffff);
border-radius: 8px;
border-left: 3px solid #8b5cf6;
}
.sw-original {
font-family: var(--font-chinese, serif);
font-size: 1.1rem;
line-height: 1.8;
margin-bottom: 0.75rem;
}
.sw-trans {
font-size: 0.95rem;
color: var(--text-secondary, #6b7280);
line-height: 1.5;
}
.sw-trans em {
color: var(--text-tertiary, #9ca3af);
}
/* char-variants display */
.char-variants {
display: flex;
flex-wrap: wrap;
justify-content: center;
gap: 0.5rem;
margin-top: 0.5rem;
font-size: 0.875rem;
color: var(--text-secondary, #6b7280);
}
.variant-item {
padding: 0.25rem 0.5rem;
background: var(--bg-secondary, #f9fafb);
border-radius: 4px;
}
/* Stroke writer container */
.stroke-writer {
width: 150px;
height: 150px;
margin: 0 auto;
background: var(--bg-primary, #ffffff);
border: 1px solid var(--border-color, #e5e7eb);
border-radius: 8px;
}
/* Dark mode overrides for new classes */
[data-theme="dark"] .moe-entry,
[data-theme="dark"] .dialect-def-item,
[data-theme="dark"] .shuowen-box {
background: var(--bg-tertiary, #374151);
}
[data-theme="dark"] .chinese-content,
[data-theme="dark"] .moe-def,
[data-theme="dark"] .kx-val,
[data-theme="dark"] .nm-def,
[data-theme="dark"] .dd-meaning,
[data-theme="dark"] .sw-original {
color: var(--text-primary, #e5e7eb);
}
[data-theme="dark"] .variant-item {
background: var(--bg-tertiary, #374151);
}
