/* Paleta Catppuccin Mocha Oficial */
:root {
    --crust: #11111b;
    --mantle: #181825;
    --base: #1e1e2e;
    --surface0: #313244;
    --surface1: #45475a;
    --text: #cdd6f4;
    --subtext0: #a6adc8;
    
    /* Cores de destaque (Vril, CLI, etc) */
    --mauve: #cba6f7;
    --red: #f38ba8;
    --green: #a6e3a1;
    --blue: #89b4fa;
    --yellow: #f9e2af;
}

@font-face {
    font-family: 'OldEnglish';
    src: url('fonts/OldEnglish.ttf') format('truetype');
    /* Fallback enquanto a fonte não está na pasta */
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background-color: var(--crust);
    color: var(--text);
    font-family: system-ui, -apple-system, sans-serif;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Impede scroll global, rolagem fica nas colunas */
}

/* ================= HEADER & SEARCH BAR ================= */
.top-nav {
    background-color: var(--base);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 1px solid var(--surface0);
}

.logo {
    font-family: 'OldEnglish', serif;
    font-size: 2.5rem;
    color: var(--text);
    cursor: pointer;
}

.omni-bar-container {
    background-color: var(--mantle);
    border: 1px solid var(--surface0);
    border-radius: 20px;
    padding: 0.5rem;
    width: 50%;
    transition: all 0.3s ease;
}

.search-row {
    display: flex;
    gap: 0.5rem;
}

.search-row input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text);
    padding: 0.5rem;
    font-size: 1rem;
    outline: none;
}

.btn-icon {
    background: transparent;
    border: none;
    color: var(--subtext0);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background 0.2s;
}

.btn-icon:hover { background: var(--surface0); }

/* Animação de Expansão do Post Creator */
.post-creator {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.3s ease, margin-top 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.omni-bar-container.expanded {
    border-radius: 12px;
    background-color: var(--surface0);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.omni-bar-container.expanded .post-creator {
    max-height: 400px;
    opacity: 1;
    margin-top: 1rem;
    padding: 0 0.5rem 0.5rem;
}

.post-input, .post-textarea {
    background-color: var(--base);
    border: 1px solid var(--surface1);
    color: var(--text);
    border-radius: 8px;
    padding: 0.8rem;
    outline: none;
}

.post-textarea { resize: vertical; min-height: 100px; }

.post-actions {
    display: flex;
    justify-content: space-between;
}

.btn-submit {
    background-color: var(--mauve);
    color: var(--crust);
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
}

/* ================= GRID DE 3 COLUNAS ================= */
.layout-grid {
    display: grid;
    grid-template-columns: 300px 1fr 300px; /* Esquerda fixa, meio fluido, direita fixa */
    gap: 1.5rem;
    padding: 1.5rem;
    flex: 1;
    overflow: hidden;
}

.layout-grid > * {
    background-color: var(--base);
    border-radius: 16px;
    padding: 1.5rem;
    overflow-y: auto;
    border: 1px solid var(--surface0);
}

/* CLI Estilo Terminal */
.cli-panel { display: flex; flex-direction: column; }
.chat-history { flex: 1; overflow-y: auto; font-family: monospace; font-size: 0.9rem; margin-bottom: 1rem; color: var(--subtext0); }
.chat-history .sys { color: var(--red); }
.cli-input-wrapper { display: flex; align-items: center; gap: 0.5rem; font-family: monospace; }
.prompt-symbol { color: var(--green); animation: blink 1s step-end infinite; }
.cli-input { background: transparent; border: none; color: var(--green); flex: 1; font-family: monospace; outline: none; }

@keyframes blink { 50% { opacity: 0; } }

/* Estilização básica dos Posts */
.post-card {
    background-color: var(--mantle);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border: 1px solid var(--surface0);
}
.post-media 
img.post-media { max-width: 100%; height: auto; border-radius: 8px; margin-top: 1rem; object-fit: contain; }

.tag {
    display: inline-block;
    background-color: var(--surface1);
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.8rem;
    margin-right: 0.5rem;
    margin-top: 1rem;
    color: var(--mauve);
}