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

body {
    font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', sans-serif;
    overflow-x: hidden;
    background-color: #a1a1a1;
}

/* Контейнер для полноэкранных секций */
.fullpage-container {
    scroll-snap-type: y mandatory;
    overflow-y: scroll;
    height: 100vh;
    scroll-behavior: smooth;
}

/* Каждая секция — полноэкранный блок */
.screen {
    scroll-snap-align: start;
    width: 100%;
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ПЕРВЫЙ ЭКРАН — фоновое изображение */
.screen-main {
    background-image: url('../img/bg.jpg');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #a1a1a1;
}

.screen-main .content {
    text-align: center;
    color: white;
    padding: 2rem;
    z-index: 2;
}

.screen-main h1 {
    font-size: 4rem;
    text-shadow: 2px 2px 20px rgba(0,0,0,0.5);
    letter-spacing: 3px;
    margin-bottom: 1rem;
    animation: fadeInUp 0.8s ease;
}

.screen-main p {
    font-size: 1.3rem;
    text-shadow: 1px 1px 10px rgba(0,0,0,0.4);
    opacity: 0.9;
    animation: fadeInUp 0.8s ease 0.2s both;
}

/* ПОДСКАЗКА "ПРОКРУТИТЕ ВНИЗ" */
.scroll-hint {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    z-index: 20;
    animation: bounce 2s infinite;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    padding: 8px 20px;
    border-radius: 50px;
    border: 1px solid rgba(255, 215, 150, 0.5);
    transition: all 0.3s ease;
}

.scroll-hint:hover {
    background: rgba(0, 0, 0, 0.7);
    border-color: #ffd966;
}

.hint-text {
    font-size: 0.8rem;
    color: #ffecb3;
    letter-spacing: 2px;
    font-family: monospace;
}

.hint-arrow {
    font-size: 1rem;
    color: #ffd966;
    font-weight: bold;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(8px); }
}

/* ВТОРОЙ ЭКРАН — ГАЛЕРЕЯ */
.screen-gallery {
    background-image: url('../img/bg2.jpg');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #a1a1a1;
    display: block;
    overflow-y: auto;
    padding: 1rem;
    padding-bottom: 70px;
}

.gallery-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0.5rem;
}

.gallery-container h2 {
    text-align: center;
    color: #ffefc0;
    font-size: 1.8rem;
    margin-bottom: 1rem;
    letter-spacing: 2px;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.5);
}

.gallery-container h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 2px;
    background: #ffd966;
    margin: 0.5rem auto 0;
    border-radius: 2px;
}

/* Сетка галереи */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    justify-items: center;
    align-items: center;
}

/* Карточка фото */
.gallery-item {
    background: rgba(15, 20, 30, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
    max-width: 180px;
    border: 1px solid rgba(255, 215, 150, 0.4);
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.4s ease forwards;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 25px -10px rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 215, 150, 0.8);
}

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

.gallery-item:hover .gallery-img {
    transform: scale(1.03);
}

.gallery-caption {
    padding: 0.5rem;
    text-align: center;
    color: #ffefc0;
    font-size: 0.7rem;
    font-weight: 500;
    background: rgba(0, 0, 0, 0.6);
    border-top: 1px solid rgba(255, 215, 150, 0.3);
}

/* КНОПКИ НАВИГАЦИИ ВНИЗУ */
.bottom-buttons {
    position: fixed;
    bottom: 15px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 15px;
    z-index: 100;
    padding: 0 15px;
    flex-wrap: wrap;
}

.nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    font-family: monospace;
    letter-spacing: 0.5px;
    cursor: pointer;
    border: 1px solid rgba(255, 215, 150, 0.5);
}

.home-btn {
    background: rgba(15, 20, 30, 0.85);
    color: #ffecb3;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.home-btn:hover {
    background: #2c3e50;
    transform: translateY(-2px);
    border-color: #ffd966;
}

.bio-btn {
    background: rgba(45, 55, 72, 0.85);
    color: #ffecb3;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.bio-btn:hover {
    background: #4a6741;
    transform: translateY(-2px);
    border-color: #ffd966;
}

/* МОДАЛЬНОЕ ОКНО */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(8px);
    justify-content: center;
    align-items: center;
}

.modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    text-align: center;
}

.modal-image {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    border: 2px solid #ffd966;
    transition: opacity 0.15s ease;
}

.modal-caption {
    margin-top: 0.8rem;
    color: #ffefc0;
    font-size: 1rem;
    font-weight: 500;
    text-shadow: 1px 1px 3px black;
}

.modal-close {
    position: absolute;
    top: -35px;
    right: 0;
    color: #ffd966;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
}

.modal-close:hover {
    color: #ffaa00;
}

/* СТРЕЛКИ НАВИГАЦИИ В МОДАЛЬНОМ ОКНЕ */
.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 2rem;
    color: #ffd966;
    transition: all 0.3s ease;
    z-index: 1010;
    user-select: none;
    border: 1px solid rgba(255, 215, 150, 0.5);
}

.modal-nav:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: translateY(-50%) scale(1.1);
    color: #ffaa00;
    border-color: #ffaa00;
}

.modal-nav.prev {
    left: 20px;
}

.modal-nav.next {
    right: 20px;
}

/* Скроллбар */
.screen-gallery::-webkit-scrollbar {
    width: 4px;
}
.screen-gallery::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.3);
    border-radius: 10px;
}
.screen-gallery::-webkit-scrollbar-thumb {
    background: #ffd966;
    border-radius: 10px;
}

/* Адаптив */
@media (max-width: 768px) {
    .screen-main h1 {
        font-size: 2.5rem;
    }
    .screen-main p {
        font-size: 1rem;
    }
    .gallery-container h2 {
        font-size: 1.4rem;
    }
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 0.8rem;
    }
    .gallery-img {
        height: 100px;
    }
    .gallery-caption {
        font-size: 0.6rem;
        padding: 0.4rem;
    }
    .bottom-buttons {
        bottom: 10px;
        gap: 10px;
    }
    .nav-btn {
        padding: 6px 14px;
        font-size: 0.7rem;
    }
    .scroll-hint {
        padding: 5px 15px;
        bottom: 20px;
    }
    .modal-nav {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }
    .modal-nav.prev {
        left: 10px;
    }
    .modal-nav.next {
        right: 10px;
    }
}

@media (max-width: 550px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
        gap: 0.7rem;
    }
    .gallery-img {
        height: 85px;
    }
    .gallery-caption {
        font-size: 0.55rem;
    }
    .modal-nav {
        width: 35px;
        height: 35px;
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(95px, 1fr));
        gap: 0.5rem;
    }
    .gallery-img {
        height: 75px;
    }
    .gallery-caption {
        font-size: 0.5rem;
        padding: 0.3rem;
    }
}