@font-face {
    font-family: 'LeonemFont';
    src: url('../assets/font1.ttf') format('truetype');
}

:root {
    --primary-color: #4c3217;
    --accent-color: #b5b38c;
    --text-color: #333;
    --bg-color: #ffffff;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    background-image: url('../assets/bg-pope.png');
    background-size: contain;
    background-position: center bottom;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background: transparent;
}

.logo img {
    height: 60px;
    width: auto;
    border-radius: 50%;
}

.desktop-nav {
    display: flex;
    gap: 2rem;
    background: rgba(181, 179, 140, 0.3);
    padding: 0.75rem 2rem;
    border-radius: 999px;
    backdrop-filter: blur(5px);
}

.desktop-nav a {
    text-decoration: none;
    color: #fff; /* Changed to white for better contrast on colored bg, or dark if bg is light */
    color: #5a5840;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    transition: opacity 0.2s;
}

.desktop-nav a:hover {
    opacity: 0.7;
}

.buy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #4a3728;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 999px;
    text-decoration: none;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.9rem;
    transition: transform 0.2s;
    line-height: 1;
}

.buy-btn:hover {
    transform: scale(1.05);
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 200;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: #000;
    transition: 0.3s;
}

/* Main Content */
main {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
    margin-top: 60px; /* Space for header */
}

.title {
    font-family: 'LeonemFont', serif;
    font-size: 4rem;
    margin-bottom: 1rem;
    color: #000;
    text-transform: uppercase;
}

.subtitle {
    font-size: 1.2rem;
    color: #666;
    max-width: 600px;
    line-height: 1.5;
    font-weight: 500;
}

/* Mobile Home Button */
.home-mobile-btn {
    display: none; /* Hidden on desktop */
    margin-top: 1.5rem;
    background-color: rgba(255, 255, 255, 0.8);
    color: #4c3217;
    padding: 0.5rem 1.5rem;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    backdrop-filter: blur(5px);
    border: 1px solid #4c3217;
}

/* Bottom Right Section */
.bottom-right {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    z-index: 50;
}

.socials {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.socials a {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.socials a:hover {
    transform: translateY(-3px);
}

.socials img {
    width: 24px;
    height: 24px;
    color: #000; /* SVG likely needs currentcolor or specific fill */
}

.copy-address {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    border: none;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    cursor: pointer;
    color: #000;
    padding: 0.5rem;
}

.copy-address:hover {
    opacity: 0.7;
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: #fff;
    z-index: 150;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transform: translateY(-100%);
    transition: transform 0.3s ease-in-out;
}

.mobile-menu.active {
    transform: translateY(0);
}

.mobile-menu nav {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    text-align: center;
}

.mobile-menu a {
    font-size: 1.5rem;
    text-decoration: none;
    color: #000;
    font-weight: bold;
}

.mobile-buy-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #4c3217;
    color: white !important;
    padding: 1rem 2rem;
    border-radius: 999px;
    margin-top: 1rem;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
    white-space: nowrap; 
    max-width: 90%;
    line-height: 1;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
    overflow-y: auto;
}

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 2rem;
    border: 1px solid #888;
    width: 90%;
    max-width: 600px;
    border-radius: 10px;
    position: relative;
    text-align: left; /* Changed to left for readability */
    max-height: 85vh; /* Limit height */
    overflow-y: auto; /* Scroll inside content */
    color: #333;
}

.about-img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.modal-body h2 {
    margin-bottom: 1rem;
    font-family: 'LeonemFont', serif;
}

.modal-body h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    font-family: 'LeonemFont', serif;
}

.modal-body p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.tokenomics {
    background: #f9f9f9;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
}

.close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 2rem;
    cursor: pointer;
}

/* Responsive */
@media (max-width: 768px) {
    .desktop-nav {
        display: none;
    }
    
    .hamburger {
        display: flex;
    }
    
    .buy-btn {
        display: none; /* Hide in header, show in menu if needed, or keep */
    }
    
    .home-mobile-btn {
        display: inline-block; /* Show on mobile */
    }

    .bottom-right {
        position: static;
        flex-direction: column;
        padding: 1rem;
        width: 100%;
        justify-content: center;
        align-items: center; /* Ensure everything is centered */
        background: rgba(255, 255, 255, 0.9);
        backdrop-filter: blur(5px);
        margin-top: auto; /* Push to bottom */
    }
    
    .socials {
        justify-content: center; /* Center social icons */
        flex-wrap: wrap; /* Allow wrapping if too many */
    }
    
    .copy-address {
        justify-content: center; /* Center copy button content */
        width: 100%; /* Take full width to allow centering */
    }
    
    .title {
        font-size: 2.5rem;
    }
    
    main {
        justify-content: flex-start;
        padding-top: 5%; /* Reduced padding */
        padding-bottom: 2rem;
    }
    
    body {
        background-position: center bottom;
        background-size: contain; 
    }
}

/* New Memes Gallery Styles */
.memes-gallery {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-top: 1.5rem;
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 0.5rem; /* Space for scrollbar */
}

.memes-gallery img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
}

/* Scrollbar styling for gallery */
.memes-gallery::-webkit-scrollbar {
    width: 8px;
}

.memes-gallery::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.memes-gallery::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.memes-gallery::-webkit-scrollbar-thumb:hover {
    background: #555;
}

@media (min-width: 768px) {
    .memes-gallery {
        grid-template-columns: repeat(2, 1fr); /* 2 columns on desktop */
    }
}