:root {
    --primary: #1F4C6B;
    --secondary: #C3A678;
    --accent: #8BA88F;
    --background: #F8F6F1;
    --text: #2C3E50;
    --card-bg: #ffffff;
}

body {
    font-family: 'Amiri', 'Scheherazade New', 'Traditional Arabic', Arial, sans-serif;
    background-color: var(--background);
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

.lesson-header h1 {
    color: var(--primary);
    font-size: 3rem;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.subtitle {
    color: var(--secondary);
    font-size: 2.5rem;
    margin-top: 0;
    font-family: 'Noto Naskh Arabic', 'Amiri', serif;
}
.letter-card {
    background: var(--card-bg);
    border-radius: 15px;
    min-height: 120px;
    padding: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    font-size: 3.5rem;
    text-align: center;
    line-height: 1.8;
    word-wrap: break-word;
    font-family: 'Noto Naskh Arabic', 'Amiri', serif;
}
.letter-card span {
    display: block;
    margin-top: 15px;
    font-size: 1.4rem;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #666;
}
.practice-card {
    font-size: 2.2rem;
    font-family: 'Noto Naskh Arabic', 'Amiri', serif;
    line-height: 1.6;
}
.lesson-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}
.lesson-header {
    text-align: center;
    margin-bottom: 3rem;
    animation: slideDown 0.8s ease-out;
}
.lesson-header h1 {
    color: var(--primary);
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}
.subtitle {
    color: var(--secondary);
    font-size: 1.8rem;
    margin-top: 0;
}
.letters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 25px;
    margin: 30px 0;
}

.letter-card {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 30px;
    font-size: 3.5rem;
    font-weight: bold;
    min-height: 150px;
    min-width: 180px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    overflow: visible;
    margin: 10px;
    height: 100%;
    box-sizing: border-box;
    word-break: keep-all;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .letter-card {
        min-height: 180px;
        min-width: 150px;
        padding: 25px;
        font-size: 3rem;
    }
    
    .letters-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 20px;
    }
}
.letter-card:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
    background: var(--secondary);
    color: white;
    z-index: 10;
}
.letter-card span {
    display: block;
    margin-top: 10px;
    font-size: 1.2rem;
}
.letter-card:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
    background: var(--secondary);
    color: white;
}
.navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 3rem;
    padding: 1rem;
    animation: fadeIn 1s ease-out;
}
.nav-btn {
    background: var(--primary);
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
}
.nav-btn:hover {
    background: var(--secondary);
    transform: translateY(-2px);
}
.practice-section {
    margin-top: 3rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    animation: fadeIn 1s ease-out;
}
.practice-section h2 {
    color: var(--primary);
    text-align: center;
    margin-bottom: 2rem;
}
.practice-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
}
.practice-card {
    background: var(--secondary);
    color: white;
    border-radius: 10px;
    padding: 1.5rem;
    text-align: center;
    font-size: 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    animation: fadeIn 0.5s ease-out forwards;
    opacity: 0;
}
.practice-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
    background: var(--primary);
}
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* Add animation delay to letter cards */
.letter-card {
    animation-delay: calc(var(--index) * 0.1s);
}
/* Responsive design */
@media (max-width: 768px) {
    .lesson-container {
        padding: 1rem;
    }
.letter-card {
    min-height: 150px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
}
.arabic-text {
    font-size: 3.5rem;
    margin-bottom: 15px;
    font-family: 'Noto Naskh Arabic', 'Amiri', serif;
}
.english-text {
    font-size: 1.2rem;
    color: #666;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    text-align: center;
    margin-top: auto;
}
}