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

:root {
    --primary-color: #3b82f6;
    --primary-dark: #2563eb;
    --secondary-color: #64748b;
    --accent-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --background: #f8fafc;
    --surface: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --gradient: linear-gradient(135deg, var(--primary-color), var(--accent-color));
}

[data-theme="dark"] {
    --primary-color: #60a5fa;
    --primary-dark: #3b82f6;
    --secondary-color: #94a3b8;
    --accent-color: #34d399;
    --danger-color: #f87171;
    --warning-color: #fbbf24;
    --background: #0f172a;
    --surface: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --border-color: #334155;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.3), 0 1px 2px 0 rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

body.font-small { font-size: 14px; }
body.font-medium { font-size: 16px; }
body.font-large { font-size: 18px; }

/* Navigation */
.navbar {
    background: var(--surface);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

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

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

.nav-btn {
    background: transparent;
    border: none;
    padding: 0.75rem 1.25rem;
    border-radius: 0.5rem;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-btn:hover {
    background: var(--background);
    color: var(--text-primary);
}

.nav-btn.active {
    background: var(--primary-color);
    color: white;
}

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

.theme-toggle,
.settings-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: false;
}

.theme-toggle:hover,
.settings-btn:hover {
    background: var(--background);
    color: var(--text-primary);
    border-color: var(--primary-color);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--background);
    border-radius: 2rem;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid var(--border-color);
}

.user-profile:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.user-profile i {
    font-size: 1.5rem;
}

.user-profile span {
    font-weight: 500;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Main Content */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.section {
    display: none;
    animation: fadeIn 0.3s ease-in;
}

.section.active {
    display: block;
}

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

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.section-header p {
    font-size: 1.125rem;
    color: var(--text-secondary);
}

/* Home Section */
.hero {
    text-align: center;
    padding: 4rem 0;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    margin-top: -60px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.stat-card {
    background: var(--surface);
    padding: 1.5rem;
    border-radius: 1rem;
    border: 2px solid var(--border-color);
    box-shadow: var(--shadow);
    text-align: center;
}

.stat-card i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-card h3 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0rem;
}

.stat-card p {
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 0px;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    padding: 0.875rem 2rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    text-decoration: none;
}

.btn.primary {
    background: var(--primary-color);
    color: white;
}

.btn.primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.btn.secondary {
    background: var(--surface);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

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

.back-btn {
    background: transparent;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

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

/* Lessons Section */
.lesson-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.category-card {
    background: var(--surface);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid var(--border-color);
}

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

.category-icon {
    width: 4rem;
    height: 4rem;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.category-icon i {
    font-size: 1.5rem;
    color: white;
}

.category-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.category-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.progress-bar {
    background: var(--background);
    height: 0.5rem;
    border-radius: 0.25rem;
    overflow: hidden;
    margin-bottom: 1rem;
}

.progress {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    height: 100%;
    transition: width 0.3s ease;
}

.lesson-count {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
}

.lessons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.lesson-item {
    background: var(--surface);
    padding: 1.5rem;
    border-radius: 0.75rem;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: all 0.2s;
    border-left: 4px solid var(--border-color);
}

.lesson-item:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.lesson-item.completed {
    border-left-color: var(--accent-color);
}

.lesson-item.current {
    border-left-color: var(--primary-color);
}

.lesson-item h4 {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.lesson-item p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Keyboard Visual */
.keyboard-visual {
    background: var(--surface);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.keyboard-row {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 0.25rem;
    justify-content: center;
}

.key {
    background: var(--background);
    border: 1px solid var(--border-color);
    border-radius: 0.25rem;
    padding: 0.5rem;
    min-width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.key.highlighted {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-dark);
}

.key.active {
    background: var(--accent-color);
    color: white;
    transform: scale(0.95);
}

/* Practice and Exercise Areas */
.practice-modes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.practice-card {
    background: var(--surface);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow);
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid var(--border-color);
}

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

.practice-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.practice-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.practice-card p {
    color: var(--text-secondary);
}

.practice-area,
.exercise-content {
    background: var(--surface);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow);
}

.practice-text,
.exercise-text {
    background: var(--background);
    padding: 2rem;
    border-radius: 0.75rem;
    font-family: 'Courier New', monospace;
    font-size: 1.125rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    min-height: 150px;
    border: 2px solid var(--border-color);
}

.practice-text .char,
.exercise-text .char {
    transition: all 0.2s ease;
    border-radius: 2px;
    padding: 1px 2px;
}

.practice-text .char.correct,
.exercise-text .char.correct {
    background-color: rgba(16, 185, 129, 0.2);
    color: var(--accent-color);
}

.practice-text .char.incorrect,
.exercise-text .char.incorrect {
    background-color: rgba(239, 68, 68, 0.2);
    color: var(--danger-color);
}

.practice-text .char.current,
.exercise-text .char.current {
    background-color: var(--primary-color);
    color: white;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.5; }
}

#practiceInput,
#exerciseInput {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    font-family: 'Courier New', monospace;
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
    resize: none;
    background: var(--background);
}

#practiceInput:focus,
#exerciseInput:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--surface);
}

.practice-stats,
.exercise-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat {
    text-align: center;
    background: var(--background);
    padding: 1rem;
    border-radius: 0.5rem;
}

.stat .label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.stat .value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.practice-controls,
.exercise-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Test Section */
.test-area {
    background: var(--surface);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.test-settings {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}

.setting-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.setting-group label {
    font-weight: 500;
    color: var(--text-secondary);
}

.setting-group select {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    background: var(--surface);
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.setting-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

#customDurationInput {
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#customDurationInput input {
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    background: var(--surface);
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: border-color 0.3s ease;
}

#customDurationInput input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

#customDurationInput span {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.test-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-item {
    background: var(--background);
    padding: 1.5rem;
    border-radius: 0.75rem;
    text-align: center;
}

.stat-label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.stat-value {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.test-text {
    background: var(--background);
    padding: 2rem;
    border-radius: 0.75rem;
    font-family: 'Courier New', monospace;
    font-size: 1.125rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    min-height: 300px;
    max-height: 400px;
    overflow-y: auto;
    border: 2px solid var(--border-color);
    word-wrap: break-word;
    white-space: pre-wrap;
    user-select: none;
    position: relative;
}

.test-text .char,
.practice-text .char,
.exercise-text .char {
    transition: all 0.2s ease;
    border-radius: 2px;
    padding: 1px 2px;
}

.test-text .char.correct,
.practice-text .char.correct,
.exercise-text .char.correct {
    background-color: rgba(34, 197, 94, 0.2);
    color: var(--accent-color);
}

.test-text .char.incorrect,
.practice-text .char.incorrect,
.exercise-text .char.incorrect {
    background-color: rgba(239, 68, 68, 0.2);
    color: var(--danger-color);
}

.test-text .char.current,
.practice-text .char.current,
.exercise-text .char.current {
    background-color: var(--primary-color);
    color: white;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.5; }
}

#testInput {
    width: 100%;
    height: 120px;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    font-family: 'Courier New', monospace;
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
    resize: none;
    background: var(--background);
}

#testInput:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--surface);
}

.test-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.test-results {
    background: linear-gradient(135deg, var(--accent-color), var(--primary-color));
    color: white;
    padding: 2rem;
    border-radius: 1rem;
    text-align: center;
}

.test-results h3 {
    font-size: 2rem;
    margin-bottom: 2rem;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.result-card {
    background: rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: 0.75rem;
    backdrop-filter: blur(10px);
    text-align: center;
}

.result-card i {
    font-size: 2rem;
    margin-bottom: 1rem;
    opacity: 0.8;
}

.result-label {
    display: block;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.result-value {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.result-unit {
    display: block;
    font-size: 0.875rem;
    opacity: 0.8;
}

.results-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.results-actions .btn {
    background: white;
    color: var(--primary-color);
}

/* Progress Section */
.progress-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.progress-card {
    background: var(--surface);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow);
    border: 2px solid var(--border-color);
    text-align: center;
}

.progress-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.progress-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.level-badge {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 1rem;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 1rem;
}

.streak-number,
.time-number {
    display: block;
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stats-charts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.chart-container {
    background: var(--surface);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow);
}

.chart-container h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-align: center;
}

.chart {
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chart-placeholder {
    text-align: center;
    color: var(--text-secondary);
}

.chart-placeholder i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.achievements h4 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 2rem;
    text-align: center;
}

.achievement-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.achievement {
    background: var(--surface);
    padding: 1.5rem;
    border-radius: 1rem;
    box-shadow: var(--shadow);
    text-align: center;
    transition: all 0.2s;
}

.achievement.unlocked {
    border: 2px solid var(--accent-color);
}

.achievement.locked {
    opacity: 0.5;
    border: 2px solid var(--border-color);
}

.achievement i {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.achievement.unlocked i {
    color: var(--accent-color);
}

.achievement.locked i {
    color: var(--text-secondary);
}

.achievement h5 {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.achievement p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--surface);
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

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

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

.modal-header h3 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
}

.close-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.25rem;
    transition: all 0.2s;
}

.close-btn:hover {
    background: var(--background);
    color: var(--text-primary);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.setting-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.setting-group label {
    font-weight: 500;
    color: var(--text-primary);
}

.setting-group input[type="text"],
.setting-group select {
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 0.25rem;
    background: var(--background);
    color: var(--text-primary);
    min-width: 150px;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border-color);
    transition: .4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--primary-color);
}

input:checked + .slider:before {
    transform: translateX(26px);
}

/* Profile Stats */
.profile-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.profile-stat {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--background);
    border-radius: 0.5rem;
}

.profile-stat i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.profile-stat .stat-label {
    display: block;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.profile-stat .stat-value {
    display: block;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.export-section {
    text-align: center;
    padding: 1.5rem;
    background: var(--background);
    border-radius: 0.5rem;
}

.export-section h4 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.export-section p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

/* Notification System */
.notification-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.notification {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1rem;
    box-shadow: var(--shadow-lg);
    max-width: 350px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: slideInRight 0.3s ease;
    transition: all 0.3s ease;
}

.notification.success {
    border-left: 4px solid var(--accent-color);
}

.notification.error {
    border-left: 4px solid var(--danger-color);
}

.notification.warning {
    border-left: 4px solid var(--warning-color);
}

.notification.info {
    border-left: 4px solid var(--primary-color);
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.notification i {
    font-size: 1.25rem;
}

.notification.success i { color: var(--accent-color); }
.notification.error i { color: var(--danger-color); }
.notification.warning i { color: var(--warning-color); }
.notification.info i { color: var(--primary-color); }

.notification-content {
    flex: 1;
}

.notification-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.notification-message {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--background);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    transition: opacity 0.5s ease;
}

.loading-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-spinner {
    text-align: center;
    color: var(--text-primary);
}

.loading-spinner i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    animation: bounce 1s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

.loading-spinner h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 1rem auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-spinner p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Recent Activity */
.recent-activity {
    margin-top: 3rem;
}

.recent-activity h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-align: center;
    color: var(--text-primary);
}

.activity-list {
    background: var(--surface);
    border-radius: 0.75rem;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.activity-item {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: background-color 0.2s;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-item:hover {
    background: var(--background);
}

.activity-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.activity-icon.lesson { background: rgba(59, 130, 246, 0.1); color: var(--primary-color); }
.activity-icon.practice { background: rgba(16, 185, 129, 0.1); color: var(--accent-color); }
.activity-icon.test { background: rgba(245, 158, 11, 0.1); color: var(--warning-color); }
.activity-icon.achievement { background: rgba(139, 69, 19, 0.1); color: #8b4513; }

.activity-content {
    flex: 1;
}

.activity-title {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.activity-meta {
    font-size: 0.875rem;
    color: var(--text-secondary);
    display: flex;
    gap: 1rem;
}

.activity-time {
    margin-left: auto;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* SEO and Hero Enhancements */
.hero-keywords {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
    justify-content: center;
}

.keyword-tag {
    background: var(--gradient);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: transform 0.2s ease;
}

.keyword-tag:hover {
    transform: translateY(-2px);
}

.seo-content {
    margin-top: 60px;
    padding: 40px 20px;
    background: var(--surface);
    border-radius: 16px;
    box-shadow: var(--shadow);
}

.seo-content h2 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--text-primary);
    font-size: 2rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.feature-item {
    text-align: center;
    padding: 20px;
    border-radius: 12px;
    background: var(--background);
    border: 2px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-item i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.feature-item h3 {
    color: var(--text-primary);
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.feature-item p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* SEO Content Styling */
.seo-hero-content {
    margin-top: 3rem;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05), rgba(16, 185, 129, 0.05));
    border-radius: 16px;
    border: 1px solid var(--border-color);
}

.keyword-rich-section h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.8rem;
    text-align: center;
}

.keyword-rich-section p {
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 2rem;
    text-align: center;
    color: var(--text-secondary);
}

.typing-test-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.feature-highlight {
    background: var(--surface);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-highlight:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.feature-highlight h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.feature-highlight p {
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
    text-align: left;
}

.typing-benefits {
    background: var(--surface);
    padding: 2rem;
    border-radius: 12px;
    margin: 2rem 0;
    box-shadow: var(--shadow);
    border: 2px solid var(--border-color);
}

.typing-benefits h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    text-align: center;
}

.benefits-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.benefits-list li {
    padding: 0.5rem 0;
    font-size: 1rem;
    line-height: 1.6;
    border-bottom: 1px solid var(--border-color);
}

.benefits-list li:last-child {
    border-bottom: none;
}

.typing-keywords-section {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: black;
    padding: 2rem;
    border-radius: 12px;
    margin: 2rem 0;
    text-align: center;
    align-items: center;
}

.typing-keywords-section h3 {
    margin-bottom: 1rem;
    color: white;
}

.typing-keywords-section p {
    width: 100%;
    font-size: 1.1rem;
    line-height: 1.7;
    /* margin: 0; */
    color: rgba(255, 255, 255, 0.95);
}
.typing-keywords-section p strong {
    color: white;
    font-weight: 800;
}

/* Hero keywords enhanced styling */
.hero-keywords {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin: 1.5rem 0;
}

.keyword-tag {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    transition: transform 0.2s ease;
}

.keyword-tag:hover {
    transform: scale(1.05);
}

/* Responsive design for SEO content */
@media (max-width: 768px) {
    .seo-hero-content {
        margin-top: 2rem;
        padding: 1.5rem;
    }
    
    .keyword-rich-section h2 {
        font-size: 1.5rem;
    }
    
    .typing-test-features {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .feature-highlight {
        padding: 1rem;
    }
    
    .hero-keywords {
        gap: 0.3rem;
    }
    
    .keyword-tag {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
}

/* Additional emphasis for strong tags in SEO content */
strong {
    color: var(--primary-color);
    font-weight: 600;
}

[data-theme="dark"] strong {
    color: var(--primary-color);
}

/* Footer Styles */
.footer {
    background: var(--surface);
    border-top: 1px solid var(--border-color);
    margin-top: 60px;
    padding: 40px 0 20px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.footer-section h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.footer-section h4 {
    color: var(--text-primary);
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.footer-section p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section ul li a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: var(--primary-color);
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    text-decoration: none;
    transition: transform 0.3s ease, background 0.3s ease;
}

.social-link:hover {
    transform: translateY(-3px);
    background: var(--primary-dark);
}

.footer-bottom {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.footer-bottom-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

.footer-bottom p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.footer-bottom a {
    color: var(--primary-color);
    text-decoration: none;
}

.footer-bottom a:hover {
    text-decoration: underline;
}

.seo-text {
    font-style: italic;
    color: var(--text-secondary);
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar {
        padding: 1rem;
        flex-wrap: wrap;
        gap: 1rem;
    }

    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
        order: 3;
        width: 100%;
    }

    .nav-controls {
        order: 2;
    }

    .main-content {
        padding: 1rem;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .section-header h2 {
        font-size: 1.75rem;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 300px;
    }

    .test-settings {
        flex-direction: column;
        align-items: center;
    }

    .results-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }

    .stats-charts {
        grid-template-columns: 1fr;
    }

    .modal-content {
        width: 95%;
        margin: 1rem;
    }

    .modal-footer {
        flex-direction: column;
    }

    .notification-container {
        left: 1rem;
        right: 1rem;
    }

    .notification {
        max-width: none;
    }

    .nav-controls {
        gap: 0.5rem;
    }

    .user-profile span {
        display: none;
    }

    .hero-keywords {
        justify-content: center;
    }
    
    .keyword-tag {
        font-size: 0.8rem;
        padding: 6px 12px;
    }
    
    .seo-content h2 {
        font-size: 1.5rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }
}
