/* style.css (Re-checked) */

/* --- Base & Typography --- */
html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: monospace;
    background: #000;
    color: #fff;
    overflow-x: hidden;
    padding-top: 5rem; /* Adjust if header height changes */
}

/* --- Canvas Background --- */
canvas#matrix {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1; /* Make sure it's behind everything */
    pointer-events: none;
}

/* --- Header --- */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    /* background: rgba(0, 0, 0, 0.85); */ /* Simplified background */
    background: #000; /* Solid background might be safer for debugging */
    /* backdrop-filter: blur(5px); */ /* Removed for debugging */
    color: #0f0;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    border-bottom: 1px solid #0f0;
    flex-wrap: wrap;
    box-sizing: border-box;
    min-height: 4rem;
}

header .site-title strong {
    font-size: 1.5rem;
}

header .header-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

#langSelector {
    background: #000;
    color: #0f0;
    border: 1px solid #0f0;
    padding: 0.3rem 0.5rem;
    font-family: monospace;
    border-radius: 2px;
}
#langSelector:focus {
    outline: 1px solid #0f0;
    outline-offset: 1px;
}

.menu-toggle {
    background: #0f0;
    color: #000;
    font-weight: bold;
    border: none;
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-family: monospace;
    border-radius: 2px;
}
.menu-toggle:focus {
     outline: 2px solid #000;
     outline-offset: 1px;
}

/* --- Mobile Menu --- */
.mobile-menu {
    position: fixed;
    top: 4rem; /* Adjust if header height changes */
    right: 0;
    /* background: rgba(0, 0, 0, 0.9); */
    background: #050505; /* Dark solid color for menu */
    /* backdrop-filter: blur(5px); */ /* Removed for debugging */
    border: 1px solid #0f0;
    border-top: none;
    border-right: none;
    padding: 1rem;
    z-index: 999;
    display: none; /* Toggled by JS */
    flex-direction: column;
    gap: 0.5rem;
    max-height: calc(100vh - 5rem);
    overflow-y: auto;
}

.mobile-menu.open {
    display: flex;
}

.mobile-menu a {
    color: #0f0;
    text-decoration: none;
    padding: 0.5rem;
    display: block;
    border: 1px solid transparent;
    border-radius: 2px;
    transition: background-color 0.2s ease-out, border-color 0.2s ease-out;
}

.mobile-menu a:hover,
.mobile-menu a:focus {
    border-color: #39ff14;
    background: #111;
    outline: none;
}

/* --- Content Sections --- */
main {
    /* Ensure main content has some stacking context if needed */
    position: relative;
    z-index: 5; /* Make sure main content is above canvas */
}

.section {
    max-width: 800px;
    margin: 2.5rem auto;
    background: rgba(10, 10, 10, 0.8); /* Slightly adjusted background */
    border: 1px solid #39ff14;
    border-radius: 8px;
    overflow: hidden; /* Important for border-radius */
    position: relative; /* Needed for z-index stacking */
    z-index: 1; /* Sections stack normally */
}

/* --- Collapsible Sections Styling --- */
.section.collapsible .title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    padding: 1rem 1.5rem;
    cursor: pointer;
    background: #111;
    transition: background 0.3s;
}
.section.collapsible .title:hover {
     background: #222;
}

.section.collapsible .title h2,
.section.collapsible .title h3 { /* Applied to H2 in titles */
    margin: 0;
    font-size: 1.2rem;
    color: #39ff14;
    animation: fadePulse 2s ease-in-out infinite alternate;
}

.section.collapsible .arrow {
    font-size: 1.5rem;
    color: #39ff14;
    transition: transform 0.3s ease-out;
    flex-shrink: 0;
    margin-left: 1rem;
}
.section.collapsible .arrow.rotated {
     transform: rotate(180deg);
}

.section.collapsible .content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-out, padding 0.5s ease-out, border-top 0.5s ease-out; /* Added border transition */
    padding: 0 1.5rem;
    box-sizing: border-box;
    color: #ccc;
    border-top: 0px solid transparent; /* Start with transparent border */
}
.section.collapsible .content.open {
    max-height: 2000px; /* Adjust if necessary */
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
    border-top: 1px solid #39ff14; /* Border appears when open */
}

/* --- Non-Collapsible Sections Styling --- */
.section:not(.collapsible) {
    padding: 2rem 1.5rem;
}

.section:not(.collapsible) h2 {
    color: #00ffcc;
    text-align: center;
    margin-top: 0;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}
/* Pulse effect on Join H2 */
#join h2 {
     animation: fadePulse 2s ease-in-out infinite alternate;
}

.section:not(.collapsible) .content-always-open {
    color: #ccc;
    text-align: center;
}
.section:not(.collapsible) .content-always-open p {
    margin: 1rem auto;
    max-width: 600px;
    line-height: 1.6;
}

/* Intro H1 specific */
#intro h1.glitch {
    color: #00ffcc;
    animation: glitch 1s infinite;
    font-size: 1.8rem;
    text-align: center;
    margin-top: 0;
    margin-bottom: 1.5rem;
}

/* --- General Content Styling (Inside .content or .content-always-open) --- */
.section .content p,
.section .content-always-open p {
    margin: 1rem 0;
    color: #ccc;
}
.section .content p:first-child,
.section .content-always-open p:first-child { margin-top: 0; }
.section .content p:last-child,
.section .content-always-open p:last-child { margin-bottom: 0; }

.section .content ul,
.section .content-always-open ul {
    color: #aaa;
    list-style: square;
    padding-left: 2rem;
    margin: 1rem 0;
    text-align: left;
}
.section .content ul li,
.section .content-always-open ul li { margin-bottom: 0.5rem; }
.section .content ul strong,
.section .content-always-open ul strong { color: #0f0; }
.section .content ul a,
.section .content-always-open ul a {
    color: #39ff14;
    text-decoration: none;
    border-bottom: 1px dotted #39ff14;
    transition: color 0.2s, border-color 0.2s;
}
.section .content ul a:hover,
.section .content-always-open ul a:hover {
    color: #8cff7a;
    border-color: #8cff7a;
}

.section .content h3 { /* H3 inside collapsible */
    color: #39ff14;
    animation: fadePulse 2s ease-in-out infinite alternate;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}
.section .content h3:first-child { margin-top: 0; }


/* --- Action Buttons (NOA, Backend) --- */
.action-button {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    margin-top: 1.5rem;
    font-size: 1.1rem;
    font-family: monospace;
    background: #39ff14;
    border: 1px solid #39ff14;
    color: #000;
    cursor: pointer;
    transition: background 0.2s ease-out, color 0.2s ease-out, transform 0.1s ease-out, box-shadow 0.2s ease-out;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 0 0px rgba(57, 255, 20, 0);
    border-radius: 2px;
}
.action-button:hover {
    background: #8cff7a;
    color: #000;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(57, 255, 20, 0.3);
}
.action-button:active {
    transform: translateY(0px);
    box-shadow: 0 2px 4px rgba(57, 255, 20, 0.2);
}
.action-button:focus {
    outline: 2px solid #39ff14;
    outline-offset: 2px;
}


/* --- Newsletter Form --- */
.footer-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 1rem;
  padding: 1rem 0;
}

.footer-form input,
.footer-form button {
  font-family: monospace;
  font-size: 1rem;
  padding: 0.8rem 1rem;
  margin: 0.5rem;
  width: 80%;
  max-width: 400px;
  box-sizing: border-box;
  border: 1px solid #39ff14;
  background: #111;
  color: #39ff14; /* Default text color for button */
  transition: border-color 0.2s ease-out, box-shadow 0.2s ease-out, background 0.2s ease-out, color 0.2s ease-out, transform 0.1s ease-out; /* Added all transitions */
  border-radius: 2px;
}

/* Input specific */
.footer-form input { color: #ccc; }
.footer-form input::placeholder { color: #666; opacity: 0.8; }
.footer-form input:focus {
    border-color: #8cff7a;
    box-shadow: 0 0 8px rgba(57, 255, 20, 0.4);
    outline: none;
}

/* Newsletter Button specific */
.footer-form button { cursor: pointer; font-weight: bold; }
.footer-form button:hover {
  background: #39ff14; color: #000; border-color: #39ff14; transform: translateY(-1px);
}
.footer-form button:active { transform: translateY(0px); }
.footer-form button:focus {
    outline: 2px solid #39ff14; outline-offset: 2px; box-shadow: 0 0 8px rgba(57, 255, 20, 0.4);
}

/* --- Footer --- */
footer {
    margin-top: 4rem;
    padding: 2.5rem 1.5rem 2rem 1.5rem;
    border-top: 1px solid #0f0; /* Division line */
    background: #0a0a0a;
    text-align: center;
    position: relative; /* Keep footer in normal flow */
    z-index: 10; /* Ensure footer is above canvas */
}

footer nav { max-width: 900px; margin: 0 auto; }

footer nav ul {
    list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0.8rem 1.5rem;
}

footer nav ul li { display: inline; }

footer nav ul li a {
    color: #0f0; text-decoration: none; font-size: 0.9rem; padding: 0.4rem 0.6rem; border: 1px solid transparent; border-radius: 3px; transition: color 0.2s ease-out, background-color 0.2s ease-out; white-space: nowrap;
}
footer nav ul li a:hover { color: #000; background-color: #39ff14; border-color: #39ff14; }
footer nav ul li a:focus { outline: 1px dotted #39ff14; outline-offset: 3px; color: #fff; background-color: #1a1a1a; }


/* --- Animations --- */
@keyframes glitch {
  0% { text-shadow: 2px 2px #f0f, -2px -2px #0ff; transform: translate(0, 0); }
  25% { text-shadow: -2px 2px #f0f, 2px -2px #0ff;
