@font-face {
    font-family: 'Comic Sans MS'; /* Имя, которое вы будете использовать в CSS */
    src: url('Comic Sans MS.ttf') format('truetype'); /* Путь к файлу шрифта */
    font-weight: normal;
    font-style: normal;
}

html {
    scroll-behavior: smooth; /* Плавный скролл */
}

/* Общие стили */
body {
    font-family: 'Comic Sans MS', cursive, sans-serif;
    background-color: #f0f0f0;
    color: #333;
    text-align: center;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

h1, h2, h3 {
    font-family: 'Comic Sans MS', cursive, sans-serif;
}

/* Стили для лоадера */
.loader-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #333; /* Темный фон */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999; /* Чтобы лоадер был поверх всего */
    transition: opacity 0.7s ease-out, visibility 0.7s ease-out;
    opacity: 1;
    visibility: visible;
}

.loader-wrapper.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: white;
}

.loader-image {
    width: 150px; /* Размер вашей картинки like.png */
    height: 150px;
    margin-bottom: 20px;
    animation: rotateAndScale 1s infinite alternate; /* Анимация для иконки */
}

@keyframes rotateAndScale {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(-15px);
    }
}

.loader-text {
    font-family: 'Comic Sans MS', cursive, sans-serif;
    font-size: 3em;
    font-weight: bold;
    margin-bottom: 20px;
    color: #4CAF50; /* Цвет текста PEPEARMY */
    animation: bounce 1s infinite alternate; /* Анимация для текста */
}

@keyframes bounce {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(-15px);
    }
}

.loader-bar-container {
    width: 300px;
    height: 20px;
    background-color: #555;
    border-radius: 10px;
    overflow: hidden;
    margin-top: 20px;
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
}

.loader-bar {
    width: 0%;
    height: 100%;
    background-color: #4CAF50; /* Цвет заполнения шкалы */
    border-radius: 10px;
    transition: width 0.3s ease-out; /* Плавное заполнение */
}


/* Шапка */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #4CAF50;
    color: white;
    padding: 10px 20px;
    box-sizing: border-box;
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
}

header .logo {
    display: flex;
    align-items: center;
}

header .logo img {
    width: 50px;
    height: 50px;
    margin-right: 10px;
}

header .logo h1 {
    margin: 0;
    font-size: 1.5em;
    color: white;
}

/* Меню */
nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 20px;
    align-items: center;
}

nav ul li {
    display: inline;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-size: 1.1em;
}

nav ul li a:hover {
    text-decoration: underline;
}

nav ul li button.cta-button {
    background-color: #FFD700;
    color: #333;
    padding: 10px 20px;
    font-size: 1.1em;
    border: none;
    cursor: pointer;
    border-radius: 5px;
    animation: pulse 1.5s infinite;
}

/* Анимация пульсации */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

/* Блок с фоном и текстом PEPE DEFENDER */
.hero-section {
    width: 100vw;
    height: 650px;
    max-height: 1080px;
    background-image: url('fon.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    position: relative;
    margin: 0 auto;
    margin-top: 60px;
}

/* Затемнение фона */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 0;
}

/* Контент */
.hero-content {
    position: absolute;
    top: 10%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
    text-align: center;
}

.hero-content h2 {
    font-size: 4em;
    margin: 0;
}

/* Стили для текста PEPE и DEFENDER */
#pepe-text,
#defender-text {
    display: inline-block;
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 1s ease, transform 1s ease;
}

#pepe-text {
    transform: translateX(-100%) translateY(-20px); /* Начальное смещение влево */
}

#defender-text {
    transform: translateX(100%) translateY(-20px); /* Начальное смещение вправо */
}

#pepe-text.animate {
    opacity: 1;
    transform: translateX(0) translateY(0); /* Конечное положение */
}

#defender-text.animate {
    opacity: 1;
    transform: translateX(0) translateY(0); /* Конечное положение */
}

/* Стили для обратной анимации */
#pepe-text:not(.animate) {
    transform: translateX(-100%) translateY(-20px); /* Возвращаем влево */
    opacity: 0;
}

#defender-text:not(.animate) {
    transform: translateX(100%) translateY(-20px); /* Возвращаем вправо */
    opacity: 0;
}

/* Изображение */
.hero-image {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
}

.hero-image img {
    max-width: 60%; /* Изменено: Уменьшено до 50% по запросу */
    height: auto;
    display: block;
    margin: 0 auto; /* Это отцентрирует изображение по горизонтали внутри его родительского блока */
}

/* Контейнер для элементов внизу справа */
.bottom-right-container {
    position: absolute;
    bottom: 20px;
    right: 50px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    width: auto;
    z-index: 1;
}

/* Стили для контейнера с input и кнопкой Copy */
.input-container {
    display: flex;
    align-items: center;
    width: 100%;
}

.input-container input {
    padding: 10px;
    font-size: 1em;
    border: 2px solid #4CAF50;
    border-radius: 5px;
    margin-right: 10px;
    width: 300px;
    text-align: center;
    background-color: #fff;
    color: #333;
    cursor: not-allowed;
}

.input-container .copy-button {
    background-color: #4CAF50;
    color: white;
    padding: 10px 20px;
    font-size: 1em;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    white-space: nowrap;
}

.input-container .copy-button:hover {
    background-color: #45a049;
}

/* Стили для кнопки BUY ON BLUM */
.buy-on-blum {
    background-color: #FFD700;
    color: #333;
    padding: 10px 20px;
    font-size: 1.2em;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
}

.buy-on-blum:hover {
    background-color: #e6b800;
}

.buy-on-blum .blum {
    background-color: black; /* Черный фон */
    color: white; /* Белый текст */
    border: 2px solid black; /* Черная рамка */
    padding: 2px 5px;
    border-radius: 3px;
    font-weight: bold;
}

/* Зеленый цвет для всех $PEPEDEF */
.pepedef {
    color: #4CAF50;
}

/* Черный цвет для $PEPEDEF на кнопке */
.pepedef-black {
    color: black;
}

/* Блок About */
.about-section {
    display: flex;
    justify-content: space-between;
    align-items: flex-start; /* Поднимаем текст к верхней границе */
    padding: 50px 20px; /* Отступы от границ */
    padding-bottom: 0;
    background-color: #fff;
    box-sizing: border-box;
    width: 100%;
    position: relative; /* Добавляем относительное позиционирование */
}

.about-section h2 {
    font-size: 2.5em;
    margin-bottom: 30px;
}

.about-text {
    flex: 1;
    text-align: left;
    padding-right: 20px;
}

.about-image {
    flex: 1;
    display: flex;
    align-items: flex-end; /* Прижимаем картинку к низу */
    position: relative; /* Добавляем относительное позиционирование */
    margin-left: 300px; /* Сдвигаем картинку на 300px вправо */
}

#about-image {
    max-width: 80%;
    height: auto;
    position: relative; /* Добавляем относительное позиционирование */
    animation: moveImage 6s linear infinite; /* Анимация движения */
}

/* Анимация движения картинки с мгновенным отражением */
@keyframes moveImage {
    0% {
        transform: translateX(-140px) scaleX(1); /* Начальное положение: -150px, без отражения */
    }
    49.9% {
        transform: translateX(140px) scaleX(1); /* Правая точка без отражения */
    }
    50% {
        transform: translateX(140px) scaleX(-1); /* Мгновенное отражение */
    }
    99.9% {
        transform: translateX(-140px) scaleX(-1); /* Левая точка с отражением */
    }
    100% {
        transform: translateX(-150px) scaleX(1); /* Мгновенное возвращение в исходное состояние */
    }
}

/* Блок Tokenomics */
.tokenomics-section {
    padding: 50px 20px;
    background-color: #f9f9f9;
    box-sizing: border-box;
    width: 100%;
}

.tokenomics-section h2 {
    font-size: 2.5em;
    margin-bottom: 30px;
}

.tokenomics-images {
    display: flex;
    justify-content: center;
    align-items: flex-end; /* Изменено: Прижато к низу секции */
    gap: 30px; /* Расстояние между картинками */
    flex-wrap: wrap; /* Перенос на новую строку на мобильных */
}

.tokenomics-image {
    max-width: 30%; /* Ширина картинки, чтобы 3 поместились в ряд */
    height: auto;
    animation: sway 3s ease-in-out infinite alternate; /* Анимация покачивания */
}

/* Анимация покачивания */
@keyframes sway {
    0% {
        transform: rotate(15deg);
    }
    100% {
        transform: rotate(-15deg);
    }
}

/* Блок FAQ */
.faq-section {
    padding: 50px 20px;
    background-color: #fff;
    box-sizing: border-box;
    width: 100%;
}

.faq-section h2 {
    font-size: 2.5em;
    margin-bottom: 30px;
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
}

.faq-item {
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
}

.faq-question {
    display: flex;
    align-items: center;
    padding: 15px;
    background-color: #f9f9f9;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.faq-question:hover {
    background-color: #f0f0f0;
}

.faq-icon {
    font-size: 1.5em;
    margin-right: 10px;
    transition: transform 0.3s ease;
}

.faq-answer {
    padding: 0 15px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-answer p {
    margin: 0;
    padding: 15px 0;
}

/* Активный вопрос */
.faq-item.active .faq-icon {
    transform: rotate(45deg); /* Плюс становится минусом */
}

.faq-item.active .faq-answer {
    max-height: 200px; /* Максимальная высота для анимации */
    padding: 0 15px 15px 15px;
}

/* Блок Links */
/* Стили для флага в секции Links */
.links-section {
    position: relative; /* Чтобы позиционировать флаг относительно этого блока */
    padding-bottom: 150px; /* Изменено: Увеличено для отступа от флага */
    padding-top: 50px; /* Убедимся, что есть достаточный отступ сверху */
}

.links-section h2 {
    font-size: 2.5em;
    margin-bottom: 30px;
}

.links-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 50px; /* Добавлен отступ снизу для разделения от флага */
}

.links-container a {
    color: #4CAF50;
    text-decoration: none;
    font-size: 1.2em;
}

.links-container a:hover {
    text-decoration: underline;
}

.links-section .flag-image {
    position: absolute;
    bottom: -10px; /* Отрегулировано, чтобы флаг располагался правильно относительно нового padding-bottom */
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: auto;
}

/* Блок Buy */
.buy-section {
    display: flex;
    align-items: center; /* Центрируем текст по вертикали */
    padding: 0; /* Отступы от границ */
    background-color: #f9f9f9;
    box-sizing: border-box;
    width: 100%;
}

.buy-image img {
    max-width: 50%;
    height: auto;
    border-radius: 10px;
    margin-bottom: -10px;
}

.buy-content {
    text-align: center;
}

.buy-section h2 {
    font-size: 2.5em;
    margin-bottom: 20px;
    color: #4CAF50; /* Зеленый цвет для заголовка */
}

.buy-section p {
    font-size: 1.2em;
    margin-bottom: 20px;
    color: #333;
}

.buy-section .cta-button {
    background-color: #FFD700;
    color: #333;
    padding: 15px 30px;
    font-size: 1.2em;
    border: none;
    cursor: pointer;
    border-radius: 5px;
    margin: 20px 0;
    animation: pulse 1.5s infinite; /* Анимация пульсации */
    transition: background-color 0.3s ease;
}

.buy-section .cta-button:hover {
    background-color: #e6b800;
}

/* Бегущая строка */
.marquee-section {
    background-color: #4CAF50; /* Зеленый фон */
    color: white; /* Белый текст */
    overflow: hidden;
    white-space: nowrap;
    padding: 10px 0;
    width: 100%;
    box-sizing: border-box;
    position: relative;
}

.marquee {
    display: flex;
    width: 300%; /* Увеличиваем ширину, чтобы вместить три блока текста */
    animation: marquee 30s linear infinite; /* Анимация бегущей строки */
}

.marquee-reverse {
    animation: marquee-reverse 30s linear infinite; /* Обратная анимация */
}

.marquee-content {
    display: flex;
    align-items: center;
    flex: 1;
}

.marquee span {
    padding-right: 50px; /* Расстояние между повторениями текста */
    font-size: 1.5em;
    font-weight: bold;
}

/* Анимация бегущей строки (справа налево) */
@keyframes marquee {
    0% {
        transform: translateX(0); /* Начальное положение */
    }
    100% {
        transform: translateX(-66.66%); /* Сдвигаем на две трети ширины */
    }
}

/* Анимация бегущей строки (слева направо) */
@keyframes marquee-reverse {
    0% {
        transform: translateX(-66.66%); /* Начальное положение */
    }
    100% {
        transform: translateX(0); /* Сдвигаем на две трети ширины */
    }
}

/* Стили для бомб */
.bomb {
    position: absolute;
    top: -100px; /* Начальная позиция за пределами видимости */
    width: 100px; /* Размер бомбы */
    height: 100px;
    animation: fall linear forwards; /* Анимация падения */
}

/* Анимация падения */
@keyframes fall {
    to {
        top: 100%; /* Падение до нижней границы hero-section */
    }
}

/* ------------------- БУРГЕР МЕНЮ И МЕДИА-ЗАПРОСЫ ТОЛЬКО ДЛЯ МОБИЛЬНЫХ УСТРОЙСТВ ------------------- */

/* Стили для бургер-иконки (невидима на ПК) */
.burger-icon {
    display: none; /* Скрыто на ПК */
    cursor: pointer;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    z-index: 1001; /* Поверх всего */
}

.burger-icon div {
    width: 100%;
    height: 3px;
    background-color: white;
    border-radius: 2px;
    transition: all 0.3s ease-in-out;
}

/* Медиа-запросы для мобильных устройств (менее 768px) */
@media (max-width: 768px) {
    
    .loader-image {
        width: 100px;
        height: 100px;
    }

    .loader-text {
        font-size: 2em;
    }

    .loader-bar-container {
        width: 200px;
        height: 15px;
    }
    /* Шапка */
    header {
        flex-direction: row; /* Восстанавливаем row, чтобы лого и бургер были по бокам */
        justify-content: space-between; /* Расставляем элементы по краям */
        padding: 10px 15px;
        position: fixed; /* Header remains fixed on mobile too */
        width: 100%;
        box-sizing: border-box;
    }

    header .logo {
        margin-bottom: 0;
    }

    header .logo img {
        width: 40px;
        height: 40px;
    }

    header .logo h1 {
        font-size: 1.2em;
    }

    /* Показываем бургер-иконку на мобильных */
    .burger-icon {
        display: flex;
    }

    /* Скрываем обычное меню на мобильных по умолчанию */
    nav ul {
        display: none; /* Скрываем меню по умолчанию */
        flex-direction: column;
        background-color: #4CAF50;
        position: absolute;
        top: 60px; /* Высота шапки */
        left: 0;
        width: 100%;
        padding: 10px 0;
        box-shadow: 0 8px 16px rgba(0,0,0,0.2);
        z-index: 999;
        transition: max-height 0.3s ease-out, opacity 0.3s ease-out;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
    }

    /* Стили для открытого меню (добавляется через JS) */
    nav.nav-open ul {
        display: flex; /* Показываем меню */
        max-height: 300px; /* Достаточно большая высота для анимации */
        opacity: 1;
    }

    nav ul li {
        width: 100%;
        text-align: center;
        padding: 8px 0;
    }

    nav ul li a {
        font-size: 1em;
        padding: 10px 0;
        display: block;
    }

    nav ul li button.cta-button {
        width: 80%; /* Уменьшаем ширину кнопки, чтобы не выглядела слишком большой */
        margin: 10px auto; /* Центрируем кнопку */
    }

    /* Анимация бургер-иконки */
    .burger-icon.active div:nth-child(1) {
        transform: translateY(11px) rotate(45deg);
    }
    .burger-icon.active div:nth-child(2) {
        opacity: 0;
    }
    .burger-icon.active div:nth-child(3) {
        transform: translateY(-11px) rotate(-45deg);
    }

    /* Hero Section */
    .hero-section {
        margin-top: 60px; /* Сохраняем отступ от фиксированной шапки */
        height: auto;
        min-height: 70vh; /* Меньше минимальная высота для очень маленьких экранов */
        padding-top: 20px;
        padding-bottom: 20px;
        justify-content: space-between;
    }

    .hero-content {
        top: 8%; /* Слегка поднимаем контент */
        width: 95%;
    }

    .hero-content h2 {
        font-size: 10vw; /* Более адаптивный размер для разных мобильных */
        white-space: normal;
        word-break: break-word;
    }

    .hero-image {
        width: 100%;
    }

    .hero-image img {
        max-width: 80%; /* Адаптивный размер изображения */
    }

    .bottom-right-container {
        position: relative;
        bottom: auto;
        right: auto;
        left: auto;
        margin: 20px auto;
        width: 90%;
        align-items: center;
    }

    .input-container {
        flex-direction: column;
        align-items: center;
        width: 100%;
    }

    .input-container input {
        width: calc(100% - 20px);
        margin-right: 0;
        margin-bottom: 10px;
        font-size: 0.9em;
    }

    .input-container .copy-button {
        width: 100%;
        max-width: 150px; /* Меньше для мобильных */
        font-size: 0.9em;
    }

    .buy-on-blum {
        width: 100%;
        max-width: 150px; /* Меньше для мобильных */
        font-size: 1em;
        padding: 8px 12px;
    }

    /* About Section */
    .about-section {
        flex-direction: column;
        align-items: center;
        padding: 30px 15px;
        text-align: center;
    }

    .about-section h2 {
        font-size: 2em;
    }

    .about-text {
        padding-right: 0;
        margin-bottom: 20px;
    }

    .about-image {
        margin-left: 0;
        order: -1;
    }

    #about-image {
        max-width: 90%;
        animation: none;
        transform: none;
    }

    /* Tokenomics Section */
    .tokenomics-section {
        padding: 30px 15px;
    }

    .tokenomics-section h2 {
        font-size: 2em;
    }

    .tokenomics-images {
        flex-direction: column;
        align-items: center; /* Центрируем изображения */
        gap: 15px;
    }

    .tokenomics-image {
        max-width: 90%;
    }

    /* FAQ Section */
    .faq-section {
        padding: 30px 15px;
    }

    .faq-section h2 {
        font-size: 2em;
    }

    .faq-container {
        max-width: 100%;
    }

    .faq-question h3 {
        font-size: 1.1em;
    }

    .faq-icon {
        font-size: 1.3em;
    }

    .faq-answer p {
        font-size: 0.9em;
    }

    /* Links Section */
    .links-section {
        padding: 30px 15px;
        padding-bottom: 50px; /* Adjusted padding-bottom for mobile */
    }

    .links-section h2 {
        font-size: 2em;
    }

    .links-container {
        gap: 10px;
    }

    .links-container a {
        font-size: 1.1em;
    }

    .links-section .flag-image {
        bottom: -70px; /* Adjusted for mobile */
        width: 100px;
    }

    /* Buy Section */
    .buy-section {
        flex-direction: column;
        align-items: center;
        padding: 30px 15px;
        text-align: center;
    }

    .buy-image {
        margin-right: 0;
        margin-bottom: 20px;
        order: -1;
    }

    .buy-image img {
        max-width: 90%;
    }

    .buy-section h2 {
        font-size: 2em;
    }

    .buy-section p {
        font-size: 1em;
    }

    .buy-section .cta-button {
        padding: 10px 20px;
        font-size: 1em;
    }

    /* Marquee Section */
    .marquee-section {
        padding: 5px 0;
    }

    .marquee span {
        font-size: 1.1em;
        padding-right: 20px;
    }

    /* Бомбы */
    .bomb {
        width: 60px;
        height: 60px;
    }
}

/* Дополнительные медиа-запросы для очень маленьких экранов (менее 480px) */
@media (max-width: 480px) {
    .loader-image {
        width: 80px;
        height: 80px;
    }

    .loader-text {
        font-size: 1.5em;
    }

    .loader-bar-container {
        width: 150px;
        height: 10px;
    }
    
    header .logo h1 {
        font-size: 1.1em;
    }

    nav ul li a {
        font-size: 0.9em;
    }

    nav ul li button.cta-button {
        padding: 6px 10px;
        font-size: 0.8em;
    }

    .hero-section {
        min-height: 60vh;
    }

    .hero-content h2 {
        font-size: 16vw; /* Больше для очень маленьких экранов */
    }

    .input-container input,
    .input-container .copy-button,
    .buy-on-blum {
        font-size: 0.8em;
        padding: 8px 10px;
    }

    .about-section h2,
    .tokenomics-section h2,
    .faq-section h2,
    .links-section h2,
    .buy-section h2 {
        font-size: 1.8em;
    }

    .faq-question h3 {
        font-size: 0.9em;
    }

    .faq-answer p {
        font-size: 0.8em;
    }

    .links-container a {
        font-size: 1em;
    }

    .marquee span {
        font-size: 1em;
        padding-right: 15px;
    }

    .bomb {
        width: 40px;
        height: 40px;
    }
}