:root {
    --primary-color: #5d4037; /* Darker brown */
    --secondary-color: #76ff03; /* Bright Lime */
    --accent-color: #ffea00; /* Vivid Yellow */
    --text-color: #ffffff;
    --bg-color: #121212;
    --card-bg: #1e1e1e;
    --font-heading: 'Bangers', cursive;
    --font-body: 'Comic Neue', cursive;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow-x: hidden;
    line-height: 1.6;
}

/* Header */
header {
    background-color: rgba(0, 0, 0, 0.9);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 3px solid var(--secondary-color);
    box-shadow: 0 4px 15px rgba(118, 255, 3, 0.2);
}

.logo h1 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: var(--secondary-color);
    text-shadow: 3px 3px 0 var(--primary-color);
    margin: 0;
    letter-spacing: 2px;
}

nav {
    display: flex;
    gap: 1.5rem;
}

nav a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: bold;
    font-size: 1.2rem;
    transition: all 0.3s;
    text-transform: uppercase;
}

nav a:hover {
    color: var(--secondary-color);
    text-shadow: 0 0 10px var(--secondary-color);
}

/* Hero Section */
#hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    background-image: url('banner bg.png'); /* Kept per instruction */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.8) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 20; /* Ensure content is above tweets (max z-index 11) */
    max-width: 900px;
}

.hero-content h2 {
    font-family: var(--font-heading);
    font-size: 5rem;
    color: var(--text-color);
    margin: 0;
    text-shadow: 5px 5px 0 var(--primary-color), -2px -2px 0 var(--secondary-color);
    line-height: 1;
}

/* Contract Address Styles */
.contract-container {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.7);
    border: 2px solid var(--secondary-color);
    border-radius: 10px;
    padding: 0.8rem 1.5rem;
    margin: 2rem auto;
    max-width: fit-content;
    gap: 1rem;
    position: relative;
    box-shadow: 0 0 15px rgba(118, 255, 3, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
}

.contract-container:hover {
    transform: scale(1.02);
    box-shadow: 0 0 25px rgba(118, 255, 3, 0.5);
}

.contract-label {
    font-family: var(--font-heading);
    color: var(--accent-color);
    font-size: 1.5rem;
}

#contract-address {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    font-size: 1.2rem;
    color: #fff;
    word-break: break-all;
}

#copy-btn {
    background: none;
    border: none;
    color: var(--secondary-color);
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

#copy-btn:hover {
    color: #fff;
}

#copy-tooltip {
    position: absolute;
    top: -40px;
    right: 0;
    background-color: var(--secondary-color);
    color: #000;
    padding: 5px 10px;
    border-radius: 5px;
    font-weight: bold;
    font-family: var(--font-heading);
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s;
    pointer-events: none;
}

#copy-tooltip.show {
    opacity: 1;
    transform: translateY(0);
}

/* CTA Group */
.cta-group {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-top: 1rem;
}

.cta-button {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    padding: 1rem 2.5rem;
    border: none;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.2s;
    text-transform: uppercase;
}

.cta-button.primary {
    background-color: var(--secondary-color);
    color: #000;
    box-shadow: 6px 6px 0 var(--primary-color);
}

.cta-button.primary:hover {
    background-color: #64dd17;
    transform: scale(1.05);
}

.cta-button.secondary {
    background-color: #29b6f6; /* Light Blue for X Community */
    color: #000;
    box-shadow: 6px 6px 0 #01579b;
}

.cta-button.secondary:hover {
    background-color: #4fc3f7;
    transform: scale(1.05);
}

/* Tweet Stack */
#tweet-stack-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 30; /* Above hero content (20) */
    pointer-events: none; /* Allow clicks through to hero content unless dragging */
}

@keyframes float-tweet {
    0%, 100% { transform: translateY(0) rotate(var(--rotation)) scale(var(--scale, 1)); }
    50% { transform: translateY(-20px) rotate(var(--rotation)) scale(var(--scale, 1)); }
}

.stacked-tweet {
    position: absolute;
    max-width: 450px;
    width: 30%;
    left: var(--x-pos);
    top: var(--y-pos);
    border: 3px solid #000;
    box-shadow: 8px 8px 0 rgba(0,0,0,0.5);
    cursor: grab;
    pointer-events: auto; /* Re-enable pointer events for images */
    /* transition: transform 0.1s; */
    animation: float-tweet ease-in-out infinite;
    opacity: 0; /* Hidden by default for JS cycle */
    transition: opacity 2s ease-in-out;
}

.stacked-tweet:active {
    cursor: grabbing;
    --scale: 1.1;
    z-index: 1000 !important;
}

/* Sections General */
.section-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

h2 {
    font-family: var(--font-heading);
    font-size: 4rem;
    text-align: center;
    color: var(--secondary-color);
    text-shadow: 3px 3px 0 #000;
    margin-bottom: 3rem;
}

/* Overtake Wheel Section */
#overtake-wheel {
    padding: 6rem 0;
    background: transparent;
    overflow: hidden;
}

.wheel-container-main {
    position: relative;
    width: fit-content;
    margin: 0 auto;
}

.wheel-marker {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 0; 
    height: 0; 
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-top: 40px solid var(--secondary-color);
    z-index: 20;
    filter: drop-shadow(0 0 5px #000);
}

.wheel-wrapper {
    position: relative;
    width: 600px;
    height: 600px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    /* transition: transform 4s cubic-bezier(0.25, 0.1, 0.25, 1);  Moving transition to JS applied class or inline style */
}

.center-piece {
    position: absolute;
    z-index: 10;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    border: 5px solid var(--secondary-color);
    box-shadow: 0 0 30px var(--secondary-color);
    overflow: hidden; /* Strict circle containment */
    background: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    position: relative; /* Ensure overlay is positioned relative to this */
}

.center-piece img {
    width: 85%; /* Smaller to ensure it fits without cutting */
    height: 85%;
    object-fit: contain; /* Shows full image without cropping */
    position: relative;
    z-index: 1;
}

.spin-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s;
    border-radius: 50%;
    z-index: 2; /* Ensure it's above the image */
}

.center-piece:hover .spin-overlay {
    opacity: 1;
}

.spin-overlay span {
    font-family: var(--font-heading);
    color: var(--secondary-color);
    font-size: 3rem;
    text-shadow: 2px 2px 0 #000;
    pointer-events: none; /* Let clicks pass through to container */
}

/* Mobile Only Button */
.mobile-only {
    display: none;
}

@media screen and (max-width: 768px) {
    .mobile-only {
        display: block;
        margin: 2rem auto 0; /* Center it */
    }

    /* Disable hover effect on mobile to prevent sticky overlay */
    .center-piece:hover .spin-overlay {
        opacity: 0;
    }
    
    .center-piece {
        pointer-events: none; /* Disable click on center piece on mobile */
    }

    /* Tweet Stack Mobile Fixes - Non-overlapping */
    #tweet-stack-container {
        position: relative;
        height: 300px;
        margin-bottom: 1rem;
        z-index: 5;
    }

    .stacked-tweet {
        width: 85%;
        max-width: 320px;
        left: 50% !important;
        top: 50% !important;
        transform: translate(-50%, -50%) rotate(var(--rotation)) !important;
        animation: none; /* Disable floating animation to keep it centered */
    }

    /* Contract Address Mobile Fixes */
    .contract-container {
        flex-direction: column;
        padding: 1rem;
        width: 90%;
        margin: 2rem auto;
        gap: 0.5rem;
    }

    .contract-label {
        font-size: 1.2rem;
    }

    #contract-address {
        font-size: 0.9rem; /* Smaller font for mobile */
        word-break: break-all; /* Ensure long address breaks */
        text-align: center;
    }

    #copy-tooltip {
        top: -30px;
        right: 50%;
        transform: translateX(50%) translateY(10px);
    }
    
    #copy-tooltip.show {
        transform: translateX(50%) translateY(0);
    }
}

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

.modal-content {
    background-color: var(--card-bg);
    margin: 5% auto;
    padding: 2rem;
    border: 4px solid var(--secondary-color);
    width: 90%;
    max-width: 500px;
    border-radius: 20px;
    text-align: center;
    position: relative;
    box-shadow: 0 0 50px rgba(118, 255, 3, 0.3);
    animation: slideIn 0.5s ease;
}

@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.close-modal {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close-modal:hover {
    color: var(--secondary-color);
}

.winner-card {
    background: linear-gradient(135deg, #1a1a1a 0%, #000 100%);
    border: 2px solid var(--accent-color);
    border-radius: 15px;
    padding: 2rem;
    margin: 1.5rem 0;
    position: relative;
    overflow: hidden;
}

.winner-card h3 {
    font-family: var(--font-heading);
    color: var(--secondary-color);
    margin: 0.5rem 0;
    font-size: 1.8rem;
    text-transform: uppercase;
}

.winner-image-container {
    width: 150px;
    height: 150px;
    margin: 1.5rem auto;
    background: radial-gradient(circle, rgba(118,255,3,0.2) 0%, rgba(0,0,0,0) 70%);
    border-radius: 50%;
    padding: 10px;
    border: 3px dashed var(--accent-color);
    display: flex;
    justify-content: center;
    align-items: center;
}

.winner-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.5));
}

.winner-card p {
    font-family: var(--font-heading);
    color: #fff;
    font-size: 1.5rem;
    margin: 0;
}

.watermark {
    position: absolute;
    bottom: 10px;
    right: 15px;
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.3);
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.modal-actions button {
    font-size: 1.2rem;
    padding: 0.8rem 1.5rem;
}

.pulse-center {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.orbit-container {
    position: absolute;
    width: 100%;
    height: 100%;
    transform: rotate(var(--wheel-rotation, 0deg));
    transition: transform 4s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.orbit-item {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100px;
    height: 100px;
    margin-left: -50px;
    margin-top: -50px;
    /* 
       Base position: rotate(i*40deg) translate(200) rotate(-i*40deg)
       Counter-rotation: rotate(-wheel-rotation)
       360 / 9 items = 40deg
    */
    transform: rotate(calc(var(--i) * 40deg)) translate(200px) rotate(calc(var(--i) * -40deg)) rotate(calc(-1 * var(--wheel-rotation, 0deg)));
    transition: transform 4s cubic-bezier(0.25, 0.1, 0.25, 1);
    
    /* Circle Styles */
    border-radius: 50%;
    border: 3px solid var(--secondary-color);
    background-color: rgba(0, 0, 0, 0.8);
    box-shadow: 0 0 15px var(--secondary-color);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.orbit-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.orbit-item:hover img {
    transform: scale(1.2);
    filter: drop-shadow(0 0 10px var(--accent-color));
}


/* About Section */
#about {
    padding: 6rem 0;
    background-color: #1a1a1a;
    background-image: radial-gradient(#333 1px, transparent 1px);
    background-size: 20px 20px;
}

.content-box {
    background-color: var(--card-bg);
    border: 4px solid var(--primary-color);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 10px 10px 0 var(--secondary-color);
    text-align: center;
    font-size: 1.5rem;
}

.fartdev-container {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
    width: 100%;
}

.fartdev-img {
    max-width: 100%;
    height: auto;
    max-height: 400px;
    border-radius: 15px;
    /* Gradient opacity effect */
    mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 60%, rgba(0,0,0,0) 100%);
    -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 60%, rgba(0,0,0,0) 100%);
    opacity: 0.9;
    transition: opacity 0.3s;
}

.fartdev-img:hover {
    opacity: 1;
}

/* Tokenomics */
#tokenomics {
    padding: 6rem 0;
    background-color: #000;
    border-top: 4px solid var(--secondary-color);
    border-bottom: 4px solid var(--secondary-color);
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.card {
    background-color: var(--card-bg);
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    border: 2px solid #333;
    transition: transform 0.3s;
}

.card:hover {
    transform: translateY(-10px);
    border-color: var(--secondary-color);
}

.card h3 {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--accent-color);
}

.big-number {
    font-family: var(--font-heading);
    font-size: 3rem;
    color: var(--text-color);
    margin: 1rem 0;
}

/* Roadmap */
#roadmap {
    padding: 6rem 0;
    background-color: #151515;
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 6px;
    background-color: var(--secondary-color);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -3px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
    box-sizing: border-box;
}

.timeline-item.left {
    left: 0;
}

.timeline-item.right {
    left: 50%;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 25px;
    height: 25px;
    right: -17px;
    background-color: var(--accent-color);
    border: 4px solid #000;
    top: 15px;
    border-radius: 50%;
    z-index: 1;
}

.timeline-item.right::after {
    left: -16px;
}

.timeline-item .content {
    padding: 20px 30px;
    background-color: var(--card-bg);
    position: relative;
    border-radius: 6px;
    border: 2px solid var(--secondary-color);
}

.timeline-item h3 {
    font-family: var(--font-heading);
    color: var(--accent-color);
    margin-top: 0;
}

.timeline-item ul {
    list-style-type: none;
    padding: 0;
    text-align: left;
}

.timeline-item li::before {
    content: "💨";
    margin-right: 10px;
}

/* How to Buy */
#buy {
    padding: 6rem 0;
    background-color: #0d0d0d;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.step {
    background-color: var(--card-bg);
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    position: relative;
    border: 1px solid #333;
}

.step-number {
    width: 50px;
    height: 50px;
    background-color: var(--secondary-color);
    color: #000;
    font-family: var(--font-heading);
    font-size: 2rem;
    line-height: 50px;
    border-radius: 50%;
    margin: 0 auto 1rem;
    box-shadow: 0 0 10px var(--secondary-color);
}

/* Footer */
footer {
    background-color: #000;
    padding: 4rem 0;
    text-align: center;
    border-top: 4px solid var(--primary-color);
}

.footer-content h3 {
    font-family: var(--font-heading);
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.socials {
    margin: 2rem 0;
}

.socials a {
    color: var(--text-color);
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin: 0 1rem;
    text-decoration: none;
    border: 2px solid var(--text-color);
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: all 0.3s;
}

.socials a:hover {
    background-color: var(--text-color);
    color: #000;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    -webkit-transition: all 0.3s ease-in-out;
    transition: all 0.3s ease-in-out;
    background-color: var(--secondary-color);
}

/* Mobile Responsive */
@media screen and (max-width: 768px) {
    .hamburger {
        display: block;
        width: 30px; /* Ensure click area */
        height: 25px;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    nav {
        position: fixed;
        left: -100%;
        top: 70px; /* Adjust based on header height */
        gap: 0;
        flex-direction: column;
        background-color: rgba(0, 0, 0, 0.95);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        border-bottom: 2px solid var(--secondary-color);
    }

    nav.active {
        left: 0;
        display: flex;
    }

    nav a {
        margin: 16px 0;
    }

    .contract-container {
        flex-direction: row; /* Switch back to row to save height */
        flex-wrap: wrap;     /* Allow wrapping */
        padding: 0.5rem;
        width: 95%;
        gap: 0.5rem;
        margin: 1rem auto;   /* Reduce margin */
    }

    #contract-address {
        font-size: 0.8rem;   /* Smaller font */
    }

    .contract-label {
        font-size: 1rem;
    }

    .timeline::after {
        left: 31px;
    }
    
    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }
    
    .timeline-item::after {
        left: 15px;
    }
    
    .timeline-item.right {
        left: 0%;
    }

    .hero-content h2 {
        font-size: 3rem;
    }

    .wheel-wrapper {
        width: 100%;
        max-width: 350px;
        height: 350px;
    }

    .center-piece {
        width: 120px;
        height: 120px;
    }

    .orbit-item {
        width: 60px;
        height: 60px;
        margin-left: -30px;
        margin-top: -30px;
        transform: rotate(calc(var(--i) * 40deg)) translate(110px) rotate(calc(var(--i) * -40deg)) rotate(calc(-1 * var(--wheel-rotation, 0deg)));
        animation: none;
        transition: transform 4s cubic-bezier(0.25, 0.1, 0.25, 1);
    }

    /* Mobile CTA Improvements */
    .cta-group {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
        align-items: center;
    }

    .cta-button {
        width: 80%;
        font-size: 1.4rem;
        padding: 0.8rem 1rem;
        box-sizing: border-box; /* Ensure padding doesn't affect width calculation */
    }

    /* @keyframes counter-spin-mobile removed */
}

.inline-gif-2 {
    height: 0.6em; /* Even smaller */
    width: auto;
    vertical-align: middle; /* Better alignment for smaller icon */
    margin-left: 0; /* No overlap */
    position: relative;
    z-index: 1;
    pointer-events: none;
}
