/* Configurações de Reset e Cores do Game */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #12181b;
    color: #e2e8f0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    background: linear-gradient(135deg, #1e3a1f, #152b16);
    text-align: center;
    padding: 1.5rem 1rem;
    border-bottom: 3px solid #2e7d32;
}

header h1 { font-size: 1.8rem; color: #4caf50; }
header p { font-size: 0.9rem; color: #a7f3d0; opacity: 0.8; }

/* Grid Responsivo de 3 Colunas para o Jogo */
.game-container {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1.2fr 1fr;
    gap: 20px;
    max-width: 1300px;
    width: 100%;
    margin: 1.5rem auto;
    padding: 0 1rem;
}

@media (max-width: 900px) {
    .game-container { grid-template-columns: 1fr; }
}

/* Painéis de Conteúdo */
.panel {
    background-color: #1e293b;
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.panel h2 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid #334155;
    padding-bottom: 0.5rem;
    color: #38bdf8;
}

/* Barras de Status (HUD) */
.hud-item { margin-bottom: 1.2rem; }
.hud-item label { display: block; font-weight: bold; margin-bottom: 0.4rem; font-size: 0.95rem; }

.bar-bg { background-color: #0f172a; height: 20px; border-radius: 6px; overflow: hidden; }
.bar-fill { height: 100%; width: 0%; transition: width 0.4s ease; }
.cor-producao { background: #38bdf8; }
.cor-sustentabilidade { background: #4caf50; }

/* Caixa do Robô / Personagem */
.bot-box {
    display: flex;
    background: #0f172a;
    padding: 1rem;
    border-radius: 8px;
    align-items: center;
    gap: 12px;
    margin-top: auto;
    border-left: 4px solid #4caf50;
}

#bot-avatar { font-size: 2.5rem; }
.bot-dialogo strong { color: #4caf50; font-size: 0.9rem; }
.bot-dialogo p { font-size: 0.85rem; margin-top: 2px; }

/* --- DESIGN DA ESTUFA VISUAL --- */
.estufa {
    width: 100%;
    height: 250px;
    border-radius: 10px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1rem;
    transition: background 0.5s ease, border 0.5s ease;
}

/* Classes dinâmicas de ambiente */
.estufa-agua { background: linear-gradient(to bottom, #1e3a5f, #1e293b); border: 3px solid #38bdf8; }
.estufa-alerta { background: linear-gradient(to bottom, #7c2d12, #1e293b); border: 3px solid #ea580c; }
.estufa-sustentavel { background: linear-gradient(to bottom, #064e3b, #1e293b); border: 3px solid #10b981; }

.teto-vidro {
    position: absolute;
    top: 0; left: 0; right: 0; height: 35px;
    background: rgba(255,255,255,0.08);
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

.placa-solar {
    background: #0284c7;
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
    text-align: center;
    padding: 4px;
    width: 60%;
    margin: 5px auto 0 auto;
    border-radius: 4px;
}

.terra-canteiro {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    background: #451a03;
    padding: 1rem;
    border-radius: 6px;
}

.vaso {
    background: #7c2d12;
    padding: 0.5rem 0;
    text-align: center;
    border-radius: 4px;
    font-size: 2rem;
}

/* Terminal de Logs */
.terminal {
    background: #090d16;
    margin-top: 15px;
    border-radius: 6px;
    border: 1px solid #1e293b;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.terminal-topo { background: #1e293b; padding: 4px 10px; font-size: 0.75rem; color: #94a3b8; font-family: monospace; }
.terminal-conteudo { padding: 10px; font-family: monospace; font-size: 0.8rem; color: #4ade80; overflow-y: auto; height: 100px; }

/* Botões do Painel de Controle */
.sub-painel { font-size: 0.85rem; color: #94a3b8; margin-bottom: 1rem; }
.botoes-alinhados { display: flex; flex-direction: column; gap: 10px; flex: 1; }

.btn {
    width: 100%;
    padding: 0.9rem;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    text-align: left;
}

.btn-acao { background-color: #334155; color: white; border-left: 5px solid #38bdf8; }
.btn-acao:hover:not(:disabled) { background-color: #475569; }

.btn-upgrade { background-color: #334155; color: white; border-left: 5px solid #a855f7; }
.btn-upgrade:hover:not(:disabled) { background-color: #475569; }

button:disabled { opacity: 0.25; cursor: not-allowed; }

#btn-reiniciar {
    background-color: #ef4444;
    color: white;
    border: none;
    padding: 0.6rem;
    font-weight: bold;
    border-radius: 6px;
    margin-top: 15px;
    cursor: pointer;
}
#btn-reiniciar:hover { background-color: #dc2626; }

escondido { display: none !important; }

footer { text-align: center; padding: 1rem; background-color: #0f172a; font-size: 0.8rem; color: #64748b; }