@font-face {
font-family: "Philosopher"; 
src: url("/assets/fonts/Philosopher/Philosopher-Regular.ttf") format("truetype"); 
font-style: normal; 
font-weight: normal; 
font-display: fallback;
}  
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #121212;
    --bg-secondary: #1e1e1e;
    --bg-card: #252525;
    --text-primary: #f0f0f0;
    --text-secondary: #b0b0b0;
    --accent: #ff9800;
    --border: #333;
    --success: #69db8a;
}

/* Страница */
html, body {
    height: 100%;
    margin: 0;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: Philosopher,'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
}

.page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Шапка */
header {
    background-color: var(--bg-secondary);
    padding: 1rem 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    text-align: center;
}

header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #ff9800;
}

/* Меню в шапке */
.header-menu ul {
    list-style: none;
    display: block;
    margin-top: 10px;
    padding: 0;
}

.header-menu li { margin: 0; display:inline-block; padding-left:10px; }
.header-menu a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s;
    background: url(/assets/svg/folder.svg?v=4) left center no-repeat;
    padding-left: 20px;
}

.header-menu a:hover {
    color: var(--accent);
    text-decoration: underline;
}

/* Основной контент */
main {
    flex: 1;
    width: 1000px;
    max-width: 100%;
    margin: 1.5rem auto;
    padding: 0 1rem;
}

section {
    margin-bottom: 2.5rem;
}

section h2 {
    font-size: 1.4rem;
    margin-bottom: 1.2rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
    color: var(--accent);
}

/* Галерея */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.thumb {
    width: 100%;
    height: auto;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid var(--border);
    background: #333;
}

.thumb:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
    border-color: var(--accent);
}

/* Сетка категорий на главной */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 24px;
    margin-top: 16px;
}

.category-item {
    text-align: center;
}

.category-item a {
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
background: url(/assets/svg/folder.svg?v=4) left center no-repeat;
padding-left: 22px;
display: inline;

}

.category-item a:hover {
    color: var(--accent);
}

.category-thumb {
    width: 100%;
    max-width: 200px;
    height: auto;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: #333;
}

/* Подвал */
footer {
    background-color: var(--bg-secondary);
    padding: 1rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    border-top: 1px solid var(--border);
}

/* Модальное окно */
#modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    overflow: auto;
}

.modal-content {
    background: var(--bg-card);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    position: relative;
    max-width: 400px;
    width: calc(100% - 2rem);
    max-height: 100vh;
    display: flex;
    flex-direction: column;
}

.modal-body {
    padding: 2rem;
    overflow-y: auto;
    max-height: calc(100vh - 2rem);
}

#close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    color: var(--text-secondary);
    cursor: pointer;
    z-index: 1001;
}

#close:hover {
    color: var(--accent);
}

.modal-preview {
    width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
    margin-bottom: 20px;
    background: #333;
}

.modal-banner {
    background: var(--bg-secondary);
    padding: 16px;
    border-radius: 10px;
    text-align: center;
    margin-bottom: 20px;
    font-weight: 600;
}

#download-area {
    text-align: center;
}

.btn {
    display: inline-block;
    padding: 8px 16px;
    background: var(--accent);
    color: #000;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    border: none;
    cursor: pointer;
}

/* Адаптивность */
@media (max-width: 768px) {
    .gallery {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 12px;
    }

    .categories-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }

    .header-menu ul {
        gap: 10px;
    }
}

@media (max-width: 600px) {
    .categories-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }

    .header-menu ul {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .gallery {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 10px;
    }
}