/*
* CSS for the "Life-Itself" Website
* All colors are defined in the :root for easy customization.
*/
:root {
    /* Solar-punk inspired color palette */
    --color-vibrant-green: #34d399; /* A bright, vibrant green */
    --color-sky-blue: #3b82f6;      /* Bright sky blue */
    --color-deep-blue: #1e3a8a;     /* Deep, rich blue */
    --color-sunset-orange: #fb923c;  /* A flash of orange for accents */
    --color-timeline-line: #a6f7b1; /* A subtle, luminescent green for the dark mode timeline */
    --color-dark-card-bg: #2c3e50;  /* A corrected, dark background for cards */

    /* Light Mode */
    --color-light-bg: #e2f5ec;      /* Soft, green-tinted background */
    --color-light-text: #2c3e50;    /* Dark text for contrast */
    --color-light-card: #ffffff;    /* White card background */
    --color-light-border: rgba(44, 62, 80, 0.1);

    /* Dark Mode */
    --color-dark-bg: #1a2a3a;       /* Deep, cosmic blue background */
    --color-dark-text: #ecf0f1;     /* Light text for dark background */
    --color-dark-border: rgba(236, 240, 241, 0.1);
}

/* Base styles */
body {
    font-family: 'Inter', sans-serif;
    background-color: var(--color-light-bg);
    color: var(--color-light-text);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    transition: background-color 0.4s ease, color 0.4s ease;
}

/* Dark Mode overrides */
body.dark-mode {
    background-color: var(--color-dark-bg);
    color: var(--color-dark-text);
}
body.dark-mode h1, body.dark-mode h2, body.dark-mode h3, body.dark-mode h4 {
    color: var(--color-vibrant-green);
}
body.dark-mode .content-block, body.dark-mode .component-card, body.dark-mode .roadmap-content, body.dark-mode .controls-info {
    background-color: var(--color-dark-card-bg);
    border-color: var(--color-dark-border);
}
body.dark-mode pre, body.dark-mode code, body.dark-mode .live-data-stream #data-stream-output {
    background-color: rgba(0, 0, 0, 0.2);
    color: var(--color-vibrant-green);
}
body.dark-mode .github-link {
    color: var(--color-vibrant-green);
}
body.dark-mode .webgl-placeholder {
    background-color: rgba(255, 255, 255, 0.05);
}

/* Global layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}
.flex-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}
.text-center {
    text-align: center;
}
.inline-link {
    color: var(--color-sky-blue);
    text-decoration: none;
    transition: color 0.3s ease;
}
.inline-link:hover {
    color: var(--color-vibrant-green);
}

/* Typography */
h1, h2, h3, h4 {
    font-family: 'Orbitron', sans-serif;
    color: var(--color-deep-blue);
    transition: color 0.4s ease;
}

/* Header & Navigation */
header {
    background-color: rgba(226, 245, 236, 0.8);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(5px);
    border-bottom: 1px solid var(--color-light-border);
    transition: background-color 0.4s ease, border-color 0.4s ease;
}
body.dark-mode header {
     background-color: rgba(26, 42, 58, 0.8);
}
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo {
    font-size: 1.8em;
    font-weight: bold;
    color: var(--color-deep-blue);
    text-decoration: none;
    transition: color 0.4s ease;
}

.logo img {
    max-width: 50px;
    vertical-align: middle;
}
body.dark-mode .logo {
    color: var(--color-vibrant-green);
}
.nav-links {
    display: flex;
}
.nav-links a {
    color: var(--color-light-text);
    text-decoration: none;
    margin-left: 25px;
    font-weight: bold;
    position: relative;
    transition: color 0.4s ease;
}
body.dark-mode .nav-links a {
    color: var(--color-dark-text);
}
.nav-link.active::after, .nav-link:hover::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    left: 0;
    bottom: -5px;
    background: var(--color-sky-blue);
}

/* Mode Toggle Switch */
.mode-toggle-container {
    display: flex;
    align-items: center;
    gap: 10px;
}
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
}
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--color-sky-blue);
    transition: .4s;
    border-radius: 28px;
}
.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}
input:checked + .slider {
    background-color: var(--color-sunset-orange);
}
input:checked + .slider:before {
    transform: translateX(22px);
}

/* Main Sections */
.page-section {
    padding: 80px 20px;
    animation: fadeIn 0.8s ease-out;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Hero section */
.hero-section {
    text-align: center;
    padding: 100px 0;
}
.hero-section h1 {
    font-size: 3.5em;
    margin-bottom: 20px;
    color: var(--color-vibrant-green);
}
.hero-section p {
    font-size: 1.2em;
    max-width: 800px;
    margin: 0 auto 40px;
}
.call-to-action {
    display: inline-block;
    padding: 15px 30px;
    margin-bottom: 20px;
    background: linear-gradient(45deg, var(--color-vibrant-green), var(--color-sky-blue));
    color: white;
    text-decoration: none;
    font-weight: bold;
    border-radius: 50px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.call-to-action:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* Content Blocks */
.content-block, .component-card, .controls-info {
    background-color: var(--color-light-card);
    border: 1px solid var(--color-light-border);
    border-radius: 10px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: background-color 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}
.content-block h3 {
    border-bottom: 2px solid var(--color-vibrant-green);
    padding-bottom: 10px;
    margin-top: 0;
}
pre {
    background-color: rgba(0, 0, 0, 0.05);
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    font-family: 'Courier New', Courier, monospace;
    position: relative; /* For copy button positioning */
}
.component-card {
    padding: 20px;
    flex: 1 1 300px;
    text-align: center;
}
.github-link {
    font-weight: bold;
    text-decoration: none;
    color: var(--color-deep-blue);
    transition: color 0.3s ease;
}
.github-link:hover {
    color: var(--color-sky-blue);
}

/* Demo Section */
.demo-container {
    width: 100%;
    aspect-ratio: 16 / 9;
    background-color: var(--color-dark-card-bg);
    border: 1px solid var(--color-dark-border);
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.webgl-placeholder {
    text-align: center;
    color: var(--color-dark-text);
}

.spinner {
    margin: 20px auto;
    border: 4px solid var(--color-dark-card-bg);
    border-top: 4px solid var(--color-vibrant-green);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.controls-info {
    max-width: 800px;
    margin: 2rem auto 0 auto;
    padding: 1.5rem;
}
.controls-info h3 {
    margin-bottom: 1rem;
}

/* Roadmap */
.roadmap-timeline {
    position: relative;
    padding-left: 50px;
    max-width: 800px;
    margin: 0 auto;
}
.roadmap-timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20px;
    width: 2px;
    height: 100%;
    background-color: var(--color-sky-blue);
}
body.dark-mode .roadmap-timeline::before {
    background-color: var(--color-timeline-line);
}
.roadmap-item {
    position: relative;
    margin-bottom: 40px;
}
.roadmap-dot {
    width: 20px;
    height: 20px;
    background-color: var(--color-sunset-orange);
    border-radius: 50%;
    position: absolute;
    left: 10px;
    top: 5px; /* Adjust alignment */
    transform: translateX(-50%);
    z-index: 1;
}
.roadmap-dot::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background-color: var(--color-sunset-orange);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0% { transform: translate(-50%, -50%) scale(0.8); opacity: 0.7; }
    50% { transform: translate(-50%, -50%) scale(1.5); opacity: 0; }
    100% { transform: translate(-50%, -50%) scale(0.8); opacity: 0.7; }
}
.roadmap-content {
    padding: 20px;
    background-color: var(--color-light-card);
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    margin-left: 30px;
    border: 1px solid var(--color-light-border);
}


/* Key Feature Text Styling */
strong {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    color: var(--color-deep-blue);
    text-shadow: 0 0 5px rgba(52, 211, 153, 0.2);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
body.dark-mode strong {
    color: var(--color-sunset-orange);
    text-shadow: 0 0 8px rgba(251, 146, 60, 0.7);
}


/* Footer */
footer {
    text-align: center;
    padding: 40px 0;
    border-top: 1px solid var(--color-light-border);
    opacity: 0.8;
    transition: border-color 0.4s ease;
}

/* Mobile Nav */
.mobile-menu-button {
    display: none;
    cursor: pointer;
    color: var(--color-deep-blue);
}
body.dark-mode .mobile-menu-button {
    color: var(--color-vibrant-green);
}


/* Responsive design */
@media (max-width: 768px) {
    .nav-links { display: none; }
    .mobile-menu-button { display: block; } /* Show hamburger */
    .hero-section h1 { font-size: 2.5em; }
    .roadmap-timeline { padding-left: 20px; }
    .roadmap-dot { left: 5px; } /* Adjust dot for smaller screens */
    .roadmap-content { margin-left: 20px; }
}

