/* Configurações Gerais de Resete */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Georgia, 'Times New Roman', serif;
    background: #0f1722;
    color: #e8e3d3;
    line-height: 1.6;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

/* Container Principal */
.container {
    width: 100%;
    max-width: 900px;
    height: 95vh;
    display: flex;
    flex-direction: column;
    padding: 20px;
    background: #0b121c;
    border: 1px solid #3a2f21;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

/* Cabeçalho */
.terminal-header {
    text-align: center;
    padding-bottom: 10px;
}

.terminal-header h2 {
    color: #d4af37;
    font-size: 1.3rem;
    letter-spacing: 2px;
}

.subtitle {
    color: #8b7355;
    font-size: 0.85rem;
    margin-top: 5px;
}

.divider {
    border: 0;
    border-top: 1px solid #3a2f21;
    margin: 12px 0;
}

/* Tela do Terminal / Chat */
.terminal-screen {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    background: #0d1622;
    border: 1px solid #1a2433;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Mensagens */
.system-msg, .user-msg, .loading-msg {
    padding: 14px;
    border-radius: 6px;
    max-width: 90%;
    white-space: pre-wrap;
    font-size: 1.05rem;
}

.system-msg {
    background: #141d2b;
    border-left: 4px solid #d4af37;
    align-self: flex-start;
}

.user-msg {
    background: #1f2d42;
    border-right: 4px solid #8b7355;
    align-self: flex-end;
}

.loading-msg {
    color: #8b7355;
    font-style: italic;
    align-self: flex-start;
}

/* Links e Botões de Texto */
.btn-link {
    background: none;
    border: none;
    color: #d4af37;
    font-family: inherit;
    font-size: 1rem;
    cursor: pointer;
    font-weight: bold;
    padding: 0 5px;
}

.btn-link:hover {
    text-decoration: underline;
    color: #e6c85a;
}

/* Menu de Expansão Dinâmico */
.expansion-menu {
    background: #141d2b;
    border: 1px solid #3a2f21;
    padding: 15px;
    margin-top: 12px;
    border-radius: 6px;
}

.menu-title {
    color: #b8a98a;
    font-size: 0.95rem;
    margin-bottom: 10px;
    font-weight: bold;
}

.grid-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

.grid-options button {
    background: #1c283a;
    border: 1px solid #4a3b29;
    color: #e8e3d3;
    padding: 10px;
    border-radius: 4px;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.grid-options button:hover {
    background: #d4af37;
    color: #0f1722;
    font-weight: bold;
}

/* Área de Entrada */
.input-area {
    margin-top: 15px;
}

.prompt-label {
    color: #8b7355;
    font-size: 0.85rem;
    margin-bottom: 6px;
    font-weight: bold;
}

.input-group {
    display: flex;
    gap: 10px;
}

#user-input {
    flex: 1;
    background: #070c14;
    border: 1px solid #3a2f21;
    color: #e8e3d3;
    padding: 12px;
    border-radius: 6px;
    font-family: inherit;
    font-size: 1rem;
}

#user-input:focus {
    outline: 1px solid #d4af37;
}

#send-btn {
    background: #d4af37;
    color: #0f1722;
    border: none;
    padding: 0 25px;
    border-radius: 6px;
    font-weight: bold;
    font-family: inherit;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
}

#send-btn:hover {
    background: #e6c85a;
}

/* Utilitários */
.hidden {
    display: none !important;
}