/* START Core Site */
:root {
    --bg-color: #002200; /* Darker green for depth */
    --accent-green: #006600;
    --terminal-text: #ffffff;
}

body {
    background-color: var(--accent-green);
    color: var(--terminal-text);
    font-family: 'Courier New', Courier, monospace;
    margin: 0;
    line-height: 1.6;
}

header {
    padding: 2rem;
    text-align: center;
    border-bottom: 1px solid white;
}

#logo {
    font-size: 2.5rem;
    font-weight: bold;
    letter-spacing: 5px;
    cursor: default;
}

/* Ensure secret-x stays white even on hover */
#secret-x {
    cursor: default; /* Doesn't look clickable to strangers */
    color: inherit;
    text-decoration: none;
}

/* START HUD Console Styling (login console) */
#terminal-overlay {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 450px;
    height: 300px;
    background: #000000;
    border: 1px solid #ffffff;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
    z-index: 10000;
    padding: 15px;
    flex-direction: column;
    font-family: 'Fira Code', monospace;
    font-size: 0.85rem;
}

#term-output {
    flex-grow: 1;
    overflow-y: auto;
    color: #ffffff;
    margin-bottom: 10px;
}

.input-line {
    display: flex;
    border-top: 1px solid #333;
    padding-top: 5px;
}

#term-input {
    background: transparent;
    border: none;
    color: #ffffff;
    outline: none;
    width: 100%;
    padding-left: 10px;
}

.cmd-echo { color: #555; }
/* END HUD Console Styling (login console) */
/* END Core Site */
/* START Lab */
.pulsing {
    animation: pulse-green 1s infinite;
    color: #00ff00;
}

@keyframes pulse-green {
    0% { opacity: 1; }
    50% { opacity: 0.3; }
    100% { opacity: 1; }
}

.message.model .msg-body pre {
    background: #000;
    border: 1px solid #fff;
    padding: 1rem;
    overflow-x: auto;
}

.message.model .msg-body code {
    color: #00ff00;
}

.lab-nav {
    display: flex;
    justify-content: center;
    gap: 2rem;
    padding: 1rem;
    border-bottom: 1px solid white;
}
/* END Lab */
/* START Terminal Updates */
.err-text { 
    color: #ff4444; 
    font-weight: bold;
    margin-top: 5px;
}

.success-text { 
    color: #00ff00; 
    font-weight: bold;
    margin-top: 5px;
}

#term-input {
    background: transparent;
    border: none;
    color: #ffffff;
    outline: none;
    width: 100%;
    padding-left: 10px;
    font-family: 'Fira Code', monospace;
}

/* Ensure the prompt looks consistent */
.input-line::before {
    content: ">";
    color: #ffffff;
    padding-right: 5px;
}
/* END Terminal Updates */
/* START Sleek Nav */
.sleek-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 40px;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-brand { font-weight: bold; letter-spacing: 2px; color: #fff; }

.nav-links a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    margin-left: 30px;
    font-size: 0.8rem;
    transition: 0.3s;
}

.nav-links a.active, .nav-links a:hover { color: #fff; }

/* Lab Layout */
.lab-wrapper {
    max-width: 1000px;
    margin: 20px auto;
    height: calc(100vh - 120px);
    display: flex;
    flex-direction: column;
}

#chat-window {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.lab-controls {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    background: #004400; /* Darker green contrast */
    font-size: 0.7rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-console {
    background: transparent;
    border: 1px solid #fff;
    color: #fff;
    padding: 4px 12px;
    font-family: 'Fira Code', monospace;
    cursor: pointer;
    font-size: 0.65rem;
    margin-left: 10px;
}

.btn-console.highlight:hover { background: #fff; color: #006600; }

.input-container {
    display: flex;
    margin-top: 10px;
    background: #000;
    border: 1px solid #fff;
}

#user-input {
    flex-grow: 1;
    background: transparent;
    color: #fff;
    border: none;
    padding: 15px;
    resize: none;
    font-family: 'Fira Code', monospace;
    outline: none;
}
/* END Sleek Nav */
/* START Lab Update */
/* Message Styling */
.message {
    margin-bottom: 25px;
    padding: 15px;
    border-left: 2px solid rgba(255, 255, 255, 0.1);
}

.ai-msg { background: rgba(0, 102, 0, 0.1); }

.msg-header {
    font-size: 0.65rem;
    font-weight: bold;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 8px;
    letter-spacing: 1px;
}

/* Markdown Specifics */
.msg-body p { margin: 0 0 10px 0; font-size: 0.9rem; }

.msg-body code {
    background: #000;
    color: #00ff00;
    padding: 2px 5px;
    font-family: 'Fira Code', monospace;
    font-size: 0.85rem;
}

.msg-body pre {
    background: #000;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 15px;
    overflow-x: auto;
    margin: 15px 0;
}

.msg-body pre code {
    background: none;
    padding: 0;
    color: #ffffff;
}

.code-wrapper {
    position: relative;
    margin: 15px 0;
}

.copy-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    font-size: 0.6rem;
    padding: 2px 8px;
    cursor: pointer;
    font-family: 'Fira Code', monospace;
    z-index: 10;
}

.copy-btn:hover {
    background: #fff;
    color: #006600;
}

.msg-body pre {
    margin: 0; /* Let code-wrapper handle margins */
}
/* END Lab Update */
/* START Research Update */
#loading-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 20, 0, 0.95);
    z-index: 20000;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Fira Code', monospace;
}

.pulse-text {
    font-size: 1.5rem;
    color: #fff;
    animation: pulse 1.5s infinite;
}

.sub-text {
    color: #00ff00;
    font-size: 0.8rem;
    text-align: center;
    margin-top: 10px;
}
/* END Research Update */
/* START Review Update */
.review-wrapper {
    max-width: 900px;
    margin: 20px auto;
    padding: 0 20px;
}

.review-header, .editor-container {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
}

.review-header label, .editor-container label {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 5px;
}

.review-title-input {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid #fff;
    color: #fff;
    padding: 10px;
    font-family: 'Fira Code', monospace;
    font-size: 1.2rem;
}

.review-textarea {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid #fff;
    color: #fff;
    padding: 20px;
    height: 500px;
    font-family: 'Fira Code', monospace;
    line-height: 1.6;
    resize: vertical;
}

.review-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
}

.btn-publish {
    background: #fff;
    color: #006600;
    border: none;
    padding: 12px 30px;
    font-family: 'Fira Code', monospace;
    font-weight: bold;
    cursor: pointer;
}

.warning-text { font-size: 0.65rem; color: #ff4444; }
/* END Review Update */
/* START Blog Update */
.blog-feed {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
}

.blog-entry {
    margin-bottom: 60px;
}

.entry-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.4);
    font-family: 'Fira Code', monospace;
}

.entry-title {
    font-size: 1.8rem;
    margin: 10px 0 20px 0;
    color: #fff;
}

/* Markdown Formatting for Blog */
.markdown-body p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.9);
}

.markdown-body h1, .markdown-body h2, .markdown-body h3 {
    color: #00ff00; /* Neon headers for the 3 pillars */
    margin-top: 2rem;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.markdown-body code {
    background: rgba(0, 0, 0, 0.4);
    color: #00ff00;
    padding: 2px 6px;
    font-family: 'Fira Code', monospace;
}

.entry-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    margin-top: 40px;
}

/* Loading Overlay Styling */
#loading-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 30, 0, 0.98); /* Deep green-black */
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Fira Code', monospace;
}

.glitch-text {
    color: #fff;
    font-size: 1.5rem;
    letter-spacing: 2px;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.3; }
    100% { opacity: 1; }
}

/* Blog Toggle Styling */
.content-wrapper {
    position: relative;
    overflow: hidden;
    transition: max-height 0.5s ease-in-out;
}

.content-wrapper.collapsed {
    max-height: 250px; /* Adjust based on how much you want to show */
}

/* Fade effect at the bottom of collapsed posts */
.content-wrapper.collapsed .read-more-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background: linear-gradient(transparent, #006600);
}

.toggle-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    padding: 5px 15px;
    font-size: 0.7rem;
    font-family: 'Fira Code', monospace;
    cursor: pointer;
    margin-top: 15px;
}

.toggle-btn:hover {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.1);
}
/* END Blog Update */
/* START Research (moved from research.html) */
.research-container { max-width: 800px; margin: 40px auto; }
.staged-card {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.slog-id { color: #fff; font-weight: bold; margin-right: 15px; }
.slog-date { color: rgba(255, 255, 255, 0.4); font-size: 0.75rem; }
.slog-preview { font-size: 0.85rem; margin-top: 5px; color: rgba(255, 255, 255, 0.8); }
.btn-refract {
    background: #fff;
    color: #006600;
    text-decoration: none;
    padding: 10px 20px;
    font-size: 0.75rem;
    font-weight: bold;
}
/* END Research (moved from research.html) */
/* START Blog Refinement */
.entry-admin {
    display: inline-flex;
    gap: 15px;
    margin-left: 20px;
}

.entry-admin a {
    color: rgba(255, 255, 255, 0.4);
    text-decoration: none;
    transition: color 0.2s;
}

.entry-admin a:hover {
    color: #fff;
}

.entry-admin .delete-link:hover {
    color: #ff4444;
}
/* END Blog Refinement */