
/* -------------------- Тело -------------------- */
body {
    margin: 0;
    font-family: Arial, sans-serif;
}

body {
    background-color: #ffffff; /* Light background */
    color: #333333; /* Dark text for readability */
}

body.dark-mode {
    background-color: #121212; /* Dark background */
    color: #ffffff; /* White text for dark mode */
}

/* -------------------- Хедер -------------------- */
header {
    position: fixed;
    top: 0;
    width: 100%;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Lighter shadow for both themes */
    z-index: 1000;
    background-color: whitesmoke;
}

header h1 {
    margin: 0;
    padding-right: 40px;
    font-size: 24px;
}

header button {
    background-color: #6200ea; /* Purple button */
    border: none;
    padding: 10px;
    border-radius: 6px;
    color: #ffffff;
    cursor: pointer;
}

header button:hover {
    background-color: #3600b3; /* Darker purple */
}

header.dark-mode {
    background-color: #1f1f1f; /* Dark header background */
}

/* -------------------- Сайдбар -------------------- */
.sidebar {
    position: fixed;
    top: 60px;
    left: 0;
    width: 250px;
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 4px rgba(0, 0, 0, 0.1); /* Легкая тень */
    background-color: #ffffff; /* Белый фон для светлой темы */
    z-index: 999;
    overflow-y: auto;
    padding: 20px;
    transform: translateX(-100%); /* Скрываем сайдбар */
    transition: all 0.3s;
}

/* Когда активен, сайдбар выдвигается */
.sidebar.active {
    transform: translateX(0); /* Сдвигаем в исходное положение */
}

.sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar ul li {
    margin-bottom: 15px;
}

.sidebar ul li a {
    text-decoration: none;
    color: #6200ea; /* Purple text color */
    font-size: 16px;
    padding: 10px;
    display: block;
    border-radius: 4px;
}

.sidebar ul li a:hover {
    color: #ffffff;
    background-color: #3700b3; /* Darker purple for hover */
    transition: all 0.3s;

}

.sidebar ul li a.active {
    background-color: rgba(160, 12, 186, 0.811);
    color: #ffffff;
}

.section-title {
    font-size: 14px;
    color: #9c27b0;
    text-transform: uppercase;
    margin-top: 20px;
    margin-bottom: 10px;
}

/* Стили для выпадающего списка */
.dropdown-btn {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dropdown-container {
    display: none;
    padding-left: 20px;
}

.dropdown-container a {
    font-size: 14px;
    color: #9c27b0;
}

.dropdown-container a:hover {
    color: #3700b3;
}

.dropdown-icon {
    transition: transform 0.3s ease;
}

.dropdown-btn.active .dropdown-icon {
    transform: rotate(180deg); /* Переворот иконки */
}

/* Тёмная тема для сайдбара */
.sidebar.dark-mode {
    background-color: #1e1e2f; /* Тёмный фон */
}

.sidebar.dark-mode ul li a {
    color: #03a9f4; /* Светло-синие ссылки */
}

.sidebar.dark-mode ul li a:hover {
    background-color: #0288d1; /* Тёмно-синий при наведении */
}

/* Тёмная тема для выпадающего контейнера */
.sidebar.dark-mode .dropdown-container {
    background-color: #252535; /* Фон для выпадающих подкатегорий */
}

.sidebar.dark-mode .dropdown-container a {
    color: #4fc3f7; /* Светло-синий для подкатегорий */
}

.sidebar.dark-mode .dropdown-container a:hover {
    color: #ffffff; /* Белый текст при наведении */
    background-color: #0288d1; /* Тёмно-синий фон */
}

/* Иконка в тёмной теме */
.sidebar.dark-mode .dropdown-btn .dropdown-icon {
    color: #03a9f4; /* Светло-синяя стрелка */
}


/* -------------------- Контент -------------------- */
.content {
    margin-top: 60px;
    padding: 20px;
    text-align: center;
    animation: fadeIn 2s ease-in-out;
    background: linear-gradient(135deg, #e3f2fd, #ede7f6);
    border-radius: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.content h2 {
    color: #6200ea; /* Purple color for headings */
    font-size: 2.5rem;
    font-family: 'Roboto', sans-serif;
    letter-spacing: 1px;
    transition: transform 0.3s ease, color 0.3s ease;
}

.content h2:hover {
    transform: scale(1.1);
    color: #311b92;
}

.content p {
    line-height: 1.8;
    font-size: 1.1rem;
    color: #333;
    font-family: 'Open Sans', sans-serif;
    transition: color 0.3s ease;
}

.content p:hover {
    color: #6200ea; /* Purple color on hover */
}

.content.dark-mode {
    background: linear-gradient(135deg, #303f9fa7, #531a7e8b);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.content.dark-mode h2 {
    color: #9c27b0; /* Purple color for headings in dark mode */
}

.content.dark-mode p {
    color: #ffffff; /* White text in content for dark mode */
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (hover: hover) {
    .content p:hover {
        color: #6200ea; /* Purple color on hover */
        transition: color 0.3s ease;
    }
}

/* -------------------- Кнопка переключения темы -------------------- */
.theme-toggle-button {
    bottom: 10px;
    right: 20px;
    background-color: #edeced; /* Purple background */
    border: none;
    padding: 5px;
    border-radius: 10%;
    color: white;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 1001; /* Ensure it's above other content */
}

.theme-toggle-button:hover {
    background-color: #3700b3; /* Darker purple on hover */
    transform: scale(1.1); /* Slightly enlarge the button on hover */
}

.theme-toggle-button:active {
    background-color: #03a9f4; /* Lighter blue when button is pressed */
    transform: scale(1); /* Reset size when clicked */
}

body:not(.dark-mode) .theme-toggle-button {
    background-color: #9c27b0; /* Yellow for light theme */
}

body.dark-mode .theme-toggle-button {
    background-color: #6200ea; /* Purple for dark theme */
}

/* -------------------- Пользовательское меню -------------------- */
.user_icon {
    position: relative;
    display: inline-block;
    cursor: pointer;
}

.user_icon img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: transform 0.3s ease;
    margin-right: 50px;
}

.user_icon img:hover {
    transform: scale(1.1);
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 50px; /* Adjust as necessary */
    right: 0;
    background-color: #ffffff;
    border-radius: 10px;
    border: 1px solid #ddd;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    width: 200px;
    font-family: 'Open Sans', sans-serif;
    margin-right: 50px;

}

body.dark-mode .dropdown-menu {
    background-color: #333;
    border: 1px solid #555;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
}

body.dark-mode .dropdown-menu a, body.dark-mode .dropdown-menu button {
    color: #ddd;
}

body.dark-mode .dropdown-menu a:hover, body.dark-mode .dropdown-menu button:hover {
    background-color: #444;
    color: #9c27b0;
}

.dropdown-menu.show {
    display: block;
    animation: dropdownFadeIn 0.3s ease;
}

.dropdown-menu a, .dropdown-menu button {
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    color: #333;
    background-color: transparent;
    border: none;
    width: 100%;
    text-align: left;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.dropdown-menu a:hover, .dropdown-menu button:hover {
    background-color: #f1f1f1;
    color: #6200ea;
}

.dropdown-menu .divider {
    height: 1px;
    background-color: #ddd;
    margin: 8px 0;
}

body.dark-mode .dropdown-menu .divider {
    background-color: #555;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* -------------------- Медиа-запросы -------------------- */
@media (max-width: 768px) {
    .sidebar {
        width: 200px;
    }

    header button {
        padding: 8px;
    }

    .sidebar ul li a {
        font-size: 14px;
    }
}


/* -------------------- Стиль для окна регистрации-------------------- */
.modal {
    display: none; /* Скрыто по умолчанию */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6); /* Черный фон с полупрозрачностью */
    z-index: 1000;
    animation: fadeIn 0.5s ease-in-out;
}

/* Окно регистрации */
.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #fff;
    padding: 40px;
    border-radius: 10px;
    width: 400px;
    max-width: 90%;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    text-align: center;
    box-sizing: border-box;
    background: linear-gradient(135deg, #a130fe, #4a18ff);
}

.modal-content h2 {
    color: white;
    font-family: 'Roboto', sans-serif;
    font-size: 2rem;
    margin-bottom: 20px;
}

.modal-content label {
    display: block;
    margin: 10px 0 5px;
    color: #333;
}

.modal-content input {
    width: 100%;
    padding: 12px;
    margin-bottom: 20px;
    border-radius: 6px;
    border: 1px solid #ccc;
}

.modal-content input:focus {
    border-color: #6200ea;
    outline: none;
}

.modal-content button {
    width: 100%;
    padding: 12px;
    background-color: #6200ea;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.modal-content button:hover {
    background-color: #311b92;
}

/* Кнопка закрытия */
.close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    color: #aaa;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
}

.close-btn:hover {
    color: #6200ea;
}

/* Фон затемнения */
.overlay {
    display: none; /* Скрыто по умолчанию */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 999;
}

/* Анимация */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Тёмная тема для модального окна */
.modal-content.dark-mode {
    background: linear-gradient(135deg, #304ffe, #18ffff);
}

.modal-content.dark-mode input {
    border-color: #ffffff;
}

.modal-content.dark-mode button {
    background-color: #6200ea;
}

.overlay.dark-mode {
    background-color: rgba(0, 0, 0, 0.8);
}


/*  Анимации  */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/*  Темный режим  */
.modal-content.dark-mode {
    background: linear-gradient(135deg, #304ffe, #18ffff);
}

.modal-content.dark-mode input {
    border-color: #ffffff;
}

.modal-content.dark-mode button {
    background-color: #6200ea;
}

.overlay.dark-mode {
    background-color: rgba(0, 0, 0, 0.8);
}
