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

:root{
  --bg: #0f1724; /* dark navy */
  --card: #0b1220;
  --muted: #9aa4b2;
  --accent: #7c5cff; /* purple */
  --glass: rgba(255,255,255,0.04);
}

html,body{
  height:100%;
}
body{
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  background: linear-gradient(180deg, #081028 0%, #071225 100%);
  color: #e6eef8;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  padding: 48px 24px;
  display:flex;
  justify-content:center;
}

.container{
  width:100%;
  max-width:980px;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: 14px;
  padding: 32px;
  box-shadow: 0 6px 24px rgba(2,6,23,0.6);
}

h1{
  font-size:1.6rem;
  margin-bottom:6px;
  display:flex;
  align-items:center;
  gap:10px;
}

.description{
  color:var(--muted);
  margin-bottom:18px;
  line-height:1.45;
}

/* iframe como card responsivo */
.chat-card{
  width:100%;
  background:var(--card);
  border-radius:10px;
  overflow:hidden;
  border:1px solid rgba(255,255,255,0.03);
}

.chat-card iframe{
  width:100%;
  height:640px;
  border:0;
  display:block;
  background:transparent;
}

/* Pequenas melhorias responsivas */
@media (max-width:640px){
  body{ padding:24px 12px; }
  .container{ padding:20px; }
  h1{ font-size:1.25rem; }
  .chat-card iframe{ height:520px; }
}

/* Acessibilidade */
a:focus, button:focus, iframe:focus{ outline: 3px solid rgba(124,92,255,0.16); outline-offset: 3px; }

/* Utilitários */
.small{ font-size:0.9rem; color:var(--muted); }

/* Fallback fonts e small polished touch */
@supports (font-variation-settings: normal){
  h1{ font-weight:600; }
}

/* mensagens do chat */
.bot-message, .user-message {
  padding: 8px 12px;
  border-radius: 8px;
  margin: 6px 0;
  max-width: 80%;
  word-wrap: break-word;
}
.bot-message {
  background: #1e293b;
  color: #e2e8f0;
  align-self: flex-start;
  padding: 10px 14px;
  border-radius: 14px;
  max-width: 75%;
  font-style: italic;
}
.user-message {
  background: #4f46e5;
  color: #fff;
  align-self: flex-end;
  padding: 10px 14px;
  border-radius: 14px;
  max-width: 75%;
}

.chat-messages{
  display:flex;
  flex-direction:column;
  gap:4px;
  max-height: 400px;
  overflow-y:auto;
  margin-bottom:12px;
}

.chat-form{
  display:flex;
  gap:6px;
}

.chat-form input{
  flex:1;
  padding:8px;
  border-radius:6px;
  border:1px solid #334155;
  background: var(--card);
  color: inherit;
}

.chat-form button{
  padding:8px 16px;
  border:none;
  border-radius:6px;
  background: var(--accent);
  color:#fff;
  cursor:pointer;
}
.chat-form button:hover{ opacity:0.9; }

/* ações pós plano */
.plan-actions{ display:flex; gap:8px; margin-top:16px; flex-wrap:wrap; }
.plan-actions button{ padding:8px 14px; border:none; border-radius:6px; background: var(--accent); color:#fff; cursor:pointer; }
.plan-actions button:hover{ opacity:0.9; }

/* modal */
.modal{ position:fixed; top:0; left:0; width:100%; height:100%; background:rgba(0,0,0,0.6); display:flex; align-items:center; justify-content:center; z-index:1000; opacity:0; visibility:hidden; transition:opacity 0.3s ease, visibility 0.3s ease; }
.modal.hidden{ opacity:0; visibility:hidden; }
.modal.show{ opacity:1; visibility:visible; }
.modal-content{ background:var(--card); padding:24px; border-radius:12px; width:90%; max-width:400px; color:#e6eef8; }
.modal-close{ position:absolute; top:12px; right:18px; font-size:24px; cursor:pointer; }

/* result card for atlas suggestions */
.result-card{ background:#334155; padding:12px 16px; border-radius:10px; margin:8px 0; }
.result-card h3{ margin:0 0 6px; }
.result-card p, .result-card ul{ margin:4px 0; }
