body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f5f5f5;
    color: #333;
}

.container {
    max-width: 1200px;
    min-width: 390px;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0 auto;
}

.container a:link {
    text-decoration: none;
}

.container a:visited {
    text-decoration: none;
}

.main {
    display: flex;
    flex-direction: row;
    width: 100%;
    align-items: flex-start;
    
}

/* Заголовок */
.header {
    width: 100%;
    background-color: #007BFF;
    text-align: center;
    position: relative;
    padding: 0px;
    padding-top: 10px;
    font-size: 24px;
    font-weight: bold;
}

.header h1 {
    margin: 0;
}

/* Панель выбора языка */
#language_choice_panel {
    text-align: center;
    padding: 20px 0;
}

#language_choice_panel h3 {
    margin-bottom: 20px;
    font-size: 22px;
    color: #555;
}

/* Стили для ссылок в панели выбора языка */
#language_choice_panel a {
    display: inline-block;
    width: 45%;
    max-width: 200px;
    margin: 10px;
    text-decoration: none;
    background-color: #fff;
    border: 2px solid #ddd;
    border-radius: 8px;
    text-align: center;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease-in-out;
}

/* Стили для содержимого кнопок */
#language_choice_panel a .language_choice {
    color: #333;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#language_choice_panel a img {
    width: 50px;
    height: auto;
    margin-bottom: 10px;
}

#language_choice_panel a p {
    font-size: 16px;
    font-weight: bold;
    margin: 0;
}

/* Эффект при наведении */
#language_choice_panel a:hover {
    background-color: #007BFF;
    border-color: #0056b3;
    transform: translateY(-5px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.2);
}

#language_choice_panel a:hover img {
    filter: brightness(0.9);
}


.footer {
    background-color: #007BFF;
    color: #fff;
    text-align: center;
    padding: 20px;
    margin-top: 30px;
    font-size: 16px;
}

/* Стили для выпадающего меню */
.topbar {
    display: none; /* на десктопе кнопку скрываем */
    position: sticky;
    top: 0;
    width: 100%;
    height: 40px;
    padding: 0px;
    margin: 0px;
    z-index: 1001;
}

.menu-button {
    border: none;
    padding-left: 20px;
    padding-right: 20px;
    position: absolute;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
    color: #fff;
    background-color: #007BFF;
    border-radius: 5px;
}

.menu-button:hover {
    cursor: pointer;
}

/* Backdrop */
.backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.4);
    z-index: 999;
}

.sidebar {
    width: 320px;
    flex: 0 0 320px;
    margin-top: 20px;
    
    height: calc(100vh - 180px);
    
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 8px;
}

.article-paragraphs {
    text-align: justify;
}

.article-list {
    display: block;
    /* position: absolute; */
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-top: 5px;
    padding: 10px;
    list-style: none;
}

.article-list li {
    padding: 10px 15px;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.article-list li:hover {
    background-color: #007BFF;
}

.article-list a {
    text-decoration: none;
    color: #333;
    font-size: 16px;
}

/* Accordion (sidebar groups) */
.accordion {
  margin-bottom: 12px;
}

.accordion-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    font-weight: bold;
    font-size: 16px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.accordion-header:hover {
    background-color: #007BFF;
    color: #fff;
    border-color: #0056b3;
}

.accordion-arrow {
    transition: transform 0.2s ease-in-out;
}

.accordion-header[aria-expanded="false"] .accordion-arrow {
    transform: rotate(-90deg);
}

/* Lists */
.article-list {
  list-style: none;
  padding-left: 0;
  margin: 10px 0 0 0;
  
  height: 550px;
  overflow-y: auto;
  overflow-x: hidden;
}

.article-list.is-collapsed {
  display: none;
}

/* Optional: spacing between items */
.article-list li {
  margin-bottom: 8px;
}


/* Контент */
.content {
    margin: 20px;
    margin-right: 0px;
    margin-left: 0px;
    /* min-width: 390px; */
    padding: 20px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#mission_panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding: 10px 15px;
}

/* Стили для article-questions */
#article-questions {
    margin-top: 20px;
    margin-bottom: 20px;
    padding: 20px;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    font-size: 18px;
    text-align: center;
}

/* Кнопки для вариантов ответов */
.options button {
    display: inline-block;
    margin: 10px;
    padding: 15px 25px;
    font-size: 16px;
    color: #333333;
    background-color: #fff;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
}

.options button:hover {
    background-color: #007BFF;
    color: #fff;
    border-color: #0056b3;
}

.options button:active {
    background-color: #0056b3;
    color: #333333;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) inset;
}




/* Скрываем стандартный аудиоплеер */
#article-audio {
    display: none;
}

/* Контейнер для кастомных кнопок */
.audio-controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    background-color: #f9f9f9;
    padding: 10px 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    align-items: center;
}

/* Стили для кнопок */
.audio-controls button {
    color: #fff;
    background-color: #007BFF;
    border: none;
    border-radius: 5px;
    padding: 10px 10px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
}
/* range: height 30px; */
.speed {
    display: flex;
    align-items: center;
    padding: 10px 10px;
}

.audio-controls button:hover {
    background-color: #0056b3;
}

.audio-controls button:active {
    background-color: #003f7f;
    transform: scale(0.95);
}

/* Индикатор скорости воспроизведения */
#playback-rate-indicator {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin: 10px;
    text-align: center;
}

/* =========================================================
   Registration / Auth pages (keeps existing site style)
   ========================================================= */

.auth-card {
    max-width: 520px;
    margin: 0 auto;
    padding: 25px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.auth-title {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 24px;
    color: #333;
    text-align: center;
}

.auth-subtitle {
    margin-top: 0;
    margin-bottom: 20px;
    color: #555;
    text-align: center;
    line-height: 1.4;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-row label {
    font-weight: bold;
    color: #333;
    font-size: 14px;
}

.form-row input {
    padding: 12px 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    outline: none;
    font-size: 16px;
    background-color: #fff;
    transition: all 0.2s ease-in-out;
}

.form-row input:focus {
    border-color: #007BFF;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.15);
}

.form-row input::placeholder {
    color: #888;
}

/* Checkbox row */
.form-row-checkbox {
    margin-top: 6px;
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    user-select: none;
}

.checkbox input {
    width: 18px;
    height: 18px;
}

/* Submit button in same “blue hover” feel */
.auth-btn {
    margin-top: 8px;
    padding: 14px 18px;
    font-size: 16px;
    font-weight: bold;

    color: #333;
    background-color: #fff;

    border: 2px solid #ddd;
    border-radius: 8px;

    cursor: pointer;
    transition: all 0.3s ease-in-out;
}

.auth-btn:hover {
    background-color: #007BFF;
    color: #fff;
    border-color: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

.auth-btn:active {
    background-color: #0056b3;
    color: #fff;
    transform: translateY(0px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) inset;
}

.auth-footnote {
    margin: 6px 0 0 0;
    text-align: center;
    color: #555;
    font-size: 14px;
}

.auth-link {
    color: #007BFF;
    text-decoration: none;
    font-weight: bold;
}

.auth-link:hover {
    text-decoration: underline;
}

/* Mobile tweaks */
@media (max-width: 520px) {
    .auth-card {
        padding: 18px;
    }
}

#bottom-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    background-color: #f9f9f9;
    padding: 10px 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    align-items: center;
}

#bottom-buttons button{
    color: #fff;
    background-color: #007BFF;
    border: none;
    border-radius: 5px;
    padding: 10px 10px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    range: height 30px;
}

#bottom-buttons button:hover {
    background-color: #0056b3;
}

/* Мобильная версия */
@media (max-width: 1000px) {
  .main {
    display: block; /* контент на всю ширину */
  }

  .topbar {
    display: block; /* показываем кнопку меню */
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100dvh;
    width: 280px;
    max-width: 85vw;
    z-index: 1000;

    /* скрытое состояние: уезжает влево */
    transform: translateX(-110%);
    transition: transform .25s ease;
    /* box-shadow: 0 10px 30px rgba(0,0,0,.2); */
  }

  /* открытое состояние */
  .sidebar.is-open {
    transform: translateX(0);
  }

  /* чтобы кнопка/хедер были сверху */
  body.sidebar-open {
    overflow: hidden; /* блокируем прокрутку фона при открытом меню */
  }
}