﻿/* ===== БАЗОВЫЕ СТИЛИ - CSS GRID ===== */
html {
    font-size: 14px;
    height: 100%;
}

body {
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-rows: auto 1fr auto;
    min-height: 100vh;
    min-height: 100%;
    background-color: #f8f9fa;
}

/* Предотвращение переноса по буквам */
* {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.card-text,
p {
    word-break: break-word;
    hyphens: auto;
}

/* ===== NAVBAR ===== */
.navbar-fixed {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

    .navbar-fixed.scrolled {
        background-color: rgba(248, 249, 250, 0.95) !important;
        backdrop-filter: blur(10px);
    }

.navbar-brand {
    font-weight: 700;
    font-size: 1.3rem;
}

.navbar-fixed .dropdown-menu {
    margin-top: 8px;
    border: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* ===== MAIN CONTENT ===== */
.main-content {
    padding-top: 65px;
    grid-row: 2;
    overflow-y: auto;
    overflow-x: hidden;
}

    .main-content main {
        padding-bottom: 1rem;
        max-height: 100%;
    }

/* ===== FOOTER ===== */
.footer-fixed {
    grid-row: 3;
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    flex-shrink: 0;
}

.footer-compact {
    padding: 8px 0;
    font-size: 0.875rem;
}

.footer-column h6 {
    font-size: 0.8rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 4px;
}

.footer-column p {
    margin-bottom: 1px;
    font-size: 0.7rem;
    color: #6c757d;
    line-height: 1.2;
}

.footer-column a {
    color: #6c757d;
    text-decoration: none;
    transition: color 0.2s ease;
}

    .footer-column a:hover {
        color: #007bff;
    }

/* ===== SOCIAL LINKS ===== */
.social-links {
    display: flex;
    gap: 6px;
    margin-top: 4px;
}

    .social-links a {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 28px;
        height: 28px;
        background-color: #e9ecef;
        border-radius: 50%;
        color: #6c757d;
        font-size: 0.9rem;
        transition: all 0.2s ease;
        text-decoration: none;
    }

        .social-links a:hover {
            background-color: #007bff;
            color: white;
            transform: translateY(-2px);
            box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
        }

    .social-links .telegram:hover {
        background-color: #0088cc;
    }

    .social-links .github:hover {
        background-color: #333;
    }

/* ===== MOBILE FOOTER ===== */
.footer-column-mobile {
    padding: 4px 2px;
}

.footer-mobile-title {
    font-size: 0.65rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 2px;
    line-height: 1.1;
}

.footer-mobile-name {
    font-size: 0.6rem;
    color: #6c757d;
    margin-bottom: 3px;
    line-height: 1.1;
}

.footer-mobile-contacts {
    display: flex;
    justify-content: center;
    gap: 5px;
}

.footer-contact-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    background-color: #e9ecef;
    border: 1px solid #dee2e6;
    border-radius: 50%;
    color: #6c757d;
    text-decoration: none;
    font-size: 0.7rem;
    transition: all 0.2s ease;
}

    .footer-contact-icon:hover {
        background-color: #007bff;
        color: white;
        border-color: #007bff;
        transform: translateY(-2px);
        box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
    }

    .footer-contact-icon.telegram:hover {
        background-color: #0088cc;
        border-color: #0088cc;
    }

    .footer-contact-icon.github:hover {
        background-color: #333;
        border-color: #333;
    }

/* ===== FORM ELEMENTS ===== */
.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;
}

.form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* ===== CARDS ===== */
.card {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

/* ===== BREADCRUMB ===== */
.breadcrumb-compact {
    font-size: 0.85rem;
    padding: 0;
    background: none;
    margin-bottom: 0;
}

    .breadcrumb-compact .breadcrumb-item + .breadcrumb-item::before {
        content: "›";
    }

    .breadcrumb-compact .breadcrumb-item {
        max-width: none;
    }

/* ===== СТАТИСТИЧЕСКИЕ КАРТОЧКИ ===== */
.stats-card-compact {
    transition: transform 0.2s, box-shadow 0.2s;
}

    .stats-card-compact:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 16px rgba(0,0,0,0.12) !important;
    }

    .stats-card-compact .card-body {
        padding: 0.75rem 0.5rem !important;
    }

    .stats-card-compact h5 {
        font-size: 1.5rem;
        margin: 0.25rem 0;
    }

    .stats-card-compact i {
        font-size: 1.25rem;
    }

    .stats-card-compact small {
        font-size: 0.75rem;
    }

/* ===== НАСТРОЙКИ ===== */
.settings-compact {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.setting-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.25rem 0;
    font-size: 0.875rem;
}

.setting-label {
    color: #6c757d;
    font-weight: 500;
}

.settings-bar {
    background-color: #f8f9fa;
    border-left: 3px solid #007bff;
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
}

.setting-label-main {
    color: #495057;
    font-size: 0.875rem;
}

/* ===== ТАБЛИЦЫ ===== */
.table-compact {
    font-size: 0.875rem;
}

    .table-compact thead th {
        padding: 0.5rem;
        font-weight: 600;
        font-size: 0.8rem;
        background-color: #f8f9fa;
        border-bottom: 2px solid #dee2e6;
    }

    .table-compact tbody td {
        padding: 0.5rem;
        vertical-align: middle;
    }

.table-responsive {
    border-radius: 0.5rem;
    overflow-x: auto;
}

.table {
    margin-bottom: 0;
    background-color: white;
}

    .table thead th {
        font-weight: 600;
        font-size: 0.875rem;
        border-bottom: 2px solid #dee2e6;
        padding: 0.75rem;
        vertical-align: middle;
        white-space: nowrap;
    }

    .table tbody td {
        padding: 0.75rem;
        vertical-align: middle;
        font-size: 0.875rem;
    }

.table-hover tbody tr:hover {
    background-color: rgba(0, 123, 255, 0.05);
}

/* ===== КЛИКАБЕЛЬНЫЕ СТРОКИ ===== */
.clickable-row {
    cursor: pointer;
    transition: all 0.2s ease;
}

    .clickable-row:hover {
        background-color: rgba(0, 123, 255, 0.08) !important;
    }

    .clickable-row:active {
        background-color: rgba(0, 123, 255, 0.12) !important;
        transform: scale(0.995);
    }

.question-row {
    user-select: none;
}

/* ===== BADGES ===== */
.badge-sm {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

.status-badge-compact {
    font-size: 0.75rem;
    padding: 0.25rem 0.4rem;
}

.grade-badge-compact {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    font-size: 0.7rem;
    font-weight: bold;
    color: white;
}

.grade-excellent {
    background-color: #28a745;
}

.grade-good {
    background-color: #17a2b8;
}

.grade-satisfactory {
    background-color: #ffc107;
    color: #212529;
}

.grade-unsatisfactory {
    background-color: #dc3545;
}

/* ===== КНОПКИ ===== */
.btn-icon {
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

    .btn-icon i {
        margin: 0;
    }

.btn-group-separated {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

    .btn-group-separated .btn {
        border-radius: 0.25rem !important;
    }

/* ===== ALERTS ===== */
.alert {
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

/* ===== NAVIGATION ===== */
.nav-link {
    transition: color 0.2s ease-in-out;
}

    .nav-link:hover {
        color: #007bff !important;
    }

/* ===== DROPDOWN ===== */
.dropdown-menu {
    max-width: calc(100vw - 2rem);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* ===== МОДАЛЬНЫЕ ОКНА ===== */
.modal.fade .modal-dialog {
    transition: transform 0.3s ease-out;
}

.modal.show .modal-dialog {
    transform: none;
}

/* ===== КАТЕГОРИИ ТЕСТОВ ===== */
.test-category-card {
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

    .test-category-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    }

    .test-category-card .card-header {
        padding: 30px 20px;
    }

/* ===== СТУДЕНТЫ ===== */
.students-minimal {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    margin-top: 4px;
}

.student-tag {
    display: inline-block;
    background: #f8f9fa;
    color: #6c757d;
    padding: 1px 6px;
    border-radius: 8px;
    font-size: 0.9rem;
    line-height: 1.2;
    border: 1px solid #e9ecef;
}

/* ===== КАРТОЧКИ УЧИТЕЛЯ ===== */
.teacher-card {
    transition: all 0.2s ease;
}

    .teacher-card .card-header {
        background-color: #f8f9fa;
        border-bottom: 2px solid #007bff;
    }

    .teacher-card .card-title {
        font-size: 1rem;
        font-weight: 600;
        color: #495057;
    }

    .teacher-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }

/* ===== ПОИСК ===== */
.input-group-text {
    border-right: none;
}

.input-group .form-control {
    border-left: none;
}

    .input-group .form-control:focus {
        border-left: none;
        box-shadow: none;
    }

        .input-group .form-control:focus + .input-group-text {
            border-color: #007bff;
        }

#searchInput {
    transition: all 0.2s ease;
}

    #searchInput:focus {
        border-color: #007bff;
        box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    }

#clearSearch {
    border-left: none;
}

#noResultsMessage {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== ФОРМА УДАЛЕНИЯ СТУДЕНТА ===== */
.delete-form-title {
    font-size: 1.1rem;
}

.delete-form-body {
    padding: 0.75rem;
}

.delete-form-alert {
    padding: 0.5rem;
}

.delete-form-alert-text {
    font-size: 0.875rem;
}

.delete-form-student-info {
    padding: 0.75rem;
}

.delete-form-avatar {
    width: 45px;
    height: 45px;
}

.delete-form-avatar-icon {
    font-size: 1.2rem;
}

.delete-form-name {
    font-size: 1rem;
}

.delete-form-info-text {
    font-size: 0.875rem;
}

.delete-form-stat {
    padding: 0.5rem;
    background-color: #f8f9fa;
    border-radius: 0.25rem;
}

.delete-form-stat-number {
    font-size: 1.25rem;
}

.delete-form-stat-label {
    font-size: 0.75rem;
}

.delete-form-warning-text {
    font-size: 0.875rem;
}

.delete-form-label {
    font-size: 0.875rem;
}

.delete-form-hint {
    font-size: 0.75rem;
}

.delete-form-footer {
    padding: 0.5rem 0.75rem;
}

.delete-form-buttons {
    gap: 0.5rem;
}

.delete-form-btn {
    font-size: 0.875rem;
}

/* ===== MEDIA QUERIES ===== */

/* Десктоп (≥ 992px) */
@media (min-width: 992px) {
    html {
        font-size: 16px;
    }
}

/* Планшеты (768px - 991px) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .stats-card-compact h5 {
        font-size: 1.3rem;
    }

    .stats-card-compact i {
        font-size: 1.1rem;
    }

    .table-compact thead th {
        font-size: 0.75rem;
        padding: 0.4rem;
    }

    .table-compact tbody td {
        font-size: 0.75rem;
        padding: 0.4rem;
    }

    .btn-icon {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }

    .delete-form-body {
        padding: 1rem;
    }

    .delete-form-footer {
        padding: 0.75rem 1rem;
    }
}

/* Мобильные (< 768px) */
@media (max-width: 767.98px) {
    /* Breadcrumb */
    .breadcrumb-compact {
        font-size: 0.75rem;
    }

        .breadcrumb-compact .breadcrumb-item.active {
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            max-width: 200px;
        }

    /* Статистические карточки */
    .stats-card-compact .card-body {
        padding: 0.5rem 0.25rem !important;
    }

    .stats-card-compact h5 {
        font-size: 1.2rem;
    }

    .stats-card-compact i {
        font-size: 1rem;
    }

    .stats-card-compact small {
        font-size: 0.7rem;
    }

    /* Настройки */
    .setting-item {
        font-size: 0.8rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .settings-bar {
        padding: 0.4rem 0.75rem;
    }

    .setting-label-main {
        font-size: 0.8rem;
    }

    /* Таблицы */
    .table-compact thead th {
        font-size: 0.7rem;
        padding: 0.35rem 0.25rem;
    }

    .table-compact tbody td {
        font-size: 0.7rem;
        padding: 0.35rem 0.25rem;
    }

    .table-compact .btn-icon {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
    }

    .actions-cell .d-flex {
        gap: 0.25rem !important;
    }

    /* Кнопки и badges */
    .btn-icon {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
    }

    .badge-sm {
        font-size: 0.7rem;
        padding: 0.2rem 0.4rem;
    }

    /* Форма удаления */
    .delete-form-title {
        font-size: 1rem;
    }

    .delete-form-body {
        padding: 0.5rem;
    }

    .delete-form-alert {
        padding: 0.4rem;
        margin-bottom: 0.5rem;
    }

    .delete-form-alert-text {
        font-size: 0.8rem;
    }

    .delete-form-student-info {
        padding: 0.5rem;
    }

    .delete-form-avatar {
        width: 38px;
        height: 38px;
    }

    .delete-form-avatar-icon {
        font-size: 1rem;
    }

    .delete-form-name {
        font-size: 0.9rem;
    }

    .delete-form-info-text {
        font-size: 0.8rem;
    }

    .delete-form-email {
        word-break: break-all;
    }

    .delete-form-stat {
        padding: 0.4rem;
    }

    .delete-form-stat-number {
        font-size: 1.1rem;
    }

    .delete-form-stat-label {
        font-size: 0.7rem;
    }

    .delete-form-warning-text {
        font-size: 0.8rem;
    }

    .delete-form-label {
        font-size: 0.8rem;
    }

    .delete-form-hint {
        font-size: 0.7rem;
    }

    .delete-form-footer {
        padding: 0.4rem 0.5rem;
    }

    .delete-form-buttons {
        gap: 0.35rem;
    }

    .delete-form-btn {
        font-size: 0.8rem;
        padding: 0.25rem 0.5rem;
    }
}

/* Мелкие мобильные (< 576px) */
@media (max-width: 575.98px) {
    /* Breadcrumb */
    .breadcrumb-compact {
        font-size: 0.7rem;
    }

        .breadcrumb-compact .breadcrumb-item.active {
            max-width: 150px;
        }

    /* Статистические карточки */
    .stats-card-compact h5 {
        font-size: 1.1rem;
    }

    .stats-card-compact i {
        font-size: 0.9rem;
    }

    /* Таблицы */
    .table-compact thead th {
        font-size: 0.65rem;
        padding: 0.3rem 0.2rem;
    }

    .table-compact tbody td {
        font-size: 0.65rem;
        padding: 0.3rem 0.2rem;
    }

    .table-compact .btn-icon {
        width: 26px;
        height: 26px;
        font-size: 0.7rem;
    }

    /* Кнопки */
    .btn-icon {
        width: 26px;
        height: 26px;
        font-size: 0.7rem;
    }

    /* Форма удаления */
    .delete-form-title {
        font-size: 0.95rem;
    }

    .delete-form-body {
        padding: 0.4rem;
    }

    .delete-form-alert {
        padding: 0.35rem;
    }

    .delete-form-alert-text {
        font-size: 0.75rem;
    }

    .delete-form-student-info {
        padding: 0.4rem;
    }

    .delete-form-avatar {
        width: 35px;
        height: 35px;
    }

    .delete-form-avatar-icon {
        font-size: 0.95rem;
    }

    .delete-form-name {
        font-size: 0.85rem;
    }

    .delete-form-info-text {
        font-size: 0.75rem;
    }

    .delete-form-stat {
        padding: 0.35rem;
    }

    .delete-form-stat-number {
        font-size: 1rem;
    }

    .delete-form-stat-label {
        font-size: 0.65rem;
    }

    .delete-form-warning-text {
        font-size: 0.75rem;
    }

    .delete-form-label {
        font-size: 0.75rem;
    }

    .delete-form-hint {
        font-size: 0.65rem;
    }

    .delete-form-footer {
        padding: 0.35rem 0.4rem;
    }

    .delete-form-buttons {
        gap: 0.3rem;
    }

    .delete-form-btn {
        font-size: 0.75rem;
        padding: 0.2rem 0.4rem;
    }
}

/* Очень узкие экраны (< 375px) */
@media (max-width: 374.98px) {
    /* Breadcrumb */
    .breadcrumb-compact .breadcrumb-item.active {
        max-width: 120px;
    }

    /* Статистические карточки */
    .stats-card-compact .card-body {
        padding: 0.4rem 0.2rem !important;
    }

    .stats-card-compact h5 {
        font-size: 1rem;
    }

    .stats-card-compact i {
        font-size: 0.85rem;
    }

    .stats-card-compact small {
        font-size: 0.65rem;
    }

    /* Таблицы и кнопки */
    .table-compact .btn-icon,
    .btn-icon {
        width: 24px;
        height: 24px;
        font-size: 0.65rem;
    }

    /* Форма удаления */
    .delete-form-title {
        font-size: 0.9rem;
    }

    .delete-form-body {
        padding: 0.35rem;
    }

    .delete-form-alert {
        padding: 0.3rem;
    }

    .delete-form-alert-text {
        font-size: 0.7rem;
    }

    .delete-form-student-info {
        padding: 0.35rem;
    }

    .delete-form-avatar {
        width: 32px;
        height: 32px;
    }

    .delete-form-avatar-icon {
        font-size: 0.85rem;
    }

    .delete-form-name {
        font-size: 0.8rem;
    }

    .delete-form-info-text {
        font-size: 0.7rem;
    }

    .delete-form-stat {
        padding: 0.3rem 0.2rem;
    }

    .delete-form-stat-number {
        font-size: 0.95rem;
    }

    .delete-form-stat-label {
        font-size: 0.6rem;
    }

    .delete-form-warning-text {
        font-size: 0.7rem;
    }

    .delete-form-label {
        font-size: 0.7rem;
    }

    .delete-form-hint {
        font-size: 0.6rem;
    }

    .delete-form-footer {
        padding: 0.3rem 0.35rem;
    }

    .delete-form-buttons {
        gap: 0.25rem;
        justify-content: center !important;
    }

    .delete-form-btn {
        font-size: 0.7rem;
        padding: 0.2rem 0.35rem;
    }
}

/* Стили для кнопок действий на мобильных */
.mobile-actions-btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

/* Курсор pointer для кликабельных строк */
.class-row {
    cursor: pointer;
    transition: all 0.2s ease;
}

    .class-row:hover {
        background-color: rgba(0, 123, 255, 0.08) !important;
    }

    .class-row:active {
        background-color: rgba(0, 123, 255, 0.12) !important;
        transform: scale(0.995);
    }

/* Предотвращение выделения текста при клике */
.class-row {
    user-select: none;
}

.hover-card {
    transition: transform 0.2s, box-shadow 0.2s;
}

    .hover-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
    }

.card-header {
    border-bottom: 2px solid rgba(0, 0, 0, 0.05);
}

.breadcrumb {
    background: none;
    padding: 0;
    margin: 0;
}

@media (max-width: 767.98px) {
    .card-body {
        padding: 1rem;
    }

    .row.g-2 {
        margin: 0 -0.25rem;
    }

        .row.g-2 > * {
            padding: 0 0.25rem;
        }
}

/* Контейнер теста */
.test-container {
    max-width: 900px;
    margin: 0 auto;
    padding-bottom: 1rem;
}

/* Минимальная ширина для flex элементов */
.min-w-0 {
    min-width: 0;
}

/* Компактное слово с пропуском */
.word-with-gap {
    font-size: 1.5rem;
    font-weight: 600;
    color: #0d6efd;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 12px 24px;
    border-radius: 8px;
    border: 2px dashed #0d6efd;
    display: inline-block;
    letter-spacing: 2px;
}

/* Поле ввода ответа */
.answer-input {
    font-size: 1.1rem;
    text-align: center;
    font-weight: 600;
    height: 45px;
}

/* Секция ввода ответа с нижним отступом */
.answer-input-section {
    margin-bottom: 1.5rem;
}

/* Навигационная карточка */
.navigation-card {
    position: relative;
    z-index: 10;
}

/* Анимация появления вопроса */
.question-card {
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

    .question-card.active {
        animation: fadeIn 0.3s ease;
    }

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Таймер */
#timer {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    white-space: nowrap;
}

.timer-warning {
    color: #ffc107 !important;
    animation: pulse 1.5s ease-in-out infinite;
}

.timer-danger {
    color: #dc3545 !important;
    animation: blink 0.8s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

@keyframes blink {
    0%, 50% {
        opacity: 1;
    }

    51%, 100% {
        opacity: 0.5;
    }
}

/* Компактные алерты */
.alert-sm {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
}

/* Адаптивность для мобильных */
@media (max-width: 767.98px) {
    .test-container {
        padding-bottom: 1.5rem;
    }

    .word-with-gap {
        font-size: 1.2rem;
        padding: 10px 18px;
        letter-spacing: 1px;
    }

    .answer-input {
        font-size: 1rem;
        height: 40px;
    }

    .answer-input-section {
        margin-bottom: 2rem;
    }

    .card-body {
        padding: 0.75rem !important;
    }

    /* Уменьшаем размер заголовка для мобильных */
    .card-header h6 {
        font-size: 0.9rem;
    }

    /* Уменьшаем иконку */
    .card-header .fa-spell-check {
        font-size: 0.85rem;
    }

    /* Уменьшаем таймер на очень узких экранах */
    #timer {
        font-size: 0.9rem;
    }

        #timer .fa-clock {
            font-size: 0.85rem;
        }

    /* Компактный текст подсказки */
    .form-text {
        font-size: 0.75rem;
        line-height: 1.3;
    }

    .question-card {
        margin-bottom: 1.5rem;
    }

        /* Дополнительный отступ для карточки с вопросом */
        .question-card .card {
            margin-bottom: 0.5rem;
        }
}

@media (max-width: 575.98px) {
    .test-container {
        padding: 0 0.25rem 2rem;
    }

    .word-with-gap {
        font-size: 1rem;
        padding: 8px 15px;
    }

    .answer-input {
        font-size: 0.95rem;
        height: 38px;
    }

    .answer-input-section {
        margin-bottom: 2.5rem;
    }

    .breadcrumb-compact {
        font-size: 0.75rem;
    }

    /* Еще более компактный header */
    .card-header h6 {
        font-size: 0.85rem;
    }

    .card-header .fa-spell-check {
        font-size: 0.8rem;
    }

    #timer {
        font-size: 0.85rem;
    }

        #timer .h6 {
            font-size: 0.85rem !important;
        }

        #timer .fa-clock {
            font-size: 0.8rem;
        }

    /* Еще более компактный текст */
    .form-text {
        font-size: 0.7rem;
    }

    /* Увеличенный нижний отступ */
    .question-card {
        margin-bottom: 2rem;
    }
}

/* Очень узкие экраны */
@media (max-width: 374.98px) {
    .answer-input-section {
        margin-bottom: 3rem;
    }

    .form-text {
        font-size: 0.65rem;
    }

    /* Совсем компактный header */
    .card-header h6 {
        font-size: 0.8rem;
    }

    .card-header .fa-spell-check {
        font-size: 0.75rem;
        margin-right: 0.25rem !important;
    }

    #timer {
        font-size: 0.8rem;
    }

        #timer .h6 {
            font-size: 0.8rem !important;
        }

        #timer .fa-clock {
            font-size: 0.75rem;
            margin-right: 0.25rem !important;
        }
}

/* ===== РЕЗУЛЬТАТЫ ТЕСТА ===== */
.result-circle {
    position: relative;
}

    .result-circle svg {
        transform: rotate(0deg);
    }

.question-result {
    background-color: #fff;
    transition: all 0.2s ease;
}

/* Адаптивность для результатов */
@media (max-width: 767.98px) {
    .result-circle {
        width: 100px !important;
        height: 100px !important;
    }

    .question-result {
        font-size: 0.875rem;
    }

        .question-result .fa-2x {
            font-size: 1.5rem !important;
        }

    .word-with-gap {
        font-size: 1rem !important;
        padding: 5px 10px !important;
    }
}

@media (max-width: 575.98px) {
    .result-circle {
        width: 90px !important;
        height: 90px !important;
    }

        .result-circle text {
            font-size: 18px !important;
        }

    .question-result {
        font-size: 0.8rem;
    }

        .question-result .fa-2x {
            font-size: 1.3rem !important;
        }

    .word-with-gap {
        font-size: 0.9rem !important;
        padding: 4px 8px !important;
    }
}

@media (max-width: 374.98px) {
    .result-circle {
        width: 80px !important;
        height: 80px !important;
    }

        .result-circle text {
            font-size: 16px !important;
        }

    .question-result {
        font-size: 0.75rem;
    }

        .question-result .fa-2x {
            font-size: 1.2rem !important;
        }
}
