body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #121212; /* Темний фон */
    color: #ffffff; /* Білий текст */
}

#auth {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
}

#auth form {
    display: flex;
    flex-direction: column;
    gap: 12px; /* Відступ між елементами */
    width: 300px; /* Ширина форми */
    padding: 20px;
    background-color: #212121; /* Білий фон форми */
    border-radius: 8px; /* Закруглені кути */
    box-shadow: 0 0 10px rgba(0,0,0,0.2); /* Легка тінь */
}

/* Щоб і поля, і кнопка були однакової ширини */
#auth form input,
#auth form button {
    width: 100%;
    box-sizing: border-box;
    margin: 0; /* Забираємо можливі зовнішні відступи */
}

#auth form input {
    background-color: #333333;
}

#auth input {
    color: white;
    padding: 10px;
    font-size: 16px;
    border: 1px solid #373737;
    border-radius: 4px;
    outline: none;
}

#auth input:focus {
    border-color: #0078d4; /* Підсвічування рамки при фокусі */
}

#auth button {
    padding: 10px;
    font-size: 16px;
    background-color: #0078d4; /* Синій фон */
    color: #ffffff;           /* Білий текст */
    border: none;
    border-radius: 4px;       /* Закруглені кути */
    cursor: pointer;
    text-align: center;       /* Текст по центру */
    transition: background-color 0.2s ease;
}

#auth button:hover {
    background-color: #005fa3; /* Трохи темніший синій при наведенні */
}

#auth button:active {
    background-color: #00447a; /* Ще темніший синій при натисканні */
}

.container {
    display: flex;
    height: 100vh;
}

#toggleSidebarBtn {
    position: absolute;
    bottom: 10px;
    left: 10px;
    z-index: 1001;
    padding: 10px;
    font-size: 16px;
    cursor: pointer;
    background-color: #333333; /* Темна кнопка для відкриття сайдбара */
    color: #ffffff;
}

.sidebar {
    width: 20%;
    background-color: #1e1e1e; /* Темний фон для сайдбара */
    padding: 10px;
    box-shadow: 2px 0 5px rgba(0,0,0,0.5); /* Більше тіней */
    overflow-y: auto;
    transition: transform 0.3s ease;
}

.sidebar.hidden {
    transform: translateX(-100%);
    width: 0px;
}

.sidebar ul {
    list-style: none;
    padding: 0;
}

.sidebar li {
    padding: 8px;
    cursor: pointer;
    color: #ffffff; /* Білий текст */
}

.sidebar li:hover,
.sidebar li.selected {
    background-color: #333333; /* Темний фон при наведенні або виборі */
}

.main {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    transition: margin-left 0.3s ease;
    background-color: #121212; /* Темний фон для основного контейнера */
}

.main.full-width {
    width: 100%;
}

#imageViewer {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

#imageViewer img {
    max-width: 100%;
    max-height: 80%;
}

#prevBtn, #nextBtn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #ffffff; /* Білий текст для кнопок */
}

#prevBtn {
    left: 10px;
}

#nextBtn {
    right: 10px;
}

#timelineContainer {
    height: 90px; /* 1.5 рази вищий */
    background-color: #1e1e1e; /* Темний фон для таймлайну */
    position: relative;
}

.image-date-time {
    position: absolute;
    right: 10px;
    bottom: 5px;
    font-size: 14px;
    color: #cccccc; /* Світліший текст */
}

.loading-indicator {
    position: absolute;
    right: 200px;
    top: 5px;
    font-size: 14px;
    color: #cccccc; /* Світліший текст */
}

#timeline {
    height: 60px; /* Висота відкоригована */
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
}

#timeline .time-block {
    width: 1px;
    height: 30px; /* Висота відкоригована */
    display: inline-block;
    position: relative;
}

.time-block.gray {
    background-color: #555555; /* Темний сірий колір для недоступних блоків */
    cursor: not-allowed;
}

.time-block.blue {
    background-color: #007bff; /* Залишаємо синій для доступних блоків */
    cursor: pointer;
}

.time-block.current {
    background-color: turquoise !important;
}

.time-block:hover {
    background-color: #55abe3; /* Колір підсвічування */
    cursor: pointer; /* Зміна курсора для візуального ефекту */
}

.tooltip {
    position: absolute;
    background-color: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 10px;
    border-radius: 5px;
    font-size: 12px;
    pointer-events: none; /* Щоб не заважати взаємодії з іншими елементами */
    z-index: 1000; /* Високий пріоритет для відображення поверх інших елементів */
    transform: translate(-50%, 0%); /* Вирівнювання над елементом */
    white-space: nowrap; /* Запобігання переносу тексту */
    display: flex;
    flex-direction: column; /* Вирівнювання елементів вертикально */
    align-items: center;
    gap: 5px; /* Відступ між зображенням і текстом */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.tooltip img {
    width: 100%; /* Зображення займає всю ширину tooltip */
    height: auto; /* Пропорційна висота */
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.time-block:hover .tooltip {
    visibility: visible;
}

.session-timer {
    position: fixed;
    top: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.7); /* Прозорий темний фон */
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 14px;
    z-index: 1000;
}

.controls {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 10px;
}

::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: #1e1e1e;
}

::-webkit-scrollbar-thumb {
    background-color: #555555;
    border-radius: 6px;
    border: 3px solid #1e1e1e;
}

::-webkit-scrollbar-thumb:hover {
    background-color: #777777;
}

button {
    background-color: #0078d4; /* Основний синій фон */
    color: #ffffff; /* Білий текст */
    border: none; /* Без рамки */
    border-radius: 6px; /* Закруглені краї */
    padding: 10px 20px; /* Простір всередині кнопки */
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

button:hover {
    background-color: #005a9e; /* Темніший синій при наведенні */
}

button:active {
    transform: scale(0.98); /* Невелике зменшення при натисканні */
}

button:disabled {
    background-color: #555555; /* Сірий фон для неактивних кнопок */
    cursor: not-allowed;
}

/* Специфічний стиль для кнопки виходу */
/* Style for the logout button */
#logoutBtn { 
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 15px 40px; /* Відступи для кнопки виходу */
    font-size: 14px; /* Трохи менший текст */
    background-color: #868080; 
    color: #ffffff; /* Білий текст */
    border-radius: 6px; /* Згладжені кути */
    cursor: pointer; /* Курсор у вигляді руки */
    transition: background-color 0.3s ease, transform 0.2s ease; /* Плавний перехід кольорів і ефект натискання */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Легка тінь */
}

/* Стиль кнопки виходу при наведенні */
#logoutBtn:hover {
    background-color: #a29c9c;
    transform: translateY(-1px); /* Легке підняття кнопки */
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15); /* Більша тінь */
}

/* Стиль кнопки виходу при натисканні */
#logoutBtn:active {
    background-color: #5c5858; /* Ще темніший червоний фон */
    transform: translateY(0); /* Повернення до початкової позиції */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Початкова тінь */
}

button {
    background: none; /* Видаляємо фон кнопки */
    border: none; /* Прибираємо межі */
    padding: 0; /* Прибираємо внутрішні відступи */
    cursor: pointer; /* Робимо курсор у вигляді руки */
    margin: 5px; /* Відстань між кнопками */
    width: 32px; /* Розмір кнопки під розмір зображення */
    height: 32px; /* Встановлюємо висоту кнопки */
    display: flex;
    align-items: center;
    justify-content: center;
}

button img {
    width: 100%; /* Розтягуємо зображення по розміру кнопки */
    height: 100%;
    border-radius: 5px; /* Робимо кути згладженими */
    transition: background-color 0.2s ease, box-shadow 0.2s ease; /* Додаємо плавний ефект */
}

button:hover img {
    background-color: rgba(255, 255, 255, 0.2); /* Додаємо фон підсвічування */
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.5); /* Підсвічування через тінь */
}

#thumbnailsView {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-start;
    padding: 10px;
}

#thumbnailsView img {
    width: calc(33.333% - 10px); /* Три зображення в рядок */
    max-width: 100%;
    height: auto;
    cursor: pointer;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease;
}

#thumbnailsView img:hover {
    transform: scale(1.05); /* Легке збільшення при наведенні */
}