:root {
    --bg-color: #050505;
    --panel-bg: rgba(10, 10, 10, 0.8);
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;

    /* Scientific Neon Palette */
    --accent-cyan: #00f0ff;
    /* Sci-Fi Cyan */
    --accent-amber: #ffa500;
    /* Warning Amber */
    --accent-purple: #bd00ff;
    /* Deep Purple/UV */
    --border-color: rgba(255, 255, 255, 0.15);

    --font-heading: 'Space Grotesk', monospace;
    --font-body: 'Inter', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

/* Home Link */
.home-link {
    text-decoration: none;
    color: inherit;
    background: linear-gradient(to right, #fff, var(--accent-cyan));
    -webkit-background-clip: text;
    background-clip: text;
    transition: opacity 0.2s;
}

.home-link:hover {
    opacity: 0.8;
}

/* Toggle Switch / Segmented Control */
.toggle-container {
    display: flex;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    /* Optional rounded corners */
    padding: 2px;
    width: 100%;
}

.toggle-option {
    flex: 1;
    position: relative;
    cursor: pointer;
}

.toggle-option input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.toggle-btn {
    display: block;
    width: 100%;
    text-align: center;
    padding: 8px 0;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-secondary);
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: transparent;
    border: none;
    border-radius: 2px;
    /* Small radius for inner button */
}

/* Checked State */
.toggle-option input:checked+.toggle-btn {
    background: var(--accent-cyan);
    color: #000;
    /* High contrast text */
    font-weight: 700;
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.3);
}

/* Hover State */
.toggle-option:hover .toggle-btn {
    color: var(--text-primary);
}

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

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-cyan);
    border-radius: 2px;
}

::-webkit-scrollbar-thumb:hover {
    background: #fff;
    box-shadow: 0 0 10px var(--accent-cyan);
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-body);
    display: flex;
    height: 100vh;
    overflow: hidden;

    /* Technical Grid Background */
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
}

/* Typography - Lab Style */
h1,
h2,
h3 {
    font-family: var(--font-heading);
    letter-spacing: -0.03em;
    text-transform: uppercase;
}

h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    background: linear-gradient(to right, #fff, var(--accent-cyan));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 20px rgba(0, 240, 255, 0.3);
}

h2 {
    font-size: 0.8rem;
    color: var(--accent-cyan);
    letter-spacing: 0.2em;
    margin-top: 0;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
    display: inline-block;
}

p {
    line-height: 1.6;
    font-size: 0.9rem;
    color: #cbd5e1;
}

/* Layout */
#app-container {
    display: flex;
    width: 100%;
    height: 100%;
}

#sidebar {
    width: 380px;
    background-color: rgba(5, 5, 5, 0.95);
    backdrop-filter: blur(10px);
    padding: 1.5rem;
    box-sizing: border-box;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    gap: 1rem;
    z-index: 10;
}

#canvas-container {
    flex-grow: 1;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    /* Transparent to show grid behind, or radial for focus */
    background-image: radial-gradient(circle at center, rgba(0, 0, 0, 0) 0%, #050505 80%);
    cursor: crosshair;
}

/* Controls - HUD Style */
.control-group {
    margin-bottom: 1rem;
}

label {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    margin-bottom: 0.8rem;
    color: var(--text-secondary);
    letter-spacing: 0.1em;
}

/* Sliders */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 2px;
    background: var(--border-color);
    outline: none;
    margin: 15px 0;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    background: var(--accent-cyan);
    border: 2px solid #000;
    cursor: pointer;
    box-shadow: 0 0 10px var(--accent-cyan);
    transition: transform 0.1s;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.5);
}

/* Buttons - Tactical */
button {
    background: transparent;
    color: var(--accent-cyan);
    border: 1px solid var(--accent-cyan);
    padding: 0.8rem 1.2rem;
    font-family: var(--font-mono);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    cursor: pointer;
    width: 100%;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
    border-radius: 0;
    /* Sharp corners */
}

button:hover {
    background: rgba(0, 240, 255, 0.1);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.3);
    text-shadow: 0 0 5px var(--accent-cyan);
}

button.primary {
    background: rgba(0, 240, 255, 0.1);
}

button.secondary {
    border-color: var(--text-secondary);
    color: var(--text-secondary);
}

button.secondary:hover {
    border-color: var(--text-primary);
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: none;
}

/* Stats & Info - Data Readout */
.stat-card {
    background: rgba(0, 240, 255, 0.03);
    border: 1px solid var(--border-color);
    border-left: 2px solid var(--accent-cyan);
    padding: 1rem;
    margin-bottom: 1rem;
    position: relative;
}

.stat-value {
    font-family: var(--font-mono);
    font-size: 1.4rem;
    color: var(--text-primary);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

.stat-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--accent-cyan);
    margin-bottom: 5px;
}

/* Tooltip Overlay */
#tooltip {
    position: absolute;
    background: rgba(5, 5, 5, 0.95);
    padding: 0.5rem 1rem;
    border: 1px solid var(--accent-cyan);
    color: var(--accent-cyan);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    pointer-events: none;
    display: none;
    z-index: 20;
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.2);
}

/* Responsive */
@media (max-width: 768px) {
    #app-container {
        flex-direction: column-reverse;
    }

    #sidebar {
        width: 100%;
        height: 40%;
        border-right: none;
        border-top: 1px solid var(--border-color);
    }

    #canvas-container {
        height: 60%;
    }
}

/* --- LANDING PAGE STYLES --- */

.landing-body {
    display: block;
    height: auto;
    overflow-y: auto;
    /* Grid background inherited from body */
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 0;
    border-bottom: 1px solid var(--border-color);
}

.nav-brand {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.nav-brand span {
    color: var(--accent-cyan);
}

.hero {
    text-align: center;
    padding: 6rem 1rem;
    position: relative;
}

.hero h1 {
    font-size: 4.5rem;
    /* Larger */
    margin-bottom: 1.5rem;
    line-height: 1;
    letter-spacing: -0.05em;
    background: none;
    -webkit-text-fill-color: initial;
    color: white;
}

.hero p {
    font-size: 1.3rem;
    color: var(--text-secondary);
    max-width: 650px;
    margin: 0 auto 3rem;
    font-family: var(--font-mono);
}

/* Big Launch Button */
.btn-large {
    background-color: var(--accent-cyan);
    color: #000;
    padding: 1.2rem 2.5rem;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    text-decoration: none;
    display: inline-block;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}

.btn-large:hover {
    transform: translateY(-2px);
    background-color: #fff;
    box-shadow: 0 0 30px var(--accent-cyan);
}

.section {
    padding: 4rem 0;
    border-top: 1px solid var(--border-color);
}

.section h2 {
    font-size: 2rem;
    color: var(--text-primary);
    margin-bottom: 3rem;
    text-align: center;
    border: none;
    display: block;
    text-shadow: none;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

/* Technical Cards */
.card {
    background: rgba(10, 10, 10, 0.6);
    border: 1px solid var(--border-color);
    padding: 2rem;
    transition: all 0.3s;
    position: relative;
    backdrop-filter: blur(5px);
}

/* Corner Accents */
.card::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    width: 10px;
    height: 10px;
    border-top: 2px solid var(--accent-cyan);
    border-left: 2px solid var(--accent-cyan);
    opacity: 0.5;
    transition: opacity 0.3s;
}

.card::after {
    content: '';
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 10px;
    height: 10px;
    border-bottom: 2px solid var(--accent-cyan);
    border-right: 2px solid var(--accent-cyan);
    opacity: 0.5;
    transition: opacity 0.3s;
}

.card:hover {
    border-color: var(--accent-cyan);
    background: rgba(0, 240, 255, 0.02);
}

.card:hover::before,
.card:hover::after {
    opacity: 1;
}

.card h3 {
    color: var(--text-primary);
    font-family: var(--font-heading);
    margin-top: 0;
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

/* Glass Pill Navbar */
.nav-minimal {
    position: fixed;
    /* Fixed to stay on top */
    top: 1rem;
    /* Reduced top spacing */
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 2rem;
    z-index: 1000;

    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.8rem 2rem;
    border-radius: 999px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: all 0.2s;
    font-weight: 500;
}

.nav-link:hover {
    color: var(--accent-cyan);
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.4);
    transform: translateY(-1px);
}

/* Modal System */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 3.5rem 2.5rem 2.5rem 2.5rem;
    /* Increased top padding to clear button */
    border-radius: 16px;
    max-width: 600px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: auto;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    transition: color 0.2s;
    z-index: 10;
}

.modal-close:hover {
    color: var(--accent-cyan);
}

#modal-body h2 {
    color: var(--accent-cyan);
    margin-top: 0;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
}

#modal-body h3 {
    color: var(--text-primary);
    font-size: 1.2rem;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
    display: inline-block;
}

#modal-body p,
#modal-body ul {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 1rem;
}

#modal-body li {
    margin-bottom: 0.5rem;
}

/* --- FEEDBACK FORM & FOOTER --- */
.form-container {
    max-width: 600px;
    margin: 0 auto;
}

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

.form-control {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    padding: 1rem;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    border-radius: 4px;
    /* Minimal radius */
    transition: all 0.3s;
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-cyan);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.2);
    background: rgba(0, 240, 255, 0.05);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

/* Social Footer */
.social-footer {
    border-top: 1px solid var(--border-color);
    padding: 0.5rem 0 0.5rem;
    text-align: center;
    margin-top: 0.5rem;
}

.dev-profile {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.dev-name {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: var(--text-primary);
    letter-spacing: 0.05em;
    font-weight: 700;
}

.social-links {
    display: flex;
    gap: 1.5rem;
    margin-top: 1rem;
    justify-content: center;
}

.social-icon {
    color: var(--text-secondary);
    font-size: 1.5rem;
    /* Icon size */
    transition: all 0.2s;
    display: flex;
    /* Fix alignment if using SVG */
    align-items: center;
    text-decoration: none;
}

.social-icon:hover {
    color: var(--accent-cyan);
    transform: translateY(-2px);
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
}

#feedback {
    padding-bottom: 2rem;
}


.copyright {
    margin-top: 2rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-family: var(--font-mono);
}