/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: #0a0a0a;
    color: #ffffff;
    line-height: 1.6;
    overflow-x: hidden;
    overflow-y: hidden;
    position: relative;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

/* Скрываем скроллбар в WebKit браузерах (Chrome, Safari, Edge) */
body::-webkit-scrollbar {
    display: none;
}

html {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

html::-webkit-scrollbar {
    display: none;
}

/* Animated background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(120, 219, 255, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 219, 120, 0.2) 0%, transparent 50%);
    filter: blur(100px);
    z-index: -2;
    animation: backgroundShift 20s ease-in-out infinite;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 60% 30%, rgba(255, 119, 198, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 30% 70%, rgba(120, 219, 255, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 70% 60%, rgba(255, 219, 120, 0.1) 0%, transparent 40%);
    filter: blur(150px);
    z-index: -1;
    animation: backgroundShift 25s ease-in-out infinite reverse;
}

@keyframes backgroundShift {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    25% {
        transform: translate(-20px, -20px) scale(1.1);
    }
    50% {
        transform: translate(20px, -10px) scale(0.9);
    }
    75% {
        transform: translate(-10px, 20px) scale(1.05);
    }
}

/* Floating particles */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.particle:nth-child(1) { left: 10%; animation-delay: 0s; }
.particle:nth-child(2) { left: 20%; animation-delay: 1s; }
.particle:nth-child(3) { left: 30%; animation-delay: 2s; }
.particle:nth-child(4) { left: 40%; animation-delay: 3s; }
.particle:nth-child(5) { left: 50%; animation-delay: 4s; }
.particle:nth-child(6) { left: 60%; animation-delay: 5s; }
.particle:nth-child(7) { left: 70%; animation-delay: 0.5s; }
.particle:nth-child(8) { left: 80%; animation-delay: 1.5s; }
.particle:nth-child(9) { left: 90%; animation-delay: 2.5s; }
.particle:nth-child(10) { left: 15%; animation-delay: 3.5s; }
.particle:nth-child(11) { left: 25%; animation-delay: 4.5s; }
.particle:nth-child(12) { left: 35%; animation-delay: 5.5s; }
.particle:nth-child(13) { left: 45%; animation-delay: 0.2s; }
.particle:nth-child(14) { left: 55%; animation-delay: 1.2s; }
.particle:nth-child(15) { left: 65%; animation-delay: 2.2s; }
.particle:nth-child(16) { left: 75%; animation-delay: 3.2s; }
.particle:nth-child(17) { left: 85%; animation-delay: 4.2s; }
.particle:nth-child(18) { left: 95%; animation-delay: 5.2s; }
.particle:nth-child(19) { left: 5%; animation-delay: 0.8s; }
.particle:nth-child(20) { left: 100%; animation-delay: 1.8s; }

@keyframes float {
    0%, 100% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    50% {
        transform: translateY(50vh) scale(1);
        opacity: 0.5;
    }
}

/* Gallery section */
.gallery-section {
    padding: 4rem 0;
    background: rgba(10, 10, 10, 0.6);
    backdrop-filter: blur(10px);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

.gallery-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(26, 26, 26, 0.3) 0%, rgba(10, 10, 10, 0.3) 100%);
    z-index: -1;
}

/* Gallery header */
.gallery-header {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    z-index: 1;
}

.gallery-title {
    font-size: 3.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #ffffff 0%, #e0e0e0 50%, #ffffff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(255,255,255,0.3);
    animation: titleGlow 2s ease-in-out infinite alternate;
    position: relative;
    z-index: 1;
    margin-bottom: 1rem;
}

@keyframes titleGlow {
    from { text-shadow: 0 0 30px rgba(255,255,255,0.3); }
    to { text-shadow: 0 0 50px rgba(255,255,255,0.5); }
}

.gallery-description {
    font-size: 1.2rem;
    color: #cccccc;
    max-width: 600px;
    margin: 0 auto;
    font-style: italic;
    text-shadow: 0 0 10px rgba(255,255,255,0.1);
}

/* Gallery container */
.gallery-container {
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    z-index: 1;
}

/* Gallery scroll */
.gallery-scroll {
    display: flex;
    gap: 2rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 1rem 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
}

.gallery-scroll::-webkit-scrollbar {
    display: none;
}

/* Gallery items */
.gallery-item {
    flex: 0 0 350px;
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    transform: translateZ(0);
    cursor: pointer;
}

/* Оптимизация миниатюр в галерее */
.gallery-item .item-image img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    filter: contrast(1.1) brightness(1.05);
}

.gallery-item::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #2a2a2a, #1a1a1a, #0d0d0d, #1f1f1f, #2d2d2d);
    border-radius: 17px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: rgba(255,255,255,0.3);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    background: rgba(255,255,255,0.12);
}

.gallery-item:hover::before {
    opacity: 1;
}

/* Item image */
.item-image {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    overflow: hidden;
}

.item-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    filter: contrast(1.1) brightness(1.05);
}

.gallery-item:hover .item-image img {
    transform: scale(1.05);
}

/* Item content */
.item-content {
    padding: 1.5rem;
}

.item-content h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #ffffff;
}

.designer {
    font-size: 0.9rem;
    color: #cccccc;
    font-style: italic;
}

/* Author links */
.author-link {
    color: #4a9eff;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.author-link:hover {
    color: #66b3ff;
    text-decoration: underline;
    text-shadow: 0 0 8px rgba(74, 158, 255, 0.5);
}

.author-text {
    color: #cccccc;
    font-style: italic;
}

/* Scroll buttons */
.scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.25);
    color: #ffffff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.scroll-btn:hover {
    background: rgba(255,255,255,0.25);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

.scroll-left {
    left: -25px;
}

.scroll-right {
    right: -25px;
}

/* Modal styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: none;
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal.active {
    display: flex;
    opacity: 1;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    backdrop-filter: blur(10px);
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal.active .modal-overlay {
    opacity: 1;
}

.modal-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    z-index: 1001;
    transform: scale(0.8);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal.active .modal-content {
    transform: scale(1);
    opacity: 1;
}

.modal-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: #ffffff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    z-index: 1002;
    transform: scale(0);
    opacity: 0;
}

.modal.active .modal-close {
    transform: scale(1);
    opacity: 1;
    transition-delay: 0.2s;
}

.modal-close:hover {
    background: rgba(255,255,255,0.2);
    transform: scale(1.1);
}

.modal-image-container {
    max-width: 80%;
    max-height: 70%;
    position: relative;
    transform: scale(0.9);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transition-delay: 0.1s;
}

.modal.active .modal-image-container {
    transform: scale(1);
    opacity: 1;
}

.modal-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
    max-width: 1200px;
    max-height: 800px;
    transition: opacity 0.3s ease;
    image-rendering: auto;
    filter: none;
}

.modal-info {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    text-align: center;
    background: rgba(0,0,0,0.8);
    padding: 1rem 2rem;
    border-radius: 10px;
    backdrop-filter: blur(10px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transition-delay: 0.3s;
}

.modal.active .modal-info {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.modal-info h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #ffffff;
    transition: opacity 0.3s ease;
}

.modal-author {
    font-size: 1rem;
    color: #cccccc;
    font-style: italic;
    transition: opacity 0.3s ease;
}

.modal-author .author-link {
    color: #4a9eff;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.modal-author .author-link:hover {
    color: #66b3ff;
    text-decoration: underline;
    text-shadow: 0 0 8px rgba(74, 158, 255, 0.5);
}

.modal-author .author-text {
    color: #cccccc;
    font-style: italic;
}

.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%) scale(0);
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: #ffffff;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    z-index: 1002;
    opacity: 0;
}

.modal.active .modal-nav {
    transform: translateY(-50%) scale(1);
    opacity: 1;
    transition-delay: 0.4s;
}

.modal-nav:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-50%) scale(1.1);
}

.modal-prev {
    left: 2rem;
}

.modal-next {
    right: 2rem;
}

/* Footer */
.footer {
    background: rgba(26, 26, 26, 0.8);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 2rem 0;
    position: relative;
}

.footer .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.copyright {
    font-family: 'SF Pro Display', sans-serif;
    font-weight: 700;
    color: #cccccc;
    text-shadow: 0 0 10px rgba(255,255,255,0.1);
}

.brand {
    font-family: 'SF Pro Display', sans-serif;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 0 15px rgba(255,255,255,0.3);
}

/* Responsive design */
@media (max-width: 768px) {
    /* Gallery header */
    .gallery-title {
        font-size: 2.5rem;
        margin-bottom: 0.8rem;
    }
    
    .gallery-description {
        font-size: 1rem;
        max-width: 90%;
    }
    
    /* Gallery container */
    .gallery-container {
        padding: 0 1rem;
        max-width: 100%;
    }
    
    /* Gallery items */
    .gallery-item {
        flex: 0 0 280px;
        margin: 0 0.5rem;
    }
    
    .item-content {
        padding: 1.2rem;
    }
    
    .item-content h3 {
        font-size: 1.1rem;
    }
    
    .designer {
        font-size: 0.8rem;
    }
    
    /* Scroll buttons */
    .scroll-btn {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }
    
    .scroll-left {
        left: 0.5rem;
    }
    
    .scroll-right {
        right: 0.5rem;
    }
    
    /* Footer */
    .footer .container {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
        padding: 0 1rem;
    }
    
    .copyright, .brand {
        font-size: 0.9rem;
    }
    
    /* Modal */
    .modal-content {
        padding: 1rem;
    }
    
    .modal-close {
        top: 1rem;
        right: 1rem;
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }
    
    .modal-nav {
        width: 55px;
        height: 55px;
        font-size: 1.3rem;
    }
    
    .modal-prev {
        left: 1rem;
    }
    
    .modal-next {
        right: 1rem;
    }
    
    .modal-info {
        bottom: 1rem;
        padding: 0.8rem 1.5rem;
        max-width: 90%;
    }
    
    .modal-info h3 {
        font-size: 1.2rem;
    }
    
    .modal-author {
        font-size: 0.9rem;
    }
    
    /* Gallery section */
    .gallery-section {
        padding: 2rem 0;
        min-height: 100vh;
    }
    
    .gallery-header {
        margin-bottom: 2rem;
    }
    
    /* Gallery scroll */
    .gallery-scroll {
        gap: 1rem;
        padding: 0.5rem 0;
    }
}

@media (max-width: 480px) {
    /* Gallery header */
    .gallery-title {
        font-size: 2rem;
        margin-bottom: 0.6rem;
    }
    
    .gallery-description {
        font-size: 0.9rem;
        max-width: 95%;
    }
    
    /* Gallery container */
    .gallery-container {
        padding: 0 0.5rem;
    }
    
    /* Gallery items */
    .gallery-item {
        flex: 0 0 250px;
        margin: 0 0.3rem;
    }
    
    .item-content {
        padding: 1rem;
    }
    
    .item-content h3 {
        font-size: 1rem;
    }
    
    .designer {
        font-size: 0.75rem;
    }
    
    /* Scroll buttons */
    .scroll-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .scroll-left {
        left: 0.3rem;
    }
    
    .scroll-right {
        right: 0.3rem;
    }
    
    /* Footer */
    .footer {
        padding: 1.5rem 0;
    }
    
    .footer .container {
        padding: 0 0.5rem;
    }
    
    .copyright, .brand {
        font-size: 0.8rem;
    }
    
    /* Modal */
    .modal-content {
        padding: 0.5rem;
    }
    
    .modal-close {
        top: 0.5rem;
        right: 0.5rem;
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .modal-nav {
        width: 50px;
        height: 50px;
        font-size: 1.1rem;
    }
    
    .modal-prev {
        left: 0.5rem;
    }
    
    .modal-next {
        right: 0.5rem;
    }
    
    .modal-info {
        bottom: 0.5rem;
        padding: 0.6rem 1rem;
        max-width: 95%;
    }
    
    .modal-info h3 {
        font-size: 1.1rem;
    }
    
    .modal-author {
        font-size: 0.8rem;
    }
    
    /* Gallery section */
    .gallery-section {
        padding: 1.5rem 0;
    }
    
    .gallery-header {
        margin-bottom: 1.5rem;
    }
    
    /* Gallery scroll */
    .gallery-scroll {
        gap: 0.8rem;
        padding: 0.3rem 0;
    }
}

/* Очень маленькие экраны */
@media (max-width: 360px) {
    .gallery-title {
        font-size: 1.8rem;
    }
    
    .gallery-description {
        font-size: 0.8rem;
    }
    
    .gallery-item {
        flex: 0 0 220px;
    }
    
    .scroll-btn {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
    
    .modal-close {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
    
    .modal-nav {
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
} 