/* Custom Font Definition */
@font-face {
    font-family: 'VT323';
    src: url('VT323-Regular.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}

/* Body Styling for a Scrollable Page */
body {
    background-color: #000000;
    color: #FFFFFF;
    font-family: 'VT323', 'Courier New', Courier, monospace;
    font-size: 1.2rem;
    margin: 0;
    padding: 2rem 0;
}

/* Main Container for all content */
.container {
    width: 90%;
    max-width: 960px; /* Increased max-width for side-by-side layout */
    margin: 0 auto;
    
    background-color: #000000;
    
}

/* Hero Section using Flexbox for side-by-side layout */
.hero-section {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 3rem;
    border: 2px solid #FFFF00;
    box-shadow: 0 0 15px rgba(255, 255, 0, 0.5);
    border-bottom: 2px solid #FFFF00; /* Replaced individual section borders with one divider */
}

.hero-text {
    flex: 1.5; /* Give text content more space */
}

h1 {
    font-size: 6rem;
    color: #FFFF00;
    margin: 0;
    line-height: 1;
    animation: flicker 1.5s infinite alternate;
}

.subtitle {
    font-size: 1.5rem;
    margin: 0 0 2rem 0;
    color: #FFFFFF;
    letter-spacing: 2px;
}

.narrative p {
    margin-bottom: 1.5rem;
    max-width: 50ch;
}

.cta-buttons {
    margin-top: 2rem;
    display: flex; /* Added for better control of buttons */
    flex-wrap: wrap; /* Allow buttons to wrap on small screens */
    gap: 1rem; /* Use gap for spacing */
}

.btn {
    text-decoration: none;
    padding: 10px 25px;
    font-size: 1.2rem;
    font-family: 'VT323', monospace;
    transition: all 0.2s ease-in-out;
}

.btn.primary {
    background-color: #FFFF00;
    color: #000000;
    border: 2px solid #FFFF00;
}

.btn.primary:hover {
    background-color: #000000;
    color: #FFFF00;
}

.btn.secondary {
    background-color: transparent;
    color: #FFFFFF;
    border: 2px solid #FFFFFF;
    /* margin-left: 1rem;  Removed in favor of gap */
}

.btn.secondary:hover {
    background-color: #FFFFFF;
    color: #000000;
}

/* Ape Visual styling */
.ape-visual {
    flex: 1; /* Give image its own space */
    position: relative;
    text-align: center;
}

.ape-visual img {
    max-width: 100%;
    min-width: 250px;
    filter: drop-shadow(0 0 20px rgba(255, 255, 0, 0.6));
}

.scanlines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(0deg, rgba(0,0,0,0.5), rgba(0,0,0,0.5) 1px, transparent 1px, transparent 3px);
    pointer-events: none;
}

/* Styling for the new sections */
.info-section {
    padding: 3rem;
    /* BORDER REMOVED */
}

.info-section:not(:last-child) {
    border-bottom: 1px dashed rgba(255, 255, 0, 0.5); /* Add a faint line between sections */
}

.info-section h2 {
    font-size: 1.8rem;
    color: #FFFF00;
    margin-top: 0;
    margin-bottom: 1.5rem;
    letter-spacing: 1px;
}

.spec-list, .how-to-list {
    max-width: 600px;
    margin: 0 auto;
}

/* Protocol Specs Styling */
.spec-list {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 1rem;
    font-size: 1.1rem;
}

.spec-list dt {
    color: #FFFFFF;
    font-weight: bold;
    text-align: right;
}

.spec-list dt::after {
    content: ":";
    color: #FFFF00;
    margin-left: 5px;
}

.spec-list dd {
    margin: 0;
    color: #FFFFFF;
    font-weight: normal;
}

/* How-To-Buy Styling */
.how-to-list {
    list-style: none;
    padding: 0;
    font-size: 1.1rem;
}

.how-to-list li {
    margin-bottom: 1.2rem;
    position: relative;
    padding-left: 3rem;
    line-height: 1.5;
}

.how-to-list li span {
    position: absolute;
    left: 0;
    top: 0;
    color: #FFFF00;
    font-weight: bold;
    font-size: 1.2rem;
}

.how-to-list a {
    color: #FFFF00;
    text-decoration: underline;
}

.how-to-list a:hover {
    color: #FFFFFF;
}

/* PopCat-like APE Button Styling */
.clickbait-container {
    text-align: center;
    padding: 3rem;
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    position: relative;
    z-index: 1;
}

.ape-counter {
    font-size: 2.5rem;
    color: #FFFF00;
    font-family: 'VT323', 'Courier New', Courier, monospace;
    text-shadow: 0 0 10px rgba(255, 255, 0, 0.7);
    margin-bottom: 1rem;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.ape-counter:hover {
    transform: scale(1.05);
}

.ape-button {
    background-color: transparent;
    cursor: pointer;
    transition: all 0.1s ease;
    display: inline-block;
    position: relative;
    user-select: none;
}

.ape-image {
    width: 300px;
    height: 300px;
    filter: drop-shadow(0 0 15px rgba(255, 255, 0, 0.6));
    transition: transform 0.1s ease;
}

.ape-button:hover .ape-image {
    transform: scale(1.05);
}

.ape-button:active .ape-image {
    transform: scale(0.95);
}

.banana-container {
    position: fixed;
    width: 100%;
    height: 100vh;
    top: 0;
    left: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 10;
}

.banana {
    position: absolute;
    width: 40px;
    height: 40px;
    pointer-events: none;
    z-index: 2;
    transition: transform 0.2s;
}

.banana:hover {
    transform: scale(1.2) rotate(45deg);
}

.frenzy-meter-container {
    width: 80%;
    margin: 1.5rem 0;
    text-align: center;
}

.frenzy-meter-label {
    font-size: 1rem;
    font-weight: bold;
    color: #FFEB3B;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 5px rgba(255, 235, 59, 0.7);
}

.frenzy-meter {
    height: 20px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid #FFEB3B;
    box-shadow: 0 0 10px rgba(255, 235, 59, 0.5);
}

.frenzy-progress {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #FFEB3B, #FFC107);
    border-radius: 8px;
    transition: width 0.3s ease-out;
}

.ape-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat span:first-child {
    font-size: 2rem;
    color: #FFFF00;
    font-weight: bold;
}

.stat-label {
    font-size: 0.9rem;
    color: #FFFFFF;
    opacity: 0.8;
}

@keyframes pop {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.pop-animation {
    animation: pop 0.2s ease;
}

@keyframes fall {
    0% { transform: translateY(-100px) rotate(0deg) scale(0.8); opacity: 0; }
    10% { opacity: 1; }
    100% { transform: translateY(100vh) rotate(360deg) scale(1.2); opacity: 0; }
}

@keyframes collect {
    0% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.5) rotate(180deg); }
    100% { transform: scale(0) rotate(360deg); opacity: 0; }
}

.banana-fall {
    animation: fall 3s linear forwards;
}

.banana-collect {
    animation: collect 0.5s ease-out forwards;
}

.frenzy-active .ape-button {
    box-shadow: 0 0 30px rgba(255, 235, 59, 0.9);
}

.frenzy-active .ape-counter {
    color: #FFEB3B;
    text-shadow: 0 0 10px rgba(255, 235, 59, 0.9);
}

.copy-btn {
    width: 100%;
    background: transparent;
    border: 2px solid #FFFF00;
    color: #FFFF00;
    padding: 15px;
    font-size: 1.2rem;
    margin-top: 1rem;
    cursor: pointer;
    max-width: 600px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.copy-btn:hover {
    background-color: #FFFF00;
    color: #000;
}

/* Flicker Animation */
@keyframes flicker {
    0%, 18%, 22%, 25%, 53%, 57%, 100% {
        text-shadow:
            0 0 4px #FFFF00,
            0 0 11px #FFFF00,
            0 0 19px #FFFF00,
            0 0 40px #FF00DE,
            0 0 80px #FF00DE;
    }
    20%, 24%, 55% { text-shadow: none; }
}
/* --- Popup Styles --- */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: none; /* Hidden by default */
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.popup-box {
    background-color: #1a1a1a;
    color: #fff;
    padding: 25px 35px;
    border: 2px solid #FFFF00;
    border-radius: 8px;
    text-align: center;
    font-family: 'Courier New', Courier, monospace;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

.popup-box kbd {
    background-color: #333;
    border: 1px solid #555;
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 0.9em;
}

.popup-close-btn {
    background-color: #FFFF00;
    color: #000;
    border: none;
    padding: 8px 16px;
    margin-top: 15px;
    cursor: pointer;
    font-weight: bold;
    border-radius: 4px;
}
/* Styling for icons inside CTA buttons */
.cta-buttons .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px; /* Space between icon and text */
}

.cta-buttons .icon {
    width: 20px;
    height: 20px;
}

/* Style for the X logo SVG */
.cta-buttons .btn.primary .icon {
    fill: #000;
}


/*
==============================================
   MOBILE RESPONSIVENESS
==============================================
*/
@media (max-width: 768px) {

    body {
        font-size: 1rem; /* Adjust base font size for better readability */
        padding: 1rem 0;
    }

    .container {
        width: 95%; /* Use more of the screen width */
    }

    /* Stack hero section vertically */
    .hero-section {
        flex-direction: column;
        padding: 1.5rem;
        text-align: center;
    }

    .hero-text {
        order: 2; /* Make text appear below the image */
    }

    .ape-visual {
        order: 1; /* Make image appear above the text */
        margin-bottom: 2rem;
    }
    
    .ape-visual img {
        min-width: 200px; /* Allow image to be smaller on mobile */
    }

    /* Adjust typography for smaller screens */
    h1 {
        font-size: 4rem;
    }

    .subtitle {
        font-size: 1.2rem;
    }

    .narrative p {
        max-width: 100%; /* Allow narrative text to use full width */
    }
    
    .cta-buttons {
        justify-content: center; /* Center buttons when they wrap */
    }

    /* Adjust padding for info sections */
    .info-section {
        padding: 2rem 1.5rem;
    }
    
    .info-section h2 {
        font-size: 1.5rem;
    }
    
    /* Stack protocol specs into a single column */
    .spec-list {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .spec-list dt {
        text-align: left; /* Align spec titles to the left */
        grid-column: 1; /* Ensure it stays in the first column */
    }
    
    .spec-list dt::after {
        content: ""; /* Remove the colon */
    }

    .spec-list dd {
        grid-column: 1; /* Ensure it stays in the first column */
        margin-bottom: 0.5rem; /* Add some space below the value */
    }

    /* Adjust "How To" list padding */
    .how-to-list li {
        padding-left: 2.5rem;
    }

    /* Adjust clickbait section for smaller screens */
    .clickbait-container {
        padding: 2rem 1rem;
    }

    .ape-counter {
        font-size: 2rem;
    }
    
    .ape-image {
        width: 250px;
        height: 250px;
    }
}