:root {
    --primary-color: #1a1a2e;
    --secondary-color: #16213e;
    --accent-color: #0f3460;
    --text-color: #e6e6e6;
    --highlight-color: #00b4d8;
    --card-color: #2a2a3c;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--primary-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    padding: 20px 0;
    text-align: center;
    animation: fadeIn 1s ease-in-out;
}

.title {
    font-size: 2.5rem;
    margin-bottom: 10px;
    background: linear-gradient(90deg, var(--highlight-color), #00d4ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 10px rgba(0, 180, 216, 0.3);
}

.gallery {
    padding: 20px 0;
}

.category {
    margin-bottom: 30px;
    padding: 15px;
    background-color: var(--secondary-color);
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.category:hover {
    transform: translateY(-5px);
}

.category-title {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--highlight-color);
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 8px;
}

.documents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.document-card {
    background-color: var(--card-color);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

.document-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.document-card:hover .document-image {
    filter: brightness(1.1);
}

.document-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    transition: filter 0.3s ease;
}

.document-name {
    padding: 12px;
    text-align: center;
    font-weight: 500;
}

/* Модальное окно */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    overflow: auto;
    animation: fadeIn 0.3s;
}

.modal-content {
    display: block;
    margin: 50px auto;
    max-width: 80%;
    max-height: 80%;
    border: 3px solid var(--highlight-color);
    border-radius: 5px;
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 30px;
    color: var(--text-color);
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close-btn:hover {
    color: var(--highlight-color);
}

.caption {
    text-align: center;
    color: white;
    padding: 10px 0;
    font-size: 1.2rem;
}

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

/* Адаптивность */
@media (max-width: 768px) {
    .title {
        font-size: 2rem;
    }
    
    .documents-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 1.8rem;
    }
    
    .documents-grid {
        grid-template-columns: 1fr;
    }
}