/* fancy-terminal theme - Terminal-styled Pelican theme */
/* Inspired by daita.io with customizable colors */

:root {
    /* Default: Dark terminal theme - override with THEME_COLORS in pelicanconf.py */
    --bg-color: #1a1a1a;
    --terminal-bg: #0d0d0d;
    --text-color: #00ff00;
    --primary-color: #00ff00;
    --accent-color: #00cc00;
    --muted-color: #666666;
    --code-bg: #0a0a0a;
    --link-color: #00ff00;
    --header-bg: #333333;
    --font-family: "SF Mono", "Fira Code", "Monaco", "Inconsolata", "Roboto Mono", monospace;
}

/* Note: body.light-theme class is added when THEME_LIGHT_MODE = True
   Colors are controlled via THEME_COLORS in pelicanconf.py, not here */

* {
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-family);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px 30px;
}

/* Terminal window styling */
.terminal-window {
    background-color: var(--terminal-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    margin-bottom: 30px;
    border: 1px solid var(--muted-color);
    transition: all 0.3s ease;
}

.terminal-window.maximized {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    max-width: 100%;
    width: 100%;
    height: 100vh;
    margin: 0;
    border-radius: 0;
    z-index: 9999;
    overflow-y: auto;
}

.terminal-window.minimized {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.terminal-window.closed {
    opacity: 0.7;
}

.terminal-header {
    background-color: var(--header-bg);
    padding: 10px 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: default;
    user-select: none;
}

.terminal-btn {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    cursor: pointer;
    transition: transform 0.1s ease, opacity 0.2s ease;
    position: relative;
}

.terminal-btn:hover {
    transform: scale(1.15);
}

.terminal-btn:active {
    transform: scale(0.95);
}

/* Button icons on hover */
.terminal-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 8px;
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.2s ease;
    color: rgba(0, 0, 0, 0.5);
}

.terminal-btn:hover::after {
    opacity: 1;
}

.terminal-btn.close::after { content: '×'; font-size: 10px; }
.terminal-btn.minimize::after { content: '−'; font-size: 10px; }
.terminal-btn.maximize::after { content: '+'; font-size: 9px; }

.terminal-btn.close { background-color: #ff5f56; }
.terminal-btn.minimize { background-color: #ffbd2e; }
.terminal-btn.maximize { background-color: #27ca40; }

.terminal-title {
    color: #888;
    font-size: 0.85rem;
    margin-left: 10px;
}

.terminal-body {
    padding: 20px;
}

/* Login message styling */
.login-message {
    color: var(--muted-color);
    margin-bottom: 20px;
    font-size: 0.9rem;
}

/* Command prompt styling */
.prompt {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    margin-bottom: 10px;
}

.prompt-user {
    color: var(--primary-color);
    font-weight: bold;
}

.prompt-at {
    color: var(--muted-color);
}

.prompt-host {
    color: var(--accent-color);
}

.prompt-separator {
    color: var(--muted-color);
}

.prompt-path {
    color: var(--primary-color);
}

.prompt-symbol {
    color: var(--text-color);
    margin-right: 8px;
}

/* Cursor */
.cursor {
    display: inline-block;
    width: 10px;
    height: 1.2em;
    background-color: var(--primary-color);
    animation: blink 1s step-end infinite;
    vertical-align: text-bottom;
    margin-left: 2px;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Command output */
.command-output {
    margin-left: 0;
    margin-bottom: 25px;
    padding-left: 0;
}

/* Links */
a {
    color: var(--link-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Navigation menu styled as ls output */
.nav-menu {
    margin: 20px 0;
}

.nav-item {
    display: block;
    margin: 5px 0;
    font-size: 0.95rem;
}

.nav-item .permissions {
    color: var(--muted-color);
    margin-right: 10px;
}

.nav-item .dirname {
    color: var(--primary-color);
    font-weight: bold;
}

.nav-item .description {
    color: var(--muted-color);
    margin-left: 5px;
}

.nav-item a {
    color: var(--link-color);
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-color);
    font-weight: normal;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}

h1 { font-size: 1.5rem; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.1rem; }

/* Articles list */
.article-list {
    margin: 20px 0;
}

.article-entry {
    margin: 15px 0;
    padding: 10px 0;
    border-bottom: 1px dashed var(--muted-color);
}

.article-entry:last-child {
    border-bottom: none;
}

.article-date {
    color: var(--muted-color);
    font-size: 0.85rem;
    margin-right: 15px;
}

.article-title {
    color: var(--link-color);
}

.article-title:hover {
    text-decoration: underline;
}

.article-meta {
    color: var(--muted-color);
    font-size: 0.85rem;
    margin-top: 5px;
}

.article-summary {
    color: var(--text-color);
    margin-top: 10px;
    font-size: 0.95rem;
}

/* Article content */
.article-content {
    margin-top: 30px;
    line-height: 1.8;
}

.article-content p {
    margin: 1em 0;
}

.article-content img {
    max-width: 100%;
    height: auto;
    margin: 20px 0;
}

/* Code blocks */
code {
    background-color: var(--code-bg);
    padding: 2px 6px;
    border-radius: 3px;
    font-family: var(--font-family);
    font-size: 0.9em;
}

pre {
    background-color: var(--code-bg);
    padding: 15px;
    overflow-x: auto;
    border-radius: 4px;
    font-family: var(--font-family);
    font-size: 0.9rem;
    line-height: 1.5;
}

pre code {
    background: none;
    padding: 0;
}

/* Blockquote */
blockquote {
    border-left: 3px solid var(--primary-color);
    margin: 20px 0;
    padding-left: 20px;
    color: var(--muted-color);
    font-style: italic;
}

/* Footer */
.footer {
    margin-top: 50px;
    padding-top: 20px;
    border-top: 1px dashed var(--muted-color);
    color: var(--muted-color);
    font-size: 0.85rem;
    text-align: center;
}

/* Pagination */
.pagination {
    margin: 30px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.pagination a {
    color: var(--link-color);
}

.pagination .current {
    color: var(--muted-color);
}

/* Tags */
.tag {
    display: inline-block;
    background-color: var(--code-bg);
    color: var(--primary-color);
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 0.85rem;
    margin-right: 5px;
    margin-bottom: 5px;
}

.tag:hover {
    text-decoration: none;
    opacity: 0.8;
}

/* Social links */
.social-links {
    margin: 20px 0;
}

.social-links a {
    margin-right: 15px;
    color: var(--link-color);
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    html {
        font-size: 14px;
    }

    .terminal-header {
        padding: 8px 12px;
    }

    .terminal-body {
        padding: 15px;
    }
}

/* Syntax highlighting - Pygments compatible */
.highlight .hll { background-color: var(--code-bg); }
.highlight .c { color: var(--muted-color); font-style: italic; }
.highlight .k { color: var(--primary-color); font-weight: bold; }
.highlight .o { color: var(--text-color); }
.highlight .cm { color: var(--muted-color); font-style: italic; }
.highlight .cp { color: var(--accent-color); }
.highlight .c1 { color: var(--muted-color); font-style: italic; }
.highlight .cs { color: var(--muted-color); font-style: italic; }
.highlight .gd { color: #ff0000; }
.highlight .ge { font-style: italic; }
.highlight .gr { color: #ff0000; }
.highlight .gh { color: var(--primary-color); font-weight: bold; }
.highlight .gi { color: #00ff00; }
.highlight .go { color: var(--muted-color); }
.highlight .gp { color: var(--primary-color); font-weight: bold; }
.highlight .gs { font-weight: bold; }
.highlight .gu { color: var(--accent-color); font-weight: bold; }
.highlight .gt { color: #ff0000; }
.highlight .kc { color: var(--primary-color); font-weight: bold; }
.highlight .kd { color: var(--primary-color); font-weight: bold; }
.highlight .kn { color: var(--primary-color); font-weight: bold; }
.highlight .kp { color: var(--primary-color); }
.highlight .kr { color: var(--primary-color); font-weight: bold; }
.highlight .kt { color: var(--accent-color); }
.highlight .m { color: var(--accent-color); }
.highlight .s { color: var(--accent-color); }
.highlight .na { color: var(--text-color); }
.highlight .nb { color: var(--primary-color); }
.highlight .nc { color: var(--accent-color); font-weight: bold; }
.highlight .no { color: var(--accent-color); }
.highlight .nd { color: var(--accent-color); }
.highlight .ni { color: var(--text-color); font-weight: bold; }
.highlight .ne { color: var(--accent-color); font-weight: bold; }
.highlight .nf { color: var(--accent-color); }
.highlight .nl { color: var(--text-color); }
.highlight .nn { color: var(--text-color); }
.highlight .nt { color: var(--primary-color); font-weight: bold; }
.highlight .nv { color: var(--text-color); }
.highlight .ow { color: var(--primary-color); font-weight: bold; }
.highlight .w { color: var(--text-color); }
.highlight .mf { color: var(--accent-color); }
.highlight .mh { color: var(--accent-color); }
.highlight .mi { color: var(--accent-color); }
.highlight .mo { color: var(--accent-color); }
.highlight .sb { color: var(--accent-color); }
.highlight .sc { color: var(--accent-color); }
.highlight .sd { color: var(--accent-color); font-style: italic; }
.highlight .s2 { color: var(--accent-color); }
.highlight .se { color: var(--accent-color); font-weight: bold; }
.highlight .sh { color: var(--accent-color); }
.highlight .si { color: var(--accent-color); font-weight: bold; }
.highlight .sx { color: var(--accent-color); }
.highlight .sr { color: var(--accent-color); }
.highlight .s1 { color: var(--accent-color); }
.highlight .ss { color: var(--accent-color); }
.highlight .bp { color: var(--primary-color); }
.highlight .vc { color: var(--text-color); }
.highlight .vg { color: var(--text-color); }
.highlight .vi { color: var(--text-color); }
.highlight .il { color: var(--accent-color); }

