:root {
    /* Palette: Seeed Studio Green + MeshCore Blue */
    --bg-color: #0b1116;
    --text-color: #a8b8c0;
    --accent-color: #2e7d32;
    --highlight-color: #44a755;
    --blue-accent: #00bcd4;
    --blue-border: #1e3a45;
    --font-stack: 'CaskaydiaMono Nerd Font', 'Caskaydia Mono', 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-stack);
    line-height: 1.6;
    padding: 2rem;
    max-width: 1200px; /* CHANGED FROM 800px to 1200px */
    margin: 0 auto;
    border-left: 1px solid var(--blue-border);
    border-right: 1px solid var(--blue-border);
}

header {
    border-bottom: 1px solid var(--accent-color);
    padding-bottom: 1rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    position: relative; /* Needed for absolute positioning of mobile menu */
}

.header-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

h1 {
    color: var(--blue-accent);
    font-size: 1.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    line-height: 1.2;
}

.url-display {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-top: 0.5rem;
    color: var(--accent-color);
}

/* Discord Button Styling */
.discord-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: var(--blue-border);
    border: 1px solid var(--blue-accent);
    border-radius: 6px;
    color: var(--blue-accent);
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.discord-btn:hover {
    background-color: var(--blue-accent);
    color: var(--bg-color);
    box-shadow: 0 0 8px var(--blue-accent);
}

.discord-btn svg {
    width: 24px;
    height: 24px;
}

section {
    margin-bottom: 2rem;
}

h2 {
    color: var(--accent-color);
    border-left: 3px solid var(--blue-accent);
    padding-left: 1rem;
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1rem;
}

.node-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.node-card {
    background-color: #0f181f;
    border: 1px solid var(--blue-border);
    padding: 1rem;
    transition: border-color 0.2s ease;
}

.node-card:hover {
    border-color: var(--blue-accent);
}

.node-card h3 {
    color: var(--highlight-color);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

/* Node Path */
.node-path {
    margin-top: 1rem;
    padding-top: 0.5rem;
    border-top: 1px dashed var(--blue-border);
    font-family: var(--font-stack);
    font-size: 0.85rem;
    color: var(--blue-accent); /* Blue text */
    opacity: 0.8;
    letter-spacing: 0.5px;
}

.node-path:hover {
    color: var(--highlight-color); /* Turns green on hover */
    opacity: 1;
}

.status-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    background-color: var(--blue-accent); /* Start Blue */
    border-radius: 50%;
    margin-right: 0.5rem;
    /* Initial shadow matches the start color */
    box-shadow: 0 0 5px var(--blue-accent);
    /* Apply the pulse animation */
    animation: pulse-color 3s infinite ease-in-out;
}

/* Animation to pulse between Blue and Green */
@keyframes pulse-color {
    0%, 100% {
        background-color: var(--blue-accent);
        box-shadow: 0 0 5px var(--blue-accent);
    }
    50% {
        background-color: var(--highlight-color);
        box-shadow: 0 0 8px var(--highlight-color); /* Slightly brighter glow at peak */
    }
}

/* QR Images Section (New Card Layout) */
.qr-images {
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 1rem;
    margin: 1rem 0;
    padding: 1rem 0;
    border-top: 1px solid var(--blue-border);
    border-bottom: 1px solid var(--blue-border);
    flex-wrap: wrap;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.qr-card {
    display: flex;
    background-color: #0f181f;
    border: 2px solid var(--blue-border);
    border-radius: 8px;
    overflow: hidden;
    flex: 1 1 48%; 
    min-width: 500px;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.qr-card:hover {
    border-color: var(--blue-accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 204, 255, 0.1);
}

.qr-content {
    display: flex;
    align-items: center;
    width: 100%;
}

.qr-img {
    width: 250px; /* Fixed width for QR code */
    height: 250px;
    object-fit: contain;
    padding: 10px;
    flex-shrink: 0;
    border-right: 1px solid var(--blue-border);
}

.qr-text {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.qr-text h3 {
    color: var(--highlight-color);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.qr-text p {
    color: var(--text-color);
    font-size: 0.95rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.btn-small {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: var(--blue-border);
    color: var(--blue-accent);
    border: 1px solid var(--blue-accent);
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: bold;
    transition: all 0.2s ease;
    align-self: flex-start;
}

.btn-small:hover {
    background-color: var(--blue-accent);
    color: var(--bg-color);
}

/* --- Navigation Styles --- */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 4px;
    z-index: 20;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--blue-accent);
    transition: all 0.3s ease;
}

.nav-menu {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-link {
    color: var(--text-color);
    text-decoration: none;
    font-weight: bold;
    transition: color 0.2s ease;
    position: relative;
}

.nav-link:hover, .nav-link.active {
    color: var(--blue-accent);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--blue-accent);
}

/* --- Contact Form Styles --- */
.contact-form {
    max-width: 500px;
    margin: 0 auto;
    background-color: #0f181f;
    padding: 2rem;
    border: 1px solid var(--blue-border);
    border-radius: 8px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--accent-color);
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    background-color: var(--bg-color);
    border: 1px solid var(--blue-border);
    border-radius: 4px;
    color: var(--text-color);
    font-family: var(--font-stack);
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--blue-accent);
}

.btn-submit {
    width: 100%;
    padding: 0.75rem;
    background-color: var(--blue-border);
    color: var(--blue-accent);
    border: 1px solid var(--blue-accent);
    border-radius: 4px;
    font-family: var(--font-stack);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-submit:hover {
    background-color: var(--blue-accent);
    color: var(--bg-color);
}

footer {
    margin-top: 3rem;
    padding-top: 1rem;
    border-top: 1px solid var(--blue-border);
    font-size: 0.8rem;
    text-align: center;
    opacity: 0.7;
}

a {
    color: var(--blue-accent);
    text-decoration: none;
    border-bottom: 1px dotted var(--blue-accent);
}

a:hover {
    background-color: var(--blue-border);
    color: var(--bg-color);
}

/* Progressive Pride Banner (Vertical Stripes) */
.pride-banner {
    width: 100%;
    height: 15px;
    margin: 2rem 0;
    display: block;
    overflow: hidden;
}

.pride-banner svg {
    width: 100%;
    height: 100%;
    display: block;
    shape-rendering: crispEdges;
}

/* --- Unified Header & Ticker Layout --- */

/* Common container for Header + Ticker */
.hero-header, 
.topology-header {
    display: flex;
    flex-direction: row; /* Side by side on desktop */
    align-items: center;
    justify-content: flex-start; /* Left align everything */
    flex-wrap: wrap;
    margin-bottom: 1rem;
    gap: 1rem;
}

/* The H2 Header Box */
.hero-header h2,
.topology-header h2 {
    flex: 0 0 auto; /* Don't shrink */
    margin-bottom: 0;
    white-space: nowrap; /* Prevent header from wrapping */
    border-right: 1px solid var(--blue-border); /* Separator line */
    padding-right: 2rem;
    min-width: 180px; /* Minimum width for the header box */
}

/* The Ticker Box (Typing or Counter) */
.hero-tagline-container,
.node-counter {
    flex: 1 1 auto; /* Grow to fill remaining space */
    display: flex;
    align-items: center;
    white-space: nowrap;
    padding-left: 1rem; /* Space from the separator line */
}

/* Typing tagline */
.prompt {
    color: var(--highlight-color); /* Green */
    font-weight: bold;
    font-size: 0.9rem;
    opacity: 0.9;
    letter-spacing: 1px;
    margin-right: 5px;
    user-select: none;
}

.typing-text {
    color: var(--highlight-color); /* Green */
    font-weight: bold;
    font-size: 0.9rem;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Block Cursor */
.typing-text::after {
    content: '';
    display: inline-block;
    width: 0.6em;
    height: 0.9em;
    background-color: var(--highlight-color);
    margin-left: 2px;
    vertical-align: middle;
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* --- Network Topology Counter --- */
.node-counter {
    font-family: var(--font-stack);
    font-size: 1rem;
    color: var(--highlight-color); /* Green */
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-left: 5rem;
}

.counter-label {
    font-size: 0.9rem;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.counter-value {
    font-size: 1.2rem; /* Larger number */
    font-weight: 800;
    min-width: 2ch; /* Prevents layout shift as numbers grow */
}

/* Specific overrides for the Hero Typing */
.hero-tagline-container {
    font-family: var(--font-stack);
    height: 1.5em;
    line-height: 1.5em;
    overflow: hidden;
    /* Remove the global padding-left indent since we are now in a flex container */
    padding-left: 0; 
}

/* Specific overrides for the Counter */
.node-counter {
    height: 1.5em;
    line-height: 1.5em;
    font-family: var(--font-stack);
    font-size: 1rem;
    color: var(--highlight-color);
    font-weight: bold;
    /* Remove the global padding-left indent */
    padding-left: 0;
}




/* --- Mobile Responsiveness (768px) --- */
@media (max-width: 768px) {

    /* Header Layout */
    header {
        flex-direction: row;
        align-items: center;
    }

    .header-content {
        margin-right: 0;
        width: auto;
    }

    .hero-header,
    .topology-header {
        flex-direction: column; /* Stack vertically */
        align-items: flex-start; /* Left align */
        gap: 0.5rem;
        border-bottom: none; /* Remove bottom border on mobile if desired, or keep it */
        padding: 0;
    }

    .hero-header h2,
    .topology-header h2 {
        border-right: none; /* Remove vertical separator on mobile */
        padding-right: 0;
        min-width: auto;
        width: 100%; /* Full width header */
        margin-bottom: 0.5rem;
    }

    .hero-tagline-container,
    .node-counter {
        width: 100%; /* Full width ticker */
        padding-left: 0;
        margin-top: 0.25rem;
        border-left: 3px solid var(--highlight-color); /* Add a left accent bar on mobile */
        padding-left: 0.5rem; /* Space for the accent bar */
    }
    
    /* Adjust hero typing font size for mobile if needed */
    .prompt, .typing-text {
        font-size: 0.85rem;
    }
    
    .counter-label {
        font-size: 0.8rem;
    }
    .counter-value {
        font-size: 1.1rem;
    }

    /* Hamburger Toggle */
    .nav-toggle {
        display: flex;
    }

    /* Navigation Menu Dropdown */
    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--bg-color);
        flex-direction: column;
        align-items: flex-start;
        padding: 1rem;
        border-bottom: 1px solid var(--blue-border);
        display: none;
        z-index: 15;
        box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    }

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

    .nav-link {
        width: 100%;
        padding: 0.75rem 0;
        border-bottom: 1px solid var(--blue-border);
    }

    .nav-link:last-child {
        border-bottom: none;
    }

    /* Hide Discord button on mobile to reduce clutter when menu is open */
    .discord-btn {
        display: none;
    }

    /* QR Images Stack */
    .qr-images {
        flex-direction: column;
        gap: 1.5rem;
        padding: 1rem;
    }

    .qr-img {
        width: 100%;
        max-width: 100%;
        height: auto;
    }

    .qr-card {
        flex-direction: column; /* Stack QR and text vertically on mobile */
        max-width: 100%;
    }

    .qr-content {
        flex-direction: column;
    }

    .qr-text {
        text-align: center;
        padding: 1rem;
    }

    .btn-small {
        width: 100%;
        text-align: center;
    }
}

/* --- Wiki Page Layout --- */
.wiki-layout {
    display: flex;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    gap: 3rem;
    position: relative;
}

/* Sidebar Navigation */
.wiki-sidebar {
    flex: 0 0 250px;
    position: sticky;
    top: 2rem;
    height: fit-content;
    background-color: #0f181f;
    border: 1px solid var(--blue-border);
    border-radius: 8px;
    padding: 1.5rem;
    align-self: flex-start;
}

.wiki-sidebar h3 {
    color: var(--highlight-color);
    margin-bottom: 1rem;
    font-size: 1.1rem;
    border-bottom: 1px solid var(--blue-border);
    padding-bottom: 0.5rem;
}

.wiki-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.wiki-nav li {
    margin-bottom: 0.5rem;
}

.wiki-nav a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.95rem;
    display: block;
    padding: 0.25rem 0;
    transition: color 0.2s ease, padding-left 0.2s ease;
}

.wiki-nav a:hover {
    color: var(--blue-accent);
    padding-left: 5px;
}

/* Main Content Area */
.wiki-content {
    flex: 1;
    min-width: 0; /* Prevents flex item overflow */
}

.wiki-section {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--blue-border);
}

.wiki-section:last-child {
    border-bottom: none;
}

.wiki-section h2 {
    color: var(--blue-accent);
    font-size: 1.8rem;
    margin-bottom: 1rem;
    border-left: none; /* Override default h2 style */
    padding-left: 0;
}

.wiki-section h3 {
    color: var(--highlight-color);
    font-size: 1.3rem;
    margin: 1.5rem 0 0.5rem 0;
}

.wiki-section p {
    margin-bottom: 1rem;
}

/* FAQ Styling */
.faq-item {
    margin-bottom: 1.5rem;
    background-color: #0f181f;
    padding: 1rem;
    border-radius: 6px;
    border-left: 3px solid var(--blue-border);
}

.faq-item h3 {
    margin-top: 0;
    font-size: 1.1rem;
    color: var(--blue-accent);
}

.faq-item p {
    margin-bottom: 0;
    font-size: 0.95rem;
}

/* Settings Box */
.settings-box {
    background-color: #0f181f;
    border: 1px dashed var(--highlight-color);
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 1rem;
}

.settings-box ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.settings-box li {
    margin-bottom: 0.5rem;
    font-family: var(--font-stack);
    font-size: 0.95rem;
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

/* Product Card with Glowing Border */
.product-card {
    background-color: #0f181f;
    border: 1px solid var(--blue-border);
    border-radius: 8px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

.product-card h4 {
    color: var(--blue-accent);
    text-decoration: underline;
}

.product-card:hover {
    border-color: var(--blue-accent);
    transform: translateY(-2px);
    box-shadow: 0 0 12px rgba(0, 188, 212, 0.15), 0 0 4px rgba(0, 188, 212, 0.1);
}

/* Buy Button */
.btn-buy {
    margin-top: auto;
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: var(--blue-border);
    color: var(--blue-accent);
    border: 1px solid var(--blue-accent);
    border-radius: 4px;
    text-align: center;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.btn-buy:hover {
    background-color: var(--blue-accent);
    color: var(--bg-color);
}
/* Mobile Responsiveness for Wiki */
@media (max-width: 900px) {
    .wiki-layout {
        flex-direction: column;
        padding: 1rem;
    }

    .wiki-sidebar {
        flex: none;
        width: 100%;
        position: static;
        margin-bottom: 2rem;
    }

    .wiki-nav ul {
        display: flex;
        flex-wrap: wrap;
        gap: 1rem;
    }

    .wiki-nav li {
        margin-bottom: 0;
    }

    .wiki-nav a {
        border: 1px solid var(--blue-border);
        padding: 0.5rem 1rem;
        border-radius: 4px;
        background-color: #0f181f;
    }
    
    .wiki-nav a:hover {
        background-color: var(--blue-border);
        color: var(--blue-accent);
    }
}