/* LCARS CSS Theme */
@import url('https://fonts.googleapis.com/css2?family=Antonio:wght@400;700&display=swap');

:root {
    --lcars-bg: #050510;
    /* Deep space blue/black */
    --lcars-orange: #FF9900;
    --lcars-purple: #CC99CC;
    --lcars-blue: #9999FF;
    --lcars-beige: #FFCC99;
    --lcars-red: #CC0000;
    --lcars-text: #FFDDAA;
    /* Brighter beige for better contrast */
    /* Beige text is common */
    --lcars-font: 'Antonio', sans-serif;
    --lcars-elbow-width: 150px;
    --lcars-header-height: 80px;
    --lcars-gap: 5px;
}

body {
    background-color: var(--lcars-bg);
    color: var(--lcars-text);
    font-family: var(--lcars-font);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    font-size: 18px;
}

a {
    color: var(--lcars-blue);
    text-decoration: none;
}

a:hover {
    color: var(--lcars-orange);
}

/* LCARS Grid Layout */
.lcars-container {
    display: grid;
    grid-template-columns: var(--lcars-elbow-width) 1fr;
    grid-template-rows: var(--lcars-header-height) 1fr;
    min-height: 100vh;
    /* Allow growth */
    height: auto;
    /* Remove fixed height */
    gap: var(--lcars-gap);
    padding: var(--lcars-gap);
    box-sizing: border-box;
}

/* Header Area (Top Right) */
.lcars-header {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--lcars-orange);
    border-bottom-left-radius: 0;
    /* Remove radius here, handled by main content top-left */
    padding: 0 20px;
    color: #000;
    text-transform: uppercase;
    font-weight: bold;
    font-size: 2em;
    position: relative;
}

/* Make the title clickable and look like part of the interface */
.lcars-header h1 {
    margin: 0;
    font-size: 1.5em;
    letter-spacing: 2px;
    cursor: pointer;
}

.lcars-header h1 a {
    color: #000;
    text-decoration: none;
    display: block;
    width: 100%;
    height: 100%;
}

.lcars-header h1 a:hover {
    color: #333;
}

/* Sidebar (Left) - The "Elbow" Vertical Part */
.lcars-sidebar {
    grid-column: 1;
    grid-row: 1 / span 2;
    display: flex;
    flex-direction: column;
    background-color: transparent;
    /* The elbow shape is built with children */
}

.lcars-elbow {
    height: var(--lcars-header-height);
    background-color: var(--lcars-orange);
    border-bottom-right-radius: 0;
    /* Flat connection */
    margin-bottom: var(--lcars-gap);
    position: relative;
}

/* The Curve is actually in the negative space of the main content */

/* Filler to make the curve look right if needed, but simple border radius often works for the "hockey stick" look */
/* Actually, the classic LCARS elbow is a solid block that turns. 
   Top-Left block (elbow) connects to Top-Right bar.
   Left column continues down.
*/

.lcars-sidebar-content {
    flex-grow: 1;
    background-color: var(--lcars-purple);
    display: flex;
    flex-direction: column;
    padding-top: 20px;
    border-top-right-radius: 20px;
    /* Optional styling */
}

.lcars-nav-item {
    display: block;
    padding: 10px 20px;
    margin-bottom: 5px;
    background-color: var(--lcars-blue);
    color: #000;
    text-align: right;
    text-transform: uppercase;
    font-weight: bold;
    font-size: 1.2em;
    margin-right: 10px;
    /* Indent from the right edge of the bar */
    border-top-left-radius: 15px;
    border-bottom-left-radius: 15px;
    transition: background-color 0.3s;
}

.lcars-nav-item:hover {
    background-color: var(--lcars-beige);
    color: #000;
}

/* Main Content Area */
.lcars-main {
    grid-column: 2;
    grid-row: 2;
    background-color: #000;
    border-top: 5px solid var(--lcars-orange);
    /* Connected to header */
    border-left: 15px solid var(--lcars-purple);
    /* Connected to sidebar */
    border-bottom-left-radius: 30px;
    /* Inner curve matching header/sidebar */
    padding: 20px;
    /* overflow-y: auto; REMOVED for natural scroll */
    position: relative;

    /* Star Trek Data Frame Look */
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.8)),
        repeating-linear-gradient(0deg, transparent, transparent 19px, #111 20px);
}

/* Content Typography */
.lcars-main h1,
.lcars-main h2,
.lcars-main h3 {
    color: var(--lcars-orange);
    text-transform: uppercase;
    font-weight: normal;
    letter-spacing: 1px;
}

.lcars-main p {
    line-height: 1.6;
    margin-bottom: 1.5em;
    max-width: 800px;
    color: var(--lcars-text);
}

/* Article Styling - Consistent Panel Look */
/* Article Styling - Light Panel Look */
.lcars-main article {
    background-color: #e6e6e6;
    /* Light gray/off-white */
    color: #111;
    /* Dark text */
    border-left: 5px solid var(--lcars-blue);
    padding: 20px;
    margin-bottom: 30px;
    border-radius: 0 10px 10px 0;
    position: relative;
}

.lcars-main article:hover {
    background-color: #f2f2f2;
    /* Slightly lighter on hover */
    border-left-color: var(--lcars-orange);
}

.lcars-main article p {
    color: #111;
    /* Ensure paragraph text is dark */
}

.lcars-main article header h1 a {
    color: #000 !important;
    /* Dark title for contrast */
    text-decoration: none;
    font-weight: bold;
    text-shadow: none;
}

.lcars-main article header h1 a:hover {
    color: var(--lcars-blue) !important;
    text-shadow: none;
}

.lcars-main article header p.meta {
    color: #444;
    /* Darker gray for meta text */
    font-size: 0.9em;
    text-transform: uppercase;
    margin-bottom: 10px;
    display: block;
}

/* Override improved-styles.css interference */
/* Override improved-styles.css interference and match light theme */
.blog-index article {
    background: #e6e6e6 !important;
    /* Light gray */
    color: #111 !important;
    /* Dark text */
    box-shadow: none !important;
    border: none !important;
    border-left: 5px solid var(--lcars-blue) !important;
}

.blog-index article:hover {
    background: #f2f2f2 !important;
}

.blog-index article h1 a {
    color: #000 !important;
}

.blog-index article h1 a:hover {
    color: var(--lcars-blue) !important;
}

/* Style the old sidebar to match the light theme if it exists */
aside.sidebar section {
    background: #e6e6e6 !important;
    color: #111 !important;
    border-left: 5px solid var(--lcars-purple) !important;
    padding: 15px !important;
    margin-bottom: 20px !important;
    border-radius: 0 10px 10px 0 !important;
}

aside.sidebar section h1 {
    color: #000 !important;
    border-bottom: 1px solid #999 !important;
}

aside.sidebar a {
    color: #000 !important;
    text-decoration: none;
}

aside.sidebar a:hover {
    color: var(--lcars-blue) !important;
    text-decoration: underline;
}

/* Pagination */
.pagination {
    text-align: center;
    padding: 20px;
    color: var(--lcars-text);
}

.pagination a {
    color: var(--lcars-orange) !important;
    font-weight: bold;
    padding: 0 10px;
}

.pagination a:hover {
    color: var(--lcars-beige) !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .lcars-container {
        grid-template-columns: 60px 1fr;
        grid-template-rows: 60px 1fr;
    }

    :root {
        --lcars-elbow-width: 60px;
        --lcars-header-height: 60px;
    }

    .lcars-header h1 {
        font-size: 1em;
    }

    .lcars-nav-item {
        font-size: 0.9em;
        padding: 10px 5px;
        text-align: center;
        margin-right: 0;
        border-radius: 0;
    }
}