body, html {
    font-family: 'Roboto', sans-serif;
    background-color: var(--color-primary);
    color: var(--font-color);
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    height: 100vh;
    -webkit-tap-highlight-color: transparent; /* Убирает стандартное выделение на мобильных устройствах */
}

.page-content {
    opacity: 0;
    /* transition: opacity 0.05s ease; */
}

.page-content.visible {
    opacity: 1;
}

.menu-list {
    flex-grow: 1;
    overflow-y: auto;
    padding: 10px;
    background-color: var(--color-secondary);
    border-radius: 8px;
    /* box-shadow: 0 0 15px rgba(0, 0, 0, 0.5); */
}

.menu-item {
    padding: 12px 20px;
    border-bottom: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    border-radius: 8px;
    margin-bottom: 8px;
    visibility: hidden; /* Изначально скрываем пункты */
    opacity: 0;
}

.menu-item.visible {
    visibility: visible; /* Отображаем пункты после задержки */
    opacity: 1;
}

.menu-item:active {
    background-color: var(--color-menu-hover);
    transform: translateY(-2px);
}

.menu-item:active, .menu-item:focus {
    background-color: var(--color-menu-hover);
}

@media (hover: none) {
    .menu-item:focus {
        background-color: var(--color-secondary); /* Сброс цвета после тапов */
        outline: none;
    }
}


.menu-item i {
    font-size: 1.5em;
}

.menu-item span {
    flex-grow: 1;
    font-size: 1.1em;
}

/* Стиль для переключателя (свитча) */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    border-radius: 50%;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.4s;
}

input:checked + .slider {
    background-color: #4CAF50;
}

input:checked + .slider:before {
    transform: translateX(24px);
}


/* Стиль для переключателя с логотипами для выбора темы */
.theme-light {      
--color-primary: #f8f8f8;
--color-secondary: #eeeeee;
--color-accent: #000000;
--color-menu-hover: #d1d1d1;
--font-color: #000000;
--font-color-secondary: #616161;
}
.theme-dark {
--color-primary: #181818;
--color-secondary: #1c1c1c; /* внутри курсов */
--color-accent: #fff;
--color-menu-hover: #2c2c2c;
--font-color: #f1f1f1;
--font-color-secondary: #aaaaaa;
}
.theme-switch {
position: relative;
display: inline-block;
width: 50px;
height: 24px;
}
.theme-switch input {
opacity: 0;
width: 0;
height: 0;
}
.theme-slider {
position: absolute;
cursor: pointer;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: #4d4d4d;
-webkit-transition: 0.4s;
transition: 0.4s;
}
.theme-slider:before {
position: absolute;
content: "";
height: 30px;
width: 30px;
left: 0px;
bottom: 4px;
top: 0;
bottom: 0;
margin: auto 0;
-webkit-transition: 0.4s;
transition: 0.4s;
box-shadow: 0 0px 15px #2020203d;
background: #383838 url('/static/night-mode.png');
background-repeat: no-repeat;
background-position: center;
}
input:checked + .theme-slider {
background-color: #ffffff;
}
input:focus + .theme-slider {
box-shadow: 0 0 1px #c9c9c9;
}
input:checked + .theme-slider:before {
-webkit-transform: translateX(24px);
-ms-transform: translateX(24px);
transform: translateX(24px);
background: white url('/static/sun-mode.png');
background-repeat: no-repeat;
background-position: center;
}
.theme-slider.round {
border-radius: 34px;
}
.theme-slider.round:before {
border-radius: 50%;
}



/* Стиль для навигационной панели */
.nav-bar {
    display: flex;
    justify-content: space-around;
    align-items: center;
    background-color: var(--color-primary);
    padding: 4px 0 10px 0;
    position: sticky;
    bottom: 0;
}

.nav-item, a {
    text-align: center;
    font-size: 0.9em;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
}

.nav-item i {
    font-size: 1.3em;
    margin-bottom: 5px;
}

.nav-bar {
    padding-bottom: var(--tg-safe-area-inset-bottom);
}

.nav-item:hover {
    color: #999;
}

.nav-item.active {
    color: var(--color-accent);
}

.nav-item.active span {
    position: relative;
    display: inline-block;
    padding-bottom: 4px;
}

.nav-item.active span::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
    width: 120%;
    height: 2px;
    background-color: var(--color-accent);
}

a {
    text-decoration: none;
    color: inherit;
}

.app-version {
    text-align: center;
    font-size: 0.8em;
    color: #888;
    margin-top: 10px;
}

.bottom-container {
    position: absolute;
    bottom: 70px; 
    left: 0;
    right: 0;
    text-align: center;
    padding: 10px;
}

.logo-container {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 10px;
}

.logo-img {
    max-width: 40%; /* Логотип занимает до 80% ширины экрана */
    width: auto;
    opacity: 0.1;
    transition: all 0.3s ease;
}

.logo-img:hover {
    opacity: 0.8; /* наводка, чтобы сделать логотип более видимым при наведении */
    transform: scale(1.05); /* легкое увеличение при наведении */
}



/* feedback */
.modal-overlay {
    display: none; 
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background-color: var(--color-secondary);
    width: 75%;
    height: 50%;
    padding: 25px;
    border-radius: 10px;
    text-align: center;
    color: var(--font-color);
}

textarea {
    width: 90%;
    height: 80%;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 8px;
    border: none;
    resize: none;
    background-color: var(--color-primary);
    color: var(--font-color);
}

.send-feedback-btn {
    background-color: var(--color-accent);
    color: var(--color-menu-hover);
    border: none;
    padding: 10px 15px;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    margin-left: auto;
}

.send-feedback-btn svg {
    margin-left: 5px;
    height: 15px;
    width: auto;
}
.send-feedback-btn svg g {
    fill: var(--color-menu-hover);
}

.send-feedback-btn:hover {
    background-color: var(--font-color-secondary);
}