html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
}

/* Headings */
h1:focus {
    outline: none;
}

/* Links */
a, .btn-link {
    color: #0071c1;
    text-decoration: none;
}

    a:hover {
        text-decoration: underline;
    }

/* Buttons */
.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

/* Page content */
.content {
    padding-top: 1.1rem;
}

/* Validation */
.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

/* Blazor error UI */
#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

/* --- Loader removed completely --- */
/* No .loading-progress */
/* No .loading-progress-text */
/* No circles */
/* No spinner */
.subjects-title {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 30px;
}

.subjects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.subject-card {
    background: #ffffff;
    border-radius: 14px;
    padding: 25px;
    text-align: center;
    text-decoration: none;
    color: #222;
    font-size: 1.4rem;
    font-weight: 600;
    border: 1px solid #e5e5e5;
    transition: 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

    .subject-card:hover {
        transform: translateY(-4px);
        background: #f5f5f5;
    }

    .subject-card .icon {
        font-size: 40px;
    }

    .subject-card .label {
        font-size: 1.3rem;
    }

    /* Цвета */
    .subject-card.suomi {
        border-left: 6px solid #0A4FFF;
    }

    .subject-card.english {
        border-left: 6px solid #D62828;
    }

    .subject-card.math {
        border-left: 6px solid #2A9D8F;
    }

    .subject-card.coding {
        border-left: 6px solid #6A4CFF;
    }
/* Top bar */
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #0A4FFF;
    padding: 12px 25px;
    color: white;
    font-size: 1.2rem;
}

/* Logo */
.logo {
    font-size: 1.5rem;
    font-weight: 700;
}

/* Menu */
.menu {
    display: flex;
    gap: 20px;
}

.menu-item {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 6px 10px;
    border-radius: 6px;
    transition: 0.2s;
}

    .menu-item:hover {
        background: rgba(255, 255, 255, 0.2);
    }

.menu-item-active {
    background: rgba(255, 255, 255, 0.35);
}

/* Main content */
.main-content {
    padding: 25px;
}
.levels-column {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-top: 25px;
}

.level-item {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #ffffff;
    border: 1px solid #e5e5e5;
    padding: 16px 20px;
    border-radius: 10px;
    text-decoration: none;
    color: #222;
    font-size: 1.2rem;
    font-weight: 600;
    transition: 0.2s;
}

    .level-item:hover {
        background: #f5f5f5;
        transform: translateX(4px);
    }

    .level-item .icon {
        font-size: 32px;
    }

    .level-item .text {
        font-size: 1.2rem;
    }
.lesson-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.lesson-intro {
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.lesson-block {
    background: #ffffff;
    padding: 18px;
    border-radius: 10px;
    border: 1px solid #e5e5e5;
    margin-bottom: 25px;
}

.ai-output {
    background: #f0f8ff;
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
    border: 1px solid #cce6ff;
}
.lessons-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 25px;
}

.lesson-item {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #ffffff;
    border: 1px solid #e5e5e5;
    padding: 14px 18px;
    border-radius: 10px;
    text-decoration: none;
    color: #222;
    font-size: 1.2rem;
    font-weight: 600;
    transition: 0.2s;
}

    .lesson-item:hover {
        background: #f5f5f5;
        transform: translateX(4px);
    }

.lesson-icon {
    font-size: 1.8rem;
}

.lesson-text {
    flex-grow: 1;
}
.quiz-block {
    margin-top: 20px;
}

.quiz-question {
    margin-bottom: 25px;
    padding: 15px;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    background: #fff;
}

.quiz-text {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.quiz-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.quiz-btn {
    padding: 10px 16px;
    border-radius: 8px;
    border: 1px solid #ccc;
    background: #f5f5f5;
    cursor: pointer;
    font-size: 1rem;
    transition: 0.2s;
}

    .quiz-btn:hover {
        background: #e8e8e8;
    }

.quiz-result {
    margin-top: 10px;
    font-weight: bold;
}
.dialog-input {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 1rem;
    resize: vertical;
    margin-bottom: 10px;
}

.dialog-output {
    margin-top: 15px;
    padding: 15px;
    background: #f0f8ff;
    border-radius: 8px;
    border: 1px solid #cce6ff;
}
.lesson-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.lesson-intro {
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.lesson-block {
    background: #ffffff;
    padding: 18px;
    border-radius: 10px;
    border: 1px solid #e5e5e5;
    margin-bottom: 25px;
}

.quiz-block {
    margin-top: 20px;
}

.quiz-question {
    margin-bottom: 25px;
    padding: 15px;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    background: #fff;
}

.quiz-text {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.quiz-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.quiz-btn {
    padding: 10px 16px;
    border-radius: 8px;
    border: 1px solid #ccc;
    background: #f5f5f5;
    cursor: pointer;
    font-size: 1rem;
    transition: 0.2s;
}

    .quiz-btn:hover {
        background: #e8e8e8;
    }

.quiz-result {
    margin-top: 10px;
    font-weight: bold;
}

.dialog-input {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 1rem;
    resize: vertical;
    margin-bottom: 10px;
}

.dialog-output {
    margin-top: 15px;
    padding: 15px;
    background: #f0f8ff;
    border-radius: 8px;
    border: 1px solid #cce6ff;
}

.ai-output {
    background: #f0f8ff;
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
    border: 1px solid #cce6ff;
}
/* ============================
   📱 MOBILE ADAPTIVE VERSION
   ============================ */

@media (max-width: 600px) {

    /* Заголовок урока */
    .lesson-title {
        font-size: 1.4rem;
        line-height: 1.3;
        text-align: center;
        margin-bottom: 15px;
    }

    /* Введение */
    .lesson-intro {
        font-size: 1rem;
        text-align: center;
        margin-bottom: 20px;
    }

    /* Карточки */
    .lesson-block {
        padding: 14px;
        border-radius: 12px;
        margin-bottom: 20px;
    }

    /* Quizizz-кнопки */
    .quiz-btn {
        width: 100%;
        font-size: 1.1rem;
        padding: 14px;
        border-radius: 10px;
    }

    .quiz-options {
        flex-direction: column;
        gap: 12px;
    }

    /* Поле ввода диалога */
    .dialog-input {
        font-size: 1.1rem;
        padding: 14px;
        border-radius: 10px;
    }

    /* Кнопки Сохранить / Очистить */
    .btn {
        width: 100%;
        margin-top: 10px;
        padding: 14px;
        font-size: 1.1rem;
        border-radius: 10px;
    }

    /* Блок результата диалога */
    .dialog-output {
        padding: 14px;
        font-size: 1.05rem;
    }

    /* AI-вывод */
    .ai-output {
        padding: 14px;
        font-size: 1.05rem;
    }
}
.menu-item-active {
    font-weight: 600;
    color: #0078ff !important;
    border-bottom: 2px solid #0078ff;
}
/* ===== TOPBAR ===== */

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #0078ff;
    padding: 12px 20px;
    color: white;
}

.logo {
    font-size: 1.4rem;
    font-weight: 700;
}

.menu {
    display: flex;
    gap: 20px;
}

.menu-item {
    color: white;
    text-decoration: none;
    font-size: 1.1rem;
}

    .menu-item:hover {
        opacity: 0.8;
    }

/* ===== ACTIVE MENU ITEM ===== */

.menu-item-active {
    font-weight: 600;
    color: #fff !important;
    border-bottom: 2px solid #fff;
}

/* ===== HAMBURGER ===== */

.hamburger {
    display: none;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: white;
    cursor: pointer;
}

/* ===== MOBILE VERSION ===== */

@media (max-width: 700px) {

    .hamburger {
        display: block;
    }

    .menu {
        display: none;
        flex-direction: column;
        background: #0078ff;
        padding: 10px 0;
        gap: 10px;
    }

    .menu-open {
        display: flex;
    }

    .menu-item {
        padding: 10px 20px;
        font-size: 1.2rem;
    }
}
/* ===== LANGUAGE BAR ===== */

.langbar {
    display: flex;
    gap: 20px;
    padding: 10px 20px;
    background: #f5f5f5;
    border-bottom: 1px solid #ddd;
}

.lang-item {
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    color: #0078ff;
}

    .lang-item:hover {
        text-decoration: underline;
    }

/* ===== MOBILE VERSION ===== */

@media (max-width: 700px) {

    .langbar {
        justify-content: center;
        gap: 30px;
        padding: 12px;
    }

    .lang-item {
        font-size: 1.3rem;
    }
}
.subjects-grid {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.subject-card {
    width: 180px;
    height: 140px;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e5e5e5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s;
}

    .subject-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    }

.subject-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 10px;
}

.subject-name {
    font-size: 1.2rem;
    font-weight: 600;
}

/* Mobile */
@media (max-width: 700px) {
    .subjects-grid {
        justify-content: center;
    }

    .subject-card {
        width: 45%;
        height: 130px;
    }

    .subject-name {
        font-size: 1.1rem;
    }
}
.subject-item {
    cursor: pointer;
    transition: transform 0.1s ease;
}

    .subject-item:hover {
        transform: scale(1.03);
    }
/* Сетка предметов */
.subjects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
    padding: 20px;
    max-width: 900px;
    margin: 0 auto;
}

/* Карточка предмета */
.subject-item {
    cursor: pointer;
    padding: 18px 20px;
    border-radius: 14px;
    background: #ffffff;
    border: 1px solid #e5e5e5;
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 20px;
    transition: 0.25s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

    /* Hover эффект */
    .subject-item:hover {
        transform: translateY(-3px);
        box-shadow: 0 6px 14px rgba(0,0,0,0.12);
        background: #f7f7f7;
    }

    /* Иконка */
    .subject-item .icon {
        font-size: 32px;
    }

    /* Текст */
    .subject-item .text {
        font-size: 20px;
        font-weight: 500;
    }

/* Заголовок */
.subjects-title {
    text-align: center;
    margin-top: 20px;
    font-size: 32px;
    font-weight: 600;
}

.langbar {
    display: flex;
    justify-content: space-between; /* Языки слева, кнопка справа */
    align-items: center;
    padding: 8px 12px;
}

.lang-items {
    display: flex;
    gap: 6px;
}


.langbar {
    display: flex;
    justify-content: space-between; /* Языки слева, кнопка справа */
    align-items: center;
    padding: 8px 12px;
}

.lang-items {
    display: flex;
    gap: 6px;
}

.back-btn {
    all: unset !important;
    cursor: pointer !important;
    display: inline-flex;
    align-items: center;
}

/* iOS-style arrow */
.ios-arrow {
    width: 22px;
    height: 22px;
}

    .ios-arrow path {
        stroke: #0078ff !important; /* синяя линия */
        stroke-width: 4 !important; /* толще, целое число */
        fill: none;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

/* Hover — ещё толще и темнее */
.back-btn:hover .ios-arrow path {
    stroke: #005fcc !important;
    stroke-width: 5 !important; /* целое число */
}

/* Финский флвг начало*/
.fi-flag {
    display: inline-block;
    width: 28px;
    height: 20px;
    background: #ffffff;
    position: relative;
    border-radius: 3px;
    box-shadow: 0 0 0 1px #e5e5e5;
}

    /* вертикальный синий крест */
    .fi-flag::before {
        content: "";
        position: absolute;
        left: 8px;
        top: 0;
        width: 4px;
        height: 100%;
        background: #003580;
    }

    /* горизонтальный синий крест */
    .fi-flag::after {
        content: "";
        position: absolute;
        left: 0;
        top: 8px;
        width: 100%;
        height: 4px;
        background: #003580;
    }
/* Финский флвг конец*/

/* Английский флаг начало */
.uk-flag {
    display: inline-block;
    width: 28px;
    height: 20px;
    position: relative;
    background: #00247d; /* синий */
    border-radius: 3px;
    overflow: hidden;
    box-shadow: 0 0 0 1px #e5e5e5;
}

    /* Белые диагонали */
    .uk-flag::before,
    .uk-flag::after {
        content: "";
        position: absolute;
        width: 40px;
        height: 4px;
        background: #ffffff;
        top: 8px;
        left: -6px;
        z-index: 1; /* белые ниже */
    }

    .uk-flag::before {
        transform: rotate(35deg);
    }

    .uk-flag::after {
        transform: rotate(-35deg);
    }

    /* Красные диагонали */
    .uk-flag .diag1,
    .uk-flag .diag2 {
        position: absolute;
        width: 40px;
        height: 3px;
        background: #cf142b;
        top: 9px;
        left: -6px;
        z-index: 2; /* красные выше */
    }

    .uk-flag .diag1 {
        transform: rotate(35deg);
    }

    .uk-flag .diag2 {
        transform: rotate(-35deg);
    }

    /* Белый крест */
    .uk-flag .white-h {
        position: absolute;
        top: 7px;
        left: 0;
        width: 100%;
        height: 6px;
        background: #ffffff;
        z-index: 3;
    }

    .uk-flag .white-v {
        position: absolute;
        left: 11px;
        top: 0;
        width: 6px;
        height: 100%;
        background: #ffffff;
        z-index: 3;
    }

    /* Красный крест */
    .uk-flag .red-h {
        position: absolute;
        top: 8px;
        left: 0;
        width: 100%;
        height: 3px;
        background: #cf142b;
        z-index: 4;
    }

    .uk-flag .red-v {
        position: absolute;
        left: 12px;
        top: 0;
        width: 3px;
        height: 100%;
        background: #cf142b;
        z-index: 4;
    }
/* Английский флаг конец */
/* Шведский флаг начало */
.se-flag {
    display: inline-block;
    width: 28px;
    height: 20px;
    background: #006aa7; /* синий */
    position: relative;
    border-radius: 3px;
    box-shadow: 0 0 0 1px #e5e5e5;
}

    /* вертикальная жёлтая линия */
    .se-flag::before {
        content: "";
        position: absolute;
        left: 8px;
        top: 0;
        width: 4px;
        height: 100%;
        background: #fecc00; /* жёлтый */
    }

    /* горизонтальная жёлтая линия */
    .se-flag::after {
        content: "";
        position: absolute;
        left: 0;
        top: 8px;
        width: 100%;
        height: 4px;
        background: #fecc00; /* жёлтый */
    }
/* Шведский флаг конец */















