* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    -webkit-tap-highlight-color: transparent;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

html,
body {
    height: 100%;
    width: 100%;
    overflow: hidden;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.5;
    touch-action: manipulation;
    font-size: calc(14px + 0.3vw);
}

.container {
    width: 100%;
    max-width: min(1300px, 95vw);
    height: 100%;
    margin: 0 auto;
    padding: 2vh 2vw;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.header {
    position: relative;
    /* Добавьте это */
    text-align: center;
    margin-bottom: 2vh;
    padding: 2vh 3vw;
    background: linear-gradient(135deg, #4a6fa5 0%, #3a5a80 100%);
    color: white;
    border-radius: 12px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.header h1 {
    margin-bottom: 1.5vh;
    font-size: clamp(1.5rem, 4vmin, 2rem);
    font-weight: 600;
    line-height: 1.3;
}

.progress {
    display: flex;
    gap: 2vmin;
    font-size: clamp(0.9rem, 2vmin, 1.1rem);
    justify-content: center;
    margin-top: 1vh;
}

.progress-table {
    border-collapse: collapse;
    margin: 0 auto;
    width: 100%;
}

.progress-table th,
.progress-table td {
    padding: 1vmin 2vmin;
    text-align: center;
}

.progress-table th {
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    font-weight: 600;
}

.quiz-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    min-height: 0;
}

.quiz-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    min-height: 0;
}

.question-scrollable {
    flex: 1;
    overflow-y: auto;
    padding: 2vh 3vw;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.navigation-sticky {
    position: sticky;
    bottom: 0;
    background: white;
    padding: 1.5vh 3vw;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: flex-end;
    z-index: 10;
    flex-shrink: 0;
}

.btn {
    background: linear-gradient(135deg, #4a6fa5 0%, #3a5a80 100%);
    color: white;
    border: none;
    padding: 1.5vh 4vw;
    font-size: clamp(0.95rem, 2.5vmin, 1rem);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    min-width: 120px;
    text-align: center;
}

.btn:hover,
.btn:focus {
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.hidden {
    display: none !important;
}

.hint {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8vmin;
    font-size: clamp(0.75rem, 2vmin, 0.85rem);
    color: rgba(255, 255, 255, 0.9);
    margin-top: 1.5vh;
    padding: 0.5vh 0;
}

.hint-item {
    display: flex;
    align-items: center;
    gap: 0.5vmin;
    line-height: 1.4;
}

.hint-key {
    padding: 0.4vmin 1.2vmin;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-family: monospace;
    font-size: clamp(0.75rem, 2vmin, 0.85rem);
    font-weight: 600;
    color: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
    .hint {
        gap: 0.6vmin;
        margin-top: 1vh;
    }

    .container {
        padding: 1vh 2vw;
    }

    .header,
    .quiz-container {
        border-radius: 10px;
    }

    .question-scrollable {
        padding: 1.5vh 3vw;
    }
}

@media (max-height: 600px) {
    .hint {
        font-size: clamp(0.7rem, 1.8vmin, 0.8rem);
    }

    .hint-key {
        padding: 0.3vmin 1vmin;
    }

    .header {
        padding: 1.5vh 3vw;
        margin-bottom: 1vh;
    }

    .header h1 {
        margin-bottom: 1vh;
        font-size: clamp(1.2rem, 3vmin, 1.5rem);
    }

    .question-scrollable {
        padding: 1vh 3vw;
    }

    .navigation-sticky {
        padding: 1vh 3vw;
    }
}

@supports (-webkit-touch-callout: none) {
    .quiz-container {
        max-height: -webkit-fill-available;
    }
}

/* Отключает лупу увеличения на iOS */
* {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -webkit-text-size-adjust: none;
    text-size-adjust: none;
}

/* Отключает двойной тап для увеличения */
html, body {
    touch-action: manipulation;
}

/* Для отдельных элементов, где нужен текст */
.quiz-content, .question-scrollable, .option-text {
    -webkit-user-select: none;
    user-select: none;
}