:root {
    --bg-color: #0d0d0d;
    --panel-bg: #111;
    --text-color: #e0e0e0;
    --accent-color: #00ff41;
    /* Terminal Green */
    --tech-color: #008f11;
    --border-color: #333;
    --hover-bg: #1a1a1a;
    --font-mono: 'Space Mono', monospace;
    --font-sans: 'Inter', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-mono);
    height: 100vh;
    overflow: hidden;
    /* Prevent body scroll if content fits */
}

/* Split Container */
.split-container {
    display: grid;
    grid-template-columns: 350px 1fr;
    height: 100vh;
    width: 100vw;
}

/* Left Panel: File List */
.file-pane {
    background-color: var(--panel-bg);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    overflow-y: auto;
}

.pane-header {
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

.brand {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
    letter-spacing: -0.05em;
}

.directory {
    font-size: 0.8rem;
    opacity: 0.6;
}

.file-list {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.file-item {
    padding: 0.75rem 1rem;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    border-radius: 4px;
}

.file-item:hover {
    background-color: var(--hover-bg);
    border-color: var(--border-color);
    transform: translateX(4px);
}

.file-item.active {
    background-color: var(--hover-bg);
    border-color: var(--accent-color);
    color: var(--accent-color);
    font-weight: 700;
}

.file-ext {
    opacity: 0.5;
    font-size: 0.8rem;
}

.pane-footer {
    margin-top: 2rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
    font-size: 0.8rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.return-link {
    color: var(--text-color);
    text-decoration: none;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.return-link:hover {
    opacity: 1;
    color: var(--accent-color);
    text-decoration: underline;
}

.sys-status {
    color: var(--accent-color);
    animation: pulse 2s infinite;
}

/* Right Panel: Preview */
.preview-pane {
    background-color: var(--bg-color);
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow-y: auto;
    /* Allow scroll if content is long */
}

/* Empty State */
.empty-state {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    opacity: 0.5;
    pointer-events: none;
    /* Let clicks pass through if needed */
}

.blink-cursor {
    font-size: 3rem;
    animation: blink 1s step-end infinite;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

/* Content State */
.content-wrapper {
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
    transition: opacity 0.3s ease;
    /* Fade in effect */
}

.project-header {
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 1rem;
}

.meta-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    opacity: 0.7;
}

.p-id {
    font-family: var(--font-mono);
}

.p-title {
    font-family: var(--font-sans);
    font-size: 3.5rem;
    /* Big impact */
    font-weight: 800;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: -0.03em;
}

.project-body {
    font-family: var(--font-sans);
    /* Easier reading for body text */
}

.tech-stack {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.tech-tag {
    background-color: rgba(0, 255, 65, 0.1);
    color: var(--accent-color);
    padding: 0.2rem 0.6rem;
    font-size: 0.8rem;
    border: 1px solid var(--tech-color);
    font-family: var(--font-mono);
}

.description {
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: 3rem;
    max-width: 600px;
}

.launch-btn {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    background-color: transparent;
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
    padding: 1rem 2rem;
    font-family: var(--font-mono);
    font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
    transition: all 0.2s ease;
}

.launch-btn:hover {
    background-color: var(--accent-color);
    color: black;
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.4);
}

.arrow {
    transition: transform 0.2s ease;
}

.launch-btn:hover .arrow {
    transform: translateX(5px);
}

/* Launch Message */
.launch-message {
    margin-top: 2rem;
    padding: 1rem;
    border-left: 3px solid var(--accent-color);
    background-color: rgba(0, 255, 65, 0.05);
    animation: fadeSlideIn 0.3s ease;
}

.launch-text {
    font-family: var(--font-mono);
    color: var(--accent-color);
    font-size: 1rem;
    font-weight: 700;
}

@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animations */
@keyframes blink {
    50% {
        opacity: 0;
    }
}

@keyframes pulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }

    100% {
        opacity: 1;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .split-container {
        display: flex;
        flex-direction: column;
        height: auto;
        min-height: 100vh;
        overflow-y: auto;
    }

    body {
        overflow-y: auto;
        /* Enable scroll on mobile */
    }

    .file-pane {
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding: 1rem;
        position: sticky;
        top: 0;
        z-index: 10;
        background-color: var(--panel-bg);
    }

    /* Hide desktop list on mobile */
    .file-list {
        display: none;
    }

    /* Show mobile dropdown */
    .mobile-select-container {
        display: block;
        width: 100%;
    }

    .project-select {
        width: 100%;
        padding: 0.8rem;
        background-color: black;
        color: var(--accent-color);
        border: 1px solid var(--accent-color);
        font-family: var(--font-mono);
        font-size: 1rem;
        outline: none;
        appearance: none;
        /* Remove default arrow */
        background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%2300ff41%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
        background-repeat: no-repeat;
        background-position: right 0.7rem top 50%;
        background-size: 0.65rem auto;
    }

    .pane-header {
        margin-bottom: 1rem;
        padding-bottom: 0.5rem;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .directory {
        display: none;
        /* Too much clutter on mobile */
    }

    .pane-footer {
        display: none;
        /* Hide footer in top pane to save space */
    }

    .preview-pane {
        padding: 1.5rem;
        flex: 1;
        min-height: 60vh;
    }

    .p-title {
        font-size: 2rem;
        word-break: break-word;
        /* Prevent overflow */
    }

    .empty-state {
        position: relative;
        top: 0;
        left: 0;
        transform: none;
        margin-top: 2rem;
    }
}

/* Desktop: Hide Dropdown */
@media (min-width: 769px) {
    .mobile-select-container {
        display: none;
    }
}

/* Ensure options are visible */
option {
    background-color: var(--panel-bg);
    color: var(--text-color);
}