/* ============================================
   THE HACKER'S PORTAL - Terminal Theme
   Strict Black/Green CRT Aesthetic
   ============================================ */

/* Color Palette - Pure Black & Green */
:root {
    --black: #000000;
    --black-soft: #050505;
    --black-terminal: #0a0a0a;
    --green-bright: #00ff41;
    --green-mid: #00cc33;
    --green-dim: #008f26;
    --green-dark: #004d15;
    --green-darker: #002208;
    --green-glow: rgba(0, 255, 65, 0.4);
    --green-glow-strong: rgba(0, 255, 65, 0.7);
    --font-mono: 'Fira Code', 'Courier New', monospace;
}

/* Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

/* Selection */
::selection {
    background-color: var(--green-bright);
    color: var(--black);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--black);
}

::-webkit-scrollbar-thumb {
    background: var(--green-dark);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--green-dim);
}

/* ============================================
   MATRIX RAIN CANVAS
   ============================================ */
#matrix-rain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.35;
    pointer-events: none;
    filter: blur(0.2px);
}

/* ============================================
   CRT OVERLAY EFFECTS
   ============================================ */
.crt-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
}

/* Scanlines - Enhanced with dual-layer effect */
.crt-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        /* Primary scanlines - more visible */
        repeating-linear-gradient(
            to bottom,
            transparent,
            transparent 1px,
            rgba(0, 0, 0, 0.35) 1px,
            rgba(0, 0, 0, 0.35) 2px
        ),
        /* Secondary green interference pattern */
        repeating-linear-gradient(
            to bottom,
            transparent,
            transparent 4px,
            rgba(0, 255, 65, 0.02) 4px,
            rgba(0, 255, 65, 0.02) 8px
        );
    pointer-events: none;
    animation: scanlineShift 0.05s steps(2) infinite;
}

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

/* Screen Vignette - Enhanced with dramatic radial gradient */
.crt-overlay::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(
        ellipse at center,
        transparent 0%,
        transparent 40%,
        rgba(0, 0, 0, 0.2) 60%,
        rgba(0, 0, 0, 0.5) 80%,
        rgba(0, 0, 0, 0.85) 100%
    );
    pointer-events: none;
}

/* Chromatic Aberration Layer */
.chromatic-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 999;
    box-shadow:
        inset 2px 0 0 rgba(255, 0, 0, 0.03),
        inset -2px 0 0 rgba(0, 255, 255, 0.03);
    animation: chromaticShift 6s ease-in-out infinite;
}

@keyframes chromaticShift {
    0%, 100% {
        box-shadow:
            inset 2px 0 0 rgba(255, 0, 0, 0.03),
            inset -2px 0 0 rgba(0, 255, 255, 0.03);
    }
    25% {
        box-shadow:
            inset 4px 0 0 rgba(255, 0, 0, 0.05),
            inset -4px 0 0 rgba(0, 255, 255, 0.05);
    }
    50% {
        box-shadow:
            inset 1px 0 0 rgba(255, 0, 0, 0.02),
            inset -1px 0 0 rgba(0, 255, 255, 0.02);
    }
    75% {
        box-shadow:
            inset 3px 0 0 rgba(255, 0, 0, 0.04),
            inset -3px 0 0 rgba(0, 255, 255, 0.04);
    }
}

/* ============================================
   GLITCH OVERLAY SYSTEM
   ============================================ */
.glitch-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1001;
    overflow: hidden;
}

/* Screen Tear Effect */
.glitch-overlay.screen-tear::before {
    content: '';
    position: absolute;
    top: var(--tear-y, 30%);
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255, 0, 0, 0.4) 20%,
        rgba(0, 255, 255, 0.4) 40%,
        rgba(0, 255, 65, 0.6) 60%,
        rgba(255, 0, 0, 0.4) 80%,
        transparent 100%
    );
    animation: tearSlide 0.15s ease-out forwards;
}

.glitch-overlay.screen-tear::after {
    content: '';
    position: absolute;
    top: var(--tear-y2, 60%);
    left: 0;
    width: 100%;
    height: 2px;
    background: rgba(0, 255, 65, 0.5);
    animation: tearSlide 0.1s ease-out 0.03s forwards;
}

@keyframes tearSlide {
    0% { transform: translateX(-100%); opacity: 1; }
    100% { transform: translateX(100%); opacity: 0; }
}

/* Color Shift Glitch (Applied to body) */
body.color-shift-glitch {
    animation: colorShiftBody 0.15s steps(3);
}

@keyframes colorShiftBody {
    0% { filter: hue-rotate(0deg); }
    25% { filter: hue-rotate(60deg) saturate(1.5); }
    50% { filter: hue-rotate(-30deg) contrast(1.1); }
    75% { filter: hue-rotate(90deg); }
    100% { filter: hue-rotate(0deg); }
}

/* Horizontal Displacement Effect */
.glitch-overlay.h-displace::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        transparent 0px,
        transparent 2px,
        rgba(0, 255, 65, 0.08) 2px,
        rgba(0, 255, 65, 0.08) 4px
    );
    animation: hDisplace 0.12s steps(4);
}

@keyframes hDisplace {
    0% { transform: translateX(0) skewX(0deg); }
    25% { transform: translateX(-8px) skewX(-0.5deg); }
    50% { transform: translateX(12px) skewX(0.5deg); }
    75% { transform: translateX(-4px) skewX(-0.3deg); }
    100% { transform: translateX(0) skewX(0deg); }
}

/* Interference/Static Effect */
.glitch-overlay.interference::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 1px,
        rgba(0, 255, 65, 0.03) 2px,
        transparent 3px
    );
    animation: interferenceAnim 0.1s steps(6);
}

.glitch-overlay.interference::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        90deg,
        transparent,
        transparent 3px,
        rgba(255, 255, 255, 0.02) 4px,
        transparent 5px
    );
    animation: interferenceAnim2 0.08s steps(4);
}

@keyframes interferenceAnim {
    0% { opacity: 0; }
    20% { opacity: 1; }
    40% { opacity: 0.5; }
    60% { opacity: 1; }
    80% { opacity: 0.3; }
    100% { opacity: 0; }
}

@keyframes interferenceAnim2 {
    0% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
    100% { transform: translateY(0); }
}

/* RGB Split Glitch */
.glitch-overlay.rgb-split {
    mix-blend-mode: screen;
}

.glitch-overlay.rgb-split::before {
    content: '';
    position: absolute;
    top: 0;
    left: -5px;
    width: 100%;
    height: 100%;
    background: rgba(255, 0, 0, 0.1);
    animation: rgbSplitLeft 0.1s steps(2);
}

.glitch-overlay.rgb-split::after {
    content: '';
    position: absolute;
    top: 0;
    left: 5px;
    width: 100%;
    height: 100%;
    background: rgba(0, 255, 255, 0.1);
    animation: rgbSplitRight 0.1s steps(2);
}

@keyframes rgbSplitLeft {
    0% { transform: translateX(0); opacity: 0; }
    50% { transform: translateX(-3px); opacity: 1; }
    100% { transform: translateX(0); opacity: 0; }
}

@keyframes rgbSplitRight {
    0% { transform: translateX(0); opacity: 0; }
    50% { transform: translateX(3px); opacity: 1; }
    100% { transform: translateX(0); opacity: 0; }
}

/* ============================================
   BOOT SEQUENCE SCREEN
   ============================================ */
.boot-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--black);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.5s ease;
}

.boot-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.boot-content {
    font-family: var(--font-mono);
    color: var(--green-bright);
    max-width: 700px;
    width: 90%;
    text-shadow: 0 0 10px var(--green-glow);
}

.boot-log {
    font-size: 0.85rem;
    line-height: 1.6;
    margin-bottom: 20px;
    height: 300px;
    overflow: hidden;
}

.boot-log .log-line {
    opacity: 0;
    animation: fadeIn 0.1s forwards;
}

.boot-log .log-ok {
    color: var(--green-bright);
}

.boot-log .log-time {
    color: var(--green-dim);
}

.boot-progress {
    height: 4px;
    background: var(--green-darker);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 20px;
}

.boot-progress-bar {
    height: 100%;
    width: 0%;
    background: var(--green-bright);
    box-shadow: 0 0 10px var(--green-glow);
    transition: width 0.1s linear;
}

.boot-skip {
    font-size: 0.75rem;
    color: var(--green-dim);
    text-align: center;
    animation: blink 1s step-end infinite;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

/* ============================================
   BODY & MAIN CONTAINER
   ============================================ */
body {
    font-family: var(--font-mono);
    background: var(--black);
    color: var(--green-bright);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    overflow-x: hidden;
}

.terminal-container {
    width: 100%;
    max-width: 800px;
    background: var(--black-soft);
    border: 1px solid var(--green-dark);
    border-radius: 8px;
    box-shadow:
        0 0 40px rgba(0, 255, 65, 0.1),
        0 0 80px rgba(0, 255, 65, 0.05),
        inset 0 0 80px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 1;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.terminal-container.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   TERMINAL HEADER
   ============================================ */
.terminal-header {
    padding: 12px 20px;
    background: var(--black-terminal);
    border-bottom: 1px solid var(--green-dark);
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

.terminal-title {
    font-size: 0.9rem;
    display: flex;
    align-items: center;
}

.header-links {
    display: flex;
    gap: 15px;
}

.title-text {
    color: var(--green-mid);
}

.title-path {
    color: var(--green-dim);
}

/* ============================================
   CURSOR ANIMATIONS
   ============================================ */
.cursor {
    color: var(--green-bright);
    margin-left: 2px;
}

.cursor.blink {
    animation: blink 1s step-end infinite;
}

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

/* ============================================
   TERMINAL BODY
   ============================================ */
.terminal-body {
    padding: 20px;
}

.section {
    margin-bottom: 20px;
}

.section:last-child {
    margin-bottom: 0;
}

/* ============================================
   HERO / ASCII BANNER
   ============================================ */
.section-hero {
    text-align: left;
    padding: 15px 0;
}

.ascii-banner {
    margin-bottom: 15px;
    overflow-x: auto;
}

.ascii-banner pre {
    font-family: 'Courier New', monospace;
    font-size: 0.55rem;
    line-height: 1.15;
    color: var(--green-bright);
    display: inline-block;
    text-align: left;
    text-shadow:
        0 0 5px var(--green-glow),
        0 0 10px var(--green-glow),
        0 0 20px var(--green-glow);
    animation: pulse-glow 4s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        text-shadow:
            0 0 5px var(--green-glow),
            0 0 10px var(--green-glow),
            0 0 20px var(--green-glow);
        opacity: 1;
    }
    50% {
        text-shadow:
            0 0 10px var(--green-glow-strong),
            0 0 30px var(--green-glow),
            0 0 50px var(--green-glow);
        opacity: 0.95;
    }
}

.tagline {
    font-size: 1rem;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 8px;
}

.prompt {
    color: var(--green-bright);
    font-weight: bold;
}

.scramble-text {
    color: var(--green-mid);
    min-width: 1ch;
}

/* ============================================
   PROJECTS SECTION
   ============================================ */
.section-title {
    font-size: 0.95rem;
    font-weight: 400;
    margin-bottom: 12px;
    color: var(--green-dim);
}

.section-title .prompt {
    color: var(--green-bright);
}

.project-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.project-card {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    justify-content: flex-start;
    padding: 10px 15px;
    background: var(--black-terminal);
    border: 1px solid var(--green-dark);
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(0, 255, 65, 0.1),
        transparent
    );
    transition: left 0.5s ease;
}

.project-card:hover::before {
    left: 100%;
}

.project-card:hover {
    border-color: var(--green-bright);
    box-shadow:
        0 0 20px var(--green-glow),
        0 0 40px rgba(0, 255, 65, 0.1),
        inset 0 0 20px rgba(0, 255, 65, 0.05);
    transform: translateY(-2px);
}

.project-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--green-bright);
    text-shadow: 0 0 10px var(--green-glow);
}

.project-name::after {
    content: ' -';
    margin-right: 8px;
}

.project-type {
    font-size: 0.7rem;
    color: var(--green-dim);
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Power-on animation for cards */
.project-card.power-on {
    animation: powerOn 0.5s ease forwards;
}

@keyframes powerOn {
    0% {
        opacity: 0;
        transform: scale(0.95);
        filter: brightness(0);
    }
    50% {
        filter: brightness(1.5);
    }
    100% {
        opacity: 1;
        transform: scale(1);
        filter: brightness(1);
    }
}

/* ============================================
   CONTACT SECTION
   ============================================ */
.section-contact {
    text-align: center;
}

.contact-line {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    font-size: 0.95rem;
}

.contact-link {
    color: var(--green-mid);
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
}

.contact-link:hover {
    color: var(--green-bright);
    text-shadow: 0 0 10px var(--green-glow);
}

/* Glitch effect on hover */
.glitch-hover:hover {
    animation: glitch 0.3s ease;
}

@keyframes glitch {
    0% {
        transform: translate(0);
        text-shadow: 0 0 10px var(--green-glow);
    }
    20% {
        transform: translate(-2px, 1px);
        text-shadow: -2px 0 #ff0000, 2px 0 #00ffff;
    }
    40% {
        transform: translate(2px, -1px);
        text-shadow: 2px 0 #ff0000, -2px 0 #00ffff;
    }
    60% {
        transform: translate(-1px, 1px);
        text-shadow: -1px 0 #ff0000, 1px 0 #00ffff;
    }
    80% {
        transform: translate(1px, -1px);
        text-shadow: 1px 0 #ff0000, -1px 0 #00ffff;
    }
    100% {
        transform: translate(0);
        text-shadow: 0 0 10px var(--green-glow);
    }
}

/* ============================================
   FOOTER
   ============================================ */
.terminal-footer {
    padding: 12px 20px;
    background: var(--black-terminal);
    border-top: 1px solid var(--green-dark);
    border-radius: 0 0 8px 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-status {
    color: var(--green-bright);
    animation: statusPulse 2s ease-in-out infinite;
}

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

.footer-text {
    font-size: 0.8rem;
    color: var(--green-dim);
}

.footer-links {
    margin-left: auto;
    display: flex;
    gap: 15px;
}

/* ============================================
   SCREEN FLICKER (Enhanced with brightness variations)
   ============================================ */
@keyframes flicker {
    0%, 100% { opacity: 1; filter: brightness(1); }
    3% { opacity: 0.98; filter: brightness(1.02); }
    6% { opacity: 1; filter: brightness(1); }
    8% { opacity: 0.95; filter: brightness(0.97); }
    9% { opacity: 1; filter: brightness(1.04); }
    10% { opacity: 1; filter: brightness(1); }
    45% { opacity: 1; filter: brightness(1); }
    47% { opacity: 0.97; filter: brightness(1.03); }
    48% { opacity: 1; filter: brightness(0.98); }
    49% { opacity: 0.98; filter: brightness(1.02); }
    50% { opacity: 1; filter: brightness(1); }
    90% { opacity: 1; filter: brightness(1); }
    92% { opacity: 0.96; filter: brightness(1.05); }
    94% { opacity: 1; filter: brightness(0.97); }
    96% { opacity: 0.99; filter: brightness(1.02); }
}

/* Occasional power surge effect */
@keyframes powerSurge {
    0%, 98% { filter: brightness(1); }
    99% { filter: brightness(1.15); }
    100% { filter: brightness(1); }
}

.terminal-container {
    animation: flicker 4s infinite, powerSurge 15s infinite;
}

/* ============================================
   REVEAL ANIMATIONS
   ============================================ */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .terminal-body {
        padding: 20px;
    }

    .ascii-banner pre {
        font-size: 0.35rem;
    }

    .project-grid {
        grid-template-columns: 1fr;
    }

    .tagline {
        font-size: 0.9rem;
    }

    .boot-log {
        font-size: 0.75rem;
        height: 250px;
    }
}

@media (max-width: 480px) {
    .ascii-banner pre {
        font-size: 0.28rem;
    }

    .section-hero {
        padding: 20px 0;
    }

    .contact-line {
        flex-direction: column;
        gap: 10px;
    }

    /* Lighter CRT effects on mobile for performance */
    .crt-overlay::before {
        background: repeating-linear-gradient(
            to bottom,
            transparent,
            transparent 3px,
            rgba(0, 0, 0, 0.1) 3px,
            rgba(0, 0, 0, 0.1) 6px
        );
    }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    #matrix-rain {
        display: none;
    }

    .boot-screen {
        display: none;
    }

    .terminal-container {
        opacity: 1;
        transform: none;
        animation: none !important;
    }

    .chromatic-layer,
    .glitch-overlay {
        display: none;
    }

    .crt-overlay::before {
        animation: none !important;
    }
}

/* ============================================
   NETWORK VISUALIZATION STYLES
   The Living Network - Knowledge Graph View
   v2: Contained Section Layout
   ============================================ */

/* Projects Tab Toggle */
.projects-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

.tab-btn {
    background: transparent;
    border: 1px solid rgba(0, 255, 65, 0.3);
    color: rgba(0, 255, 65, 0.6);
    font-family: 'Fira Code', monospace;
    font-size: 0.8rem;
    padding: 10px 18px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tab-btn:hover {
    border-color: rgba(0, 255, 65, 0.6);
    color: rgba(0, 255, 65, 0.85);
}

.tab-btn.active {
    border-color: #00ff41;
    color: #00ff41;
    text-shadow: 0 0 10px rgba(0, 255, 65, 0.5);
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.1);
}

/* Hide class for tab content */
.project-grid.hidden {
    display: none;
}

/* Network Section (contained, not fullscreen) */
.network-section {
    background: #000;
    border: 1px solid rgba(0, 255, 65, 0.3);
    border-radius: 4px;
    overflow: hidden;
}

.network-section.hidden {
    display: none;
}

/* ============================================
   RESOURCES TAB - YouTube Channels & Learn More
   ============================================ */

/* Resources Section */
.resources-section {
    background: var(--black);
    border: 1px solid var(--green-dark);
    border-radius: 4px;
    overflow: hidden;
}

.resources-section.hidden {
    display: none;
}

.resources-container {
    padding: 20px;
}

/* === COLLAPSIBLE RESOURCE SECTIONS === */

.resource-section {
    margin-bottom: 20px;
    border: 1px solid var(--green-dark);
    border-radius: 4px;
    background: rgba(0, 255, 65, 0.02);
}

.resource-section:last-child {
    margin-bottom: 0;
}

/* Section Header (clickable) */
.section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid transparent;
}

.section-header:hover {
    background: rgba(0, 255, 65, 0.05);
    border-bottom-color: var(--green-dark);
}

.section-icon {
    color: var(--green-bright);
    font-size: 1rem;
    text-shadow: 0 0 10px var(--green-glow);
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.section-title {
    color: var(--green-bright);
    font-family: var(--font-mono);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-shadow: 0 0 8px var(--green-glow);
    margin: 0;
}

/* Section Content (collapsible) */
.section-content {
    display: none;
    padding: 16px;
    animation: sectionExpand 0.2s ease;
}

.resource-section.expanded > .section-content {
    display: block;
}

/* Expand Animation */
@keyframes sectionExpand {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === YOUTUBE LINKS STYLING === */

.resources-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.resource-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: rgba(0, 255, 65, 0.02);
    border: 1px solid transparent;
    border-radius: 3px;
    transition: all 0.2s ease;
}

.resource-item:hover {
    background: rgba(0, 255, 65, 0.05);
    border-color: rgba(0, 255, 65, 0.2);
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.1);
}

.resource-icon {
    color: var(--green-bright);
    font-size: 0.9rem;
    text-shadow: 0 0 8px var(--green-glow);
    flex-shrink: 0;
}

.resource-link {
    color: var(--green-mid);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.2s ease;
    letter-spacing: 0.3px;
    word-break: break-all;
}

.resource-link:hover {
    color: var(--green-bright);
    text-shadow: 0 0 10px var(--green-glow);
    text-decoration: underline;
}

.resource-link:visited {
    color: var(--green-dim);
}

.resource-link:visited:hover {
    color: var(--green-bright);
}

/* === BOOK TREE STYLING === */

/* Book tree inherits .tree-folder styling from Dev Stack */
/* Only add book-specific content styles */

.book-tree {
    /* Container for book tree structure */
    /* Tree folders will handle their own styling */
}

.chapter-description {
    color: var(--green-mid);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    line-height: 1.6;
    margin-bottom: 8px;
    padding-left: 24px;
}

.chapter-content {
    color: var(--green-dim);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-style: italic;
    padding: 8px 12px 8px 24px;
    background: rgba(0, 0, 0, 0.3);
    border-left: 2px solid var(--green-dark);
    margin-left: 24px;
}

/* === RESOURCE ENTRIES (for categorized resources) === */

.resource-tree {
    /* Container for resource categories using tree structure */
}

.resource-entry {
    padding: 12px 16px 12px 24px;
    margin-bottom: 12px;
    background: rgba(0, 255, 65, 0.02);
    border-left: 2px solid var(--green-dark);
    transition: all 0.2s ease;
}

.resource-entry:hover {
    background: rgba(0, 255, 65, 0.05);
    border-left-color: var(--green-bright);
}

.resource-entry:last-child {
    margin-bottom: 0;
}

.resource-title {
    color: var(--green-bright);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 6px;
    text-shadow: 0 0 8px var(--green-glow);
}

.resource-description {
    color: var(--green-mid);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    line-height: 1.6;
    margin-bottom: 8px;
}

.resource-entry .resource-link {
    color: var(--green-dim);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-block;
    margin-top: 4px;
}

.resource-entry .resource-link:hover {
    color: var(--green-bright);
    text-shadow: 0 0 10px var(--green-glow);
    text-decoration: underline;
}

.resource-entry .resource-link:visited {
    color: var(--green-darker);
}

.resource-entry .resource-link:visited:hover {
    color: var(--green-bright);
}

.network-container {
    position: relative;
    height: 550px;
    width: 100%;
    background: #000;
}

#network-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.network-labels {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.node-label {
    position: absolute;
    font-family: 'Fira Code', monospace;
    font-size: 0.6rem;
    color: rgba(0, 255, 65, 0.7);
    text-shadow: 0 0 8px rgba(0, 255, 65, 0.4);
    pointer-events: none;
    white-space: nowrap;
    transform: translateX(-50%);
    transition: color 0.2s, text-shadow 0.2s;
    user-select: none;
}

.node-label:hover,
.node-label.focused {
    color: #00ff41;
    text-shadow: 0 0 15px rgba(0, 255, 65, 0.8);
}

.node-label.active {
    color: #00ff41;
}

.node-label.paused {
    color: rgba(0, 140, 40, 0.7);
}

.node-label.experiment {
    color: rgba(0, 200, 80, 0.7);
}

/* Tool Labels (languages and frameworks) */
.tool-label {
    position: absolute;
    font-family: 'Fira Code', monospace;
    font-size: 0.6rem;
    color: rgba(0, 255, 65, 0.6);
    text-shadow: 0 0 6px rgba(0, 255, 65, 0.3);
    white-space: nowrap;
    pointer-events: none;
    transform: translateX(-50%);
    transition: color 0.2s, text-shadow 0.2s;
    user-select: none;
}

.tool-label.language {
    color: rgba(0, 255, 65, 0.6);
    text-shadow: 0 0 6px rgba(0, 255, 65, 0.3);
}

.tool-label.framework {
    color: rgba(0, 255, 65, 0.6);
    text-shadow: 0 0 6px rgba(0, 255, 65, 0.3);
}

.tool-label.focused {
    color: #00ff41;
    text-shadow: 0 0 10px rgba(0, 255, 65, 0.6);
}

/* Tool tooltip status colors */
.tooltip-status.tool-language {
    background-color: rgba(0, 255, 65, 0.8);
}

.tooltip-status.tool-framework {
    background-color: rgba(0, 255, 65, 0.8);
}

/* Network Filters (inside section) */
.network-filters {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 15px;
    background: rgba(0, 20, 0, 0.5);
    border-top: 1px solid rgba(0, 255, 65, 0.2);
    flex-wrap: wrap;
}

.filter-btn {
    background: transparent;
    border: 1px solid rgba(0, 255, 65, 0.3);
    color: rgba(0, 255, 65, 0.6);
    font-family: 'Fira Code', monospace;
    font-size: 0.7rem;
    padding: 6px 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-btn:hover {
    border-color: rgba(0, 255, 65, 0.6);
    color: rgba(0, 255, 65, 0.85);
}

.filter-btn.active {
    border-color: #00ff41;
    color: #00ff41;
    text-shadow: 0 0 8px rgba(0, 255, 65, 0.5);
}

.filter-hint {
    margin-left: auto;
    font-size: 0.65rem;
    color: rgba(0, 255, 65, 0.4);
}

.filter-hint kbd {
    background: rgba(0, 255, 65, 0.1);
    border: 1px solid rgba(0, 255, 65, 0.2);
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Fira Code', monospace;
}

/* Convergence Zone Label (inside network container) */
.convergence-label {
    position: absolute;
    top: 15%;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none;
    opacity: 0.5;
}

.network-section.hidden .convergence-label {
    display: none;
}

.zone-title {
    font-family: 'Fira Code', monospace;
    font-size: 0.7rem;
    color: rgba(0, 255, 150, 0.5);
    letter-spacing: 4px;
    text-transform: uppercase;
    animation: zonePulse 4s ease-in-out infinite;
}

.zone-subtitle {
    font-family: 'Fira Code', monospace;
    font-size: 0.55rem;
    color: rgba(0, 255, 150, 0.3);
    margin-top: 4px;
    letter-spacing: 2px;
}

@keyframes zonePulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.8; }
}

/* Project Tooltip */
.tooltip {
    position: fixed;
    min-width: 280px;
    max-width: 340px;
    background: rgba(0, 0, 0, 0.95);
    border: 1px solid rgba(0, 255, 65, 0.4);
    padding: 15px;
    font-family: 'Fira Code', monospace;
    z-index: 1100;
    box-shadow:
        0 0 30px rgba(0, 255, 65, 0.15),
        inset 0 0 40px rgba(0, 0, 0, 0.5);
    pointer-events: none;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.tooltip.visible {
    opacity: 1;
    transform: translateY(0);
}

.tooltip-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(0, 255, 65, 0.2);
}

.tooltip-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.tooltip-status.active {
    background: #00ff41;
    box-shadow: 0 0 10px #00ff41;
    animation: statusPulse 2s ease-in-out infinite;
}

.tooltip-status.paused {
    background: #008c28;
}

.tooltip-status.experiment {
    background: #00c850;
}

@keyframes statusPulse {
    0%, 100% { opacity: 0.7; box-shadow: 0 0 5px #00ff41; }
    50% { opacity: 1; box-shadow: 0 0 15px #00ff41; }
}

.tooltip-name {
    color: #00ff41;
    font-weight: 700;
    font-size: 0.95rem;
    text-shadow: 0 0 10px rgba(0, 255, 65, 0.5);
}

.tooltip-pitch {
    color: rgba(0, 255, 65, 0.75);
    font-size: 0.8rem;
    margin-bottom: 12px;
    line-height: 1.5;
}

.tooltip-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.tooltip-tech .tag {
    background: rgba(0, 255, 65, 0.1);
    border: 1px solid rgba(0, 255, 65, 0.25);
    padding: 2px 8px;
    font-size: 0.65rem;
    color: rgba(0, 255, 65, 0.7);
}

.tooltip-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.7rem;
    color: rgba(0, 255, 65, 0.5);
}

.tooltip-type {
    text-transform: uppercase;
    letter-spacing: 1px;
}

.tooltip-hint {
    animation: blink 1.2s step-end infinite;
}

/* Command Palette */
.command-palette {
    position: fixed;
    top: 18%;
    left: 50%;
    transform: translateX(-50%) translateY(-15px);
    width: 90%;
    max-width: 480px;
    background: rgba(0, 0, 0, 0.97);
    border: 1px solid #00ff41;
    box-shadow:
        0 0 50px rgba(0, 255, 65, 0.2),
        0 0 100px rgba(0, 255, 65, 0.08);
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.command-palette.visible {
    opacity: 1;
    pointer-events: all;
    transform: translateX(-50%) translateY(0);
}

.palette-header {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid rgba(0, 255, 65, 0.3);
}

.palette-header .prompt {
    color: #00ff41;
    margin-right: 10px;
    font-weight: 700;
}

#palette-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: rgba(0, 255, 65, 0.9);
    font-family: 'Fira Code', monospace;
    font-size: 1rem;
    caret-color: #00ff41;
}

#palette-input::placeholder {
    color: rgba(0, 255, 65, 0.35);
}

.palette-results {
    max-height: 280px;
    overflow-y: auto;
}

.palette-result {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    border-bottom: 1px solid rgba(0, 255, 65, 0.1);
    cursor: pointer;
    transition: background 0.1s;
}

.palette-result:hover,
.palette-result.selected {
    background: rgba(0, 255, 65, 0.1);
}

.palette-result .result-status {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.palette-result .result-status.active { background: #00ff41; }
.palette-result .result-status.paused { background: #008c28; }
.palette-result .result-status.experiment { background: #00c850; }

.palette-result .result-name {
    color: #00ff41;
    font-weight: 600;
    flex: 1;
}

.palette-result .result-type {
    font-size: 0.7rem;
    color: rgba(0, 255, 65, 0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.palette-footer {
    display: flex;
    gap: 20px;
    padding: 10px 15px;
    border-top: 1px solid rgba(0, 255, 65, 0.2);
    font-size: 0.7rem;
    color: rgba(0, 255, 65, 0.45);
}

.palette-footer kbd {
    background: rgba(0, 255, 65, 0.15);
    border: 1px solid rgba(0, 255, 65, 0.3);
    padding: 2px 6px;
    border-radius: 3px;
    margin-right: 5px;
    font-family: 'Fira Code', monospace;
    font-size: 0.65rem;
}

/* Responsive styles for tabs and contained network */
@media (max-width: 768px) {
    .projects-tabs {
        flex-wrap: wrap;
    }

    .tab-btn {
        font-size: 0.7rem;
        padding: 8px 12px;
    }

    .network-container {
        height: 400px;
    }

    .network-filters {
        padding: 10px;
        gap: 6px;
    }
}

/* Network Mobile Styles (contained layout) */
@media (max-width: 768px) {
    .node-label {
        font-size: 0.55rem;
    }

    .filter-btn {
        font-size: 0.65rem;
        padding: 6px 10px;
    }

    .tooltip {
        min-width: 240px;
        max-width: 85vw;
        font-size: 0.85rem;
    }

    .command-palette {
        top: 8%;
        width: 95%;
    }

    .convergence-label {
        top: 12%;
    }

    .zone-title {
        font-size: 0.6rem;
        letter-spacing: 2px;
    }
}

@media (max-width: 480px) {
    .network-container {
        height: 350px;
    }

    .node-label {
        font-size: 0.5rem;
    }

    .filter-btn {
        padding: 5px 8px;
        font-size: 0.6rem;
    }

    .tooltip {
        min-width: 200px;
        padding: 12px;
    }

    .tooltip-name {
        font-size: 0.85rem;
    }

    .tooltip-pitch {
        font-size: 0.75rem;
    }
}

/* Reduce motion for network */
@media (prefers-reduced-motion: reduce) {
    .network-section,
    .tooltip,
    .command-palette {
        transition: none !important;
    }

    .node-label {
        transition: none !important;
    }

    .zone-title {
        animation: none !important;
    }

    .tooltip-status.active {
        animation: none !important;
    }
}

/* ============================================
   PROJECT FACTSHEET PANEL
   ============================================ */

.factsheet {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.factsheet.visible {
    opacity: 1;
    visibility: visible;
}

.factsheet-content {
    background: var(--black-terminal);
    border: 1px solid var(--green-dim);
    box-shadow: 0 0 30px var(--green-glow),
                inset 0 0 20px rgba(0, 255, 65, 0.05);
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    padding: 2rem;
    position: relative;
}

.factsheet-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: 1px solid var(--green-dim);
    color: var(--green-bright);
    font-family: var(--font-mono);
    font-size: 1rem;
    padding: 0.25rem 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.factsheet-close:hover {
    background: var(--green-bright);
    color: var(--black);
}

.factsheet-name {
    color: var(--green-bright);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    padding-right: 3rem;
    text-shadow: 0 0 10px var(--green-glow);
}

.factsheet-pitch {
    color: var(--green-mid);
    font-size: 1rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.factsheet-section {
    margin-bottom: 1.5rem;
}

.factsheet-section h4 {
    color: var(--green-bright);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid var(--green-dark);
    padding-bottom: 0.25rem;
}

.factsheet-section p {
    color: var(--green-mid);
    font-size: 0.9rem;
    line-height: 1.6;
}

.factsheet-section ul {
    list-style: none;
    padding: 0;
}

.factsheet-section li {
    color: var(--green-mid);
    font-size: 0.85rem;
    padding: 0.25rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.factsheet-section li::before {
    content: '>';
    position: absolute;
    left: 0;
    color: var(--green-dim);
}

.factsheet-section code {
    display: block;
    background: var(--black);
    border: 1px solid var(--green-dark);
    padding: 0.5rem;
    font-size: 0.8rem;
    color: var(--green-dim);
    word-break: break-all;
}

.factsheet-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.factsheet-tags .tag {
    background: var(--black);
    border: 1px solid var(--green-dark);
    color: var(--green-mid);
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

.factsheet-tags .tag.lang {
    border-color: var(--green-mid);
}

.factsheet-tags .tag.framework {
    border-color: var(--green-dim);
}

/* Network controls hint */
.network-controls {
    display: flex;
    justify-content: center;
    gap: 2rem;
    padding: 0.75rem;
    background: var(--black);
    border-top: 1px solid var(--green-dark);
}

.control-hint {
    color: var(--green-dim);
    font-size: 0.8rem;
}

.control-hint kbd {
    background: var(--black-terminal);
    border: 1px solid var(--green-dark);
    padding: 0.1rem 0.4rem;
    font-size: 0.75rem;
    color: var(--green-mid);
}

/* Spacing control slider */
.spacing-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--green-dim);
    font-size: 0.8rem;
    cursor: pointer;
}

.spacing-control input[type="range"] {
    width: 80px;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--green-dark);
    border-radius: 2px;
    outline: none;
}

.spacing-control input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    background: var(--green-mid);
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s;
}

.spacing-control input[type="range"]::-webkit-slider-thumb:hover {
    background: var(--green-bright);
}

.spacing-control input[type="range"]::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: var(--green-mid);
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

/* Control button (recenter, etc.) */
.control-btn {
    background: transparent;
    border: 1px solid var(--green-dark);
    color: var(--green-dim);
    font-family: 'Fira Code', monospace;
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
}

.control-btn:hover {
    border-color: var(--green-mid);
    color: var(--green-mid);
}

/* ============================================
   DEV STACK EXPLORER - File Tree
   3-Layer Interactive Tech Stack Browser
   ============================================ */

/* Dev Stack Section Container */
.devstack-section {
    background: var(--black);
    border: 1px solid var(--green-dark);
    border-radius: 4px;
    overflow: hidden;
}

.devstack-section.hidden {
    display: none;
}

/* Header */
.devstack-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: var(--black-terminal);
    border-bottom: 1px solid var(--green-dark);
}

.devstack-title {
    color: var(--green-bright);
    font-size: 0.85rem;
    font-weight: 700;
    text-shadow: 0 0 10px var(--green-glow);
    letter-spacing: 1px;
}

.devstack-controls {
    display: flex;
    gap: 10px;
}

.tree-btn {
    background: transparent;
    border: none;
    color: var(--green-bright);
    font-family: inherit;
    font-size: 0.7rem;
    cursor: pointer;
    padding: 4px 8px;
    transition: color 0.15s ease, text-shadow 0.15s ease;
}

.tree-btn:hover {
    color: var(--green-bright);
    text-shadow: 0 0 8px var(--green-glow);
}

/* File Tree Container */
.file-tree {
    padding: 15px 15px 15px 28px;
    max-height: 500px;
    overflow-y: auto;
    font-size: 0.85rem;
    line-height: 1.4;
    position: relative;
}

/* Tree Folder (Layer 1 & 2) */
.tree-folder {
    margin-bottom: 4px;
    position: relative;
}

/* Top-level folder horizontal branch connector (L-shape) */
.file-tree > .tree-folder::before {
    content: '';
    position: absolute;
    left: -13px;
    top: 0;
    height: 16px;
    width: 10px;
    border-left: 1px solid var(--green-bright);
    border-bottom: 1px solid var(--green-bright);
    pointer-events: none;
}

/* Top-level folders (except last) - vertical line extending down */
.file-tree > .tree-folder:not(:last-of-type)::after {
    content: '';
    position: absolute;
    left: -13px;
    top: 16px;
    bottom: -4px;
    border-left: 1px solid var(--green-bright);
    pointer-events: none;
}

.tree-folder > .folder-content {
    display: none;
    padding-left: 24px;
    margin-top: 4px;
    margin-left: 8px;
    position: relative;
}

/* Vertical line running down folder content */
.folder-content::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 12px;
    border-left: 1px solid var(--green-bright);
    pointer-events: none;
}

/* Nested items need position for connectors */
.folder-content > .tree-folder,
.folder-content > .tree-file {
    position: relative;
}

/* Horizontal branch connector for nested items */
.folder-content > .tree-folder::before,
.folder-content > .tree-file::before {
    content: '';
    position: absolute;
    left: -24px;
    top: 13px;
    width: 20px;
    border-bottom: 1px solid var(--green-bright);
    pointer-events: none;
}

/* Vertical segment for nested items (continues the line) */
.folder-content > .tree-folder::after,
.folder-content > .tree-file::after {
    content: '';
    position: absolute;
    left: -24px;
    top: 0;
    height: 14px;
    border-left: 1px solid var(--green-bright);
    pointer-events: none;
}

/* Last nested item - L-shaped corner */
.folder-content > .tree-folder:last-of-type::after,
.folder-content > .tree-file:last-of-type::after {
    height: 14px;
}

/* Hover effect on connectors - brighten */
.folder-content > .tree-folder:hover::before,
.folder-content > .tree-file:hover::before {
    /* Keep pure green - no changes */
}

.tree-folder.expanded > .folder-content {
    display: block;
}

/* Folder Header (clickable) */
.folder-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    cursor: pointer;
    transition: all 0.15s ease;
    border-radius: 3px;
    position: relative;
}

.folder-header:hover {
    /* No background - minimal style */
}

.folder-header:hover .folder-name {
    color: var(--green-bright);
    text-shadow: 0 0 8px var(--green-glow);
}

/* Folder Icon - hidden for minimal style */
.folder-icon {
    display: none;
}

/* Folder Name */
.folder-name {
    color: var(--green-bright);
    font-weight: 600;
    transition: color 0.15s ease, text-shadow 0.15s ease;
}

/* Layer 1 folders (main categories) */
.file-tree > .tree-folder > .folder-header .folder-name {
    color: var(--green-bright);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.file-tree > .tree-folder > .folder-header {
    /* No background - minimal style */
}

.file-tree > .tree-folder > .folder-header:hover {
    /* No background - minimal style */
}

.file-tree > .tree-folder.expanded > .folder-header {
    /* No background - minimal style */
}

/* Layer 2 folders (subcategories) */
.folder-content > .tree-folder > .folder-header .folder-name {
    color: var(--green-bright);
    font-size: 0.8rem;
}

/* Tree File (Layer 3 - individual tools) */
.tree-file {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px;
    cursor: pointer;
    transition: all 0.15s ease;
    border-radius: 3px;
    margin: 2px 0;
}

.tree-file:hover {
    /* No background - minimal style */
}

.tree-file:hover .file-name {
    color: var(--green-bright);
    text-shadow: 0 0 8px var(--green-glow);
}

.tree-file.selected {
    /* No background/border - minimal style */
}

.tree-file.selected .file-name {
    color: var(--green-bright);
}

/* File Icon */
.file-icon {
    color: var(--green-bright);
    font-size: 0.75rem;
    width: 12px;
    text-align: center;
    transition: color 0.15s ease;
}

.tree-file:hover .file-icon,
.tree-file.selected .file-icon {
    color: var(--green-bright);
}

/* File Name */
.file-name {
    color: var(--green-bright);
    font-size: 0.8rem;
    transition: color 0.15s ease, text-shadow 0.15s ease;
    flex: 1;
}

/* File Badge (OSS / PROP / PD) */
.file-badge {
    font-size: 0.6rem;
    padding: 2px 6px;
    border-radius: 2px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.file-badge.opensource,
.file-badge.proprietary,
.file-badge.standard,
.file-badge.sourceavail,
.file-badge.project {
    background: rgba(0, 255, 65, 0.15);
    color: var(--green-bright);
    border: 1px solid var(--green-dim);
}

/* File Details (description that appears below file) */
.file-details {
    display: none;
    padding: 8px 12px 8px 30px;
    margin: 2px 0 6px 0;
    font-size: 0.75rem;
    color: var(--green-bright);
    line-height: 1.5;
    animation: detailsSlide 0.2s ease;
}

.file-details.visible {
    display: block;
}

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

/* Dev Stack Footer */
.devstack-footer {
    display: flex;
    justify-content: center;
    gap: 25px;
    padding: 12px 15px;
    background: var(--black-terminal);
    border-top: 1px solid var(--green-dark);
}

.footer-stat {
    font-size: 0.7rem;
    color: var(--green-dim);
}

.footer-stat .stat-num {
    color: var(--green-bright);
    font-weight: 700;
    text-shadow: 0 0 8px var(--green-glow);
}

/* Folder expand animation */
.tree-folder > .folder-content {
    animation: folderExpand 0.2s ease;
}

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

/* Scanline effect on file tree scroll */
.file-tree::-webkit-scrollbar {
    width: 6px;
}

.file-tree::-webkit-scrollbar-track {
    background: var(--black);
}

.file-tree::-webkit-scrollbar-thumb {
    background: var(--green-dark);
    border-radius: 3px;
}

.file-tree::-webkit-scrollbar-thumb:hover {
    background: var(--green-dim);
}

/* Responsive adjustments for Dev Stack */
@media (max-width: 768px) {
    .devstack-header {
        flex-direction: column;
        gap: 5px;
        text-align: center;
    }

    .devstack-hint {
        font-size: 0.65rem;
    }

    .file-tree {
        padding: 10px 10px 10px 24px;
        max-height: 400px;
        font-size: 0.8rem;
    }

    .file-tree::before {
        left: 12px;
        top: 10px;
        bottom: 10px;
    }

    .file-tree > .tree-folder::before {
        left: -12px;
        width: 8px;
    }

    .folder-header {
        padding: 5px 8px;
    }

    .tree-file {
        padding: 4px 8px;
    }

    .file-name {
        font-size: 0.75rem;
    }

    .file-badge {
        font-size: 0.55rem;
        padding: 1px 4px;
    }

    .file-details {
        font-size: 0.7rem;
        padding: 6px 10px 6px 25px;
    }

    .devstack-footer {
        flex-wrap: wrap;
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .file-tree {
        max-height: 350px;
    }

    .folder-name {
        font-size: 0.75rem;
    }

    .file-tree > .tree-folder > .folder-header .folder-name {
        font-size: 0.8rem;
    }

    .file-badge {
        display: none;
    }

    .devstack-footer {
        gap: 10px;
    }

    .footer-stat {
        font-size: 0.65rem;
    }
}

/* Green Cross - Header */
.jesus-cross {
    position: relative;
    width: 12px;
    height: 18px;
    margin-left: auto;
}

.jesus-cross::before,
.jesus-cross::after {
    content: '';
    position: absolute;
    background-color: #00ff00;
}

.jesus-cross::before {
    width: 3px;
    height: 18px;
    left: 50%;
    transform: translateX(-50%);
}

.jesus-cross::after {
    width: 12px;
    height: 3px;
    top: 4px;
    left: 50%;
    transform: translateX(-50%);
}
