Spaces:
Sleeping
Sleeping
| /* CSS Reset and Base Styles */ | |
| * { | |
| margin: 0; | |
| padding: 0; | |
| box-sizing: border-box; | |
| } | |
| :root { | |
| /* Color Palette - Modern Deep Blues */ | |
| --primary-color: #1A3A6C; | |
| --primary-dark: #0D2147; | |
| --primary-light: #2C5282; | |
| --accent-color: #2B89E0; | |
| --success-color: #27AE60; | |
| --warning-color: #F39C12; | |
| --error-color: #E74C3C; | |
| /* CEFR Level Colors */ | |
| --a1-color: #E74C3C; | |
| --a2-color: #E67E22; | |
| --b1-color: #F39C12; | |
| --b2-color: #27AE60; | |
| --c1-color: #3498DB; | |
| --c2-color: #9B59B6; | |
| /* Neutral Colors */ | |
| --bg-color: #F8FAFC; | |
| --card-bg: #FFFFFF; | |
| --text-primary: #1E293B; | |
| --text-secondary: #64748B; | |
| --border-color: #E2E8F0; | |
| --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1); | |
| --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1); | |
| /* Typography */ | |
| --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; | |
| --font-size-sm: 0.875rem; | |
| --font-size-base: 1rem; | |
| --font-size-lg: 1.125rem; | |
| --font-size-xl: 1.25rem; | |
| --font-size-2xl: 1.5rem; | |
| /* Spacing */ | |
| --spacing-xs: 0.5rem; | |
| --spacing-sm: 0.75rem; | |
| --spacing-md: 1rem; | |
| --spacing-lg: 1.5rem; | |
| --spacing-xl: 2rem; | |
| --spacing-2xl: 3rem; | |
| /* Border Radius */ | |
| --radius-sm: 4px; | |
| --radius-md: 8px; | |
| --radius-lg: 12px; | |
| } | |
| /* Base Styles */ | |
| body { | |
| font-family: var(--font-family); | |
| background-color: var(--bg-color); | |
| color: var(--text-primary); | |
| line-height: 1.6; | |
| } | |
| .container { | |
| max-width: 1200px; | |
| margin: 0 auto; | |
| padding: var(--spacing-md); | |
| } | |
| /* Header */ | |
| .header { | |
| padding: var(--spacing-lg) 0; | |
| margin-bottom: var(--spacing-lg); | |
| display: flex; | |
| justify-content: space-between; | |
| align-items: center; | |
| border-bottom: 1px solid var(--border-color); | |
| } | |
| .logo h1 { | |
| font-size: var(--font-size-xl); | |
| font-weight: 600; | |
| color: var(--text-primary); | |
| } | |
| .github-link a { | |
| color: var(--primary-color); | |
| text-decoration: none; | |
| font-weight: 500; | |
| font-size: var(--font-size-base); | |
| } | |
| .github-link a:hover { | |
| text-decoration: underline; | |
| } | |
| /* Cards */ | |
| .card { | |
| background: var(--card-bg); | |
| border-radius: var(--radius-lg); | |
| padding: var(--spacing-xl); | |
| box-shadow: var(--shadow); | |
| margin-bottom: var(--spacing-xl); | |
| border: 1px solid var(--border-color); | |
| } | |
| /* Section Headers */ | |
| h2, h3 { | |
| color: var(--text-primary); | |
| margin-bottom: var(--spacing-md); | |
| } | |
| h2 { | |
| font-size: var(--font-size-xl); | |
| font-weight: 600; | |
| } | |
| h3 { | |
| font-size: var(--font-size-lg); | |
| font-weight: 600; | |
| } | |
| .section-description { | |
| color: var(--text-secondary); | |
| margin-bottom: var(--spacing-lg); | |
| font-size: var(--font-size-base); | |
| } | |
| /* Forms */ | |
| .form-group { | |
| margin-bottom: var(--spacing-lg); | |
| } | |
| .form-label { | |
| display: block; | |
| margin-bottom: var(--spacing-sm); | |
| font-weight: 500; | |
| color: var(--text-primary); | |
| font-size: var(--font-size-base); | |
| } | |
| .text-input { | |
| width: 100%; | |
| padding: var(--spacing-md); | |
| border: 2px solid var(--border-color); | |
| border-radius: var(--radius-md); | |
| font-size: var(--font-size-base); | |
| font-family: inherit; | |
| resize: vertical; | |
| min-height: 200px; | |
| transition: border-color 0.2s ease; | |
| } | |
| .text-input:focus { | |
| outline: none; | |
| border-color: var(--accent-color); | |
| box-shadow: 0 0 0 3px rgba(43, 137, 224, 0.1); | |
| } | |
| .input-hint { | |
| margin-top: var(--spacing-sm); | |
| font-size: var(--font-size-sm); | |
| color: var(--text-secondary); | |
| } | |
| /* Buttons */ | |
| .button-group { | |
| display: flex; | |
| gap: var(--spacing-md); | |
| flex-wrap: wrap; | |
| } | |
| .btn { | |
| padding: var(--spacing-sm) var(--spacing-lg); | |
| border: none; | |
| border-radius: var(--radius-md); | |
| font-size: var(--font-size-base); | |
| font-weight: 500; | |
| cursor: pointer; | |
| display: inline-flex; | |
| align-items: center; | |
| gap: var(--spacing-sm); | |
| transition: all 0.2s ease; | |
| position: relative; | |
| } | |
| .btn-primary { | |
| background: linear-gradient(135deg, var(--accent-color) 0%, var(--primary-light) 100%); | |
| color: white; | |
| } | |
| .btn-primary:hover { | |
| transform: translateY(-1px); | |
| box-shadow: 0 4px 12px rgba(43, 137, 224, 0.3); | |
| } | |
| .btn-primary:active { | |
| transform: translateY(0); | |
| } | |
| .btn-primary:disabled { | |
| opacity: 0.6; | |
| cursor: not-allowed; | |
| transform: none; | |
| } | |
| .btn-secondary { | |
| background: var(--card-bg); | |
| color: var(--text-primary); | |
| border: 1px solid var(--border-color); | |
| } | |
| .btn-secondary:hover { | |
| background: #F1F5F9; | |
| border-color: #CBD5E1; | |
| } | |
| .btn-small { | |
| padding: var(--spacing-xs) var(--spacing-sm); | |
| font-size: var(--font-size-sm); | |
| } | |
| .btn-outline { | |
| background: transparent; | |
| border: 1px solid var(--primary-light); | |
| color: var(--primary-light); | |
| } | |
| .btn-outline:hover { | |
| background: rgba(44, 82, 130, 0.05); | |
| } | |
| /* Button Loader */ | |
| .btn-loader { | |
| display: none; | |
| width: 16px; | |
| height: 16px; | |
| border: 2px solid #ffffff; | |
| border-radius: 50%; | |
| border-top-color: transparent; | |
| animation: spin 0.8s linear infinite; | |
| } | |
| .btn-loader.active { | |
| display: block; | |
| } | |
| @keyframes spin { | |
| to { transform: rotate(360deg); } | |
| } | |
| /* Compact Stats */ | |
| .compact-stats { | |
| display: flex; | |
| gap: var(--spacing-lg); | |
| margin: var(--spacing-md) 0; | |
| padding: 0 var(--spacing-lg); | |
| font-size: var(--font-size-sm); | |
| color: var(--text-secondary); | |
| } | |
| .stat-item { | |
| display: flex; | |
| align-items: baseline; | |
| gap: var(--spacing-xs); | |
| } | |
| .stat-value { | |
| font-weight: 600; | |
| color: var(--text-primary); | |
| } | |
| .stat-name { | |
| font-weight: 400; | |
| } | |
| /* Distribution Bars */ | |
| .distribution-container h3 { | |
| margin-bottom: var(--spacing-md); | |
| font-size: var(--font-size-lg); | |
| font-weight: 600; | |
| } | |
| .distribution-bars { | |
| display: flex; | |
| flex-direction: column; | |
| gap: var(--spacing-sm); | |
| } | |
| .distribution-bar { | |
| display: flex; | |
| align-items: center; | |
| gap: var(--spacing-md); | |
| font-size: var(--font-size-sm); | |
| } | |
| .distribution-label { | |
| width: 40px; | |
| font-weight: 500; | |
| } | |
| .distribution-track { | |
| flex: 1; | |
| height: 20px; | |
| background: var(--border-color); | |
| border-radius: var(--radius-sm); | |
| overflow: hidden; | |
| position: relative; | |
| } | |
| .distribution-fill { | |
| height: 100%; | |
| border-radius: var(--radius-sm); | |
| display: flex; | |
| align-items: center; | |
| justify-content: flex-end; | |
| padding-right: var(--spacing-sm); | |
| color: white; | |
| font-size: var(--font-size-sm); | |
| font-weight: 500; | |
| transition: width 0.5s ease; | |
| } | |
| .distribution-count { | |
| width: 30px; | |
| text-align: right; | |
| color: var(--text-secondary); | |
| } | |
| /* Annotated Text */ | |
| .container-header { | |
| display: flex; | |
| justify-content: space-between; | |
| align-items: center; | |
| margin-bottom: var(--spacing-md); | |
| } | |
| .main-result { | |
| padding: var(--spacing-xl); | |
| } | |
| .annotated-text { | |
| line-height: 2.5; /* Generous line height for the underlines */ | |
| font-size: var(--font-size-lg); | |
| font-family: var(--font-family); | |
| white-space: pre-wrap; | |
| word-wrap: break-word; | |
| } | |
| .annotation { | |
| display: inline; | |
| padding-bottom: 2px; | |
| border-bottom-width: 3px; | |
| border-bottom-style: solid; | |
| background-color: transparent; /* Override any potential background utilities */ | |
| box-decoration-break: clone; | |
| -webkit-box-decoration-break: clone; | |
| transition: background-color 0.2s ease, border-color 0.2s ease; | |
| cursor: help; | |
| } | |
| .annotation:hover { | |
| background-color: rgba(0, 0, 0, 0.03); /* Very subtle hover effect */ | |
| } | |
| /* Specific border colors for annotations - Overriding the general background utility classes */ | |
| .annotated-text .annotation.level-a1 { border-bottom-color: var(--a1-color); background-color: transparent; } | |
| .annotated-text .annotation.level-a2 { border-bottom-color: var(--a2-color); background-color: transparent; } | |
| .annotated-text .annotation.level-b1 { border-bottom-color: var(--b1-color); background-color: transparent; } | |
| .annotated-text .annotation.level-b2 { border-bottom-color: var(--b2-color); background-color: transparent; } | |
| .annotated-text .annotation.level-c1 { border-bottom-color: var(--c1-color); background-color: transparent; } | |
| .annotated-text .annotation.level-c2 { border-bottom-color: var(--c2-color); background-color: transparent; } | |
| /* In case the utility classes win specificity wise, we ensure these apply */ | |
| .annotation.level-a1, .annotation.level-a2, .annotation.level-b1, | |
| .annotation.level-b2, .annotation.level-c1, .annotation.level-c2 { | |
| background-color: transparent; | |
| } | |
| .annotation:hover.level-a1 { background-color: rgba(231, 76, 60, 0.1); } | |
| .annotation:hover.level-a2 { background-color: rgba(230, 126, 34, 0.1); } | |
| .annotation:hover.level-b1 { background-color: rgba(243, 156, 18, 0.1); } | |
| .annotation:hover.level-b2 { background-color: rgba(39, 174, 96, 0.1); } | |
| .annotation:hover.level-c1 { background-color: rgba(52, 152, 219, 0.1); } | |
| .annotation:hover.level-c2 { background-color: rgba(155, 89, 182, 0.1); } | |
| .annotation-hidden { | |
| border-bottom-color: transparent ; | |
| } | |
| .cefr-badge { | |
| /* Deprecated but kept to prevent errors if stale JS runs */ | |
| display: none; | |
| } | |
| /* Sentence Table */ | |
| .table-wrapper { | |
| overflow-x: auto; | |
| border-radius: var(--radius-md); | |
| border: 1px solid var(--border-color); | |
| } | |
| .sentence-table { | |
| width: 100%; | |
| border-collapse: collapse; | |
| font-size: var(--font-size-base); | |
| } | |
| .sentence-table th { | |
| background: #F1F5F9; | |
| padding: var(--spacing-md); | |
| text-align: left; | |
| font-weight: 600; | |
| color: var(--text-primary); | |
| border-bottom: 2px solid var(--border-color); | |
| } | |
| .sentence-table td { | |
| padding: var(--spacing-md); | |
| border-bottom: 1px solid var(--border-color); | |
| } | |
| .sentence-table tbody tr:last-child td { | |
| border-bottom: none; | |
| } | |
| .sentence-table tbody tr:nth-child(even) { | |
| background: #F8FAFC; | |
| } | |
| .sentence-table tbody tr:hover { | |
| background: #E2E8F0; | |
| } | |
| .sentence-text { | |
| max-width: 600px; | |
| word-wrap: break-word; | |
| } | |
| .level-cell { | |
| display: flex; | |
| align-items: center; | |
| gap: var(--spacing-sm); | |
| } | |
| .level-indicator { | |
| width: 12px; | |
| height: 12px; | |
| border-radius: 50%; | |
| flex-shrink: 0; | |
| } | |
| .confidence-bar { | |
| display: inline-block; | |
| width: 60px; | |
| height: 6px; | |
| background: var(--border-color); | |
| border-radius: 3px; | |
| position: relative; | |
| margin-left: var(--spacing-sm); | |
| } | |
| .confidence-fill { | |
| position: absolute; | |
| left: 0; | |
| top: 0; | |
| height: 100%; | |
| background: var(--accent-color); | |
| border-radius: 3px; | |
| } | |
| /* Modal */ | |
| .modal { | |
| position: fixed; | |
| top: 0; | |
| left: 0; | |
| right: 0; | |
| bottom: 0; | |
| background: rgba(0, 0, 0, 0.5); | |
| z-index: 1000; | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| padding: var(--spacing-md); | |
| } | |
| .modal-content { | |
| background: white; | |
| border-radius: var(--radius-lg); | |
| max-width: 500px; | |
| width: 100%; | |
| box-shadow: var(--shadow-lg); | |
| overflow: hidden; | |
| } | |
| .modal-header { | |
| padding: var(--spacing-lg); | |
| background: var(--primary-color); | |
| color: white; | |
| display: flex; | |
| justify-content: space-between; | |
| align-items: center; | |
| } | |
| .modal-header h3 { | |
| margin: 0; | |
| } | |
| .modal-close { | |
| background: none; | |
| border: none; | |
| color: white; | |
| font-size: 1.5rem; | |
| cursor: pointer; | |
| width: 32px; | |
| height: 32px; | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| border-radius: 50%; | |
| transition: background 0.2s ease; | |
| } | |
| .modal-close:hover { | |
| background: rgba(255, 255, 255, 0.1); | |
| } | |
| .modal-body { | |
| padding: var(--spacing-lg); | |
| color: var(--text-primary); | |
| } | |
| .modal-footer { | |
| padding: var(--spacing-lg); | |
| border-top: 1px solid var(--border-color); | |
| display: flex; | |
| justify-content: flex-end; | |
| } | |
| /* Footer */ | |
| .footer { | |
| text-align: center; | |
| padding: var(--spacing-lg); | |
| color: var(--text-secondary); | |
| font-size: var(--font-size-sm); | |
| margin-top: var(--spacing-xl); | |
| } | |
| /* Responsive Design */ | |
| @media (max-width: 768px) { | |
| .container { | |
| padding: var(--spacing-sm); | |
| } | |
| .header { | |
| flex-direction: column; | |
| gap: var(--spacing-md); | |
| text-align: center; | |
| padding: var(--spacing-lg); | |
| } | |
| .stats-grid { | |
| grid-template-columns: 1fr; | |
| } | |
| .button-group { | |
| flex-direction: column; | |
| } | |
| .btn { | |
| width: 100%; | |
| justify-content: center; | |
| } | |
| .container-header { | |
| flex-direction: column; | |
| gap: var(--spacing-md); | |
| align-items: flex-start; | |
| } | |
| .sentence-table { | |
| font-size: var(--font-size-sm); | |
| } | |
| .sentence-table th, | |
| .sentence-table td { | |
| padding: var(--spacing-sm); | |
| } | |
| } | |
| /* Animations */ | |
| @keyframes fadeIn { | |
| from { | |
| opacity: 0; | |
| transform: translateY(20px); | |
| } | |
| to { | |
| opacity: 1; | |
| transform: translateY(0); | |
| } | |
| } | |
| .card { | |
| animation: fadeIn 0.4s ease forwards; | |
| } | |
| /* CEFR Level Colors */ | |
| .level-a1 { background-color: var(--a1-color); } | |
| .level-a2 { background-color: var(--a2-color); } | |
| .level-b1 { background-color: var(--b1-color); } | |
| .level-b2 { background-color: var(--b2-color); } | |
| .level-c1 { background-color: var(--c1-color); } | |
| .level-c2 { background-color: var(--c2-color); } | |
| /* Utility Classes */ | |
| .text-center { text-align: center; } | |
| .text-left { text-align: left; } | |
| .text-right { text-align: right; } | |
| .mt-sm { margin-top: var(--spacing-sm); } | |
| .mt-md { margin-top: var(--spacing-md); } | |
| .mt-lg { margin-top: var(--spacing-lg); } | |
| .mb-sm { margin-bottom: var(--spacing-sm); } | |
| .mb-md { margin-bottom: var(--spacing-md); } | |
| .mb-lg { margin-bottom: var(--spacing-lg); } | |