/* Сброс стилей */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: 'Segoe UI', Tahoma, sans-serif;
}

body {
    position: relative;
}

/* ===== Кнопка "О проекте" ===== */
#aboutBtn {
    position: fixed;
    top: 25px;
    right: 30px;
    padding: 12px 24px;
    background-color: rgba(0, 0, 0, 0.4);
    color: #ffffff;
    border: none;
    font-size: 16px;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    z-index: 10;
    font-family: inherit;
}

#aboutBtn:hover {
    background-color: rgba(0, 0, 0, 0.65);
}

/* ===== Всплывающее окно "О проекте" ===== */
#aboutModal {
    display: none;
    position: fixed;
    top: 80px;
    right: 30px;
    width: 380px;
    padding: 40px 30px 30px 30px;
    color: #ffffff;
    background: linear-gradient(to bottom, #4134a2, #9f7edd, #eec8e7);
    border-radius: 0 20px 0 0;
    border: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    z-index: 100;
    animation: fadeIn 0.35s ease;
}

#aboutModal.show {
    display: block;
}

#aboutModal h2 {
    margin-bottom: 12px;
    font-size: 22px;
    font-weight: 600;
    color: rgba(0, 0, 0, 1);
}

#aboutModal p {
    font-size: 15px;
    line-height: 1.6;
    color: rgba(0, 0, 0, 1);
}

#closeModal {
    position: absolute;
    top: 12px;
    right: 20px;
    font-size: 26px;
    font-weight: bold;
    color: #ffffff;
    cursor: pointer;
    line-height: 1;
    transition: transform 0.2s ease, opacity 0.2s ease;
    opacity: 0.85;
}

#closeModal:hover {
    transform: scale(1.15);
    opacity: 1;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-15px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ===== Нижний блок с заголовками и кнопкой ===== */
#bottomBlock {
    position: fixed;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    z-index: 10;
}

/* Большой белый заголовок */
#mainTitle {
    color: #ffffff;
    font-size: 56px;
    font-weight: 800;
    letter-spacing: 6px;
    text-align: center;
    text-shadow: 0 4px 25px rgba(0, 0, 0, 0.6);
    line-height: 1.1;
}

/* Подзаголовок чуть меньше */
#subTitle {
    color: #ffffff;
    font-size: 30px;
    font-weight: 400;
    letter-spacing: 4px;
    text-align: center;
    text-shadow: 0 3px 15px rgba(0, 0, 0, 0.6);
    margin-bottom: 18px;
}

/* ===== Кнопка "ВПЕРЁД" ===== */
#forwardBtn {
    padding: 18px 130px;
    color: #ffffff;
    font-size: 22px;
    font-weight: 600;
    letter-spacing: 4px;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    background: linear-gradient(
        to right,
        rgba(0, 0, 0, 0) 0%,
        rgba(0, 0, 0, 0.4) 25%,
        rgba(0, 0, 0, 0.4) 75%,
        rgba(0, 0, 0, 0) 100%
    );
    border: none;
    border-radius: 0;
    transition: letter-spacing 0.3s ease, background 0.3s ease;
}

#forwardBtn:hover {
    letter-spacing: 7px;
    background: linear-gradient(
        to right,
        rgba(0, 0, 0, 0) 0%,
        rgba(0, 0, 0, 0.55) 25%,
        rgba(0, 0, 0, 0.55) 75%,
        rgba(0, 0, 0, 0) 100%
    );
}

/* ===== Плавное появление элементов при загрузке ===== */
.fade-item {
    opacity: 0;
    transform: translateY(30px);
    animation: smoothAppear 1s ease forwards;
}

/* Задержки — элементы появляются по очереди */
#mainTitle {
    animation-delay: 0.3s;
}

#subTitle {
    animation-delay: 0.9s;
}

#forwardBtn {
    animation-delay: 1.5s;
}

@keyframes smoothAppear {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body.index-page {
    background-image: url('img/background.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}
#introOverlay {
    position: fixed;
    inset: 0;
    background-color: #000000;
    z-index: 9999;
    pointer-events: none;
    animation: overlayFade 2s ease forwards;
}

@keyframes overlayFade {
    from { opacity: 1; }
    to   { opacity: 0; }
}