/* Стили для переключателя темы */
.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 24px;
    padding: 10px 14px;
    color: white;
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 10px;
}

.theme-toggle:hover {
    transform: scale(1.1);
    background-color: rgba(255, 255, 255, 0.2);
}

/* Темная тема */
body.dark-theme {
    background-color: #121212;
    color: #e0e0e0;
}

body.dark-theme nav {
    background-color: #1e1e1e;
}

body.dark-theme nav a {
    color: #e0e0e0;
}

body.dark-theme nav a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

body.dark-theme .user-info {
    background-color: rgba(255, 255, 255, 0.05);
    color: #e0e0e0;
}

body.dark-theme .login-button,
body.dark-theme .logout-button {
    color: #e0e0e0;
}

body.dark-theme .nav-toggle {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: #e0e0e0;
}

body.dark-theme .hamburger {
    background-color: #e0e0e0;
}

/* Дополнительные стили для контента */
body.dark-theme main {
    background-color: #121212;
    color: #e0e0e0;
}

body.dark-theme h1,
body.dark-theme h2,
body.dark-theme h3,
body.dark-theme h4,
body.dark-theme h5,
body.dark-theme h6 {
    color: #bb86fc;
}

body.dark-theme a {
    color: #82b1ff;
}

body.dark-theme a:hover {
    color: #448aff;
}

body.dark-theme .error {
    color: #cf6679;
}

body.dark-theme .info {
    color: #03dac6;
}

/* Адаптация для мобильных */
@media (max-width: 768px) {
    .theme-toggle {
        font-size: 20px;
        padding: 8px 12px;
        margin-left: 0;
        order: -1;
    }

    /* Адаптация encrypted-placeholder для маленьких экранов */
    .encrypted-placeholder {
        padding: 20px !important;
    }
    .encrypted-placeholder h3 {
        font-size: 18px;
    }
    .encrypted-placeholder p {
        font-size: 14px;
    }
    .encrypted-placeholder div[style*="font-size: 64px"] {
        font-size: 48px !important;
    }
    .encrypted-placeholder div[style*="font-size: 48px"] {
        font-size: 36px !important;
    }
    .encrypted-placeholder input[type="password"] {
        padding: 10px;
        font-size: 14px;
    }
    .encrypted-placeholder button[type="submit"] {
        padding: 10px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .encrypted-placeholder {
        padding: 15px !important;
    }
    .encrypted-placeholder h3 {
        font-size: 16px;
    }
    .encrypted-placeholder p {
        font-size: 12px;
    }
    .encrypted-placeholder div[style*="font-size: 64px"] {
        font-size: 36px !important;
    }
    .encrypted-placeholder div[style*="font-size: 48px"] {
        font-size: 24px !important;
    }
    .encrypted-placeholder input[type="password"] {
        padding: 8px;
        font-size: 13px;
    }
    .encrypted-placeholder button[type="submit"] {
        padding: 8px;
        font-size: 13px;
    }
}
/* Стили для view-container в темной теме */
body.dark-theme .view-container {
    background-color: #1e1e1e;
    color: #e0e0e0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

body.dark-theme .view-info {
    background-color: #2d2d2d;
    color: #cccccc;
}

body.dark-theme .view-info p {
    color: #cccccc;
}

body.dark-theme .tag {
    background-color: #3a3a3a;
    color: #bb86fc;
}

body.dark-theme .nav-button {
    background-color: #6666ff;
    color: white;
}

body.dark-theme .nav-button:hover {
    background-color: #5555dd;
}

body.dark-theme .nav-button.disabled {
    background-color: #555555;
    color: #aaaaaa;
}

/* Стили для image-box в темной теме */
body.dark-theme .image-box {
    background-color: #2d2d2d;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

body.dark-theme .image-box:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}

body.dark-theme .encrypted-placeholder {
    background-color: #3a3a3a !important;
    color: #e0e0e0;
}

body.dark-theme .encrypted-placeholder p {
    color: #b0b0b0;
}

/* Переопределение инлайн-стилей для больших плейсхолдеров на странице view */
body.dark-theme .encrypted-placeholder[style*="background-color"] {
    background-color: #3a3a3a !important;
}

/* Стили для текстовых элементов внутри */
body.dark-theme .encrypted-placeholder h3 {
    color: #bb86fc;
}

body.dark-theme .encrypted-placeholder div[style*="color: #666"] {
    color: #b0b0b0 !important;
}

body.dark-theme .encrypted-placeholder div[style*="color: #999"] {
    color: #888 !important;
}

/* Стили для формы ввода ключа */
body.dark-theme .encrypted-placeholder input[type="password"] {
    background-color: #2d2d2d;
    color: #e0e0e0;
    border-color: #555;
}

body.dark-theme .encrypted-placeholder input[type="password"]:focus {
    border-color: #6666ff;
    outline: none;
}

body.dark-theme .encrypted-placeholder button[type="submit"] {
    background-color: #6666ff;
    color: white;
    border: none;
}

body.dark-theme .encrypted-placeholder button[type="submit"]:hover {
    background-color: #5555dd;
}

/* Для маленьких плейсхолдеров в списках постов */
body.dark-theme .image-box .encrypted-placeholder {
    background-color: #3a3a3a !important;
}

body.dark-theme .encrypted-placeholder div[style*="color: #666"] {
    color: #b0b0b0 !important;
}

/* Стили для футера в темной теме */
body.dark-theme footer {
    background-color: #1e1e1e;
    color: #e0e0e0;
}

body.dark-theme footer p {
    color: #e0e0e0;
}

body.dark-theme footer a {
    color: #82b1ff;
}

body.dark-theme footer a:hover {
    color: #448aff;
}

/* Стили для search-form в темной теме */
body.dark-theme .search-input {
    background-color: #2d2d2d;
    color: #e0e0e0;
    border-color: #555;
}

body.dark-theme .search-input:focus {
    border-color: #6666ff;
}

body.dark-theme .search-button {
    background-color: #6666ff;
    color: white;
}

body.dark-theme .search-button:hover {
    background-color: #5555dd;
}

body.dark-theme .autocomplete-suggestions {
    background-color: #2d2d2d;
    border-color: #555;
}

body.dark-theme .autocomplete-suggestion {
    color: #e0e0e0;
    border-bottom-color: #444;
}

body.dark-theme .autocomplete-suggestion:hover {
    background-color: #3a3a3a;
}

body.dark-theme .tag-count {
    color: #aaa;
}
/* Стили для пагинации в темной теме */
body.dark-theme .pagination a {
    background-color: #2d2d2d;
    border-color: #555;
    color: #e0e0e0;
}

body.dark-theme .pagination a:hover {
    border-color: #6666ff;
    color: #82b1ff;
    box-shadow: 0 4px 8px rgba(102, 102, 255, 0.3);
}

body.dark-theme .pagination a.active {
    background-color: #6666ff;
    border-color: #6666ff;
    color: white;
}

body.dark-theme .pagination a.disabled {
    background-color: #3a3a3a;
    color: #888;
    border-color: #555;
}
/* Стили для section на странице about в темной теме */
body.dark-theme section {
    background-color: #2d2d2d;
    color: #e0e0e0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

body.dark-theme section h1 {
    color: #bb86fc;
}

body.dark-theme section p {
    color: #cccccc;
}

body.dark-theme section img {
    filter: brightness(0.8);
}
/* Дополнительные стили для страницы about в темной теме */
body.dark-theme section h2 {
    color: #bb86fc;
}

body.dark-theme section h3 {
    color: #03dac6;
}

body.dark-theme section ul,
body.dark-theme section ol {
    color: #cccccc;
}

body.dark-theme section li {
    color: #cccccc;
}

body.dark-theme .feature-list {
    background-color: transparent;
}

body.dark-theme .feature-item {
    background-color: #3a3a3a;
    border-left-color: #bb86fc;
}

body.dark-theme .feature-item h3 {
    color: #bb86fc;
}

body.dark-theme .feature-item p {
    color: #cccccc;
}

body.dark-theme .nav-guide {
    background-color: #2d2d2d;
    border-color: #555;
}

body.dark-theme .nav-guide h3 {
    color: #03dac6;
}

body.dark-theme .nav-guide ul {
    color: #cccccc;
}

body.dark-theme .nav-guide li {
    color: #cccccc;
}

body.dark-theme kbd {
    background-color: #555;
    color: #fff;
    border-color: #777;
}