
:root {
    --primary-dark: #1e3a8a;
    --primary-light: #0ea5e9;
    --accent: #f97316;
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --text-dark: #1e293b;
    --text-light: #64748b;
    --border: #e2e8f0;
    --success: #10b981;
    --error: #ef4444;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans SC', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
}

.navbar {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #1e40af 100%);
    padding: 1.25rem 0;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    cursor: pointer;
    transition: transform 0.3s;
}

.nav-brand:hover {
    transform: scale(1.05);
}

.nav-brand i {
    font-size: 1.75rem;
}

.nav-links {
    display: flex;
    gap: 0.5rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

.page {
    display: none;
    animation: fadeIn 0.3s ease;
}

.page.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 50%, #0ea5e9 100%);
    padding: 5rem 0 6rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-family: 'Playfair Display', serif;
    font-size: 3.5rem;
    font-weight: 800;
    color: white;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1rem;
    font-weight: 500;
}

.hero-description {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.8);
    max-width: 600px;
    margin: 0 auto;
}

.courses-section {
    padding: 4rem 0;
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.25rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--primary-dark);
}

.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.course-card {
    background: var(--bg-white);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.course-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-dark), var(--primary-light));
}

.course-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.course-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.course-icon {
    width: 60px;
    height: 60px;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: white;
}

.course-card:nth-child(1) .course-icon {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
}

.course-card:nth-child(2) .course-icon {
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
}

.course-card:nth-child(3) .course-icon {
    background: linear-gradient(135deg, #ec4899, #be185d);
}

.course-card:nth-child(4) .course-icon {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.course-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
}

.course-description {
    color: var(--text-light);
    margin-bottom: 1.25rem;
    font-size: 0.95rem;
}

.course-lesson-count {
    color: var(--accent);
    font-weight: 600;
    font-size: 0.9rem;
}

.course-card-footer {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
}

.course-card-footer .btn {
    padding: 0.5rem 1.5rem;
    font-size: 0.9rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-dark), #1e40af);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1e40af, var(--primary-dark));
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.4);
}

.btn-secondary {
    background: var(--bg-light);
    color: var(--primary-dark);
}

.btn-secondary:hover {
    background: var(--border);
}

.course-page {
    padding: 3rem 0;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    border: none;
    color: var(--primary-dark);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0.5rem 0;
    margin-bottom: 2rem;
    transition: color 0.3s;
}

.back-btn:hover {
    color: var(--primary-light);
}

.course-title {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--primary-dark);
}

.course-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
}

.lesson-sidebar {
    background: var(--bg-white);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    height: fit-content;
    position: sticky;
    top: 100px;
}

.sidebar-title {
    font-weight: 600;
    font-size: 1.125rem;
    margin-bottom: 1rem;
    color: var(--primary-dark);
}

.lesson-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 500px;
    overflow-y: auto;
}

.lesson-item {
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.95rem;
    color: var(--text-dark);
}

.lesson-item:hover {
    background: var(--bg-light);
}

.lesson-item.active {
    background: linear-gradient(135deg, var(--primary-dark), #1e40af);
    color: white;
}

.lesson-odd {
    background: rgba(59, 130, 246, 0.08);
}

.lesson-even {
    background: rgba(100, 116, 139, 0.08);
}

.lesson-content {
    background: var(--bg-white);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: var(--shadow);
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-light);
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.lesson-detail-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.lesson-detail-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
}

.lesson-detail-meta {
    color: var(--text-light);
    font-size: 0.95rem;
}

.text-block {
    margin-bottom: 2rem;
}

.text-block h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.text-content {
    line-height: 2;
    font-size: 1.05rem;
}

.text-content.en {
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
}

.practice-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.practice-page {
    padding: 3rem 0;
}

.practice-title {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--primary-dark);
}

.practice-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.practice-section {
    background: var(--bg-white);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: var(--shadow);
}

.section-label {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.text-display {
    background: var(--bg-light);
    border-radius: 0.5rem;
    padding: 1.5rem;
    line-height: 2;
}

.answer-input {
    width: 100%;
    min-height: 250px;
    padding: 1rem;
    border: 2px solid var(--border);
    border-radius: 0.5rem;
    font-size: 1rem;
    font-family: 'Noto Sans SC', sans-serif;
    resize: vertical;
    transition: border-color 0.3s;
}

.answer-input:focus {
    outline: none;
    border-color: var(--primary-light);
}

.action-buttons {
    margin-top: 1rem;
    display: flex;
    justify-content: flex-end;
}

.result-section {
    background: var(--bg-white);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: var(--shadow);
}

.result-header {
    text-align: center;
    margin-bottom: 2rem;
}

.score-display {
    font-size: 3rem;
    font-weight: 800;
    font-family: 'Playfair Display', serif;
    margin-bottom: 0.5rem;
}

.score-display.good {
    color: var(--success);
}

.score-display.medium {
    color: var(--accent);
}

.score-display.need-improve {
    color: var(--error);
}

.score-label {
    font-size: 1.125rem;
    color: var(--text-light);
}

.comparison-section {
    margin-top: 2rem;
}

.comparison-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--primary-dark);
}

.comparison-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.comparison-box {
    background: var(--bg-light);
    border-radius: 0.5rem;
    padding: 1.25rem;
}

.comparison-box h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-dark);
}

.correct-word {
    background: rgba(16, 185, 129, 0.2);
    padding: 0.125rem 0.25rem;
    border-radius: 0.25rem;
}

.incorrect-word {
    background: rgba(239, 68, 68, 0.2);
    padding: 0.125rem 0.25rem;
    border-radius: 0.25rem;
    text-decoration: line-through;
}

.missing-word {
    background: rgba(249, 115, 22, 0.2);
    padding: 0.125rem 0.25rem;
    border-radius: 0.25rem;
    font-style: italic;
}

.history-page {
    padding: 3rem 0;
}

.history-title {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--primary-dark);
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.history-item {
    background: var(--bg-white);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.history-info {
    flex: 1;
}

.history-lesson-title {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--primary-dark);
    margin-bottom: 0.25rem;
}

.history-meta {
    font-size: 0.9rem;
    color: var(--text-light);
    display: flex;
    gap: 1rem;
}

.history-type {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.history-score {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: 'Playfair Display', serif;
}

.history-score.good {
    color: var(--success);
}

.history-score.medium {
    color: var(--accent);
}

.history-score.need-improve {
    color: var(--error);
}

.empty-history {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-light);
}

.empty-history i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.hidden {
    display: none !important;
}

.dictation-sentences-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.dictation-sentence-item {
    background: var(--bg-white);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.dictation-sentence-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.sentence-number {
    font-weight: 600;
    color: var(--primary-dark);
    font-size: 1rem;
}

.sentence-source {
    font-size: 0.9rem;
    color: var(--text-light);
}

.dictation-chinese-text {
    background: var(--bg-light);
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
    line-height: 1.8;
}

.dictation-input-wrapper {
    margin-bottom: 0.5rem;
}

.dictation-input {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border);
    border-radius: 0.5rem;
    font-size: 1rem;
    font-family: 'Noto Sans SC', sans-serif;
    transition: all 0.3s;
}

.dictation-input:focus {
    outline: none;
    border-color: var(--primary-light);
}

.dictation-input.correct {
    border-color: var(--success);
    background: rgba(16, 185, 129, 0.05);
}

.dictation-input.incorrect {
    border-color: var(--error);
    background: rgba(239, 68, 68, 0.05);
}

.dictation-correct {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: rgba(30, 58, 138, 0.05);
    border-radius: 0.5rem;
    color: var(--primary-dark);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dictation-correct i {
    color: var(--primary-dark);
}

.random-page {
    padding: 3rem 0;
}

#random-setup {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.setup-section {
    background: var(--bg-white);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.setup-options-card {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(14, 165, 233, 0.05) 100%);
    border: 1px solid rgba(59, 130, 246, 0.15);
}

.lesson-select-card {
    background: linear-gradient(135deg, rgba(100, 116, 139, 0.05) 0%, rgba(148, 163, 184, 0.05) 100%);
    border: 1px solid rgba(100, 116, 139, 0.15);
}

.quick-action-card {
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.03) 0%, rgba(30, 64, 175, 0.03) 100%);
    border: 1px solid rgba(30, 58, 138, 0.1);
}

.quick-action-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-dictation {
    flex: 1;
    min-width: 160px;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15) 0%, rgba(124, 58, 237, 0.15) 100%);
    border: 1px solid rgba(139, 92, 246, 0.3);
    color: #7c3aed;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-dictation:hover {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.25) 0%, rgba(124, 58, 237, 0.25) 100%);
    border-color: rgba(139, 92, 246, 0.4);
}

.btn-translation {
    flex: 1;
    min-width: 160px;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    background: linear-gradient(135deg, rgba(250, 204, 21, 0.15) 0%, rgba(234, 179, 8, 0.15) 100%);
    border: 1px solid rgba(250, 204, 21, 0.3);
    color: #a16207;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-translation:hover {
    background: linear-gradient(135deg, rgba(250, 204, 21, 0.25) 0%, rgba(234, 179, 8, 0.25) 100%);
    border-color: rgba(250, 204, 21, 0.4);
}

.sentence-count-buttons {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.sentence-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    background: var(--bg-light);
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-dark);
    transition: all 0.2s;
}

.sentence-btn:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
}

.sentence-btn.active {
    background: linear-gradient(135deg, var(--primary-dark), #1e40af);
    border-color: var(--primary-dark);
    color: white;
}

.setup-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.lesson-select-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.lesson-select-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--bg-light);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
}

.lesson-select-item:hover {
    background: rgba(30, 58, 138, 0.1);
}

.lesson-select-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.lesson-select-item label {
    flex: 1;
    cursor: pointer;
    font-size: 0.95rem;
}

.setup-options {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: 0.5rem;
}

.option-label {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1rem;
}

.option-label select {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    font-size: 1rem;
    background: white;
}

.option-label {
    margin-bottom: 0.75rem;
}

.option-label:last-child {
    margin-bottom: 0;
}

.lesson-select-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.select-all-buttons {
    display: flex;
    gap: 0.75rem;
}

.range-select {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.range-select input[type="number"] {
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    font-size: 1rem;
    text-align: center;
}

.dictation-user {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: rgba(239, 68, 68, 0.05);
    border-radius: 0.5rem;
    color: var(--error);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-name {
    color: white;
    font-weight: 500;
}

.auth-page {
    padding: 5rem 0;
    min-height: calc(100vh - 100px);
    display: flex;
    align-items: center;
}

.auth-container {
    max-width: 450px;
    margin: 0 auto;
    background: var(--bg-white);
    border-radius: 1rem;
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
}

.auth-tabs {
    display: flex;
    margin-bottom: 2rem;
    border-radius: 0.5rem;
    overflow: hidden;
    background: var(--bg-light);
}

.auth-tab {
    flex: 1;
    padding: 0.75rem 1rem;
    background: transparent;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    color: var(--text-light);
}

.auth-tab:hover {
    background: rgba(30, 58, 138, 0.1);
}

.auth-tab.active {
    background: linear-gradient(135deg, var(--primary-dark), #1e40af);
    color: white;
}

.auth-form {
    display: block;
}

.auth-form.hidden {
    display: none;
}

.auth-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--primary-dark);
    text-align: center;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-dark);
}

.form-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border);
    border-radius: 0.5rem;
    font-size: 1rem;
    font-family: 'Noto Sans SC', sans-serif;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-light);
}

.form-error {
    color: var(--error);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    text-align: center;
}

.mistakes-page {
    padding: 3rem 0;
}

.mistakes-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mistake-item {
    background: var(--bg-white);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.mistake-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.mistake-lesson {
    font-weight: 600;
    color: var(--primary-dark);
}

.mistake-date {
    font-size: 0.9rem;
    color: var(--text-light);
}

.btn-delete {
    padding: 0.5rem 0.75rem;
    border: none;
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-delete:hover {
    background: rgba(239, 68, 68, 0.2);
}

.mistake-content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.mistake-row {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.mistake-label {
    font-weight: 600;
    color: var(--text-dark);
    min-width: 80px;
}

.mistake-text {
    flex: 1;
}

.mistake-incorrect {
    color: var(--error);
}

.mistake-correct {
    color: var(--success);
}

.highlight-incorrect {
    background: rgba(239, 68, 68, 0.2);
    padding: 0.125rem 0.25rem;
    border-radius: 0.25rem;
    color: var(--error);
}

.highlight-correct {
    background: rgba(16, 185, 129, 0.2);
    padding: 0.125rem 0.25rem;
    border-radius: 0.25rem;
    color: var(--success);
}

.highlight-correct-word {
    background: rgba(16, 185, 129, 0.3);
    padding: 0.125rem 0.25rem;
    border-radius: 0.25rem;
    color: var(--success);
    font-weight: 600;
}

@media (max-width: 1024px) {
    .course-layout {
        grid-template-columns: 1fr;
    }

    .lesson-sidebar {
        position: static;
    }

    .practice-container {
        grid-template-columns: 1fr;
    }

    .comparison-content {
        grid-template-columns: 1fr;
    }
}

.translation-sentences-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.translation-sentence-item {
    background: var(--bg-white);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.translation-sentence-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.translation-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    color: var(--primary-dark);
    cursor: pointer;
    user-select: none;
}

.translation-toggle input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.translation-original {
    background: var(--bg-light);
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
    line-height: 1.8;
    font-family: 'Playfair Display', serif;
    font-size: 1.05rem;
}

.translation-input-wrapper {
    margin-bottom: 0.75rem;
}

.translation-input {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border);
    border-radius: 0.5rem;
    font-size: 1rem;
    font-family: 'Noto Sans SC', sans-serif;
    transition: all 0.3s;
}

.translation-input:focus {
    outline: none;
    border-color: var(--primary-light);
}

.translation-input.correct {
    border-color: var(--success);
    background: rgba(16, 185, 129, 0.05);
}

.translation-input.incorrect {
    border-color: var(--error);
    background: rgba(239, 68, 68, 0.05);
}

.translation-reference {
    padding: 0.75rem 1rem;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 0.5rem;
    color: var(--success);
    font-size: 0.9rem;
    line-height: 1.6;
}

.translation-answer {
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }

    .nav-user {
        flex-wrap: wrap;
        justify-content: center;
    }

    .hero-title {
        font-size: 2.25rem;
    }

    .hero-subtitle {
        font-size: 1.125rem;
    }

    .courses-grid {
        grid-template-columns: 1fr;
    }

    .lesson-select-grid {
        grid-template-columns: 1fr;
    }

    .select-all-buttons {
        width: 100%;
        justify-content: center;
    }

    .select-all-buttons .btn {
        flex: 1;
    }
}

