:root {
    --bg-color: #030507;
    --text-main: #e0e0e0;
    --text-muted: #5a7a7a;
    --accent-primary: #00f3ff;
    /* Cyan Glitch */
    --accent-dim: #004455;
    --accent-dark: #002233;
    --error-color: #ff3333;
    --success-color: #33ff33;

    --font-main: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    --nav-height: 70px;
    --container-width: 1200px;
}

/* --- RESET & BASE --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-main);
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Scrollbar Style */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-dim);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-primary);
}

/* Typography */
h1,
h2,
h3 {
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: -0.02em;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
}

/* --- UTILITIES --- */
.mono {
    font-family: var(--font-mono);
}

.text-accent {
    color: var(--accent-primary);
}

.text-dim {
    color: var(--text-muted);
}

.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 2rem;
    flex: 1;
    /* Push footer down */
    position: relative;
    z-index: 10;
}

/* --- NAVIGATION --- */
.sys-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    background: rgba(3, 5, 7, 0.95);
    border-bottom: 1px solid var(--accent-dim);
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    backdrop-filter: blur(5px);
}

.nav-brand {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 2px;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-link {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-muted);
    letter-spacing: 1px;
    padding: 5px 0;
    position: relative;
}

.nav-link:hover {
    color: var(--text-main);
}

.nav-link.active {
    color: var(--accent-primary);
    text-shadow: 0 0 8px rgba(0, 243, 255, 0.4);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--accent-primary);
}

.nav-status {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--success-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-dot {
    width: 6px;
    height: 6px;
    background: var(--success-color);
    border-radius: 50%;
    box-shadow: 0 0 5px var(--success-color);
    animation: blink 2s infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }
}

/* --- HERO & INDEX --- */
.hero-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
    text-align: center;
    padding-top: var(--nav-height);
}

.logo-frame {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    overflow: hidden;
    /* This masks the square/checkerboard background */
    background: #000;
    /* Fallback background for transparency */
    margin-bottom: 2rem;
    border: 1px solid var(--accent-dim);
    box-shadow: 0 0 30px rgba(0, 243, 255, 0.1);
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-logo {
    width: 110%;
    /* Slight zoom to cover edges */
    height: auto;
    object-fit: cover;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 4rem);
    margin-bottom: 0.5rem;
    text-shadow: 0 0 15px rgba(0, 243, 255, 0.2);
}

.hero-subtitle {
    font-family: var(--font-mono);
    color: var(--accent-primary);
    letter-spacing: 3px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.system-status {
    margin-top: 3rem;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
    border: 1px solid var(--accent-dim);
    padding: 1rem 2rem;
    background: rgba(0, 20, 30, 0.5);
}

.status-item span {
    color: var(--text-main);
    margin-left: 0.5rem;
}

/* --- INTEL (DATOS) --- */
.intel-wrapper {
    margin-top: calc(var(--nav-height) + 2rem);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.file-block {
    border-left: 2px solid var(--accent-dim);
    padding: 2rem;
    margin-bottom: 2rem;
    background: linear-gradient(90deg, rgba(0, 68, 85, 0.1) 0%, transparent 100%);
}

.file-header {
    font-family: var(--font-mono);
    color: var(--accent-primary);
    font-size: 0.8rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
}

.file-content {
    white-space: pre-line;
    /* Retain line breaks from copy */
    line-height: 1.8;
    color: var(--text-main);
}

/* Locked Content */
.locked-content {
    position: relative;
    filter: blur(4px);
    user-select: none;
    opacity: 0.5;
    transition: all 0.5s;
}

.content-unlocked {
    filter: none;
    user-select: text;
    opacity: 1;
}

.lock-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
    background: rgba(3, 5, 7, 0.7);
    backdrop-filter: blur(2px);
}

.lock-input {
    background: transparent;
    border: 1px solid var(--accent-primary);
    color: var(--accent-primary);
    font-family: var(--font-mono);
    padding: 0.5rem 1rem;
    text-align: center;
    text-transform: uppercase;
    outline: none;
    margin-top: 1rem;
}

.lock-input::placeholder {
    color: var(--accent-dim);
}

.hack-log {
    margin-top: 1rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--success-color);
    text-align: left;
    width: 100%;
    max-width: 300px;
    min-height: 80px;
    white-space: pre-wrap;
    text-shadow: 0 0 5px var(--success-color);
    display: none;
    /* Hidden by default */
}

/* --- DATABASE (GALLERY) --- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: calc(var(--nav-height) + 2rem);
}

.data-card {
    background: #05080a;
    border: 1px solid var(--accent-dim);
    position: relative;
    aspect-ratio: 3/4;
    /* Vertical Portrait */
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.3s;
}

.data-card:hover {
    border-color: var(--accent-primary);
}

.data-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    /* Focus on heads */
    opacity: 0.7;
    transition: opacity 0.3s;
}

.data-card:hover .data-card-img {
    opacity: 1;
}

.data-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 5px 10px;
    background: rgba(0, 0, 0, 0.8);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--accent-primary);
    transform: translateY(100%);
    transition: transform 0.3s;
}

.data-card:hover .data-overlay {
    transform: translateY(0);
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.lightbox.active {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-img {
    max-width: 90%;
    max-height: 80vh;
    border: 1px solid var(--accent-dim);
}

.lightbox-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    color: var(--text-main);
    font-family: var(--font-mono);
    cursor: pointer;
    font-size: 1.5rem;
}

/* --- COMM-LINK (FORM) --- */
.comm-wrapper {
    margin-top: calc(var(--nav-height) + 4rem);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.terminal-form {
    width: 100%;
    max-width: 500px;
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.input-line {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--accent-dim);
    padding: 1rem;
}

.prompt {
    color: var(--accent-primary);
    margin-right: 1rem;
}

.terminal-input {
    background: transparent;
    border: none;
    color: var(--text-main);
    font-family: var(--font-mono);
    width: 100%;
    outline: none;
    font-size: 1rem;
}

.submit-btn {
    background: var(--accent-dim);
    color: var(--text-main);
    border: none;
    padding: 1rem;
    font-family: var(--font-mono);
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.submit-btn:hover {
    background: var(--accent-primary);
    color: #000;
}

.form-feedback {
    margin-top: 1rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    min-height: 1.2em;
    text-align: center;
    line-height: 1.4;
    transition: opacity 0.3s;
}

.success {
    color: var(--success-color);
    text-shadow: 0 0 5px rgba(51, 255, 51, 0.3);
}

.error {
    color: var(--error-color);
    text-shadow: 0 0 5px rgba(255, 51, 51, 0.3);
}

/* --- UPDATES & DOWNLOADS --- */
.updates-wrapper {
    margin-top: calc(var(--nav-height) + 2rem);
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    padding-bottom: 4rem;
}

.header-section {
    text-align: center;
    margin-bottom: 3rem;
}

/* Actions Bar (Download / Discord) */
.actions-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 4rem;
}

.action-card {
    background: rgba(0, 20, 30, 0.4);
    border: 1px solid var(--accent-dim);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.action-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--accent-dim);
    transition: background 0.3s;
}

.action-card:hover {
    background: rgba(0, 30, 45, 0.6);
    border-color: var(--accent-primary);
    transform: translateY(-2px);
}

.action-card:hover::before {
    background: var(--accent-primary);
}

.action-icon {
    font-size: 2rem;
    color: var(--accent-primary);
}

.action-info {
    display: flex;
    flex-direction: column;
}

.action-title {
    font-family: var(--font-main);
    font-weight: 800;
    font-size: 1.1rem;
    text-transform: uppercase;
    color: var(--text-main);
}

.action-subtitle {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

.discord-action .action-icon {
    color: #5865F2;
    /* Discord brand color optional, or keep generic */
}

/* Release Timeline */
.timeline {
    position: relative;
    padding-left: 2rem;
    border-left: 1px solid var(--accent-dim);
}

.release-card {
    margin-bottom: 3rem;
    position: relative;
}

.release-card::before {
    content: '';
    position: absolute;
    top: 0.5rem;
    left: -2.35rem;
    /* Align with border line */
    width: 10px;
    height: 10px;
    background: var(--bg-color);
    border: 2px solid var(--accent-primary);
    border-radius: 50%;
}

.release-header {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    margin-bottom: 1rem;
}

.version-tag {
    background: var(--accent-dim);
    color: var(--text-main);
    padding: 0.2rem 0.6rem;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.9rem;
    border-radius: 2px;
}

.version-tag.dim {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
}

.release-date {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.release-content ul {
    list-style: none;
}

.release-content li {
    margin-bottom: 0.5rem;
    padding-left: 1rem;
    position: relative;
    font-size: 0.9rem;
    line-height: 1.6;
}

.release-content li::before {
    content: '-';
    position: absolute;
    left: 0;
    color: var(--accent-dim);
}

/* --- UPDATES & DOWNLOADS --- */
.updates-wrapper {
    margin-top: calc(var(--nav-height) + 2rem);
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    padding-bottom: 4rem;
}

.header-section {
    text-align: center;
    margin-bottom: 3rem;
}

/* Actions Bar (Download / Discord) */
.actions-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 4rem;
}

.action-card {
    background: rgba(0, 20, 30, 0.4);
    border: 1px solid var(--accent-dim);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.action-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--accent-dim);
    transition: background 0.3s;
}

.action-card:hover {
    background: rgba(0, 30, 45, 0.6);
    border-color: var(--accent-primary);
    transform: translateY(-2px);
}

.action-card:hover::before {
    background: var(--accent-primary);
}

.action-icon {
    font-size: 2rem;
    color: var(--accent-primary);
}

.action-info {
    display: flex;
    flex-direction: column;
}

.action-title {
    font-family: var(--font-main);
    font-weight: 800;
    font-size: 1.1rem;
    text-transform: uppercase;
    color: var(--text-main);
}

.action-subtitle {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

.discord-action .action-icon {
    color: #5865F2;
    /* Discord brand color optional, or keep generic */
}

/* Release Timeline */
.timeline {
    position: relative;
    padding-left: 2rem;
    border-left: 1px solid var(--accent-dim);
}

.release-card {
    margin-bottom: 3rem;
    position: relative;
}

.release-card::before {
    content: '';
    position: absolute;
    top: 0.5rem;
    left: -2.35rem;
    /* Align with border line */
    width: 10px;
    height: 10px;
    background: var(--bg-color);
    border: 2px solid var(--accent-primary);
    border-radius: 50%;
}

.release-header {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    margin-bottom: 1rem;
}

.version-tag {
    background: var(--accent-dim);
    color: var(--text-main);
    padding: 0.2rem 0.6rem;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.9rem;
    border-radius: 2px;
}

.version-tag.dim {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
}

.release-date {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.release-content ul {
    list-style: none;
}

.release-content li {
    margin-bottom: 0.5rem;
    padding-left: 1rem;
    position: relative;
    font-size: 0.9rem;
    line-height: 1.6;
}

.release-content li::before {
    content: '-';
    position: absolute;
    left: 0;


    color: var(--accent-dim);
}

/* --- FOUNDER PACKS --- */
.founder-section {
    width: 100%;
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--accent-dim);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.pack-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
    width: 100%;
}

.founder-card {
    background: rgba(10, 10, 12, 0.6);
    border: 1px solid var(--text-muted);
    padding: 2rem;
    width: 280px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

/* Gold/Elite Accent for Premium */
.founder-card.elite {
    border-color: #ffd700;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.1);
}

.founder-card:hover {
    transform: translateY(-5px);
    background: rgba(20, 20, 25, 0.8);
}

.pack-title {
    font-family: var(--font-main);
    font-weight: 800;
    color: var(--text-main);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.pack-price {
    font-family: var(--font-mono);
    color: var(--accent-primary);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.founder-card.elite .pack-price {
    color: #ffd700;
}

.pack-features {
    list-style: none;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.pack-btn {
    margin-top: auto;
    border: 1px solid var(--accent-primary);
    padding: 0.8rem 1.5rem;
    color: var(--accent-primary);
    font-family: var(--font-mono);
    text-transform: uppercase;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.founder-card.elite .pack-btn {
    border-color: #ffd700;
    color: #ffd700;
}

.pack-btn:hover {
    background: var(--accent-primary);
    color: #000;
}

.founder-card.elite .pack-btn:hover {
    background: #ffd700;
    color: #000;
}



/* --- FACTION SELECTOR --- */
/* --- FACTION SELECTOR (HEX DESIGN) --- */
.faction-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 3rem;
    /* More space for hexes */
    width: 100%;
    padding: 2rem 0;
}

.faction-card {
    background: rgba(0, 0, 0, 0.6);
    /* Hexagon Shape */
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    width: 160px;
    height: 180px;

    border: none;
    /* Removed ugly border */
    padding: 0;
    /* Reset padding */

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    position: relative;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Pseudo-element for the Border Glow */
.faction-card::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    bottom: 2px;
    background: rgba(20, 20, 25, 0.9);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    z-index: -1;
}

/* Outer Glow Container (The "Border") */
.faction-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--text-muted);
    /* Default dim color */
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    z-index: -2;
    transition: background 0.3s;
}

.faction-card:hover {
    transform: scale(1.1);
}

.faction-card:hover::after,
.faction-card.selected::after {
    background: var(--faction-color);
    box-shadow: 0 0 20px var(--faction-color);
}

.faction-icon {
    width: 50px;
    height: 50px;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 2;
    transition: all 0.3s;
    color: var(--text-muted);
    /* SVG fill color */
}

.faction-icon svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 4px 4px rgba(0, 0, 0, 0.5));
}

.faction-card:hover .faction-icon,
.faction-card.selected .faction-icon {
    color: var(--faction-color);
    filter: drop-shadow(0 0 10px var(--faction-color));
    transform: scale(1.1);
}

.faction-card:hover .faction-icon,
.faction-card.selected .faction-icon {
    filter: grayscale(0%) drop-shadow(0 0 10px var(--faction-color));
    transform: scale(1.1);
}

.faction-card h3 {
    font-size: 0.75rem;
    font-weight: 800;
    margin: 0;
    color: var(--text-main);
    z-index: 2;
    text-shadow: 0 2px 4px black;
    letter-spacing: 1px;
}

.faction-card p {
    font-size: 0.55rem;
    font-family: var(--font-mono);
    color: var(--text-muted);
    margin-top: 0.3rem;
    opacity: 0;
    /* Hide by default for cleaner look */
    transform: translateY(10px);
    transition: all 0.3s;
    z-index: 2;
    max-width: 80%;
}

.faction-card:hover p,
.faction-card.selected p {
    opacity: 1;
    transform: translateY(0);
}

/* --- BACKGROUND FX --- */
.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%);
    background-size: 100% 4px;
    z-index: 500;
    pointer-events: none;
    opacity: 0.3;
}

.vignette {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, transparent 50%, #000 150%);
    z-index: 400;
    pointer-events: none;
}

/* Reduced Motion / Stable Mode */
body.stable-mode * {
    animation: none !important;
    transition: none !important;
}

body.stable-mode .scanlines {
    display: none;
}

/* Mobile */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: var(--nav-height);
        left: 0;
        width: 100%;
        background: rgba(3, 5, 7, 0.98);
        flex-direction: column;
        padding: 1rem;
        border-bottom: 1px solid var(--accent-dim);
        backdrop-filter: blur(10px);
    }

    .nav-links.mobile-open {
        display: flex;
    }

    .nav-brand {
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
    }

    /* Hamburger Icon via CSS */
    .nav-brand::after {
        content: '≡';
        /* Hamburger character */
        font-size: 1.5rem;
        color: var(--accent-primary);
        margin-left: auto;
    }

    .sys-nav {
        padding: 0 1rem;
    }

    .hero-title {
        font-size: 2rem;
    }
}

/* Boot Sequence - DEBUG MODE: Force Visible */
.boot-hidden {
    opacity: 1 !important;
    /* was opacity: 0; */
}

.boot-fade {
    animation: none;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}