/* ========== ОСНОВНЫЕ СТИЛИ ========== */

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

body {
    font-family: "RobotoSlab", serif;
    background-color: #fff;
}

/* ========== ШРИФТЫ ========== */

@font-face {
    font-family: "RobotoSlab";
    src: url('/static/fonts/RobotoSlab.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: "Caveat";
    src: url('/static/fonts/Caveat.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: "Caveat";
    src: url('/static/fonts/Caveat.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

/* ========== КОНТЕЙНЕРЫ ========== */

.container {
    width: 95%;
    max-width: 1400px;
    margin: 0 auto;
}

.intro {
    width: 90%;
    max-width: 1200px;
    margin: 50px auto 0;
    padding: 0;
}

/* ========== ХЕДЕР ========== */

.header {
    width: 100%;
    background: #f0f4f5d6;
    border: solid;
    border-width: 1px;
    border-color: #dce0e0;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 50px;
}

.header__inner {
    height: 50px;
    align-items: center;
    display: flex;
    justify-content: space-between;
    font-size: clamp(14px, 2vw, 18px);
}

.header__logo {
    font-family: "Caveat", cursive;
    font-weight: 700;
    font-size: clamp(14px, 2vw, 20px);
}

.nav .header__logo {
    font-size: clamp(18px, 3vw, 28px);
}

/* ========== НАВИГАЦИЯ ========== */

.nav {
    display: flex;
    align-items: center;
}

.nav__link {
    text-decoration: none;
    color: black;
    margin-left: 10px;
}

/* ========== ССЫЛКИ ========== */

a {
    text-decoration: none;
    color: black;
}

.register__link {
    float: right;
    padding-top: 5px;
}

.login__link {
    text-decoration: none;
    display: block;
}

/* ========== ЗАГОЛОВКИ ========== */

h1, h2, h3, h4, h5 {
    margin-block-start: 0.3em;
    margin-block-end: 0.3em;
}

.adaptive-title {
    margin: 0;
    text-align: center;
    word-break: break-word;
    font-size: clamp(24px, 8vw, 72px);
}

.adaptive-subtitle {
    margin: 10px 0 0 0;
    text-align: center;
    word-break: break-word;
    font-size: clamp(20px, 6vw, 56px);
}

/* ========== ТАЙМЕР ========== */

.time_on_level {
    font-family: "Caveat", cursive;
    font-weight: 700;
    font-size: clamp(32px, 8vw, 80px);
    margin: 0;
    padding: 0 0 20px 0;
    text-align: center;
    line-height: 1;
}

#hour, #mins, #secs {
    display: inline-block;
    padding: 0 5px;
}

/* ========== ФОРМЫ (ОБЩИЕ) ========== */

form.level {
    display: flex;
    align-items: stretch;
    gap: 0;
    margin-bottom: 20px;
}

form.level p {
    flex: 1;
    margin: 0;
}

form.level input {
    width: 100%;
    padding: 10px 15px;
    font-size: clamp(14px, 2vw, 16px);
    border: 1px solid #dce0e0;
    border-radius: 5px 0 0 5px;
    margin: 0;
    height: 100%;
    box-sizing: border-box;
}

form.level button.level {
    width: auto;
    min-width: 60px;
    padding: 10px 20px;
    border-radius: 0 5px 5px 0;
    background: #f0f4f5d6;
    border: 1px solid #dce0e0;
    border-left: none;
    cursor: pointer;
    font-size: clamp(14px, 2vw, 16px);
    height: 100%;
    box-sizing: border-box;
}

form.level button.level:hover {
    background: #e0e4e5;
}

/* ========== ОБЩИЕ СТИЛИ ДЛЯ КНОПОК ФОРМ (ЛОГИН И РЕГИСТРАЦИЯ) ========== */
.btn-register,
.btn-login {
    width: 100% !important;
    margin: 0 !important;
    padding: 6px 8px !important;
    display: block !important;
    box-sizing: border-box;
    border-radius: 5px !important;
    text-align: center;
    font-size: clamp(14px, 3vw, 18px);
    cursor: pointer;
}

.btn-register {
    background: #f0f4f5d6;
    border: 1px solid #dce0e0;
}

.btn-login {
    background: none;
    border: 1px solid #dce0e0;
    text-decoration: none;
    color: black;
    margin-top: 8px !important;
}

/* ========== ФОРМА ЛОГИНА ========== */
.login-form label {
    font-size: clamp(7px, 2vw, 12px) !important;
    margin-bottom: 2px;
    display: block;
}

.login-form input {
    padding: 4px 8px !important;
    font-size: clamp(12px, 2.5vw, 16px) !important;
    width: 100% !important;
    margin: 0 !important;
    display: block !important;
    box-sizing: border-box;
}

.login-form p {
    margin-bottom: 4px !important;
    text-align: left !important;
}

.login-form {
    gap: 0 !important;
}

/* ========== ФОРМА РЕГИСТРАЦИИ ========== */
.register-form .helptext,
.register-form ul,
.register-form li,
.register-form small,
.register-form .form-text {
    font-size: 9px !important;
    color: #666 !important;
    line-height: 1.2 !important;
}

.register-form ul {
    margin-top: 2px !important;
    margin-bottom: 4px !important;
    padding-left: 15px !important;
}

.register-form li {
    margin-bottom: 2px !important;
}

.register-form .errorlist {
    font-size: 10px !important;
    color: #d9534f !important;
}

.register-form label {
    font-size: clamp(7px, 2vw, 12px) !important;
    margin-bottom: 2px;
    display: block;
}

.register-form input {
    padding: 4px 8px !important;
    font-size: clamp(12px, 2.5vw, 16px) !important;
    width: 100% !important;
    margin: 0 !important;
    display: block !important;
    box-sizing: border-box;
}

.register-form p {
    margin-bottom: 6px !important;
    text-align: left !important;
}

.register-form {
    gap: 0 !important;
}

/* ========== БЛОКИ КОНТЕНТА ========== */

.content-box {
    font-family: "RobotoSlab", serif;
    font-size: clamp(14px, 2.5vw, 18px);
    background: #f0f4f5d6;
    border: solid;
    border-width: 1px;
    border-color: #dce0e0;
    border-radius: 10px;
    margin-block-start: 0.3em;
    margin-block-end: 0.3em;
    padding: 15px;
    width: 100%;
}

.content-text {
    margin-block-start: 0.3em;
    margin-block-end: 0.3em;
}

.code-badge {
    display: block;
    width: fit-content;
    margin: 6px auto;
    background: #e0e4e5;
    border-radius: 12px;
    padding: 4px 12px;
    font-family: "RobotoSlab", serif;
    font-size: clamp(14px, 2.5vw, 18px);
    border: 1px solid #dce0e0;
    text-align: center;
}

/* ========== СООБЩЕНИЯ ========== */

.errorlist {
    color: red;
    list-style: none;
    padding: 0;
}

.errorbox {
    background-color: #f7bebe;
    border: 1px solid #f7a6a6;
    border-radius: 20px;
    padding: 6px 16px;
    margin: 0 auto 10px auto;
    text-align: center;
    display: table;
}

.errortext {
    color: #824f4f;
    font-size: clamp(12px, 2vw, 14px);
    margin: 0;
}

.successbox {
    font-family: "RobotoSlab", serif;
    font-size: clamp(14px, 2.5vw, 18px);
    background-color: #b9e0a6;
    border: 1px solid #dce0e0;
    border-radius: 20px;
    padding: 6px 16px;
    margin: 0 auto 10px auto;
    text-align: center;
    display: table;
}

.successtext {
    color: #4e6344;
    margin: 0;
}

/* ========== ИЗОБРАЖЕНИЯ ========== */

img {
    margin: 11px 11px;
    max-width: 100%;
    height: auto;
}

/* ========== УТИЛИТЫ ========== */

.flex-row {
    display: flex;
    gap: 20px;
    margin-bottom: 0;
}

.flex-column {
    display: flex;
    flex-direction: column;
}

.justify-center {
    justify-content: center;
}

.gap-5 {
    gap: 5px;
}

.mb-20 {
    margin-bottom: 20px;
}

.mb-10 {
    margin-bottom: 10px;
}

.mt-10 {
    margin-top: 10px;
}

.text-center {
    text-align: center;
}