/* --- FIX 1: Universal Box-Sizing Reset --- */
*, *::before, *::after {
    box-sizing: border-box;
}

/* -------------------------------- */
/* Base (Revised for Scroll Fix)    */
/* -------------------------------- */
body,
html {
    margin: 0;
    padding: 0;
    
    color: #e5e7eb;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    /* --- FIX 2: Ensure overflow is hidden on the root elements --- */
    overflow-x: hidden; 
}

h1,
h2 {
    margin: 0;
    font-weight: 600;
}

a {
    color: #e5e7eb;
    text-decoration: none;
}

/* -------------------------------- */
/* VANTA BACKGROUND STYLING         */
/* -------------------------------- */
#vanta-bg {
    /* Pin to the top-left of the viewport */
    position: fixed; 
    top: 0;
    left: 0;
    
    /* Ensure it covers the entire screen */
    width: 100vw;
    height: 100vh; 
    
    /* PUSH IT TO THE BACK (Crucial for not interfering with clicks) */
    z-index: -1; 
    
    /* Ensure no scrollbars are introduced by the background */
    overflow: hidden; 
}

/* Simple fade-up animation */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade {
    animation: fadeUp 0.8s ease-out both;
}

/* Style the icon container (the 'a' tag) */
.social-icon {
    /* Use the same base color as the rest of the links */
    color: #e5e7eb; 
    text-decoration: none; 
    /* Remove padding if you want it tight to the edge, but keep 10px if you want space: */
    padding: 0 10px 0 0; 
    display: inline-flex; /* Use flex to align the icon inside */
    align-items: center; /* Vertically center the icon */
    height: 30px; /* Give the link a defined height */
}

/* Style the icon itself */
.social-icon i {
    /* Make the icon significantly larger than regular link text */
    font-size: 28px; 
    transition: color 0.3s ease;
     
}

/* Ensure the icon is highly visible on hover */
.social-icon:hover i {
    /* Change color on hover to a bright accent color */
    color: #2dd4bf; /* Using the bright teal from your buttons for contrast */
}

.navbar nav {
    max-width: 1100px;
    margin: 0 auto;
    padding: 12px 24px;
    display: flex; /* Flex container for space-between layout */
    justify-content: center; /* Push icon to the right, or logo to left (if present) */
    align-items: center;
}

/* Base list styling for all screens */
.navbar ul {
    display: flex;
    justify-content: center;
    gap: 32px;
    font-size: 14px;
    list-style: none;
    padding-left: 0;
    margin: 0;
    margin-left: 15px
}
.nav-content-wrapper {
    display: flex;
    align-items: center; /* Vertically align icon and list */
}

/* 1. Hamburger Icon Setup (Hidden by default) */
.menu-icon {
    display: none; /* Hide icon on desktop */
    cursor: pointer;
    z-index: 100; /* Ensure it's above the menu */
}

.menu-icon span {
    display: block;
    width: 25px;
    height: 3px;
    background: #e5e7eb;
    margin: 5px 0;
    transition: 0.4s;
}

/* 2. Hidden Checkbox (Required for CSS-only toggle) */
.menu-toggle {
    display: none;
}

/* Mobile Media Query: Below 768px (Common breakpoint for tablets/mobile) */
@media (max-width: 768px) {
    /* Show the hamburger icon */
    .navbar {
        position: fixed; 
        top: 0;
        left: 0;
        width: 100%;
        /* FIX: Remove solid background to show Vanta.js */
        background-color: transparent; 
        z-index: 1000; /* Ensure it stays above everything */
        /* FIX: Remove default margin/padding inherited from desktop */
        padding: 0;
        margin: 0;
    }
    .navbar nav {
        max-width: 100%;
        /* Push items (Social icon and Wrapper) to the far ends */
        justify-content: space-between; 
        padding: 12px 24px; /* Restore padding inside the transparent navbar */
    }
    
    .menu-icon {
        display: block;
    }

    /* Override Desktop List Display for Mobile */
    .navbar ul {
        /* Position the menu as an overlay/dropdown */
        z-index: 999;
        position: fixed; /* --- FIX 1: Use 'fixed' to position relative to the viewport --- */
        top: 0; /* --- FIX 2: Start from the very top of the screen --- */
        
        /* The width and initial hidden position are adjusted to prevent scroll */
        width: 100vw; /* --- FIX 3: Ensure width is exactly the viewport width --- */
        min-height: 100vh;
        
        /* Set initial position way off-screen using a large number */
        left: 100vw; /* --- FIX 4: Position the left edge of the menu off-screen to the right --- */

        background: #0f172a; 
        flex-direction: column;
        align-items: center;
        gap: 24px;
        padding-top: 80px; /* Adjusted padding-top to account for the top: 0 positioning */

        /* Animate the 'left' property instead of 'transform' */
        transition: left 0.3s ease-in-out; 
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        z-index: 90;
    }

    /* Toggled State: Show the menu */
    .menu-toggle:checked ~ ul {
        /* --- FIX 5: Move the left edge back to 0 (into view) --- */
        left: 0;
    }

    /* Toggled State: Rotate icon to form an 'X' */
    .menu-toggle:checked ~ .menu-icon span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .menu-toggle:checked ~ .menu-icon span:nth-child(2) {
        opacity: 0;
    }
    .menu-toggle:checked ~ .menu-icon span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
}

/* Preserve desktop display for screens 769px and up */
@media (min-width: 769px) {
    .navbar {
        position: fixed; /* Element scrolls until it reaches 'top: 0' */
        top: 0;          /* Stick it to the very top of the viewport */
        width: 100%;     /* Ensure it spans the full width */
        z-index: 50;     /* Ensure it stays above all other content */
        position: -webkit-sticky; 
        /*
           Optional: Add a background color to the navbar itself to prevent content
           from showing through as it scrolls, especially if your body has a texture.
        */
        background-color: #0f172a; /* Use your dark primary background color */
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5); /* Subtle shadow for depth */
    }
    .navbar ul {
        /* Ensure it remains inline on desktop */
        position: static;
        transform: none;
        flex-direction: row;
        gap: 32px;
        background: none;
    }
}

/* -------------------------------- */
/* LOGO SECTION                     */
/* -------------------------------- */
#logo {
  /* Define the property you want to animate */
  transition: transform 0.5s ease-in-out, filter 0.5s ease-in-out; 
  cursor: pointer; /* Indicates it's interactive */
    position: relative;
    width: 560px; /* Original size, good for max-width limit */
    max-width: 80vw; /* Ensures it never exceeds 80% of viewport width */
    margin: 16px auto;
}

#logo:hover {
  /* Apply the change when hovered */
  transform: scale(1.1); /* Grows and slightly rotates */
  filter: drop-shadow(0 0 10px rgba(0, 0, 0, 0.5)); /* Adds a shadow */
}

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

.hero {
    min-height: 40vh;
    display: flex;
    align-items: center;
    justify-content: center;
    /* background: linear-gradient(to right, #0a0f12, #101820, #0a0f12); */
    background: transparent;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 24px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-content h1 {
    font-size: 32px;
    margin-bottom: 12px;
}

.hero-content p {
    max-width: 540px;
    font-size: 14px;
    line-height: 1.6;
    color: #94a3b8;
}

/* Mobile Adjustments for Hero */
@media (max-width: 600px) {
    .hero {
        padding-top: 60px; /* Less padding on small screens */
    }
    .hero-content h1 {
        font-size: 26px; /* Smaller main heading */
    }
    .hero-content p {
        font-size: 13px; /* Slightly smaller body text */
    }
}

/* -------------------------------- */
/* Center Logo Section              */
/* -------------------------------- */
.center-logo {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 24px;
    text-align: center;
}

/* Section heading */
.center-logo-title {
    font-size: 28px;
    margin-bottom: 32px;
}

/* Video Proof Section */
.backtest-section {
  padding: 40px 20px;
  max-width: 1000px;
  margin: 0 auto;
}

.video-container {
  position: relative;
  overflow: hidden;
  width: 100%;
  padding-top: 56.25%; /* 16:9 Aspect Ratio */
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  margin: 20px 0;
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  width: 100%;
  height: 100%;
}

.backtest-stats {
  display: flex;
  justify-content: space-around;
  background: rgba(255, 255, 255, 0.05);
  padding: 15px;
  border-radius: 8px;
  font-size: 0.9rem;
}

/* Cards layout */
.cards-container {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 32px;
    flex-wrap: wrap; /* Already present, which is good for responsiveness */
}

.info-card {
    background: #0f172a;
    padding: 20px 18px;
    border-radius: 8px;
    width: 300px; /* Fixed width */
    max-width: 100%; /* Important: Allows it to shrink on smaller screens */
    text-align: left;
}

.chart-box {
    width: 100%;
    height: 160px; /* Keep the height constraint */
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 6px;
    font-size: 14px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 2s infinite;

    /* --- ADD THIS: Ensure the canvas inside can fill the space --- */
    position: relative; 
}
/* Ensure the canvas fills the space */
#equityChart {
    width: 100% !important;
    height: 100% !important;
}

/* Mobile: Ensure cards take full width if they can't fit side-by-side */
@media (max-width: 700px) {
    .info-card {
        width: 100%;
        max-width: 400px; /* Optional: cap maximum width on small screens for better reading */
    }
    .cards-container {
        gap: 16px; /* Slightly reduced gap */
    }
}


.info-card h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
}

.info-card p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: #94a3b8;
}


.logo-image {
    width: 180px;
    height: 70px;
    margin: 20px auto;
    border-radius: 8px;
    background: linear-gradient(to right, #14b8a6, #0ea5e9);
    opacity: 0.7;
}

/* -------------------------------- */
/* Info Section (2 cards)           */
/* -------------------------------- */
.info-section {
    max-width: 1100px;
    margin: 0 auto;
    padding: 10px 24px 60px;
    display: grid;
    grid-template-columns: 1fr; /* Default: Single column */
    gap: 24px;
}

/* Tablet/Desktop: 2 columns */
@media (min-width: 768px) {
    .info-section {
        grid-template-columns: 1fr;
        max-width: 900px;
        margin: 0 auto;
    }
}

.card {
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 24px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0px 6px 20px rgba(0, 0, 0, 0.4);
}

.card h2 {
    font-size: 20px;
    margin-bottom: 12px;
}

.card p {
    color: #94a3b8;
    font-size: 14px;
    line-height: 1.6;
}

.card button {
    margin-top: 20px;
    padding: 10px 18px;
    background: #14b8a6;
    color: #0f172a;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s ease;
}

.card button:hover {
    background: #2dd4bf;
    transform: translateY(-2px);
}

.chart-box {
    width: 100%;
    height: 350px;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 6px;
    font-size: 14px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 2s infinite;
}

.small-note {
    margin-top: 8px;
    font-size: 11px;
    color: #64748b;
}

/* History List Styling */
.equity-history {
  margin-top: 20px;
  text-align: left;
}
.equity-history ul {
  list-style: none;
  padding: 0;
}
.equity-history li {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.view-screenshot {
  color: #00d4ff; /* Adjust to your brand color */
  text-decoration: none;
  font-weight: bold;
}

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

/* Modal Image */
.modal-content {
  margin: auto;
  display: block;
  max-width: 80%;
  max-height: 80%;
  margin-top: 5%;
  border: 2px solid #fff;
}

/* Close Button */
.close-modal {
  position: absolute;
  top: 20px;
  right: 35px;
  color: #fff;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
}

/* -------------------------------- */
/* ManaFlow Mechanism Section       */
/* -------------------------------- */
.mechanism {
    /* Set the section's maximum width, similar to your other centered sections */
    max-width: 1100px;
    margin: 40px auto; /* Centers the whole mechanism section */
    padding: 0 24px;
    text-align: center; /* Centers the content if using block elements */
    display: flex; /* Use flex to easily center the single child card */
    justify-content: center; /* Horizontally centers the card */
}
/* -------------------------------- */
/* Shared Button Styling (New)      */
/* -------------------------------- */
/* Apply button styles to the new <a> tag */
.button {
    margin-top: 20px;
    padding: 10px 18px;
    background: #14b8a6;
    color: #0f172a;
    border: none; /* Inherited from button, but good practice for an <a> element */
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s ease;
    
    /* Ensure it behaves like a button */
    display: inline-block; 
    text-align: center;
    text-decoration: none; /* Remove underline */
}

.button:hover {
    background: #2dd4bf;
    transform: translateY(-2px);
}

/* -------------------------------- */
/* Targeting the Single Card        */
/* -------------------------------- */
.mechanism .card.left {
    /* Define the card's maximum size */
    max-width: 500px; /* Adjust this value to control the card's width */
    width: 100%;    /* Ensures it uses the full width up to max-width */
    
    /* Override any default grid styling if inherited from .info-section */
    margin: 0;
}

/* -------------------------------- */
/* Buyback Table (FIXED)            */
/* -------------------------------- */
.buyback {
    padding: 60px 0;
    border-top: 1px solid #1e293b;
}
.buyback-card {
    max-width: 1000px; /* Constrain the card's width for readability */
    margin: 0 auto; /* Center the card horizontally */
    padding: 30px; /* Give it more internal space */
}

/* Responsive Table Wrapper - Kept for mobile overflow, but width constraint is maintained */
.buyback-table-wrapper {
    overflow-x: auto; /* Allows horizontal scrolling on small screens */
    width: 100%;
    padding: 0;
    
}

.buyback table {
    min-width: 600px; /* Ensures the table is wide enough to scroll */ 
    width: 100%;
    /* Max width is indirectly enforced by the wrapper */
    border-collapse: collapse;
    margin: 0;
}

.buyback thead {
    background: #111827;
}

.buyback th {
    padding: 14px;
    text-align: left;
    border-bottom: 1px solid #334155;
    color: #e2e8f0;
    font-size: 14px;
}

.buyback td {
    padding: 14px;
    font-size: 14px;
    color: #94a3b8;
    border-bottom: 1px solid #1e293b;
}

.buyback tr:hover td {
    background: #1e293b;
}

/* -------------------------------- */
/* Buyback Table Link Styling       */
/* -------------------------------- */
.buyback table a {
    color: #14b8a6; /* Use your bright accent color */
    text-decoration: none; /* Remove underline by default */
    transition: color 0.2s ease, text-decoration 0.2s ease;
}

.buyback table a:hover {
    color: #2dd4bf; /* Lighter shade on hover */
    text-decoration: underline; /* Add underline on hover */
}

/* -------------------------------- */
/* CONTACT ADDRESS SECTION          */
/* -------------------------------- */
.contact-address-section {
    max-width: 1100px;
    margin: 40px auto;
    padding: 0 24px;
    text-align: center;
}

.contact-card {
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 24px;
    max-width: 600px; /* Constrain width for better look */
    margin: 0 auto;
}

.contact-card h2 {
    margin-top: 0;        /* Removes extra space at the top */
    margin-bottom: 20px;  /* Adds the space you need at the bottom */
}

.address-wrapper {
    display: flex;
    gap: 10px;
    align-items: center;
    width: 100%;
}

/* Address Input Field */
#walletAddress {
    flex-grow: 1; /* Allows the input to take up maximum space */
    padding: 10px 12px;
    background: #1e293b;
    border: 1px solid #334155;
    color: #e5e7eb;
    border-radius: 6px;
    font-family: monospace; /* Use monospace for clarity of the address */
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis; /* Ensures long addresses look clean */
    white-space: nowrap;
    cursor: default; /* Visually indicates it's read-only */
}

/* Copy Button */
#copyButton {
    padding: 10px 18px;
    background: #14b8a6; /* Your accent color */
    color: #0f172a;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
    flex-shrink: 0; /* Prevents the button from shrinking */
}

#copyButton:hover {
    background: #2dd4bf;
}

/* Feedback Message */
#copyFeedback {
    display: block;
    margin-top: 10px;
    font-size: 13px;
    color: #14b8a6;
    height: 16px; /* Reserve space to prevent layout jump */
}

/* --- COMING SOON OVERLAY --- */

/* 1. The container needs to be relative so the overlay stays inside it */
.coming-soon-container {
    position: relative;
    overflow: hidden;
}

/* 2. The blur layer */
.coming-soon-blur {
    filter: blur(4px);
    pointer-events: none; /* Prevents clicking links or buttons underneath */
    user-select: none;    /* Prevents highlighting placeholder text */
    opacity: 0.6;         /* Greys it out slightly */
}

/* 3. The "Coming Soon" Overlay Text */
.coming-soon-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    pointer-events: none; /* So it doesn't block the mouse if the box is large */
}

.coming-soon-badge {
    background: #14b8a6; /* Your teal accent color */
    color: #0f172a;      /* Dark slate for contrast */
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 800;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.2);
    transform: rotate(-5deg); /* Slight tilt for a "stamped" look */
}