/* Базовые стили и сброс */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', 'Helvetica Neue', sans-serif;
}

:root {
    --primary-color: #1a1a1a;
    --secondary-color: #f5f5f5;
    --accent-color: #888;
    --text-color: #333;
    --transition: all 0.3s ease;
}

body {
    background-color: var(--secondary-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* Навигация */
header {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    padding: 1.5rem;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

/* Основной контент */
main {
    max-width: 1200px;
    margin: 100px auto 50px;
    padding: 0 1.5rem;
}

/* Сетка альбомов */
.albums-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.album-category {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 2;
    backdrop-filter: blur(5px);
}

.album-card {
    position: relative;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    transition: var(--transition);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    cursor: pointer;
}

.album-cover-container {
    position: relative;
    overflow: hidden;
}

.album-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.album-cover {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: var(--transition);
}

.album-card:hover .album-cover {
    transform: scale(1.05);
}

/* Цвета для разных категорий */

.category-военное {
    background: rgba(231, 76, 60, 0.9);
}

.album-info {
    padding: 1.5rem;
}

.album-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.album-description {
    color: var(--accent-color);
    font-size: 0.9rem;
    white-space: pre-line;
}

/* Стили для Markdown в описании */
.album-description h1,
.album-description h2,
.album-description h3,
.album-description h4,
.album-description h5,
.album-description h6 {
    color: var(--text-color);
    margin: 0.5rem 0;
}

.album-description h1 { font-size: 1.5rem; }
.album-description h2 { font-size: 1.3rem; }
.album-description h3 { font-size: 1.1rem; }

.album-description p {
    margin: 0.5rem 0;
}

.album-description strong {
    font-weight: 700;
}

.album-description em {
    font-style: italic;
}

.album-description ul {
    list-style: disc;
    margin: 0.5rem 0 0.5rem 1.5rem;
}

.album-description li {
    margin-bottom: 0.25rem;
}

/* Модальное окно альбома */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    overflow-y: auto;
}

.modal-content {
    position: relative;
    background-color: #111;
    margin: 60px auto;
    max-width: 1200px;
    padding: 2rem;
    border-radius: 8px;
}

.close-button {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2rem;
    color: white;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

.album-header {
    color: white;
    margin-bottom: 2rem;
}

.album-header h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.album-header p {
    color: #ccc;
    max-width: 600px;
}

/* Стили для Markdown в модальном окне */
#modal-album-description h1,
#modal-album-description h2,
#modal-album-description h3,
#modal-album-description h4,
#modal-album-description h5,
#modal-album-description h6 {
    color: white;
    margin: 0.5rem 0;
}

#modal-album-description h1 { font-size: 1.8rem; }
#modal-album-description h2 { font-size: 1.5rem; }
#modal-album-description h3 { font-size: 1.3rem; }

#modal-album-description p {
    color: #ccc;
    margin: 0.5rem 0;
}

#modal-album-description strong {
    font-weight: 700;
}

#modal-album-description em {
    font-style: italic;
}

#modal-album-description ul {
    list-style: disc;
    margin: 0.5rem 0 0.5rem 1.5rem;
    color: #ccc;
}

#modal-album-description li {
    margin-bottom: 0.25rem;
}

.photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.photo-item {
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
}

.photo-item:hover {
    transform: scale(1.02);
}

.photo-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

/* Адаптивность */
@media (max-width: 768px) {
    .albums-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .photos-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .modal-content {
        padding: 1rem;
        margin: 40px auto;
    }
}

/* Стили для цитат в стиле GitHub */
.album-description blockquote {
    background-color: #f6f8fa;
    border-left: 4px solid #d0d7de;
    margin: 0.1rem 0;
	border-radius: 20px;
    padding: 0.1rem 1rem;
    color: var(--text-color);
}

#modal-album-description blockquote {
    background-color: #2f363d; /* Темный фон для модального окна */
    border-left: 4px solid #d0d7de;
    margin: 0.1rem 0;
	border-radius: 20px;
    padding: 0.1rem 1rem;
    color: #ccc; /* Светлый текст для контраста */
}

/* Модальное окно для просмотра фото */
.photo-modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    margin: 5vh auto;
    text-align: center;
}

#full-photo {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
}

.nav-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    font-size: 2rem;
    padding: 0.5rem 1rem;
    cursor: pointer;
    border-radius: 4px;
    transition: var(--transition);
}

.nav-button:hover {
    background: rgba(0, 0, 0, 0.7);
}

.prev-button {
    left: 10px;
}

.next-button {
    right: 10px;
}

@media (max-width: 768px) {
    .photo-modal-content {
        max-width: 95vw;
    }

    #full-photo {
        max-height: 70vh;
    }

    .nav-button {
        font-size: 1.5rem;
        padding: 0.3rem 0.8rem;
    }
}

/* Обновленные стили для контейнера поиска */
.search-container {
    flex: 1;
    max-width: 400px;
    margin: 0 1rem;
    position: relative;
    display: flex;
    align-items: center;
}

#search-input {
    width: 100%;
    padding: 0.5rem 3rem 0.5rem 1rem;
    border: 1px solid var(--accent-color);
    border-radius: 25px;
    background-color: var(--secondary-color);
    color: var(--text-color);
    font-size: 1rem;
    outline: none;
    transition: var(--transition);
}

.search-button {
    position: absolute;
    right: 0.5rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.3rem;
    border-radius: 50%;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-icon {
    color: var(--accent-color);
    transition: var(--transition);
}

/* Анимации для поиска */
.search-button:hover .search-icon {
    color: var(--primary-color);
    transform: scale(1.1);
}

.search-button:active .search-icon {
    transform: scale(0.9);
}

/* Анимация лупы при фокусе */
#search-input:focus + .search-button .search-icon {
    color: var(--primary-color);
    animation: searchPulse 1s ease-in-out;
}

/* Анимация при нажатии на кнопку */
.search-button.clicked .search-icon {
    animation: searchSpin 0.6s ease-in-out;
}

@keyframes searchPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

@keyframes searchSpin {
    0% { transform: rotate(0deg); }
    50% { transform: rotate(180deg); }
    100% { transform: rotate(360deg); }
}

/* Адаптивность */
@media (max-width: 768px) {
    .search-container {
        margin: 0 0.5rem;
    }

    #search-input {
        font-size: 0.9rem;
        padding: 0.4rem 2.5rem 0.4rem 0.8rem;
    }
    
    .search-button {
        right: 0.3rem;
        padding: 0.2rem;
    }
    
    .search-icon {
        width: 18px;
        height: 18px;
    }
}

/* Стили для секции видео */
.videos-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #333;
}

.videos-title {
    color: white;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.video-item {
    cursor: pointer;
    transition: var(--transition);
    border-radius: 8px;
    overflow: hidden;
    background: #1a1a1a;
}

.video-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.video-player {
    position: relative;
    width: 100%;
    height: 180px;
    overflow: hidden;
}

.video-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(255, 0, 0, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    transition: var(--transition);
}

.video-item:hover .video-play-button {
    background: rgba(255, 0, 0, 1);
    transform: translate(-50%, -50%) scale(1.1);
}

.video-info {
    padding: 1rem;
}

.video-title {
    color: white;
    font-size: 1rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.video-caption {
    color: #ccc;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Модальное окно для YouTube видео */
.youtube-modal {
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
}

.youtube-modal-content {
    position: relative;
    width: 90%;
    max-width: 800px;
    height: 80vh;
    margin: 10vh auto;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}

.youtube-player-container {
    width: 100%;
    height: 100%;
    padding: 0;
}

.youtube-modal .close-button {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2001;
    background: rgba(0, 0, 0, 0.7);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Адаптивность для видео */
@media (max-width: 768px) {
    .videos-grid {
        grid-template-columns: 1fr;
    }
    
    .video-player {
        height: 200px;
    }
    
    .youtube-modal-content {
        width: 95%;
        height: 60vh;
        margin: 20vh auto;
    }
}

@media (max-width: 480px) {
    .videos-grid {
        grid-template-columns: 1fr;
    }
    
    .video-player {
        height: 150px;
    }
    
    .youtube-modal-content {
        height: 50vh;
        margin: 25vh auto;
    }
}

/* Стили для фильтров категорий */
.category-filters {
    display: flex;
    gap: 0.5rem;
    margin: 1.5rem 0;
    flex-wrap: wrap;
}

.category-filter {
    padding: 0.5rem 1rem;
    border: 2px solid var(--accent-color);
    background: white;
    color: var(--text-color);
    border-radius: 25px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
}

.category-filter:hover,
.category-filter.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Стили для контейнера логотипа */
.logo-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-image {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 4px;
}

/* Обновите существующие стили логотипа */
.logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .logo-image {
        width: 32px;
        height: 32px;
    }
    
    .logo {
        font-size: 1.3rem;
    }
    
    .logo-container {
        gap: 0.3rem;
    }
}

/* Навигация */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    gap: 1rem;
}

/* Стили для контейнера логотипа */
.logo-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.logo-image {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 4px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    white-space: nowrap;
}

/* Строка поиска - занимает доступное пространство */
.search-container {
    flex: 1;
    max-width: 400px;
    margin: 0 1rem;
}

#search-input {
    width: 100%;
    padding: 0.5rem 1rem;
    border: 1px solid var(--accent-color);
    border-radius: 20px;
    background-color: var(--secondary-color);
    color: var(--text-color);
    font-size: 1rem;
    outline: none;
    transition: var(--transition);
}

/* Стили для ссылки Telegram */
.telegram-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #0088cc;
    color: white;
    text-decoration: none;
    transition: var(--transition);
    flex-shrink: 0;
}

.telegram-link:hover {
    background: #0077b3;
    transform: scale(1.1);
}

.tg-icon {
    width: 20px;
    height: 20px;
}

/* Адаптивность */
@media (max-width: 768px) {
    nav {
        gap: 0.5rem;
        flex-wrap: wrap;
    }
    
    .logo-image {
        width: 32px;
        height: 32px;
    }
    
    .logo {
        font-size: 1.3rem;
    }
    
    .search-container {
        margin: 0 0.5rem;
        order: 3;
        flex-basis: 100%;
        max-width: 100%;
    }
    
    .telegram-link {
        width: 36px;
        height: 36px;
    }
    
    .tg-icon {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 480px) {
    .logo-container {
        gap: 0.3rem;
    }
    
    .logo {
        font-size: 1.1rem;
    }
    
    .telegram-link {
        width: 32px;
        height: 32px;
    }
    
    .tg-icon {
        width: 16px;
        height: 16px;
    }
}

@media (max-width: 768px) {
    main h1 {
        margin-top: 150px; /* Больший отступ */
    }
}



footer {
            background-color: var(--primary-color);
            color: white;
            text-align: center;
            padding: 1.5rem;
            margin-top: auto;
        }
		
@media (max-width: 768px) {
	footer {
            background-color: var(--primary-color);
            color: white;
            text-align: center;
            padding: 1.5rem;
            margin-top: auto;
        }
}
		
		
/* Стили для кнопки "Показать еще" */
.load-more-button {
    display: block !important;
    width: 220px !important;
    margin: 2rem auto !important;
    padding: 1rem 2rem !important;
    background: var(--primary-color) !important;
    color: white !important;
    border: none !important;
    border-radius: 25px !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    text-align: center !important;
}


#load-more-photos {
    display: block !important;
    width: 220px !important;
    margin: 2rem auto !important;
    padding: 1rem 2rem !important;
    background: var(--primary-color) !important;
    color: white !important;
    border: none !important;
    border-radius: 25px !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    text-align: center !important;
}

.load-more-button:hover {
    background: #333 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2) !important;
}

/* Адаптивность для кнопки */
@media (max-width: 768px) {
    button.load-more-button {
        width: 200px !important;
        padding: 0.8rem 1.5rem !important;
        font-size: 0.9rem !important;
    }
}

/* Стили для ленивой загрузки */
.photo-placeholder {
    width: 100%;
    height: 200px;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.loading-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid #e0e0e0;
    border-top: 3px solid #888;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.photo-item.loaded img {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.photo-error {
    width: 100%;
    height: 200px;
    background: #ffebee;
    color: #c62828;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    font-size: 0.9rem;
}

/* Оптимизация для уже загруженных изображений */
.photo-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    transition: opacity 0.3s ease;
}

/* Улучшение для мобильных устройств */
@media (max-width: 768px) {
    .photo-placeholder,
    .photo-item img {
        height: 150px;
    }
}

/* Анимации для плавного перехода фото */
#full-photo {
    transition: opacity 0.3s ease-in-out;
    opacity: 1;
}

#full-photo.fade-out {
    opacity: 0;
}

#full-photo.fade-in {
    opacity: 1;
}

/* Улучшение для плавного отображения */
.photo-modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    margin: 5vh auto;
    text-align: center;
    transition: all 0.3s ease;
}

/* Плавное появление модального окна */
.modal {
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        backdrop-filter: blur(0px);
    }
    to {
        opacity: 1;
        backdrop-filter: blur(10px);
    }
}

/* Плавное исчезновение */
.modal.fade-out {
    animation: modalFadeOut 0.3s ease forwards;
}

@keyframes modalFadeOut {
    from {
        opacity: 1;
        backdrop-filter: blur(10px);
    }
    to {
        opacity: 0;
        backdrop-filter: blur(0px);
    }
}

/* Анимация для кнопок навигации */
.nav-button {
    transition: all 0.3s ease;
    opacity: 0.7;
}

.nav-button:hover {
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
}

/* Плавное изменение размера изображения при загрузке */
#full-photo.loading {
    opacity: 0;
    transform: scale(0.9);
}

#full-photo.loaded {
    opacity: 1;
    transform: scale(1);
    transition: opacity 0.3s ease, transform 0.3s ease;
}


.verify-checkmark {
    vertical-align: middle;
    margin-right: -3px;
    margin-top: -2px;
}


/* Комментарии */
#comments-section {
    margin-top: 2rem;
    color: white;
}

#comments-section h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.comment-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: #ccc;
    margin-bottom: 0.5rem;
}

.comment-username {
    font-weight: 600;
}

.comment-date {
    color: #888;
}

.comment-text {
    color: white;
}

#comment-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#comment-text {
    padding: 0.8rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #222;
    color: white;
    min-height: 100px;
}

#comment-form button {
    padding: 0.8rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

#comment-form button:hover {
    background: #333;
}

#comment-login-message {
    color: #ccc;
    text-align: center;
}