/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #d52b1e;
    --secondary-color: #ffffff;
    --accent-color: #0066cc;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --bg-color: #f5f5f5;
    --text-color: #333;
    --border-color: #ddd;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #a02318 100%);
    color: white;
    padding: 2rem 0;
    box-shadow: var(--shadow);
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

header .subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Navigation */
.main-nav {
    background: white;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
    margin-bottom: 2rem;
}

.main-nav .container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 1rem 20px;
}

.nav-btn {
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--border-color);
    background: white;
    color: var(--text-color);
    cursor: pointer;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-btn:hover {
    background: var(--bg-color);
    border-color: var(--accent-color);
}

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

/* Content Sections */
.content-section {
    display: none;
    animation: fadeIn 0.3s ease;
}

.content-section.active {
    display: block;
}

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

/* Welcome Card */
.welcome-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.welcome-card h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 2rem;
}

.welcome-card > p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: #666;
}

/* Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.info-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 1.5rem;
    border-radius: 10px;
    border-left: 4px solid var(--primary-color);
}

.info-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    font-size: 1.3rem;
}

.info-card .points {
    font-weight: bold;
    color: var(--accent-color);
    margin: 0.5rem 0;
}

.info-card ul {
    list-style: none;
    padding-left: 0;
}

.info-card li {
    padding: 0.25rem 0;
    color: #555;
}

/* Module Overview */
.module-overview {
    margin: 3rem 0;
}

.module-overview h3 {
    font-size: 1.8rem;
    color: var(--text-color);
    margin-bottom: 1.5rem;
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

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

.module-card {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.module-card:hover {
    border-color: var(--accent-color);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateY(-3px);
}

.module-card h4 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.module-card p {
    margin: 0.5rem 0;
    color: #555;
}

.module-card .scenario {
    background: #f0f7ff;
    padding: 0.75rem;
    border-radius: 6px;
    margin: 1rem 0;
    font-weight: 500;
    color: var(--accent-color);
}

.start-btn {
    width: 100%;
    padding: 0.875rem;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.start-btn:hover {
    background: #0052a3;
    transform: scale(1.02);
}

/* Test Info */
.test-info {
    background: #fff9e6;
    border-left: 4px solid var(--warning-color);
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 2rem;
}

.test-info h3 {
    color: #856404;
    margin-bottom: 1rem;
}

.test-info ul {
    list-style: none;
    padding-left: 0;
}

.test-info li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.test-info li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--warning-color);
    font-weight: bold;
}

/* Exercise Container */
.exercise-container {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.exercise-header {
    background: var(--primary-color);
    color: white;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.exercise-header h2 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.exercise-header .points-info {
    font-size: 1.1rem;
    opacity: 0.9;
}

.situation-box {
    background: #f0f7ff;
    border-left: 4px solid var(--accent-color);
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.situation-box h3 {
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.text-content {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
    border: 1px solid var(--border-color);
}

.text-content h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Form Elements */
.form-group {
    margin: 1.5rem 0;
}

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

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent-color);
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.question-number {
    display: inline-block;
    width: 30px;
    height: 30px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 30px;
    font-weight: bold;
    margin-right: 0.5rem;
}

/* Chat Interface */
.chat-interface {
    background: #fff;
    border: 2px solid var(--border-color);
    border-radius: 20px;
    padding: 1.5rem;
    max-width: 400px;
    margin: 1.5rem auto;
}

.chat-message {
    background: #e9ecef;
    padding: 1rem;
    border-radius: 15px;
    margin: 0.75rem 0;
    position: relative;
}

.chat-message.user {
    background: var(--accent-color);
    color: white;
    margin-left: auto;
    max-width: 80%;
}

.chat-input {
    background: #f8f9fa;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    padding: 0.75rem;
    margin: 0.5rem 0;
}

/* Submit Button */
.submit-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
    text-align: center;
}

.submit-btn {
    padding: 1rem 3rem;
    background: var(--success-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-btn:hover {
    background: #218838;
    transform: scale(1.05);
}

.submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* Results */
.results-container {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow);
    margin: 2rem 0;
}

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

.score-display {
    font-size: 3rem;
    font-weight: bold;
    color: var(--primary-color);
    margin: 1rem 0;
}

.feedback-item {
    background: #f8f9fa;
    border-left: 4px solid var(--border-color);
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 6px;
}

.feedback-item.correct {
    border-left-color: var(--success-color);
    background: #d4edda;
}

.feedback-item.incorrect {
    border-left-color: var(--danger-color);
    background: #f8d7da;
}

.feedback-item.partial {
    border-left-color: var(--warning-color);
    background: #fff3cd;
}

/* Progress Dashboard */
.progress-dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.progress-card {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.progress-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.progress-bar {
    width: 100%;
    height: 30px;
    background: #e9ecef;
    border-radius: 15px;
    overflow: hidden;
    margin: 1rem 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--success-color) 0%, #20c997 100%);
    transition: width 0.5s ease;
    border-radius: 15px;
}

.points-display {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--accent-color);
    text-align: center;
    margin: 1rem 0;
}

.module-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    margin: 0.5rem 0;
    background: #f8f9fa;
    border-radius: 6px;
}

.status-badge {
    padding: 0.35rem 0.75rem;
    border-radius: 15px;
    font-size: 0.875rem;
    font-weight: 600;
}

.status-badge.pending {
    background: #ffc107;
    color: #856404;
}

.status-badge.completed {
    background: var(--success-color);
    color: white;
}

.status-badge.in-progress {
    background: var(--accent-color);
    color: white;
}

/* Audio Player */
.audio-player {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.audio-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.play-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--accent-color);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.play-btn:hover {
    background: #0052a3;
    transform: scale(1.1);
}

.audio-timeline {
    flex: 1;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    cursor: pointer;
    position: relative;
}

.audio-progress {
    height: 100%;
    background: var(--accent-color);
    border-radius: 4px;
    transition: width 0.1s ease;
}

/* Footer */
footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
}

footer p {
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.8rem;
    }

    header {
        padding: 1rem 0;
    }

    /* Mobile Navigation - Horizontal Scrolling */
    .main-nav {
        position: sticky;
        top: 0;
        margin-bottom: 1rem;
    }

    .main-nav .container {
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 0.5rem 10px;
        gap: 0.5rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }

    .main-nav .container::-webkit-scrollbar {
        height: 4px;
    }

    .main-nav .container::-webkit-scrollbar-thumb {
        background: var(--primary-color);
        border-radius: 2px;
    }

    .nav-btn {
        flex-shrink: 0;
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
        white-space: nowrap;
        min-width: auto;
    }

    .info-grid,
    .modules,
    .progress-dashboard {
        grid-template-columns: 1fr;
    }

    .welcome-card {
        padding: 1.5rem;
    }

    .exercise-container {
        padding: 1.5rem;
    }

    .chat-interface {
        max-width: 100%;
    }

    /* Compact module cards on mobile */
    .module-card {
        padding: 1rem;
    }

    .module-card h3 {
        font-size: 1.2rem;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.coming-soon {
    text-align: center;
    padding: 3rem;
    color: #999;
    font-style: italic;
}

/* Print Styles */
@media print {
    .main-nav,
    .submit-btn,
    footer {
        display: none;
    }

    .exercise-container {
        box-shadow: none;
        border: 1px solid #000;
    }
}

/* ==================== SPEAKING MODULE STYLES ==================== */
.speaking-module {
    padding: 2rem 0;
}

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

.task-card {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.task-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.task-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.task-card p {
    color: #6c757d;
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.time-badge {
    display: inline-block;
    background: #e7f3ff;
    color: var(--primary-color);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.task-header {
    margin-bottom: 2rem;
}

.back-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    transition: background 0.3s;
}

.back-btn:hover {
    background: #5a6268;
}

.task-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

@media (max-width: 768px) {
    .task-content {
        grid-template-columns: 1fr;
    }
}

.task-instructions {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 12px;
}

.task-points {
    list-style: none;
    padding-left: 0;
    margin: 1rem 0;
}

.task-points li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.task-points li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: bold;
}

.tip-box {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 4px;
}

.time-requirement {
    background: #e7f3ff;
    padding: 0.75rem;
    border-radius: 6px;
    margin-top: 1rem;
}

.recording-area {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    border: 2px solid #e9ecef;
}

.recording-controls {
    display: flex;
    gap: 1rem;
    margin: 1.5rem 0;
}

.record-btn {
    flex: 1;
    padding: 1rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.record-btn:not(.stop-btn) {
    background: var(--success-color);
    color: white;
}

.record-btn:not(.stop-btn):hover {
    background: #218838;
    transform: scale(1.02);
}

.record-btn.stop-btn {
    background: var(--danger-color);
    color: white;
}

.record-btn.stop-btn:hover {
    background: #c82333;
    transform: scale(1.02);
}

.btn-icon {
    font-size: 1.3rem;
}

.recording-status {
    margin: 1rem 0;
    min-height: 30px;
}

.recording-status .success {
    color: var(--success-color);
    font-weight: 600;
}

.recording-status .error {
    color: var(--danger-color);
    padding: 1rem;
    background: #f8d7da;
    border-radius: 6px;
}

.timer-display {
    text-align: center;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 1rem 0;
}

.recording-indicator {
    color: var(--danger-color);
    font-weight: bold;
    font-size: 1.2rem;
    margin-right: 1rem;
    animation: blink 1.5s infinite;
}

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

#timer {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
    font-family: 'Courier New', monospace;
}

.playback-area {
    margin: 2rem 0;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.playback-area h4 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

#audio-playback {
    width: 100%;
    margin: 1rem 0;
}

.playback-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.action-btn {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid #dee2e6;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

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

.self-check {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #e7f3ff;
    border-radius: 8px;
}

.self-check h4 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background 0.3s;
}

.checkbox-group label:hover {
    background: rgba(255,255,255,0.5);
}

.checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.checkbox-group span {
    flex: 1;
}

.info-text {
    background: #e7f3ff;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    border-left: 4px solid var(--primary-color);
}

/* ==================== NEW HOME LAYOUT ==================== */
.module-section {
    margin: 2rem 0;
    padding: 1.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.section-title {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.section-info {
    color: #6c757d;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.modules-horizontal {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.module-card-compact {
    flex: 1;
    min-width: 140px;
    max-width: 180px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 1.25rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.module-card-compact:hover {
    border-color: var(--primary-color);
    background: white;
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.1);
}

.module-number {
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: bold;
    margin: 0 auto 0.75rem;
}

.module-card-compact h4 {
    font-size: 1rem;
    margin: 0.5rem 0;
    color: var(--text-color);
}

.module-points {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent-color);
    margin: 0.25rem 0;
}

.module-desc {
    font-size: 0.85rem;
    color: #6c757d;
    margin: 0.25rem 0;
}

@media (max-width: 768px) {
    .modules-horizontal {
        justify-content: center;
    }
    
    .module-card-compact {
        min-width: 120px;
        max-width: 150px;
    }
}

/* ==================== AMHARIC TRANSLATION TOGGLE ==================== */
.main-nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-left {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    flex: 1;
}

.nav-right {
    margin-left: 1rem;
}

.amharic-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    background: white;
    border: 2px solid #dee2e6;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.amharic-toggle:hover {
    border-color: var(--primary-color);
    background: #f8f9fa;
}

.amharic-toggle.active {
    background: var(--success-color);
    border-color: var(--success-color);
    color: white;
}

.amharic-toggle .flag {
    font-size: 1.3rem;
}

.amharic-toggle .toggle-label {
    font-size: 0.9rem;
}

.amharic-toggle .toggle-text {
    font-size: 0.85rem;
    padding: 0.2rem 0.5rem;
    background: rgba(0,0,0,0.1);
    border-radius: 12px;
}

.amharic-toggle.active .toggle-text {
    background: rgba(255,255,255,0.3);
}

/* Translation wrapper */
.translation-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.de-text {
    color: var(--text-color);
}

.am-translation {
    color: #6c757d;
    font-size: 0.9em;
    font-style: italic;
    padding-left: 0.5rem;
    border-left: 3px solid #ffc107;
    margin-top: 0.25rem;
}

/* For inline translations */
.inline-translation {
    display: inline-flex;
    flex-direction: column;
    gap: 0.1rem;
}

.inline-translation .am-translation {
    font-size: 0.85em;
    padding-left: 0;
    border-left: none;
}

@media (max-width: 768px) {
    .main-nav .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-left {
        width: 100%;
    }
    
    .nav-right {
        width: 100%;
        margin-left: 0;
    }
    
    .amharic-toggle {
        width: 100%;
        justify-content: center;
    }
}

/* ==================== LESE-KARAOKE MODULE ==================== */
.karaoke-module {
    padding: 2rem 0;
}

/* New List Layout for Texts */
.text-list-container {
    margin: 2rem 0;
}

.text-item {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.text-item:hover {
    border-color: var(--accent-color);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.text-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #f1f3f5;
}

.text-header h3 {
    color: var(--text-color);
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.text-number {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.3rem;
}

.audio-btn-small {
    padding: 0.6rem 1rem;
    background: linear-gradient(135deg, var(--accent-color) 0%, #0052a3 100%);
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 102, 204, 0.3);
}

.audio-btn-small:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.4);
}

.text-content-box {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 10px;
    border-left: 4px solid var(--primary-color);
}

.de-text-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-color);
    margin-bottom: 0;
}

.am-text-content {
    font-size: 1rem;
    line-height: 1.7;
    color: #6c757d;
    font-style: italic;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px dashed #dee2e6;
}

/* Old styles - kept for compatibility */
.karaoke-text-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.karaoke-text-card {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.karaoke-text-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.karaoke-text-card.active {
    border-color: var(--primary-color);
    background: #e7f3ff;
}

.karaoke-text-card h4 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.text-preview {
    font-size: 0.85rem;
    color: #6c757d;
    margin: 0;
}

.karaoke-player {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-top: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.text-display {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 10px;
    margin: 1.5rem 0;
    border-left: 4px solid var(--primary-color);
}

.de-text-large {
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--text-color);
    margin-bottom: 1rem;
}

.am-text-large {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #6c757d;
    font-style: italic;
    padding-top: 1rem;
    border-top: 2px dashed #dee2e6;
}

.karaoke-controls {
    display: flex;
    gap: 1rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.karaoke-btn {
    flex: 1;
    min-width: 150px;
    padding: 1rem 1.5rem;
    border: 2px solid #dee2e6;
    background: white;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.karaoke-btn:hover {
    border-color: var(--primary-color);
    background: #f8f9fa;
}

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

.karaoke-btn.primary:hover {
    background: #0056b3;
}

#karaoke-recording-area {
    background: #e7f3ff;
    padding: 1.5rem;
    border-radius: 10px;
    margin: 2rem 0;
}

#karaoke-recording-area h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

#karaoke-audio-playback {
    width: 100%;
    margin: 1rem 0;
}

.karaoke-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.karaoke-tips {
    background: #fff3cd;
    padding: 1.5rem;
    border-radius: 10px;
    margin-top: 2rem;
    border-left: 4px solid #ffc107;
}

.karaoke-tips h4 {
    color: #856404;
    margin-bottom: 1rem;
}

.karaoke-tips ul {
    margin: 0;
    padding-left: 1.5rem;
}

.karaoke-tips li {
    margin: 0.5rem 0;
    color: #856404;
}

@media (max-width: 768px) {
    .karaoke-controls {
        flex-direction: column;
    }
    
    .karaoke-btn {
        min-width: 100%;
    }
}

/* ==================== DIKTAT MODULE - VERBESSERT ==================== */

.diktat-module {
    max-width: 900px;
    margin: 0 auto;
    padding: 1rem;
}

/* Progress Dashboard for Diktat */
.progress-dashboard-diktat {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 16px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.progress-dashboard-diktat h3 {
    text-align: center;
    color: var(--text-color);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

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

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}

.stat-card.stat-success {
    border-top: 4px solid var(--success-color);
}

.stat-card.stat-error {
    border-top: 4px solid var(--danger-color);
}

.stat-card.stat-rate {
    border-top: 4px solid var(--accent-color);
}

.stat-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.9rem;
    color: #6c757d;
    font-weight: 500;
}

.level-progress {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.level-bar {
    margin-bottom: 1.5rem;
}

.level-bar:last-child {
    margin-bottom: 0;
}

.level-label {
    display: block;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.progress-bar-container {
    position: relative;
    background: #e9ecef;
    border-radius: 20px;
    height: 30px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-color) 0%, var(--primary-color) 100%);
    border-radius: 20px;
    transition: width 0.6s ease;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 0.75rem;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-color);
    z-index: 1;
}

/* Print Buttons */
.print-btn {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
    margin-top: 1rem;
}

.print-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
}

.print-btn-secondary {
    background: linear-gradient(135deg, #0066cc 0%, #0052a3 100%);
    box-shadow: 0 2px 8px rgba(0, 102, 204, 0.3);
}

/* ==================== GRAMMAR MODULE STYLES ==================== */

.grammar-module {
    max-width: 1400px;
    margin: 0 auto;
}

.grammar-level-tabs {
    display: flex;
    gap: 1rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.level-tab {
    padding: 1rem 2rem;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.level-tab:hover {
    border-color: var(--accent-color);
    transform: translateY(-2px);
}

.level-tab.active {
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--primary-color) 100%);
    color: white;
    border-color: var(--accent-color);
}

.grammar-topics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.grammar-topic-card {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 16px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.grammar-topic-card:hover {
    border-color: var(--accent-color);
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 102, 204, 0.15);
}

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

.topic-level-badge {
    background: linear-gradient(135deg, #e7f3ff 0%, #cce5ff 100%);
    color: var(--accent-color);
    padding: 0.4rem 0.9rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
}

.topic-progress {
    font-weight: 600;
    color: var(--accent-color);
    font-size: 0.9rem;
}

.grammar-topic-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.topic-explanation {
    font-size: 0.9rem;
    color: #6c757d;
    line-height: 1.5;
    margin-top: 1rem;
}

.topic-explanation-am {
    margin-top: 0.5rem;
    font-style: italic;
}

.progress-bar {
    background: #e9ecef;
    border-radius: 10px;
    height: 8px;
    overflow: hidden;
    margin: 1rem 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-color) 0%, var(--primary-color) 100%);
    border-radius: 10px;
    transition: width 0.6s ease;
}

/* Grammar Exercise Container */
.grammar-exercise-container {
    max-width: 900px;
    margin: 0 auto;
}

.exercise-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: white;
    border-radius: 16px;
    border: 2px solid #e9ecef;
}

.exercise-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.exercise-info h2 {
    color: var(--primary-color);
    margin: 0;
}

.exercise-counter {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--accent-color);
}

.explanation-box {
    background: linear-gradient(135deg, #fff9e6 0%, #fff4cc 100%);
    border-left: 4px solid #ffc107;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.explanation-box h3 {
    color: #856404;
    margin-bottom: 0.75rem;
}

.explanation-box p {
    color: #856404;
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.exercise-box {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.exercise-question h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.question-text {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--text-color);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.exercise-tip {
    background: #e7f3ff;
    color: var(--accent-color);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.95rem;
    margin-top: 1rem;
}

/* Article Color Coding */
.article-der {
    color: #0066cc;
    font-weight: 700;
    padding: 0.2rem 0.4rem;
    background: rgba(0, 102, 204, 0.1);
    border-radius: 4px;
}

.article-die {
    color: #d52b1e;
    font-weight: 700;
    padding: 0.2rem 0.4rem;
    background: rgba(213, 43, 30, 0.1);
    border-radius: 4px;
}

.article-das {
    color: #28a745;
    font-weight: 700;
    padding: 0.2rem 0.4rem;
    background: rgba(40, 167, 69, 0.1);
    border-radius: 4px;
}

/* Multiple Choice Options */
.multiple-choice-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}

.choice-btn {
    padding: 1.25rem;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 1.1rem;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s ease;
}

.choice-btn:hover:not(:disabled) {
    border-color: var(--accent-color);
    transform: translateX(8px);
    background: #f8f9fa;
}

.choice-btn.correct {
    border-color: #28a745;
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
}

.choice-btn.wrong {
    border-color: #dc3545;
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
}

.choice-btn:disabled {
    cursor: not-allowed;
}

/* Text Answer Box */
.text-answer-box {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.grammar-input {
    flex: 1;
    padding: 1rem;
    font-size: 1.1rem;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.grammar-input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.grammar-input.correct {
    border-color: #28a745;
    background: #d4edda;
}

.grammar-input.wrong {
    border-color: #dc3545;
    background: #f8d7da;
}

.check-btn {
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--primary-color) 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.check-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
}

.check-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Exercise Feedback */
.exercise-feedback {
    margin-top: 1.5rem;
}

.feedback-correct {
    padding: 1rem;
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border-left: 4px solid #28a745;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
}

.feedback-wrong {
    padding: 1rem;
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border-left: 4px solid #dc3545;
    border-radius: 8px;
    font-size: 1.1rem;
}

/* Exercise Navigation */
.exercise-navigation {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.nav-btn {
    padding: 1rem 2rem;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-btn:hover:not(:disabled) {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.nav-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.nav-btn.primary {
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--primary-color) 100%);
    color: white;
    border: none;
}

.nav-btn.primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
}

/* Grammar Results */
.grammar-results {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.results-header {
    background: white;
    border-radius: 20px;
    padding: 3rem 2rem;
    border: 2px solid #e9ecef;
    margin-bottom: 2rem;
}

.results-emoji {
    font-size: 5rem;
    margin-bottom: 1rem;
}

.results-header h2 {
    color: var(--primary-color);
    margin-bottom: 2rem;
}

.results-stats {
    margin-top: 2rem;
}

.stat-big {
    font-size: 3rem;
    font-weight: 700;
    color: var(--accent-color);
}

.stat-percentage {
    font-size: 1.5rem;
    color: #6c757d;
    margin-top: 0.5rem;
}

.results-details {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    border: 2px solid #e9ecef;
    margin-bottom: 2rem;
}

.results-details h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.results-breakdown {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
}

.result-item {
    padding: 0.75rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

.result-item.correct {
    background: #d4edda;
    color: #155724;
}

.result-item.wrong {
    background: #f8d7da;
    color: #721c24;
}

.result-icon {
    font-size: 1.2rem;
}

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

.btn-secondary, .btn-primary {
    padding: 1.25rem 2.5rem;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary {
    background: white;
    border: 2px solid #e9ecef;
    color: var(--text-color);
}

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

.btn-primary {
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--primary-color) 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 102, 204, 0.3);
}

.print-btn-secondary:hover {
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.4);
}

.print-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin: 1.5rem 0;
}

.diktat-controls {
    display: flex;
    gap: 1rem;
    margin: 2rem 0;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 140px;
}

.filter-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

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

.diktat-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.diktat-card {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.diktat-card.correct {
    border-color: var(--success-color);
    background: #f0fdf4;
}

.diktat-card.incorrect {
    border-color: #ffc107;
    background: #fffbf0;
}

.diktat-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f0f0f0;
}

.diktat-number {
    font-weight: 700;
    color: var(--text-color);
    font-size: 1.1rem;
}

.diktat-level {
    padding: 0.4rem 1rem;
    border-radius: 15px;
    font-size: 0.9rem;
    font-weight: 600;
}

.level-a1 {
    background: #d1f4ff;
    color: #0066cc;
}

.level-a2 {
    background: #ffe5b4;
    color: #cc6600;
}

.diktat-category {
    color: #6c757d;
    font-size: 1rem;
    font-weight: 500;
}

.diktat-points {
    margin-left: auto;
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.diktat-audio {
    margin: 1.25rem 0;
}

.audio-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.85rem 1.8rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.audio-btn:hover {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,123,255,0.3);
}

.audio-btn:active {
    transform: translateY(0);
}

.am-translation-small {
    color: #6c757d;
    font-size: 0.9rem;
    font-style: italic;
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.diktat-input-area {
    margin: 1.5rem 0;
}

.diktat-label {
    display: block;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-color);
    margin-bottom: 0.6rem;
}

.correct-label {
    color: var(--success-color);
    margin-top: 1.25rem;
}

.diktat-input {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    line-height: 1.6;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-family: inherit;
    resize: vertical;
    transition: all 0.3s ease;
    min-height: 90px;
}

.diktat-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(0,123,255,0.1);
}

.diktat-input:disabled {
    background: #f8f9fa;
    color: #495057;
    border-color: #dee2e6;
}

.diktat-correct-text {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    line-height: 1.6;
    border: 2px solid var(--success-color);
    border-radius: 10px;
    background: #f0fdf4;
    color: var(--success-color);
    font-weight: 600;
    min-height: 90px;
    display: flex;
    align-items: center;
}

.check-btn {
    margin-top: 1rem;
    padding: 0.85rem 2rem;
    background: var(--success-color);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.check-btn:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(40,167,69,0.3);
}

.diktat-result {
    margin-top: 1.5rem;
    padding: 1.25rem;
    border-radius: 10px;
    border-left: 4px solid;
}

.result-correct {
    background: #f0fdf4;
    border-color: var(--success-color);
}

.result-incorrect {
    background: #fffbf0;
    border-color: #ffc107;
}

.result-status {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

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

.result-incorrect .result-status {
    color: #cc6600;
}

.error-comparison {
    background: white;
    padding: 1rem;
    border-radius: 10px;
    margin: 1rem 0;
    border: 2px solid #f0f0f0;
}

.error-intro {
    font-weight: 600;
    color: #6c757d;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.word-comparison {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 1.1rem;
    line-height: 1.8;
}

.word-ok {
    color: var(--success-color);
    font-weight: 700;
    font-size: 1.2rem;
}

.word-error {
    color: #dc3545;
    font-weight: 700;
    background: #fff5f5;
    padding: 0.3rem 0.8rem;
    border-radius: 6px;
    border: 2px solid #dc3545;
    cursor: help;
    display: inline-block;
}

.word-missing {
    color: #dc3545;
    font-weight: 700;
    background: #fff5f5;
    padding: 0.3rem 0.8rem;
    border-radius: 6px;
    border: 2px dashed #dc3545;
    font-style: italic;
}

.diktat-tip {
    background: #e7f3ff;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    border-left: 4px solid var(--primary-color);
    font-size: 0.95rem;
    line-height: 1.5;
}

.diktat-tip strong {
    color: var(--primary-color);
}

.retry-btn {
    padding: 0.7rem 1.5rem;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.retry-btn:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Responsive Design für Diktat */
@media (max-width: 768px) {
    .diktat-module {
        padding: 1rem 0.5rem;
    }

    .progress-dashboard-diktat {
        padding: 1.25rem;
        margin: 1.5rem 0;
    }

    .progress-dashboard-diktat h3 {
        font-size: 1.3rem;
        margin-bottom: 1.25rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
        margin-bottom: 1.5rem;
    }

    .stat-card {
        padding: 1rem;
    }

    .stat-icon {
        font-size: 1.5rem;
        margin-bottom: 0.4rem;
    }

    .stat-value {
        font-size: 1.4rem;
    }

    .stat-label {
        font-size: 0.85rem;
    }

    .level-progress {
        padding: 1.25rem;
    }

    .level-bar {
        margin-bottom: 1.25rem;
    }

    .level-label {
        font-size: 0.95rem;
        margin-bottom: 0.6rem;
    }

    .progress-bar-container {
        height: 26px;
    }

    .progress-text {
        font-size: 0.85rem;
    }

    .diktat-card {
        padding: 1.5rem;
    }

    .diktat-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .diktat-points {
        margin-left: 0;
    }

    .filter-btn {
        flex: 1;
        min-width: 140px;
        font-size: 1rem;
        padding: 0.9rem 1.5rem;
    }

    .word-comparison {
        font-size: 1rem;
        gap: 0.8rem;
    }

    .diktat-input,
    .diktat-correct-text {
        font-size: 1rem;
        padding: 1.2rem;
    }
}

/* Lese-Übung Niveau-Badge */
.text-level {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: #e7f3ff;
    color: var(--primary-color);
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-left: 0.5rem;
}

/* ==================== PERSONALISIERTE BEGRÜSSUNG ==================== */

.welcome-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 2.5rem;
    margin-bottom: 2.5rem;
    color: white;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.greeting-section {
    text-align: center;
    margin-bottom: 2rem;
}

.greeting-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: white;
}

.greeting-subtitle {
    font-size: 1.2rem;
    opacity: 0.95;
    font-weight: 500;
}

.daily-quote {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.quote-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.quote-content {
    flex: 1;
}

.quote-text {
    font-size: 1.15rem;
    font-style: italic;
    line-height: 1.6;
    margin: 0;
    color: white;
}

.learning-tips {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.tips-title {
    color: white;
    font-size: 1.3rem;
    margin-bottom: 1.25rem;
    font-weight: 700;
}

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

.tip-card {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    padding: 1.25rem;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.tip-card:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-3px);
}

.tip-emoji {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.75rem;
}

.tip-card p {
    margin: 0;
    color: white;
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.4;
}

.modules-overview-title {
    text-align: center;
    margin: 3rem 0 2.5rem 0;
}

.modules-overview-title h2 {
    font-size: 2rem;
    color: var(--text-color);
    font-weight: 700;
}

/* Large Module Cards Grid */
.modules-grid-large {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin: 2rem 0 3rem 0;
}

.module-card-large {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 16px;
    padding: 2.5rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.module-card-large:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(213, 43, 30, 0.15);
}

.module-card-large.module-card-coming-soon {
    opacity: 0.7;
    cursor: default;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.module-card-large.module-card-coming-soon:hover {
    transform: none;
    border-color: #e9ecef;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.module-icon {
    font-size: 4rem;
    margin-bottom: 1.25rem;
    line-height: 1;
}

.module-card-large h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0.75rem 0;
    line-height: 1.3;
}

.module-card-coming-soon h3 {
    color: #6c757d;
}

.module-description {
    color: #6c757d;
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0.75rem 0 0 0;
}

.coming-soon-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
    color: white;
    padding: 0.4rem 0.9rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Responsive Design für Begrüssung */
@media (max-width: 768px) {
    .welcome-banner {
        padding: 1.25rem;
        margin-bottom: 1.5rem;
    }

    .greeting-section {
        margin-bottom: 1.25rem;
    }

    .greeting-title {
        font-size: 1.6rem;
    }

    .greeting-subtitle {
        font-size: 0.95rem;
    }

    .daily-quote {
        flex-direction: column;
        text-align: center;
        padding: 1rem;
        margin-bottom: 1.25rem;
    }

    .quote-icon {
        font-size: 2rem;
    }

    .quote-text {
        font-size: 0.95rem;
    }

    .learning-tips {
        padding: 1rem;
    }

    .tips-title {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }

    .tips-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .tip-card {
        padding: 1rem;
    }

    .tip-emoji {
        font-size: 1.75rem;
        margin-bottom: 0.5rem;
    }

    .tip-card p {
        font-size: 0.9rem;
    }

    .modules-overview-title {
        margin: 2rem 0 1.5rem 0;
    }

    .modules-overview-title h2 {
        font-size: 1.5rem;
    }

    /* Large module cards on mobile */
    .modules-grid-large {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin: 1.5rem 0 2rem 0;
    }

    .module-card-large {
        padding: 2rem 1.5rem;
        min-height: 180px;
    }

    .module-icon {
        font-size: 3rem;
        margin-bottom: 1rem;
    }

    .module-card-large h3 {
        font-size: 1.3rem;
    }

    .module-description {
        font-size: 0.9rem;
    }

    .coming-soon-badge {
        font-size: 0.7rem;
        padding: 0.35rem 0.75rem;
    }

    /* Reduce container padding on mobile */
    .container {
        padding: 0 15px;
    }

    /* Text list mobile */
    .text-item {
        padding: 1.25rem;
        margin-bottom: 1.25rem;
    }

    .text-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .text-header h3 {
        font-size: 1.1rem;
    }

    .text-number {
        font-size: 1.2rem;
    }

    .audio-btn-small {
        width: 100%;
        padding: 0.75rem 1rem;
    }

    .text-content-box {
        padding: 1.25rem;
    }

    .de-text-content {
        font-size: 1rem;
    }

    .am-text-content {
        font-size: 0.95rem;
    }
}


/* ==================== DRUCKZENTRUM STYLES ==================== */

.druckzentrum-module {
    max-width: 1400px;
    margin: 0 auto;
}

.print-category {
    margin: 3rem 0;
}

.category-header {
    margin-bottom: 2rem;
}

.category-header h3 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.category-header p {
    color: #6c757d;
    font-size: 1.1rem;
}

.materials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.material-card {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.3s ease;
    position: relative;
}

.material-card:hover {
    border-color: var(--accent-color);
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 102, 204, 0.15);
}

.material-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.material-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: linear-gradient(135deg, #e7f3ff 0%, #cce5ff 100%);
    color: var(--accent-color);
    padding: 0.4rem 0.9rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
}

.material-card h4 {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.material-description {
    color: #6c757d;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.material-meta {
    display: flex;
    gap: 1rem;
    margin: 1rem 0;
    color: #6c757d;
    font-size: 0.9rem;
}

.download-btn {
    display: block;
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    text-align: center;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    margin-top: 1.5rem;
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.print-info-box {
    background: linear-gradient(135deg, #fff9e6 0%, #fff4cc 100%);
    border-left: 4px solid #ffc107;
    padding: 2rem;
    border-radius: 12px;
    margin: 3rem 0;
}

.print-info-box h3 {
    color: #856404;
    margin-bottom: 1rem;
}

.print-info-box ul {
    list-style: none;
    padding: 0;
}

.print-info-box li {
    color: #856404;
    padding: 0.5rem 0;
    font-size: 1rem;
    line-height: 1.6;
}

/* ==================== GOOGLE TRANSLATE WIDGET ==================== */

.translator-section {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 16px;
    padding: 2rem;
    margin: 3rem 0;
}

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

.translator-header h3 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.translator-header p {
    color: #6c757d;
    font-size: 1.1rem;
}

.translator-container {
    max-width: 900px;
    margin: 0 auto;
}

.translator-iframe {
    width: 100%;
    height: 500px;
    border: none;
    border-radius: 12px;
    background: #f8f9fa;
}

.translator-tips {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.translator-tip {
    background: #e7f3ff;
    padding: 1rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.translator-tip-icon {
    font-size: 1.5rem;
}

.translator-tip-text {
    color: var(--accent-color);
    font-size: 0.9rem;
    font-weight: 500;
}

/* Updated Translator Button Styles */
.translator-open-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2rem;
    background: linear-gradient(135deg, #4285f4 0%, #34a853 100%);
    border-radius: 16px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(66, 133, 244, 0.3);
}

.translator-open-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(66, 133, 244, 0.4);
}

.translator-icon {
    font-size: 3.5rem;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.translator-button-content {
    flex: 1;
    margin: 0 2rem;
}

.translator-button-content h4 {
    color: white;
    font-size: 1.5rem;
    margin: 0 0 0.5rem 0;
}

.translator-button-content p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    margin: 0;
}

.translator-arrow {
    font-size: 2rem;
    color: white;
    transition: transform 0.3s ease;
}

.translator-open-btn:hover .translator-arrow {
    transform: translateX(8px);
}

@media (max-width: 768px) {
    .translator-open-btn {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .translator-button-content {
        margin: 0;
    }

    .translator-arrow {
        display: none;
    }
}

/* ==================== GOOGLE TRANSLATE ELEMENT STYLES ==================== */

#google_translate_element {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    border: 2px solid #e9ecef;
    margin-bottom: 1.5rem;
}

/* Style the Google Translate dropdown */
.goog-te-combo {
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    background: white;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 300px;
}

.goog-te-combo:hover {
    border-color: var(--accent-color);
}

.goog-te-combo:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

/* Hide Google Translate banner */
.goog-te-banner-frame {
    display: none !important;
}

body {
    top: 0 !important;
}

/* Style the gadget */
.goog-te-gadget {
    font-family: inherit !important;
    color: var(--text-color) !important;
}

.goog-te-gadget-simple {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
}

/* External link button */
.translator-external-link {
    text-align: center;
    margin-top: 1.5rem;
}

.external-link-btn {
    display: inline-block;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #4285f4 0%, #34a853 100%);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(66, 133, 244, 0.3);
}

.external-link-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(66, 133, 244, 0.4);
}

/* Remove powered by Google text styling */
.goog-logo-link {
    display: none !important;
}

.goog-te-gadget span {
    display: none !important;
}

/* Make it more prominent */
#google_translate_element select {
    font-size: 1.1rem !important;
    padding: 0.75rem !important;
}

@media (max-width: 768px) {
    #google_translate_element {
        padding: 1.5rem;
    }

    .goog-te-combo {
        max-width: 100%;
    }
}

/* ==================== NEW TRANSLATOR STYLES ==================== */

.language-selector {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    justify-content: center;
}

.language-select-box {
    flex: 1;
    max-width: 300px;
}

.language-select-box select {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    background: white;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

.language-select-box select:hover {
    border-color: var(--accent-color);
}

.language-select-box select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.swap-btn {
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--primary-color) 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
}

.swap-btn:hover {
    transform: rotate(180deg);
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
}

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

.translation-input-area,
.translation-output-area {
    display: flex;
    flex-direction: column;
}

.textarea-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.textarea-header label {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.clear-btn,
.copy-btn {
    padding: 0.5rem 1rem;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 600;
}

.clear-btn:hover {
    background: #dc3545;
    color: white;
    border-color: #dc3545;
}

.copy-btn:hover {
    background: #28a745;
    color: white;
    border-color: #28a745;
}

#sourceText,
#targetText {
    width: 100%;
    padding: 1.25rem;
    font-size: 1.1rem;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    resize: vertical;
    font-family: inherit;
    line-height: 1.6;
    transition: all 0.3s ease;
}

#sourceText:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

#targetText {
    background: #f8f9fa;
    cursor: not-allowed;
}

@media (max-width: 768px) {
    .translation-box {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .language-selector {
        flex-direction: column;
    }

    .language-select-box {
        max-width: 100%;
        width: 100%;
    }

    .swap-btn {
        transform: rotate(90deg);
    }

    .swap-btn:hover {
        transform: rotate(270deg);
    }
}
