:root{
  --accent: #256C40;
  --accent-soft: #9BBF91;
  --text: #143224;
  --muted: rgba(20, 50, 36, 0.55);
}

*{ box-sizing: border-box; }

body{
  margin: 0;
  font-family: "Inter", sans-serif;
  background: #ffffff;
  min-height: 100vh;
  padding: 16px;
  padding-bottom: 110px; /* bottom-nav үшін орын */
}

body::before{
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 80%, rgba(155,191,145,0.16) 0%, transparent 55%),
    radial-gradient(circle at 80% 20%, rgba(37,108,64,0.10) 0%, transparent 45%);
  pointer-events: none;
  z-index: 0;
}

.chat-container{
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 700px;
  margin: 0px auto 0;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 12px 30px rgba(25,17,42,0.10);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: calc(105vh - 160px);
  /* min-height: 520px; */
}

.chat-header{
  padding: 16px 18px;
  background: linear-gradient(135deg, rgba(155,191,145,0.70), rgba(37,108,64,0.92));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-header-left{
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-avatar{
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.chat-avatar .material-symbols-outlined{
  font-size: 22px;
}

.chat-header-text h2{
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.chat-header-text p{
  margin: 2px 0 0;
  font-size: 13px;
  opacity: 0.95;
}

.chat-messages{
  flex: 1;
  padding: 18px;
  overflow-y: auto;
  background: rgba(155,191,145,0.08);
  min-height: 0; /* flex ішінде overflow дұрыс жұмыс істеуі үшін */
}

.chat-messages::-webkit-scrollbar{ width: 8px; }
.chat-messages::-webkit-scrollbar-thumb{
  background: rgba(20,50,36,0.15);
  border-radius: 10px;
}

.message{
  margin-bottom: 12px;
  padding: 12px 14px;
  border-radius: 18px;
  line-height: 1.5;
  font-size: 14px;
  word-break: break-word;
  max-width: 86%;
}

.ai-message{
  background: rgba(255,255,255,0.92);
  color: var(--text);
  border-bottom-left-radius: 10px;
  border: 1px solid rgba(37,108,64,0.12);
}

.user-message{
  background: linear-gradient(135deg, rgba(37,108,64,0.98), rgba(155,191,145,0.95));
  color: #fff;
  margin-left: auto;
  border-bottom-right-radius: 10px;
  border: 1px solid rgba(255,255,255,0.15);
}

.typing-indicator{
  display: inline-flex;
  gap: 6px;
  align-items: center;
}
.typing-dot{
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(20,50,36,0.6);
  animation: typing 1.2s infinite ease-in-out;
}
.typing-dot:nth-child(2){ animation-delay: .15s; }
.typing-dot:nth-child(3){ animation-delay: .30s; }
@keyframes typing{
  0%, 60%, 100% { transform: translateY(0); opacity: .6; }
  30% { transform: translateY(-4px); opacity: 1; }
}

.chat-input{
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  background: #fff;
  border-top: 1px solid rgba(37,108,64,0.12);
  align-items: flex-end;
}

.chat-input textarea{
  flex: 1;
  resize: none;
  min-height: 44px;
  max-height: 120px;
  padding: 12px 14px;
  border: 1px solid rgba(20,50,36,0.14);
  border-radius: 14px;
  outline: none;
  font-size: 14px;
  background: #fff;
}

.chat-input textarea:focus{
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(37,108,64,0.10);
}

#sendBtn{
  flex-shrink: 0;
  border: none;
  background: var(--accent);
  color: #fff;
  padding: 12px 14px;
  border-radius: 14px;
  cursor: pointer;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(37,108,64,0.18);
}

#sendBtn:hover{
  background: #1e5733;
}

#chatHint{
  padding: 0 16px 14px;
  color: var(--muted);
  font-size: 12px;
}

/* Bottom Navigation (осы бетке керек) */
.bottom-nav{
  position: fixed;
  bottom: 12px;
  width: 88%;
  height: 64px;
  max-width: 420px;
  left: 50%;
  transform: translateX(-50%);
  background: white;
  display: flex;
  justify-content: space-around;
  align-items: center;
  box-shadow: 0 -4px 20px rgba(20,50,36,0.12);
  border-radius: 20px;
  border: 1px solid rgba(37,108,64,0.08);
}

.bottom-nav a{
  text-decoration: none;
  color: var(--accent);
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 12px;
}

.bottom-nav a.active{
  font-weight: 600;
}

