/* Universal Box-Sizing - ГЛАВНАЯ ПРАВКА ДЛЯ ПРЕДОТВРАЩЕНИЯ ГОРИЗОНТАЛЬНОГО СКРОЛЛА */
*, *::before, *::after {
    box-sizing: border-box;
}

/* Prevent horizontal scroll */
html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

/* General Body Styles */
body {
    font-family: 'Press Start 2P', cursive;
    background-color: #F8F4E3;
    color: #333;
    scroll-behavior: smooth;
    font-size: 16px;
}

/* Headings */
h1, h2 {
    font-family: 'Press Start 2P', cursive;
    color: #FFC107;
    text-align: center;
    margin-bottom: 20px;
    text-shadow: 3px 3px 0px rgba(0, 0, 0, 0.2);
}

h1 {
    font-size: 3.5em;
}

h2 {
    font-size: 2.5em;
    padding-top: 60px;
    margin-bottom: 40px;
    position: relative;
    z-index: 15; /* Увеличил z-index для заголовка, чтобы он точно был поверх слоев */
}

/* Buttons */
.button {
    display: inline-block;
    background-color: #FF8C00;
    color: white;
    padding: 15px 30px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease;
    text-align: center;
    margin-top: 30px;
    box-shadow: none;
    font-family: 'Press Start 2P', cursive;
}

.button:hover {
    background-color: #E67A00;
    transform: translateY(-3px);
}

/* --- Стили для кнопки "Buy on Blum" с анимацией --- */
.button-blum {
    background-color: #FF8C00;
    color: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    animation: shake-yeast 0.5s ease-in-out infinite alternate;
}

.button-blum:hover {
    background-color: #E67A00;
    transform: translateY(-3px) scale(1.02);
    animation: none;
}

@keyframes shake-yeast {
    0% { transform: translate(0px, 0px) rotate(0deg); }
    10% { transform: translate(-1px, 1px) rotate(-0.5deg); }
    20% { transform: translate(1px, -1px) rotate(0.5deg); }
    30% { transform: translate(-1.5px, 1.5px) rotate(-0.7deg); }
    40% { transform: translate(1.5px, -1.5px) rotate(0.7deg); }
    50% { transform: translate(-1px, 1px) rotate(-0.5deg); }
    60% { transform: translate(1px, -1px) rotate(0.5deg); }
    70% { transform: translate(-0.5px, 0.5px) rotate(-0.2deg); }
    80% { transform: translate(0.5px, -0.5px) rotate(0.2deg); }
    90% { transform: translate(-0.2px, 0.2px) rotate(-0.1deg); }
    100% { transform: translate(0px, 0px) rotate(0deg); }
}

/* --- Navbar --- */
.navbar {
    background-color: #2F1A00;
    color: white;
    padding: 15px 0;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    box-shadow: none;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.navbar .logo {
    font-family: 'Press Start 2P', cursive;
    font-size: 1.8em;
    color: #FFC107;
    text-decoration: none;
    padding-left: 10px;
}

.nav-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 30px;
}

.nav-links li a {
    color: #F8F4E3;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    transition: color 0.3s ease;
    font-family: 'Press Start 2P', cursive;
}

.nav-links li a:hover {
    color: #FFC107;
}

body {
    padding-top: 0;
}

/* --- Hero Section --- */
.hero {
    background: linear-gradient(to bottom right, #FFA500, #FFD700);
    color: white;
    padding: 0;
    padding-bottom: 100px;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-top: 60px;
    position: relative;
    overflow: hidden;
}

.hero-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    max-width: 1200px;
    width: 100%;
    padding-top: 100px;
    padding-left: 20px;
    padding-right: 20px;
    position: relative;
    z-index: 2;
}

.hero-text {
    flex: 1;
    min-width: 300px;
    padding: 20px;
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.hero-text h1 {
    text-align: left;
    margin-top: 0;
    color: #2F1A00;
    text-shadow: 3px 3px 0px rgba(255, 255, 255, 0.3);
}

/* Address Field Styling */
.address-container {
    display: flex;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.3);
    border: 2px solid #FFC107;
    border-radius: 8px;
    padding: 10px 15px;
    width: 100%;
    max-width: 500px;
    box-shadow: none;
    position: relative;
    backdrop-filter: blur(5px);
}

.address-container input {
    flex-grow: 1;
    background: transparent;
    border: none;
    color: #2F1A00;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.6em;
    padding: 5px 0;
    outline: none;
    cursor: text;
    user-select: all;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.address-container .copy-button {
    background: none;
    border: none;
    color: #2F1A00;
    font-size: 1.2em;
    cursor: pointer;
    margin-left: 10px;
    padding: 5px;
    transition: color 0.3s ease, transform 0.2s ease;
}

.address-container .copy-button:hover {
    color: #FFC107;
    transform: scale(1.1);
}

.copy-feedback {
    position: absolute;
    top: -30px;
    right: 0;
    background-color: #FFC107;
    color: #2F1A00;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.8em;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, top 0.3s ease;
    white-space: nowrap;
    font-family: 'Press Start 2P', cursive;
}

.copy-feedback.show {
    opacity: 1;
    visibility: visible;
    top: -40px;
}

.hero-image-container {
    flex: 1;
    min-width: 300px;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

@keyframes sway {
    0% {
        transform: translateX(0px) rotate(0deg);
    }
    25% {
        transform: translateX(5px) rotate(10deg);
    }
    75% {
        transform: translateX(-5px) rotate(-10deg);
    }
    100% {
        transform: translateX(0px) rotate(0deg);
    }
}

.hero-image {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: none;
    border: none;
    animation: sway 4s ease-in-out infinite;
}

/* --- Анимация пузырьков/пенки в Hero-секции --- */
.bubbles-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

.bubble {
    position: absolute;
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    opacity: 0;
    animation: rise-and-fade 10s infinite ease-in;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

/* Разные размеры и начальные позиции для пузырьков */
.bubble:nth-child(1) { width: 30px; height: 30px; left: 10%; animation-delay: 0s; animation-duration: 8s; }
.bubble:nth-child(2) { width: 20px; height: 20px; left: 30%; animation-delay: 2s; animation-duration: 10s; }
.bubble:nth-child(3) { width: 40px; height: 40px; left: 60%; animation-delay: 4s; animation-duration: 12s; }
.bubble:nth-child(4) { width: 25px; height: 25px; left: 80%; animation-delay: 1s; animation-duration: 9s; }
.bubble:nth-child(5) { width: 35px; height: 35px; left: 5%; animation-delay: 3s; animation-duration: 11s; }
.bubble:nth-child(6) { width: 15px; height: 15px; left: 45%; animation-delay: 5s; animation-duration: 7s; }
.bubble:nth-child(7) { width: 28px; height: 28px; left: 70%; animation-delay: 0.5s; animation-duration: 9.5s; }
.bubble:nth-child(8) { width: 22px; height: 22px; left: 20%; animation-delay: 2.5s; animation-duration: 8.5s; }
.bubble:nth-child(9) { width: 38px; height: 38px; left: 85%; animation-delay: 4.5s; animation-duration: 11.5s; }
.bubble:nth-child(10) { width: 18px; height: 18px; left: 55%; animation-delay: 1.5s; animation-duration: 7.5s; }

@keyframes rise-and-fade {
    0% {
        transform: translateY(400px);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 0.5;
    }
    100% {
        transform: translateY(-10%);
        opacity: 0;
    }
}

/* --- About Section --- */
.about {
    padding: 80px 20px;
    background-color: #F8F4E3;
    text-align: center;
    position: relative;
}

.about-top {
    max-width: 800px;
    margin: 0 auto 60px auto;
}

.about-top p {
    font-size: 1.1em;
    line-height: 1.7;
    color: #555;
    font-family: 'Press Start 2P', cursive;
}

.about-images {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
    padding: 0 10px;
}

.about-img {
    max-width: 45%;
    height: auto;
    border-radius: 10px;
    box-shadow: none;
    transition: opacity 0.5s ease-out, transform 0.2s ease-out;
    position: relative;
    z-index: 1;
    border: none;
}

/* Скрываем мобильную картинку по умолчанию */
.about-img-mobile {
    display: none;
}

/* --- Tokenomics Section --- */
.tokenomics {
    padding: 80px 20px;
    background-color: #FFF0BB;
    text-align: center;
    position: relative; /* Важно для позиционирования слоев */
    overflow: hidden;
    min-height: 800px;
    display: flex;
    flex-direction: column; /* Изменено: для вертикального расположения элементов */
    align-items: center;
    justify-content: center;
}

/* Если h2 внутри tokenomics, ему уже может быть присвоен высокий z-index,
   но если он не достаточен, можно добавить здесь: */
.tokenomics h2 {
    color: #2F1A00;
    text-shadow: 2px 2px 0px rgba(255, 255, 255, 0.3);
    margin-bottom: 20px;
    padding-top: 0;
    position: relative; /* Важно для z-index */
    z-index: 15; /* Убедимся, что заголовок поверх параллакса */
}

.tokenomics-content-wrapper {
    position: relative;
    z-index: 10; /* Убедимся, что контент поверх параллакса */
    width: 100%;
    max-width: 1200px;
    padding: 0 10px;
}

.tokenomics-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 10px;
    position: relative; /* Важно для z-index */
    z-index: 10; /* Убедимся, что контент поверх параллакса */
}

.tokenomics-block {
    flex: 1;
    min-width: 300px;
    max-width: 500px;
    background-color: rgba(255, 250, 240, 0.9);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    border: none;
    min-height: 200px;
    z-index: 5;
}

.tokenomics-block img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    border: none;
}

.tokenomics-text-chart p {
    margin-bottom: 15px;
    font-size: 1.2em;
    line-height: 1.5;
    font-family: 'Press Start 2P', cursive; /* ИЗМЕНЕНО: теперь Press Start 2P */
    color: #333;
}

.tokenomics-text-chart p:last-child {
    margin-bottom: 0;
}

/* Parallax Layers - стили для JS-параллакса */
.parallax-layer {
    position: absolute;
    width: 128px;
    height: 128px;
    background-size: contain;
    background-repeat: no-repeat;
    pointer-events: none;
    transition: transform 0.1s linear; /* Плавность движения, чтобы не было дерганий */
}

.parallax-layer-deep {
    background-image: url('hmel4.png');
    top: 50%;
    left: 20%;
    opacity: 0.2;
    z-index: 2; /* Самый дальний слой */
}

.parallax-layer-back {
    background-image: url('hmel1.png');
    top: 10%;
    left: 5%;
    opacity: 0.3;
    z-index: 3; /* Слой позади */
}

.parallax-layer-mid {
    background-image: url('hmel3.png');
    top: 60%;
    left: 70%;
    opacity: 0.4;
    z-index: 4; /* Средний слой */
}

.parallax-layer-front {
    background-image: url('hmel2.png');
    top: 30%;
    left: 40%;
    opacity: 0.5;
    z-index: 5; /* Передний слой */
}

/* Анимации для легкого покачивания хмеля - остаются, но теперь они просто добавляют движение */
@keyframes sway-hmel-deep {
    0% { transform: translateX(0px) translateY(0px) rotate(0deg); }
    50% { transform: translateX(-10px) translateY(5px) rotate(-2deg); }
    100% { transform: translateX(0px) translateY(0px) rotate(0deg); }
}

@keyframes sway-hmel-back {
    0% { transform: translateX(0px) translateY(0px) rotate(0deg); }
    50% { transform: translateX(25px) translateY(15px) rotate(5deg); }
    100% { transform: translateX(0px) translateY(0px) rotate(0deg); }
}

@keyframes sway-hmel-mid {
    0% { transform: translateX(0px) translateY(0px) rotate(0deg); }
    50% { transform: translateX(-20px) translateY(-10px) rotate(-3deg); }
    100% { transform: translateX(0px) translateY(0px) rotate(0deg); }
}

@keyframes sway-hmel-front {
    0% { transform: translateX(0px) translateY(0px) rotate(0deg); }
    50% { transform: translateX(15px) translateY(-7px) rotate(2deg); }
    100% { transform: translateX(0px) translateY(0px) rotate(0deg); }
}


/* --- Footer --- */
.footer {
    background-color: #2F1A00;
    color: #F8F4E3;
    padding: 40px 20px;
    text-align: center;
    box-shadow: none;
    font-family: 'Press Start 2P', cursive;
}

.footer p {
    margin-bottom: 20px;
    font-size: 0.9em;
    font-family: 'Press Start 2P', cursive;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 25px;
}

.social-icons img {
    width: 35px;
    height: 35px;
    filter: invert(100%) sepia(0%) saturate(7499%) hue-rotate(248deg) brightness(119%) contrast(105%);
    transition: transform 0.3s ease, filter 0.3s ease;
    border: none;
}

.social-icons img:hover {
    transform: scale(1.1);
    filter: invert(80%) sepia(50%) saturate(1200%) hue-rotate(0deg) brightness(100%) contrast(100%);
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
    html, body {
        overflow-x: hidden;
    }

    h1 {
        font-size: 2.5em;
        text-align: center;
    }

    h2 {
        font-size: 2em;
    }

    .button {
        padding: 12px 25px;
    }

    .navbar .container {
        flex-direction: column;
        gap: 15px;
    }

    .nav-links {
        gap: 15px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .hero-content {
        flex-direction: column;
        padding-top: 50px;
        padding-left: 10px;
        padding-right: 10px;
    }

    .hero-text, .hero-image-container {
        min-width: unset;
        width: 100%;
        align-items: center;
    }

    .hero-text h1 {
        text-align: center;
    }

    .address-container {
        max-width: 90%;
    }

    /* Скрываем десктопные картинки и показываем мобильную */
    .about-img-desktop {
        display: none;
    }

    .about-img-mobile {
        display: block; /* Показываем мобильную картинку */
        max-width: 100%;
        margin: 0 auto; /* Центрируем ее */
        /* Отключаем любые трансформации или opacity, которые могли быть от JS */
        transform: none !important;
        opacity: 1 !important;
    }

    .about-images {
        flex-direction: column; /* Устанавливаем вертикальное расположение для изображений на мобильных устройствах */
        gap: 20px; /* Немного уменьшаем зазор между картинками */
        padding: 0; /* Убираем горизонтальные отступы для контейнера изображений */
    }

    /* Убираем отступы для about-img в мобильной версии */
    .about-img {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /* Adjust tokenomics for mobile */
    .tokenomics {
        min-height: 400px; /* Adjust for mobile */
    }

    .parallax-layer {
        display: none; /* Hide parallax layers on mobile for better performance */
    }

    .tokenomics-content {
        flex-direction: column;
        align-items: center;
    }

    .tokenomics-block {
        width: 90%;
        max-width: unset;
    }

    /* Адаптация текстового блока токеномики для мобильных устройств */
    .tokenomics-text-chart {
        max-width: 90%;
        padding: 15px;
    }

    .tokenomics-text-chart p {
        font-size: 0.7em;
    }

    .social-icons {
        gap: 15px;
    }

    .social-icons img {
        width: 30px;
        height: 30px;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 2em;
    }

    h2 {
        font-size: 1.8em;
    }

    .button {
        padding: 12px 25px;
    }

    .navbar .logo {
        font-size: 1.5em;
    }

    .nav-links li a {
        font-size: 1em;
    }
}