html, body {
    overflow-x: hidden;
}

body {
    background: #fff;
    margin: 0;
    font-family: Impact, Arial Black, Arial, sans-serif;
    color: #111;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-header {
    text-align: center;
    margin-top: 60px;
}
.main-title, .gallery-title {
    font-size: 5rem;
    font-weight: bold;
    margin: 0 0 16px 0;
    letter-spacing: 2px;
    text-shadow:
        -1px -1px 0 #fff,
        1px -1px 0 #fff,
        -1px 1px 0 #fff,
        1px 1px 0 #fff,
        3px 3px 8px #000,
        0 0 8px #000;
    color: #111;
    text-align: center;
}
.contract-block {
    /* font-family: monospace; */
    cursor: pointer;
    user-select: all;
    border: 2px solid #fff;
    text-align: center;
    margin: 12px auto 0 auto;
    padding: 10px 22px;
    display: inline-block;
}
.contract-block:hover {
    color: #000;
    transform: scale(1.04);
    transition: transform 0.15s;
}

.modal-copy {
    display: none;
    position: fixed;
    left: 50%;
    top: 18%;
    transform: translate(-50%, 0);
    background: #fff;
    color: #111;
    font-size: 1.3rem;
    font-weight: bold;
    padding: 18px 38px;
    border-radius: 16px;
    box-shadow: 0 8px 32px #000a, 0 2px 8px #fff8;
    border: 3px solid #222;
    z-index: 1000;
    text-align: center;
    opacity: 0.98;
    letter-spacing: 1px;
    animation: fadeIn 0.2s;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translate(-50%, -20px); }
    to { opacity: 0.98; transform: translate(-50%, 0); }
}

.frog-img {
    width: 305px;
    height: auto;
    margin: 0 auto 18px auto;
    display: block;
    /* border-radius: 20px; */
    /* box-shadow: 0 8px 32px 0 #000a, 0 2px 8px #fff8; */
    /* background: #eee; */
    transition: box-shadow 0.3s, transform 0.2s;
}
.meme-text {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 18px;
    /* text-shadow: 1px 1px 3px #000, 0 0 8px #fff8; */
}

.meme-text.contract-block {
    background-image: url('ca.png');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    z-index: 2;
    padding: 20px 35px;
}

.meme-text.contract-block::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
   
    z-index: 6;
}

.meme-text.contract-block > * {
    position: relative;
    z-index: 2;
}

.mekabu-ticker {
    width: 100vw;
    background: #000;
    color: #fff;
    font-size: 1.3rem;
    font-weight: bold;
    letter-spacing: 2px;
    padding: 8px 0;
    text-align: center;
    white-space: nowrap;
    border-top: 3px solid #111;
    border-bottom: 3px solid #111;
}

main {
    /* max-width: 900px; */
    /* margin: 0 auto; */
    padding: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.frog-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 30px;
    margin-bottom: 20px;
}

.buy-section {
    width: 400px;
    max-width: 90vw;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.buy-input {
    width: 100%;
    padding: 12px 16px;
    font-size: 1.2rem;
    border: 3px solid #222;
    border-radius: 8px;
    margin-bottom: 10px;
    outline: none;
    font-family: inherit;
    background: #fafafa;
}

.buy-actions {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 10px;
}

.icon {
    font-size: 2rem;
    cursor: pointer;
    user-select: none;
    transition: transform 0.1s;
}
.icon:hover {
    transform: scale(1.2);
}

.mekabu-marquee-wrapper {
    width: 100vw;
    min-width: 100vw;
    height: 52px;
    position: relative;
    overflow: hidden;
    background: #000;
    border-top: 3px solid #111;
    border-bottom: 3px solid #111;
    z-index: 10;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}
.mekabu-marquee {
    position: absolute;
    top: 0;
    left: 0;
    min-width: 100vw;
    display: inline-block;
    white-space: nowrap;
    color: #fff;
    font-size: 2.4rem;
    font-weight: 200;
    letter-spacing: 5px;
    line-height: 48px;
    height: 48px;
    padding: 0;
    animation: marquee 60s linear infinite;
    text-shadow: 3px 3px 8px #000, 0 0 12px #000;
    box-sizing: border-box;
}
.mekabu-marquee::after {
    content: attr(data-text);
    padding-left: 6px;
}
@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.banner-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 30px;
    margin-bottom: 20px;
}

.about-section {
    background: #f8f8f8;
    border: 3px solid #111;
    border-radius: 18px;
    margin: 40px auto 30px auto;
    max-width: 700px;
    padding: 32px 24px;
    box-shadow: 0 6px 24px rgba(0,0,0,0.18), 0 2px 8px #fff8;
    text-align: center;
}
.about-section h2 {
    font-size: 2.2rem;
    margin-bottom: 18px;
    letter-spacing: 2px;
    text-shadow: 3px 3px 8px #000, 0 0 12px #000;
}
.about-section p {
    font-size: 1.2rem;
    line-height: 1.7;
    font-family: Arial, sans-serif;
    color: #222;
    text-shadow: 1px 1px 4px #fff8;
}

.buy-btn {
    background: #000;
    color: #fff;
    font-size: 1.3rem;
    font-family: inherit;
    font-weight: bold;
    border: 3px solid #222;
    border-radius: 8px;
    padding: 14px 38px;
    cursor: pointer;
    letter-spacing: 2px;
    box-shadow: 2px 2px 0 #fff, 4px 4px 0 #222, 0 8px 32px #000a;
    transition: background 0.2s, color 0.2s, transform 0.1s, box-shadow 0.2s;
    text-shadow: 2px 2px 8px #000, 0 0 8px #fff8;
    animation: bounce 2.5s infinite;
}
.buy-btn:active {
    transform: scale(0.95) rotate(-2deg);
    background: #222;
}
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px) scale(1.04); }
}

.info-section {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 40px;
    margin: 10% auto;
    max-width: 1100px;
    flex-wrap: wrap;
    display: flex;
    padding: 0 20px;
}
.chart-block {
    flex: 1 1 350px;
    min-width: 320px;
    max-width: 820px;
    display: flex;
    justify-content: center;
}
.chart-iframe {
    width: 880px;
    min-width: 320px;
    /* max-width: 500px; */
    height: 570px;
    /* border-radius: 16px; */
    /* border: 3px solid #222; */
    /* box-shadow: 0 4px 24px #0008; */
    background: #fff;
}
.info-block {
    position: relative;
    z-index: 2;
    flex: 1 1 320px;
    min-width: 320px;
    max-width: 550px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 18px;
    padding: 2% 0;
}
.info-text {
    font-size: 2.6rem;
    font-weight: 100;
    text-align: left;
    margin-bottom: 18px;
    text-shadow: 1px 1px 14px #000, 0 0 8px #fff8;
}
.info-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    width: 100%;
}
.info-btn {
    display: inline-block;
    padding: 0;
    border: none;
    background: none;
    box-shadow: none;
    width: auto;
    height: auto;
    margin: 0;
}
.info-btn:hover, .info-btn:active, .info-btn:focus {
    color: inherit;
    background: none;
    box-shadow: none;
    border: none;
    outline: none;
}
.info-btn:hover .btn-img, .info-btn:focus .btn-img {
    transform: scale(1.12);
    transition: transform 0.18s;
}

.gallery-section {
    margin-top: 60px;
    /* margin-bottom: 40px; */
}
.gallery {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 20px;
}
.gallery-title {
    font-size: 2.4rem;
    font-weight: 100;
    color: #fff;
    margin-bottom: 30px;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}
.gallery-item {
    background: #fff;
    border: 3px solid #111;
    border-radius: 16px;
    box-shadow: 0 4px 24px #0008, 0 2px 8px #fff8;
    padding: 12px;
    width: 150px;
    text-align: center;
    transition: box-shadow 0.3s, transform 0.2s;
}
.gallery-item:hover {
    box-shadow: 0 12px 48px #000c, 0 4px 16px #fff8;
    transform: scale(1.05) rotate(-2deg);
}
.gallery-item img {
    width: 100%;
    border-radius: 12px;
    border: 2px solid #222;
    background: #eee;
    box-shadow: 0 4px 16px #0008;
    transition: box-shadow 0.3s, transform 0.2s;
}
.gallery-item img:hover {
    box-shadow: 0 12px 32px #000c;
    transform: scale(1.06) rotate(1deg);
}
@media (max-width: 900px) {
    .gallery {
        grid-template-columns: repeat(2, 1fr);
    }
    .info-section {
        margin: 0 auto;
        width: 100vw;
        box-sizing: border-box;
    }
    .info-block {
        min-width: 100%;
        max-width: 100%;
        align-items: center;
        margin: 0 auto;
    }
    .chart-block {
        min-width: 100%;
        max-width: 100%;
        justify-content: center;
    }
}
@media (min-width: 760px) and (max-width: 900px) {
    .info-section {
        flex-direction: row !important;
        align-items: flex-start;
        gap: 24px;
        display: flex;
    }
    .info-buttons {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 18px;
        width: 100%;
        justify-items: center;
        align-items: center;
    }
}
@media (min-width: 900px) {
    .info-section {
        flex-direction: row !important;
        align-items: flex-start;
        gap: 40px;
    }
}

.animated-gallery {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    overflow: hidden;
    position: relative;
    padding: 24px 0 0 0;
}

.gallery-row {
    display: flex;
    align-items: center;
    position: relative;
    height: 340px;
    margin-bottom: 28px;
    overflow: hidden;
}

.gallery-row::before {
    content: '';
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100px;
    height: 100vh;
    background: linear-gradient(to right, rgba(255,255,255,1) 0%, rgba(255,255,255,0.8) 30%, rgba(255,255,255,0.4) 70%, transparent 100%);
    z-index: 1;
    pointer-events: none;
    display: block;
}

.gallery-row::after {
    content: '';
    position: fixed;
    bottom: 0;
    right: 0;
    width: 100px;
    height: 100vh;
    background: linear-gradient(to left, rgba(255,255,255,1) 0%, rgba(255,255,255,0.8) 30%, rgba(255,255,255,0.4) 70%, transparent 100%);
    z-index: 1;
    pointer-events: none;
    display: block;
}

.gallery-items {
    display: flex;
    gap: 24px;
    height: 100%;
    animation: none;
    width: max-content;
}

.gallery-items img {
    flex-shrink: 0;
}

.gallery-row-1 .gallery-items {
    animation: gallery-scroll-ltr 60s linear infinite;
}

.gallery-row-2 .gallery-items {
    animation: gallery-scroll-rtl 60s linear infinite;
}

@keyframes gallery-scroll-ltr {
    0% { transform: translateX(0%); }
    100% { transform: translateX(-33.33%); }
}

@keyframes gallery-scroll-rtl {
    0% { transform: translateX(-33.33%); }
    100% { transform: translateX(0%); }
}

.animated-gallery::before, .animated-gallery::after {
    content: '';
    position: absolute;
    top: 0; bottom: 0;
    width: 120px;
    z-index: 2;
    pointer-events: none;
}
.animated-gallery::before {
    left: -50px;
    background: linear-gradient(to right, #fff 70%, transparent 100%);
}
.animated-gallery::after {
    right: -50px;
    background: linear-gradient(to left, #fff 70%, transparent 100%);
}

@media screen and (min-width: 600px){
    .animated-gallery::before {
    left: 0;
    background: linear-gradient(to right, #fff 70%, transparent 100%);
}
.animated-gallery::after {
    right: 0;
    background: linear-gradient(to left, #fff 70%, transparent 100%);
}
}

.gallery-row img {
    width: 13vw;
    /* max-width: 300px;
    min-width: 180px; */
    height: 13vw;
    /* max-height: 300px;
    min-height: 180px; */
    object-fit: contain;
    object-position: center center;
    background: #fff;
}

.gallery-row {
    height: 190px;
}
.mekabu-img{
    width: 100%;
    max-width: 600px;

    position: relative;
    z-index: 1;
    ;
}


/* Responsive Design */
@media (max-width: 1200px) {
 
    .main-title {
        font-size: 6rem;
    }
    
    .animated-gallery {
        max-width: 95vw;
    }
    
    .gallery-row img {
        width: 160px;
        height: 160px;
    }
    /* .frog-img { width: 170px; } */
    .gallery-row {
        height: 160px;
    }
    .info-text {
        font-size: 2rem;
    }
}

@media screen and (min-width: 960px) {
    .meme-text {
    font-size: 2.3rem;
    font-weight: 100;
    margin-bottom: 70px;
}
    
}
@media (max-width: 768px) {
    .main-title {
        font-size: 3rem;
    }
    
    .frog-img { width: 285px; }
    
    .meme-text {
        font-size: 1.1rem;
    }
    
    .info-section {
        padding: 0 20px;
    }
    
    .chart-block, .info-block {
        min-width: 100%;
        max-width: 100%;
    }
    
    .gallery-row img {
        width: 110px;
        height: 110px;
    }
    
    .gallery-row {
        height: 110px;
    }
    
    .info-buttons {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .info-btn {
        /* font-size: 1.1rem; */
        /* padding: 12px 0; */
    }
    .info-text {
        font-size: 1.5rem;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .main-title {
        font-size: 2.5rem;
    }
    
    .frog-img { width: 90px; }
    
    .meme-text {
        font-size: 1rem;
    }
    
    .gallery-row img {
        width: 90px;
        height: 90px;
    }
    
    .gallery-row {
        height: 120px;
    }
    
    .gallery-items {
        gap: 16px;
    }
    
    .about-section {
        margin: 30px 15px;
        padding: 20px 15px;
    }
    
    .about-section h2 {
        font-size: 1.8rem;
    }
    
    .about-section p {
        font-size: 1rem;
    }
    
    .mekabu-marquee {
        font-size: 1.2rem;
    }
    
    .buy-btn {
        font-size: 1.1rem;
        padding: 12px 30px;
    }
    .info-text {
        font-size: 1.1rem;
        text-align: center;
    }
}

/* Fix for very small screens */
@media (max-width: 360px) {
    .main-title {
        font-size: 2rem;
    }
    
    .frog-img { width: 70px; }
    
    .gallery-row img {
        width: 80px;
        height: 80px;
    }
    
    .gallery-row {
        height: 100px;
    }
    
    .gallery-items {
        gap: 12px;
    }
}

/* Fix for landscape orientation on mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .main-header {
        margin-top: 10px;
    }
    
    .main-title {
        font-size: 2.5rem;
        margin-bottom: 8px;
    }
    
    .frog-img { width: 60px; }
    
    .meme-text {
        margin-bottom: 8px;
    }
    
    .gallery-section {
        margin-top: 20px;
    }
    
    .gallery-row {
        height: 100px;
        margin-bottom: 10px;
    }
    
    .gallery-row img {
        width: 80px;
        height: 80px;
    }
}

@media (min-width: 1440px) {
    .mekabu-marquee {

    font-size: 2.4rem;
 
}

    .gallery-row img {
        width: 300px;
        max-width: 320px;
        min-width: 220px;
        height: 300px;
        max-height: 320px;
        min-height: 220px;
        object-fit: contain;
        object-position: center center;
        background: #fff;
    }
    .animated-gallery {
        max-width: 2000px;
    }
    .about-section {
        max-width: 1000px;
        padding: 48px 40px;
    }
    .info-section {
        padding: 0 20px;
        max-width: 1800px;
        gap: 80px;
    }
    .gallery {
        max-width: 1600px;
    }
    .gallery-row {
    height: 340px;
}
}

.mekabu-logo, .sub-logo {
    display: inline-block;
    vertical-align: middle;
    height: auto;
    width: auto;
    max-width: 100%;
}

/* Для великих екранів — оригінальний розмір */
@media (min-width: 1400px) {
    .mekabu-logo {
        width: auto;
        height: auto;
        max-height: none;
        max-width: none;
    }
    .sub-logo {
        width: auto;
        height: auto;
        max-height: none;
        max-width: none;
    }
}

/* Для <=1200px */
@media (max-width: 1200px) {
    .mekabu-logo {
        height: 60px;
        width: auto;
    }
    .sub-logo {
        height: 45px;
        width: auto;
    }
    .chart-iframe {
    width: 880px;
    min-width: 300px;
    /* max-width: 500px; */
    height: 470px;
    /* border-radius: 16px; */
    /* border: 3px solid #222; */
    /* box-shadow: 0 4px 24px #0008; */
    background: #fff;
}
}

/* Для <=768px */
@media (max-width: 768px) {
    .mekabu-logo {
        height: 40px;
        width: auto;
    }
    .sub-logo {
        height: 30px;
        width: auto;
    }
}

/* Для <=480px */
@media (max-width: 480px) {
    .mekabu-logo {
        height: 28px;
        width: auto;
    }
    .sub-logo {
        height: 20px;
        width: auto;
    }
}

.btn-img {
    width: 100%;
    display: block;
 
    margin: 0 auto;
}
@media (max-width: 900px) {
    .btn-img {
        width: 50%;
        /* height: 44px; */
    }
        .chart-iframe {
    width: 700px;
    min-width: 300px;
    /* max-width: 500px; */
    height: 370px;
    /* border-radius: 16px; */
    /* border: 3px solid #222; */
    /* box-shadow: 0 4px 24px #0008; */
    background: #fff;
        }
}
@media (max-width: 480px) {
    .btn-img {
        width: 32px;
        height: 32px;
    }
}

@media (max-width: 600px) {
    body, html {
        padding: 0;
        margin: 0;
        width: 100vw;
        overflow-x: hidden;
    }
    header, .main-header {
        margin-top: 10px;
        padding: 0 2vw;
        text-align: center;
    }
    .main-title {
        font-size: 2rem;
        margin-bottom: 8px;
    }
    .mekabu-logo {
        height: auto;
        max-width: 90vw;
        width: 100%;
        margin-bottom: 6px;
        display: block;
    }
    .frog-img {
        width: 310px;
        margin: 0 auto 8px auto;
    }
    .mekabu-marquee-wrapper {
        height: 32px;
    }
    .mekabu-marquee {
        font-size: 1rem;
        line-height: 32px;
        height: 32px;
    }
    .contract-block {
        font-size: 0.9rem;
        padding: 6px 10px;
        margin: 8px auto 0 auto;
    }
    .meme-text {
        font-size: 0.7rem;
        margin-bottom: 8px;
    }
    main {
        /* padding: 0 2vw; */
    }
    .info-section {
        margin: 0 auto;
        width: 100vw;
        box-sizing: border-box;
    }
    .chart-block, .info-block {
        min-width: 100vw;
        max-width: 100vw;
        width: 100vw;
        align-items: center;
        justify-content: center;
        margin: 0;
        padding: 0;
    }
    .info-block {
        gap: 10px;
    }
    .info-buttons {
        /* display: flex; */
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 100%;
        gap: 8px;
        margin: 0 auto;
    }
    .btn-img {
        width: 50%;
        height: 50%;
        /* min-width: 28px; */
        /* min-height: 28px; */
        /* max-width: 44px; */
        /* max-height: 44px; */
    }
    .info-text {
        font-size: 1rem;
        text-align: center;
        margin-bottom: 10px;
        word-break: break-word;
        overflow-wrap: break-word;
        padding: 0 2vw;
        max-width: 96vw;
        box-sizing: border-box;
    }
    .buy-section {
        width: 98vw;
        max-width: 100vw;
        padding: 0;
    }
    .buy-btn {
        font-size: 1rem;
        padding: 10px 18px;
    }
    .gallery-section {
        margin-top: 24px;
        margin-bottom: 18px;
        padding: 0;
    }
    .gallery-title {
        font-size: 1.2rem;
        margin-bottom: 12px;
    }
    .sub-logo {
        height: 18px;
        width: auto;
    }
    .animated-gallery {
        max-width: 100vw;
        padding: 8px 0 0 0;
    }
    .gallery-row {
        height: 80px;
        margin-bottom: 8px;
    }
    .gallery-row img {
        width: 80px;
        height: 80px;
        min-width: 40px;
        min-height: 40px;
        max-width: 80px;
        max-height: 80px;
    }
    .gallery-items {
        gap: 8px;
    }
    .gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        max-width: 100vw;
    }
    .about-section {
        margin: 18px 4vw;
        padding: 10px 4vw;
        max-width: 98vw;
    }
}

.gallery-subtitle {
    width: 49%;
    height: auto;
    margin-bottom: 45px;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.5));
}

.footer {
    background: #fff;
    color: #000;
    text-align: center;
    padding: 20px;
    font-size: 14px;
    font-weight: 400;
    /* margin-top: 40px; */
    border-top: 1px solid #eee;
}

.loading-gif {
    position: absolute;
    top: 32%;
    left: 49.9%;
    transform: translate(-50%, -50%);
    z-index: 2;
    opacity: 1;
    transition: opacity 0.5s ease-out;
}

.loading-gif.hide {
    opacity: 0;
    pointer-events: none;
}

.main-header {
    position: relative;
}

.loading-gif img {
    width: 975px;
    /* height: 200px; */
    object-fit: contain;
}