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

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 40px;
}

header h1 {
    color: #0057b7;
    font-size: 2.5rem;
    margin-bottom: 10px;
}

main {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
}

section {
    margin-bottom: 40px;
}

h2 {
    color: #ffd700;
    background-color: #0057b7;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.5rem;
}

.alphabet-line {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 20px;
    line-height: 1.2;
}

.letter {
    background: #f9f9f9;
    border: 2px solid #ddd;
    border-radius: 6px;
    padding: 8px 10px;
    cursor: help;
    transition: all 0.2s ease;
    min-width: 80px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.letter:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    background: #fff;
}

.ukrainian {
    font-size: 1.4rem;
    font-weight: bold;
    color: #333;
    line-height: 1;
}

.latin {
    font-size: 0.9rem;
    color: #666;
    font-weight: normal;
    line-height: 1;
}

.pronunciation {
    font-size: 0.7rem;
    color: #888;
    font-style: italic;
    line-height: 1;
    margin-top: 1px;
}

.letter.vowel {
    background: #e8f4fd;
    border-color: #0057b7;
}

.letter.vowel .ukrainian {
    color: #0057b7;
}

.letter.vowel:hover {
    background: #d4edfa;
}

.letter.soft {
    background: #fff3cd;
    border-color: #ffd700;
}

.letter.soft .ukrainian {
    color: #856404;
}

.letter.soft:hover {
    background: #ffeaa7;
}

.legend {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 15px;
    font-size: 0.9rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.legend-vowel {
    color: #0057b7;
    font-size: 1.2rem;
}

.legend-consonant {
    color: #666;
    font-size: 1.2rem;
}

.legend-soft {
    color: #ffd700;
    font-size: 1.2rem;
}

.legend-note {
    font-style: italic;
    color: #666;
}

.vocabulary-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    font-size: 1rem;
}

.vocabulary-table th,
.vocabulary-table td {
    padding: 10px 8px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.vocabulary-table th {
    background-color: #0057b7;
    color: #ffd700;
    font-weight: bold;
    text-transform: uppercase;
}

.vocabulary-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.vocabulary-table tr:hover {
    background-color: #e8f4fd;
}

.vocabulary-table td:first-child {
    font-weight: bold;
    color: #0057b7;
}

.pronunciation-cell {
    font-style: italic;
    color: #666;
    font-size: 0.85rem;
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    main {
        padding: 20px;
    }

    header h1 {
        font-size: 2rem;
    }

    .alphabet-line {
        gap: 6px;
    }

    .letter {
        padding: 6px 8px;
        min-width: 60px;
    }

    .ukrainian {
        font-size: 1.2rem;
    }

    .latin {
        font-size: 0.8rem;
    }

    .pronunciation {
        font-size: 0.6rem;
    }

    .legend {
        gap: 15px;
        font-size: 0.8rem;
    }

    .vocabulary-table {
        font-size: 0.9rem;
    }

    .vocabulary-table th,
    .vocabulary-table td {
        padding: 8px 6px;
    }

    .pronunciation-cell {
        font-size: 0.75rem;
    }
}
