:root {
    --bg-color: #f5f7e9;
    --accent-color: #5A8C5B;
    --secondary-color: #f6fbe7;
    --font-color: #333;
    --border-color: #ddd;
    --highlight: #e0f4df;
    --heading-font: 'Patrick Hand', cursive;
    --body-font: 'Inter', sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    font-family: var(--body-font);
    background: var(--bg-color);
    margin: 0;
    padding: 0;
    color: var(--font-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: background 0.3s;
}

/* ----- HEADER ----- */

header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1em;
    background: #ffffffee;
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.logo {
    display: flex;
    align-items: center;
    font-size: 1.2em;
    font-weight: 600;
    color: var(--accent-color);
    text-decoration: none;
}

.logo img {
    width: 40px;
    height: 40px;
    margin-right: 0.5em;
    border-radius: 50%;
    object-fit: cover;
}

nav {
    display: flex;
    gap: 1em;
}

nav a {
    text-decoration: none;
    color: var(--font-color);
    font-weight: 500;
    padding: 0.5em 1em;
    border-radius: 20px;
    transition: background 0.3s;
}

nav a.active {
    background: var(--highlight);
}

nav a:hover {
    background: var(--highlight);
}

.hamburger {
    display: none;
    font-size: 1.5em;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--font-color);
}

/* ----- HERO SECTION ----- */

.hero {
    text-align: center;
    padding: 3em 1em;
    background: var(--bg-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    max-width: 1000px;
    margin: 0 auto;
}

.hero img {
    width: 180px;
    height: 180px;
    margin-bottom: 1em;
    filter: drop-shadow(0 4px 4px rgba(0, 0, 0, 0.05));
    border-radius: 50%;
    object-fit: cover;
}

h1,
h2,
h3 {
    font-family: var(--heading-font);
    color: var(--accent-color);
    margin-top: 0;
}

h1 {
    font-size: 2.2em;
    margin-bottom: 0.5em;
}

/* ----- CORE MENUS (HOME) ----- */

.core-menus {
    display: flex;
    justify-content: center;
    gap: 2em;
    padding: 2em 1em;
    flex-wrap: wrap;
    max-width: 1000px;
    margin: 0 auto;
}

.menu-card {
    background: #fff;
    border-radius: 10px;
    padding: 2em;
    flex: 1 1 250px;
    max-width: 300px;
    box-sizing: border-box;
    border: 1px solid var(--border-color);
    transition: box-shadow 0.3s;
    text-align: center;
}

.menu-card:hover {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.07);
}

.menu-card h2 {
    margin-bottom: 1em;
}

.menu-card p {
    margin-bottom: 1.5em;
}

.menu-card a {
    display: inline-block;
    background: var(--accent-color);
    color: #fff;
    text-decoration: none;
    padding: 0.6em 1.2em;
    border-radius: 20px;
    font-weight: 500;
    transition: background 0.3s;
}

.menu-card a:hover {
    background: #4e7a4f;
}

/* ----- ADDITIONAL LINKS SECTION (HOME) ----- */

.additional-links {
    padding: 2em 1em;
    background: var(--secondary-color);
    text-align: center;
}

.additional-links h2 {
    margin-bottom: 1em;
}

.link-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1em;
    max-width: 1000px;
    margin: 0 auto;
}

.link-item {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.8em 1.2em;
    text-decoration: none;
    color: var(--font-color);
    transition: background 0.3s, color 0.3s;
    font-weight: 500;
}

.link-item:hover {
    background: var(--accent-color);
    color: #fff;
}

/* ----- CONTENT SECTIONS ----- */

.content-section {
    padding: 2em 1em;
    max-width: 1000px;
    margin: 0 auto;
}

.content-section h1,
.content-section h2 {
    margin-bottom: 0.5em;
}

.content-section p {
    line-height: 1.6em;
    max-width: 700px;
    margin-bottom: 1.5em;
}

.content-section ul {
    padding-left: 1.5em;
    margin-bottom: 1.5em;
    max-width: 700px;
}

.content-section li {
    margin-bottom: 0.5em;
}

/* ----- FLEX GRID FOR CARDS ----- */

.flex-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5em;
    margin-top: 1.5em;
    max-width: 1000px;
    margin: 1.5em auto 0 auto;
}

.card {
    background: #fff;
    border-radius: 10px;
    padding: 1.5em;
    flex: 1 1 calc(33% - 3em);
    min-width: 250px;
    box-sizing: border-box;
    border: 1px solid var(--border-color);
    transition: box-shadow 0.3s;
    /* Links near top, no forced bottom alignment */
    display: flex;
    flex-direction: column;
}

.card:hover {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.07);
}

.card h3 {
    margin-top: 0;
    margin-bottom: 0.5em;
}

.card p {
    margin-bottom: 1em;
}

.card a {
    display: inline-block;
    margin-top: 0.5em;
    background: var(--accent-color);
    color: #fff;
    text-decoration: none;
    padding: 0.4em 1em;
    border-radius: 20px;
    font-weight: 500;
    transition: background 0.3s;
}

.card a:hover {
    background: #4e7a4f;
}

/* ----- TOKEN PAGE SPECIFIC STYLES ----- */

.purchase-wrapper {
    margin-top: 2em;
}

.purchase-section {
    background: #fff;
    border-radius: 10px;
    padding: 1.5em;
    border: 1px solid var(--border-color);
    margin-top: 1em;
}

.token-address {
    background: var(--highlight);
    padding: 0.2em 0.4em;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9em;
    word-break: break-all;
    display: inline-block;
    margin: 0.2em 0;
}

.disclaimer {
    background: var(--secondary-color);
    padding: 1em;
    border-radius: 8px;
    margin-top: 1em;
    font-size: 0.9em;
}

.exchanges-card {
    min-height: auto;
}

.exchange-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5em;
    margin-top: 1em;
}

.exchange-links a {
    background: var(--accent-color);
    color: #fff;
    text-decoration: none;
    padding: 0.4em 0.8em;
    border-radius: 15px;
    font-size: 0.85em;
    font-weight: 500;
    transition: background 0.3s;
    white-space: nowrap;
}

.exchange-links a:hover {
    background: #4e7a4f;
}

@media (max-width: 900px) {
    .purchase-section {
        padding: 1em;
        margin: 1em 0;
    }
    
    .token-address {
        font-size: 0.8em;
        padding: 0.3em 0.5em;
    }
    
    .disclaimer {
        padding: 0.8em;
        font-size: 0.85em;
    }
    
    .exchange-links {
        gap: 0.3em;
    }
    
    .exchange-links a {
        padding: 0.3em 0.6em;
        font-size: 0.8em;
    }
}

@media (max-width: 480px) {
    .purchase-section {
        padding: 0.8em;
    }
    
    .token-address {
        font-size: 0.75em;
        padding: 0.2em 0.3em;
        line-height: 1.3;
    }
    
    .disclaimer {
        padding: 0.6em;
        font-size: 0.8em;
    }
    
    .exchange-links a {
        padding: 0.25em 0.5em;
        font-size: 0.75em;
    }
}

/* ----- BULLET TABLES ----- */

.bullet-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px;
}

.bullet-cell {
    width: 30px;
    vertical-align: top;
    padding-right: 10px;
}

@media (max-width: 480px) {
    .bullet-table {
        border-spacing: 0 5px;
    }
    
    .bullet-cell {
        width: 20px;
        padding-right: 5px;
    }
}

td {
    max-width: 700px;
}

/* ----- TABS ----- */

.tabs {
    display: flex;
    justify-content: center;
    margin-top: 2em;
    flex-wrap: wrap;
    /* Add horizontal scrolling on small screens */
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.tab-link {
    background: var(--accent-color);
    color: #fff;
    border: 1px solid var(--border-color);
    padding: 0.8em 1.5em;
    border-radius: 10px 10px 0 0;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.3s, border-bottom 0.3s;
    white-space: nowrap;
    /* Keep text from wrapping */
    margin-bottom: -1px;
    /* Slight overlap for a smooth bottom border line */
}

.tab-link:hover {
    background: #4e7a4f;
}

.tab-link.active {
    background: #3a5a3d;
    border-bottom: 1px solid var(--bg-color);
}

.tab-content {
    display: none;
    padding: 1em;
    border: 1px solid var(--border-color);
    border-top: none;
    background: #fff;
    border-radius: 0 0 10px 10px;
}

.tab-content.active {
    display: block;
}

.tab-content h3 {
    margin-top: 0.5em;
}

/* ----- DOWNLOAD BUTTON ----- */

.download-button {
    display: inline-block;
    background: var(--accent-color);
    color: #fff;
    text-decoration: none;
    padding: 0.6em 1.2em;
    border-radius: 20px;
    font-weight: 500;
    transition: background 0.3s;
    margin-top: 1em;
}

.download-button:hover {
    background: #4e7a4f;
}

.download-button.disabled,
a.disabled {
    background: #ccc;
    cursor: not-allowed;
    pointer-events: none;
    color: #666;
}

.download-button.disabled:hover,
a.disabled:hover {
    background: #ccc;
}

/* ----- FOOTER ----- */

footer {
    text-align: center;
    padding: 2em 1em;
    margin-top: auto;
    font-size: 0.9em;
    color: #666;
    background: #ffffff99;
    backdrop-filter: blur(10px);
}

/* ----- RESPONSIVE DESIGN ----- */

/* Tablet and small desktop */
@media (max-width: 1024px) {
    .hero {
        padding: 2em 1em;
    }
    
    .hero img {
        width: 200px;
    }
    
    h1 {
        font-size: 2em;
    }
    
    .content-section {
        padding: 1.5em 1em;
    }
}

/* Mobile and tablet */
@media (max-width: 900px) {
    nav {
        display: none;
        flex-direction: column;
        background: #ffffffee;
        position: absolute;
        top: 60px;
        right: 1em;
        width: 200px;
        border: 1px solid var(--border-color);
        border-radius: 10px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        padding: 1em;
        z-index: 1001;
    }
    
    nav.active {
        display: flex;
    }
    
    .hamburger {
        display: block;
    }
    
    .hero {
        max-width: 95%;
        margin: 0 auto;
        padding: 2em 1em;
    }
    
    .hero img {
        width: 180px;
    }
    
    h1 {
        font-size: 1.8em;
    }
    
    .core-menus {
        flex-direction: column;
        align-items: center;
        max-width: 95%;
        gap: 1.5em;
    }
    
    .menu-card {
        max-width: 90%;
        width: 100%;
    }
    
    .flex-grid {
        flex-direction: column;
        align-items: center;
        gap: 1em;
    }
    
    .card {
        flex: 1 1 100%;
        max-width: 100%;
    }
    
    /* Improve table responsiveness */
    .bullet-table {
        width: 100% !important;
        font-size: 0.9em;
    }
    
    .bullet-table td {
        padding: 0.5em 0;
        max-width: none;
    }
    
    /* Better tab handling on mobile */
    .tabs {
        justify-content: flex-start;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 0.5em;
    }
    
    .tab-link {
        flex-shrink: 0;
        padding: 0.6em 1em;
        margin-right: 0.5em;
        font-size: 0.9em;
        white-space: nowrap;
    }
    
    .tab-content {
        font-size: 0.9em;
        padding: 1em 0.5em;
    }
    
    /* Content section improvements */
    .content-section {
        padding: 1.5em 0.5em;
    }
    
    .content-section p,
    .content-section ul {
        max-width: 100%;
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    header {
        padding: 0.8em;
    }
    
    .logo {
        font-size: 1.1em;
    }
    
    .logo img {
        width: 35px;
        height: 35px;
    }
    
    .hero {
        padding: 1.5em 0.5em;
    }
    
    .hero img {
        width: 150px;
    }
    
    h1 {
        font-size: 1.6em;
        margin-bottom: 0.8em;
    }
    
    h2 {
        font-size: 1.4em;
    }
    
    h3 {
        font-size: 1.2em;
    }
    
    .core-menus {
        padding: 1.5em 0.5em;
        gap: 1em;
    }
    
    .menu-card {
        padding: 1.5em;
    }
    
    .card {
        padding: 1em;
    }
    
    .tab-link {
        padding: 0.5em 0.8em;
        font-size: 0.85em;
    }
    
    .tab-content {
        padding: 0.8em 0.3em;
        font-size: 0.85em;
    }
    
    .bullet-table {
        font-size: 0.8em;
    }
    
    .bullet-table td {
        padding: 0.3em 0;
    }
    
    /* Improve button sizing on small screens */
    .menu-card a,
    .card a,
    .download-button {
        padding: 0.5em 1em;
        font-size: 0.9em;
    }
    
    /* Footer adjustments */
    footer {
        padding: 1.5em 0.5em;
        font-size: 0.8em;
    }
}

/* ----- COPY BOX ----- */

.copy-box {
    background: linear-gradient(135deg, var(--accent-color) 0%, #4e7a4f 100%);
    border: 3px solid #3a5a3d;
    border-radius: 12px;
    padding: 1.5em;
    margin: 1.5em 0;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    box-shadow: 0 4px 12px rgba(90, 140, 91, 0.3);
}

.copy-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(90, 140, 91, 0.4);
}

.copy-box:active {
    transform: translateY(0);
}

.copy-label {
    color: #fff;
    font-weight: 700;
    font-size: 1.1em;
    letter-spacing: 1px;
    margin-bottom: 0.8em;
    text-transform: uppercase;
}

.contract-address {
    background: rgba(255, 255, 255, 0.95);
    color: var(--font-color);
    padding: 0.8em 1em;
    border-radius: 8px;
    font-family: monospace;
    font-size: 0.95em;
    font-weight: 600;
    word-break: break-all;
    line-height: 1.4;
}

@media (max-width: 900px) {
    .copy-box {
        padding: 1.2em;
        margin: 1.2em 0;
    }
    
    .copy-label {
        font-size: 1em;
    }
    
    .contract-address {
        font-size: 0.85em;
        padding: 0.7em 0.8em;
    }
}

@media (max-width: 480px) {
    .copy-box {
        padding: 1em;
        margin: .5em 0;
    }
    
    .copy-label {
        font-size: 0.9em;
        letter-spacing: 0.5px;
    }
    
    .contract-address {
        font-size: 0.75em;
        padding: 0.6em;
    }
}
