:root {
    --bg-deep-desert-night: #0D0A05;
    --bg-sand-layer: #1C1509;
    --accent-gold: #C9A84C;
    --meerkat-green: #5DBB2F;
    --muted-earth: #3B2F1E;
    --text-primary: #F0E6CC;
    --text-muted: #8A7A60;

    --font-display: 'Press Start 2P', cursive;
    --font-body: 'Inter', sans-serif;

    --pixel-size: 1px; /* Base pixel size for textures */
}

/* Global Styles */
html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-deep-desert-night);
    margin: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden; /* Prevent horizontal scroll from burrow animation */
}

/* Pixel grid background texture */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: repeating-linear-gradient(
        0deg,
        rgba(255, 255, 255, 0.02) 0,
        rgba(255, 255, 255, 0.02) 1px,
        transparent 1px,
        transparent 2px
    ),
    repeating-linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.02) 0,
        rgba(255, 255, 255, 0.02) 1px,
        transparent 1px,
        transparent 2px
    );
    pointer-events: none;
    z-index: -1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3 {
    font-family: var(--font-display);
    color: var(--accent-gold);
    text-align: center;
    margin-bottom: 1em;
}

h1 { font-size: 2.5em; }
h2 { font-size: 2em; }
h3 { font-size: 1.5em; }

a {
    color: var(--accent-gold);
    text-decoration: none;
}

a:hover {
    color: var(--text-primary);
}

.btn {
    display: inline-block;
    padding: 12px 25px;
    border: 2px solid var(--accent-gold);
    border-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="8" height="8"><rect x="0" y="0" width="1" height="1" fill="%23C9A84C"/><rect x="1" y="0" width="1" height="1" fill="transparent"/><rect x="0" y="1" width="1" height="1" fill="transparent"/></svg>') 2 stretch;
    background-color: transparent;
    color: var(--accent-gold);
    font-family: var(--font-display);
    font-size: 0.8em;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 2px 2px 0px 0px var(--accent-gold); /* Pixel shadow */
}

.btn:hover {
    background-color: var(--accent-gold);
    color: var(--bg-deep-desert-night);
    box-shadow: 4px 4px 0px 0px var(--text-primary);
}

.btn-primary {
    background-color: var(--accent-gold);
    color: var(--bg-deep-desert-night);
}

.btn-primary:hover {
    background-color: var(--text-primary);
    color: var(--bg-deep-desert-night);
    border-color: var(--text-primary);
}

.btn-secondary {
    background-color: transparent;
    color: var(--accent-gold);
}

.btn-secondary:hover {
    background-color: var(--accent-gold);
    color: var(--bg-deep-desert-night);
}

/* Sand ground line divider */
.section-divider {
    width: 100%;
    height: 10px; /* Adjust height as needed */
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 10" preserveAspectRatio="none"><path d="M0,5 L10,0 L20,5 L30,0 L40,5 L50,0 L60,5 L70,0 L80,5 L90,0 L100,5 L100,10 L0,10 Z" fill="%231C1509"/></svg>');
    background-repeat: repeat-x;
    background-size: 50px 10px; /* Adjust size for desired jaggedness */
    margin: 40px 0;
}

/* Navbar */
.navbar {
    position: sticky;
    top: 0;
    width: 100%;
    background-color: rgba(13, 10, 5, 0.9); /* Semi-transparent deep desert night */
    backdrop-filter: blur(5px);
    z-index: 1000;
    padding: 15px 0;
    border-bottom: 1px solid var(--muted-earth);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand img {
    height: 40px; /* Adjust logo size */
    image-rendering: pixelated;
}

.navbar-nav {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
}

.navbar-nav li {
    margin-left: 30px;
}

.navbar-nav a {
    font-family: var(--font-display);
    font-size: 0.9em;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

.navbar-nav a:hover {
    color: var(--accent-gold);
}

.navbar-nav .mint-link {
    color: var(--text-muted);
    cursor: not-allowed;
    opacity: 0.7;
}

.navbar-nav .mint-link:hover {
    color: var(--text-muted);
}

.navbar-nav .social-icon img {
    height: 24px;
    width: 24px;
    image-rendering: pixelated;
    vertical-align: middle;
}

.navbar-toggle {
    display: none; /* Hidden by default on desktop */
    flex-direction: column;
    cursor: pointer;
    span {
        height: 3px;
        width: 25px;
        background-color: var(--text-primary);
        margin-bottom: 4px;
        border-radius: 1px;
    }
}

/* Hero Section */
.hero-section {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background-color: var(--bg-deep-desert-night);
    position: relative;
    overflow: hidden;
    padding-bottom: 60px; /* Space for burrow animation */
}

/* Scanline overlay */
.hero-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.1) 0,
        rgba(0, 0, 0, 0.1) 1px,
        transparent 1px,
        transparent 2px
    );
    pointer-events: none;
    opacity: 0.2;
    z-index: 1;
}

.hero-section h1 {
    font-size: 3.5em;
    margin-bottom: 0.5em;
    line-height: 1.2;
}

.hero-section p {
    font-family: var(--font-body);
    font-size: 1.2em;
    color: var(--text-primary);
    margin-bottom: 2em;
}

.hero-ctas {
    display: flex;
    gap: 20px;
    justify-content: center;
}

/* Burrow Animation */
.burrow-animation {
    position: absolute;
    bottom: 0;
    left: -100%; /* Start off-screen to the left */
    width: 100%;
    height: 60px;
    background-image: repeating-linear-gradient(
        90deg,
        var(--meerkat-green) 0,
        var(--meerkat-green) 10px,
        transparent 10px,
        transparent 20px
    );
    background-size: 20px 60px; /* Each block is 10px wide, 60px tall, with 10px transparent space */
    animation: burrow 1.8s ease-in-out forwards;
    animation-play-state: paused; /* Paused until JS triggers it */
    z-index: 2;
}

@keyframes burrow {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(200%); /* Move 200% to ensure it goes fully off-screen to the right */
    }
}

/* Story Section */
.story-section {
    background-color: var(--bg-sand-layer);
    padding: 80px 0;
    position: relative;
}

.story-section::before {
    content: '';
    position: absolute;
    top: -10px; /* Position above the section */
    left: 0;
    width: 100%;
    height: 10px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 10" preserveAspectRatio="none"><path d="M0,5 L10,0 L20,5 L30,0 L40,5 L50,0 L60,5 L70,0 L80,5 L90,0 L100,5 L100,10 L0,10 Z" fill="%231C1509"/></svg>');
    background-repeat: repeat-x;
    background-size: 50px 10px;
}

.story-section h2 {
    color: var(--accent-gold);
    margin-bottom: 2em;
}

.lore-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.lore-subsection h3 {
    font-family: var(--font-display);
    font-size: 1.2em;
    color: var(--text-primary);
    text-align: left;
    margin-bottom: 1em;
    display: flex;
    align-items: center;
}

.pixel-bullet {
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: var(--meerkat-green);
    margin-right: 10px;
    box-shadow: 1px 1px 0px 0px var(--meerkat-green); /* Pixel effect */
    image-rendering: pixelated;
}

.lore-subsection p {
    color: var(--text-primary);
    text-align: left;
}

/* Traits Section */
.traits-section {
    background-color: var(--bg-deep-desert-night);
    padding: 80px 0;
    position: relative;
}

.traits-section::before {
    content: '';
    position: absolute;
    top: -10px; /* Position above the section */
    left: 0;
    width: 100%;
    height: 10px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 10" preserveAspectRatio="none"><path d="M0,5 L10,0 L20,5 L30,0 L40,5 L50,0 L60,5 L70,0 L80,5 L90,0 L100,5 L100,10 L0,10 Z" fill="%230D0A05"/></svg>');
    background-repeat: repeat-x;
    background-size: 50px 10px;
}

.traits-section h2 {
    color: var(--accent-gold);
    margin-bottom: 2em;
}

.role-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    justify-content: center;
}

.role-card {
    background-color: var(--muted-earth);
    padding: 30px;
    text-align: center;
    box-shadow: 4px 4px 0px 0px var(--accent-gold); /* Pixel border */
    border: 2px solid transparent; /* For the pixel border effect */
    position: relative;
    transition: transform 0.2s ease-in-out;
}

.role-card:hover {
    transform: translateY(-5px);
}

.role-card .role-icon {
    font-size: 3em;
    display: block;
    margin-bottom: 15px;
    color: var(--meerkat-green);
    text-shadow: 2px 2px 0px var(--bg-deep-desert-night); /* Pixel shadow for icon */
}

.role-card h3 {
    font-family: var(--font-display);
    font-size: 1.3em;
    color: var(--accent-gold);
    margin-bottom: 10px;
}

.role-card p {
    color: var(--text-primary);
    font-size: 0.95em;
}

/* Colony Stats Bar */
.colony-stats-bar {
    background-color: var(--accent-gold);
    padding: 40px 0;
    text-align: center;
    position: relative;
}

.colony-stats-bar::before {
    content: '';
    position: absolute;
    top: -10px; /* Position above the section */
    left: 0;
    width: 100%;
    height: 10px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 10" preserveAspectRatio="none"><path d="M0,5 L10,0 L20,5 L30,0 L40,5 L50,0 L60,5 L70,0 L80,5 L90,0 L100,5 L100,10 L0,10 Z" fill="%23C9A84C"/></svg>');
    background-repeat: repeat-x;
    background-size: 50px 10px;
}

.colony-stats-bar .container {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 20px;
}

.stat-item {
    font-family: var(--font-display);
    font-size: 1.5em;
    color: var(--bg-deep-desert-night);
    text-shadow: 2px 2px 0px rgba(0,0,0,0.2);
}

/* FAQ Section */
.faq-section {
    background-color: var(--bg-deep-desert-night);
    padding: 80px 0;
    position: relative;
}

.faq-section::before {
    content: '';
    position: absolute;
    top: -10px; /* Position above the section */
    left: 0;
    width: 100%;
    height: 10px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 10" preserveAspectRatio="none"><path d="M0,5 L10,0 L20,5 L30,0 L40,5 L50,0 L60,5 L70,0 L80,5 L90,0 L100,5 L100,10 L0,10 Z" fill="%230D0A05"/></svg>');
    background-repeat: repeat-x;
    background-size: 50px 10px;
}

.faq-section h2 {
    color: var(--accent-gold);
    margin-bottom: 2em;
}

.accordion {
    max-width: 800px;
    margin: 0 auto;
}

.accordion-item {
    margin-bottom: 15px;
    border: 2px solid var(--muted-earth);
    box-shadow: 2px 2px 0px 0px var(--muted-earth);
}

.accordion-header {
    background-color: var(--bg-sand-layer);
    color: var(--text-primary);
    font-family: var(--font-display);
    font-size: 1em;
    padding: 18px 25px;
    width: 100%;
    text-align: left;
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s ease;
}

.accordion-header:hover {
    background-color: var(--muted-earth);
}

.accordion-icon {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-right: 2px solid var(--accent-gold);
    border-bottom: 2px solid var(--accent-gold);
    transform: rotate(45deg);
    transition: transform 0.3s ease;
}

.accordion-header.active .accordion-icon {
    transform: rotate(225deg);
}

.accordion-content {
    background-color: var(--bg-deep-desert-night);
    color: var(--text-muted);
    padding: 0 25px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, padding 0.4s ease-out;
}

.accordion-content.active {
    max-height: 200px; /* Adjust based on content, or use JS to calculate */
    padding: 15px 25px;
}

/* Footer */
.footer {
    background-color: var(--bg-sand-layer);
    padding: 40px 0;
    text-align: center;
    border-top: 1px solid var(--muted-earth);
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: -10px; /* Position above the section */
    left: 0;
    width: 100%;
    height: 10px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 10" preserveAspectRatio="none"><path d="M0,5 L10,0 L20,5 L30,0 L40,5 L50,0 L60,5 L70,0 L80,5 L90,0 L100,5 L100,10 L0,10 Z" fill="%231C1509"/></svg>');
    background-repeat: repeat-x;
    background-size: 50px 10px;
}

.footer-logo {
    height: 50px;
    margin-bottom: 20px;
    image-rendering: pixelated;
}

.footer .copyright {
    color: var(--text-muted);
    font-size: 0.9em;
    margin-bottom: 15px;
}

.footer .social-icon img {
    height: 24px;
    width: 24px;
    image-rendering: pixelated;
    vertical-align: middle;
    margin: 0 10px 20px;
}

.footer .chain-info {
    font-family: var(--font-display);
    font-size: 0.7em;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .navbar .container {
        flex-wrap: wrap;
    }

    .navbar-nav {
        flex-direction: column;
        width: 100%;
        display: none; /* Hidden by default on mobile */
        text-align: center;
        background-color: rgba(13, 10, 5, 0.95);
        padding: 20px 0;
        position: absolute;
        top: 70px; /* Below navbar */
        left: 0;
        border-top: 1px solid var(--muted-earth);
    }

    .navbar-nav.active {
        display: flex;
    }

    .navbar-nav li {
        margin: 10px 0;
    }

    .navbar-toggle {
        display: flex;
    }

    .hero-section h1 {
        font-size: 2.5em;
    }

    .hero-section p {
        font-size: 1em;
    }

    .hero-ctas {
        flex-direction: column;
        gap: 15px;
    }

    .lore-content {
        grid-template-columns: 1fr;
    }

    .role-cards-grid {
        grid-template-columns: 1fr;
    }

    .colony-stats-bar .container {
        flex-direction: column;
    }

    .stat-item {
        margin-bottom: 15px;
    }
}

/* Signal / Boost Section */
.signal-section {
  background: #1C1509;
  padding: 80px 20px;
  text-align: center;
  border-top: 2px solid #3B2F1E;
}

.tweet-embed-wrapper {
  max-width: 550px;
  margin: 40px auto;
}

.tweet-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin: 24px auto;
}

.action-btn {
  font-family: 'Press Start 2P', monospace;
  font-size: 11px;
  padding: 14px 24px;
  border: 2px solid #C9A84C;
  color: #C9A84C;
  background: transparent;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-block;
}

.action-btn:hover {
  background: #C9A84C;
  color: #0D0A05;
}

.like-btn { border-color: #E0245E; color: #E0245E; }
.like-btn:hover { background: #E0245E; color: #fff; }

.retweet-btn { border-color: #5DBB2F; color: #5DBB2F; }
.retweet-btn:hover { background: #5DBB2F; color: #0D0A05; }

/* Wallet form */
.wallet-form-wrapper {
  max-width: 600px;
  margin: 50px auto 0;
  padding: 32px;
  border: 2px solid #3B2F1E;
  background: #0D0A05;
}

.wallet-title {
  font-family: 'Press Start 2P', monospace;
  font-size: 13px;
  color: #C9A84C;
  margin-bottom: 12px;
}

.wallet-sub {
  font-family: 'Inter', sans-serif;
  color: #8A7A60;
  font-size: 14px;
  margin-bottom: 24px;
}

.wallet-form {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.wallet-input {
  flex: 1;
  min-width: 260px;
  padding: 14px 16px;
  background: #1C1509;
  border: 2px solid #3B2F1E;
  color: #F0E6CC;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  outline: none;
}

.wallet-input:focus {
  border-color: #C9A84C;
}

.wallet-submit-btn {
  font-family: 'Press Start 2P', monospace;
  font-size: 11px;
  padding: 14px 20px;
  background: #5DBB2F;
  color: #0D0A05;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}

.wallet-submit-btn:hover {
  background: #C9A84C;
}

.wallet-feedback {
  margin-top: 16px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: #5DBB2F;
  min-height: 20px;
}