* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --color-bg-dark: #1a1a1a;
    --color-bg-card: #2a2a2a;
    --color-text: #e8e8e8;
    --color-text-secondary: #999;
    --color-border: #3a3a3a;
    --color-accent: #555;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', sans-serif;
    background: var(--color-bg-dark);
    color: var(--color-text);
    overflow-x: hidden;
}

header {
    padding: 2.5rem 2rem;
    text-align: center;
    border-bottom: 1px solid var(--color-border);
    background: linear-gradient(180deg, var(--color-bg-card) 0%, var(--color-bg-dark) 100%);
}

header h1 {
    font-size: 2rem;
    font-weight: 300;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

header p {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    font-weight: 300;
}

.gallery-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    padding: 0;
}

.gallery-thumbnail {
    position: relative;
    overflow: hidden;
    border-radius: 6px;
    background: var(--color-bg-card);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--color-border);
    aspect-ratio: 16 / 9;
}

.gallery-thumbnail:hover {
    border-color: var(--color-accent);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    transform: scale(1.05);
}

.gallery-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: filter 0.3s ease;
}

.gallery-thumbnail:hover img {
    filter: brightness(1.15);
}

.thumbnail-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(42, 42, 42, 0.6) 0%, rgba(26, 26, 26, 0.8) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text);
    font-size: 2rem;
}

.gallery-thumbnail:hover .thumbnail-overlay {
    opacity: 1;
}

/* Лайтбокс */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.lightbox-container {
    position: relative;
    width: 90%;
    max-width: 1000px;
    height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 4px;
    animation: slideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.lightbox-nav {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    pointer-events: none;
    padding: 0 2rem;
}

.lightbox-btn {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    cursor: pointer;
    border-radius: 4px;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    pointer-events: all;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 300;
}

.lightbox-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
}

.lightbox-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    cursor: pointer;
    border-radius: 4px;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-info {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    background: rgba(26, 26, 26, 0.9);
    padding: 1.5rem 2rem;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    max-width: 500px;
}

.lightbox-counter {
    font-size: 0.85rem;
    color: #999;
    margin-bottom: 0.5rem;
    letter-spacing: 0.5px;
}

.lightbox-title {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 0.3rem;
}

.lightbox-description {
    font-size: 0.8rem;
    color: #aaa;
}

footer {
    background: var(--color-bg-card);
    border-top: 1px solid var(--color-border);
    padding: 2.5rem 2rem;
    text-align: center;
    color: var(--color-text-secondary);
    font-size: 0.9rem;
}

footer p {
    margin: 0.5rem 0;
}

/* Адаптивный дизайн */
@media (max-width: 1024px) {
    .gallery-wrapper {
        padding: 2rem 1.5rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 1.2rem;
    }

    header h1 {
        font-size: 1.6rem;
    }

    .lightbox-container {
        height: 70vh;
    }
}

@media (max-width: 768px) {
    header {
        padding: 1.5rem 1rem;
    }

    header h1 {
        font-size: 1.3rem;
    }

    header p {
        font-size: 0.85rem;
    }

    .gallery-wrapper {
        padding: 1.5rem 1rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 1rem;
    }

    .lightbox-container {
        width: 95%;
        height: 60vh;
        padding: 0;
    }

    .lightbox-nav {
        padding: 0 1rem;
    }

    .lightbox-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .lightbox-close {
        width: 36px;
        height: 36px;
        font-size: 1.2rem;
        top: 1rem;
        right: 1rem;
    }

    .lightbox-info {
        bottom: 1rem;
        padding: 1rem 1.5rem;
    }

    .lightbox-title {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    header {
        padding: 1rem;
    }

    header h1 {
        font-size: 1.1rem;
        margin-bottom: 0.3rem;
    }

    header p {
        font-size: 0.8rem;
    }

    .gallery-wrapper {
        padding: 1rem 0.8rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
    }

    .lightbox-container {
        width: 100%;
        height: 50vh;
    }

    .lightbox-nav {
        padding: 0;
    }

    .lightbox-btn {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    .lightbox-close {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }

    .lightbox-info {
        bottom: 0.8rem;
        padding: 0.8rem 1rem;
        max-width: 90%;
    }

    .lightbox-counter {
        font-size: 0.75rem;
    }

    .lightbox-title {
        font-size: 0.9rem;
        margin-bottom: 0.2rem;
    }

    .lightbox-description {
        font-size: 0.75rem;
        display: none;
    }

    footer {
        padding: 1.5rem 1rem;
    }

    footer p {
        font-size: 0.8rem;
    }
}