/* show/gallery.css - стили для галереи */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f8f9fa;
    padding: 20px;
}
.logo {
    flex: 0 0 auto;
}
.logo img {
    max-width: 160px;
    height: auto;
}
@media (max-width: 768px) {
    .logo img {
        max-width: 100px;
    }
}
.gallery {
    max-width: 1200px;
    margin: auto;
}
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}
h1 {
    font-size: 2rem;
    color: #333;
}
.home-link {
    background: #007bff;
    color: white;
    padding: 10px 20px;
    border-radius: 30px;
    text-decoration: none;
    transition: 0.3s;
}
.home-link:hover {
    background: #0056b3;
    transform: scale(1.02);
}
/* Фильтры */
.filter-bar {
    background: white;
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-end;
}
.filter-group {
    flex: 1;
    min-width: 150px;
}
.filter-group label {
    display: block;
    font-size: 0.8rem;
    margin-bottom: 4px;
    color: #6c757d;
}
.filter-group input, .filter-group select {
    width: 100%;
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid #ccc;
}
.filter-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
}
.filter-buttons button, .filter-buttons a {
    padding: 6px 12px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
}
.filter-buttons a {
    background: #6c757d;
}
/* Карточки публикаций */
.publication {
    background: white;
    border-radius: 12px;
    margin-bottom: 30px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.publication:nth-child(even) {
    background: #f1f3f5;
}
.header-info {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-bottom: 15px;
    color: #6c757d;
    font-size: 0.9rem;
}
.number {
    font-size: 0.8rem;
    color: #adb5bd;
}
.techcode {
    font-weight: bold;
    color: #495057;
    cursor: pointer;
}
.techcode:hover {
    text-decoration: underline;
    color: #007bff;
}
.username {
    cursor: pointer;
}
.username:hover {
    text-decoration: underline;
    color: #007bff;
}
.metamorph {
    background: #e9ecef;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.8rem;
    display: inline-block;
}
.tags {
    margin: 10px 0;
}
.tag {
    background: #dee2e6;
    padding: 2px 8px;
    border-radius: 12px;
    margin-right: 5px;
    font-size: 0.8rem;
    display: inline-block;
    cursor: pointer;
}
.tag:hover {
    background: #ced4da;
    text-decoration: underline;
}
.images {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 15px 0;
}
.images img {
    width: 180px;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s;
}
.images img:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.prompt {
    background: #f1f3f5;
    padding: 12px;
    border-radius: 8px;
    margin: 10px 0;
    position: relative;
}
.copy-prompt {
    position: absolute;
    right: 10px;
    top: 10px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 12px;
}
.delete-request {
    margin-top: 10px;
    text-align: right;
}
.delete-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
}
.link-btn {
    background: #17a2b8;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    margin-right: 5px;
}
.link-spoiler {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 10px;
    margin-top: 10px;
    display: none;
}
.link-spoiler a {
    color: #007bff;
    word-break: break-all;
}
.copy-link-btn {
    background: #28a745;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    cursor: pointer;
    margin-left: 5px;
}
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}
.pagination a {
    padding: 8px 12px;
    background: #e9ecef;
    border-radius: 6px;
    text-decoration: none;
    color: #333;
}
.pagination a.active {
    background: #007bff;
    color: white;
}
/* Модальное окно */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}
.modal-content {
    position: relative;
    max-width: 95%;
    max-height: 95%;
    text-align: center;
}
.modal img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
}
.modal button.close {
    position: absolute;
    top: 20px;
    right: 30px;
    background: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 24px;
    cursor: pointer;
}
.download-btn {
    position: absolute;
    bottom: 20px;
    right: 30px;
    background: rgba(0,0,0,0.7);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    cursor: pointer;
    text-decoration: none;
}
.prev, .next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    padding: 16px;
    cursor: pointer;
    font-size: 24px;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.prev { left: 20px; }
.next { right: 20px; }
@media (max-width: 768px) {
    .images img {
        width: 120px;
        height: 120px;
    }
    .prev, .next {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    .filter-form {
        flex-direction: column;
        align-items: stretch;
    }
}
/* Стили для single просмотра */
.view-container {
    max-width: 1000px;
    margin: 0 auto;
}
.view-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}
.publication-single {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.images-single {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 15px 0;
    justify-content: center;
}
.images-single img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s;
}
.images-single img:hover {
    transform: scale(1.02);
}
.back-link {
    background: #007bff;
    color: white;
    padding: 8px 16px;
    border-radius: 30px;
    text-decoration: none;
    transition: 0.3s;
}
.back-link:hover {
    background: #0056b3;
}