:root {
  --primary: #86b7b7;
  --source: #86b7b7;
  --bg-dark: #344f4d;
  --bg-soft: #4d6d69;
  --glass-bg: rgba(134, 183, 183, 0.12);
  --glass-bg-strong: rgba(134, 183, 183, 0.2);
  --glass-border: rgba(134, 183, 183, 0.35);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Outfit", sans-serif;
}

body {
  background: radial-gradient(circle at 20% 20%, #557a75 0%, transparent 45%),
    linear-gradient(135deg, #263e3c 0%, #344f4d 55%, #4d6d69 100%);
  color: #fff;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.chat-container {
  width: 90%;
  max-width: 500px;
  height: 89vh;
  background: linear-gradient(160deg, var(--glass-bg-strong) 0%, var(--glass-bg) 100%);
  backdrop-filter: blur(22px) saturate(135%);
  border: 1px solid var(--glass-border);
  border-radius: 32px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 35px 80px -22px rgba(13, 23, 22, 0.7);
  position: relative;
  margin-bottom: 50px;
}

.chat-header {
  padding: 25px;
  border-bottom: 1px solid rgba(134, 183, 183, 0.28);
  text-align: center;
  background: rgba(255, 255, 255, 0.03);
}

.chat-header h1 {
  font-size: 1.8rem;
  color: var(--primary);
  text-shadow: 0 0 18px rgba(134, 183, 183, 0.28);
  letter-spacing: 1px;
}

.chat-header p {
  font-size: 0.85rem;
  opacity: 0.7;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.chat-messages::-webkit-scrollbar {
  width: 4px;
}

.chat-messages::-webkit-scrollbar-thumb {
  background: rgba(134, 183, 183, 0.45);
  border-radius: 10px;
}

.message {
  max-width: 85%;
  padding: 14px 20px;
  border-radius: 20px;
  font-size: 0.95rem;
  line-height: 1.6;
  animation: slideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.message.bot {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(134, 183, 183, 0.2);
  border-bottom-left-radius: 4px;
}

.message.user {
  align-self: flex-end;
  background: linear-gradient(135deg, #86b7b7 0%, #6ca0a0 100%);
  color: #1f3432;
  font-weight: 600;
  border-bottom-right-radius: 4px;
  box-shadow: 0 10px 22px -7px rgba(24, 42, 40, 0.55);
}

.chat-input {
  padding: 25px;
  border-top: 1px solid rgba(134, 183, 183, 0.28);
  display: flex;
  gap: 12px;
  background: rgba(255, 255, 255, 0.03);
}

input {
  flex: 1;
  background: rgba(14, 24, 23, 0.38);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 14px 20px;
  color: #fff;
  outline: none;
  transition: all 0.3s;
}

input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(134, 183, 183, 0.22);
}

button {
  background: linear-gradient(135deg, #86b7b7 0%, #6ca0a0 100%);
  border: none;
  border-radius: 16px;
  padding: 0 24px;
  color: #1b302e;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px -4px rgba(25, 45, 43, 0.6);
}

.source-tag {
  font-size: 0.75rem;
  color: var(--source);
  opacity: 0.6;
  margin-top: 8px;
  display: block;
  text-align: right;
  font-weight: 600;
}

.typing {
  font-style: italic;
  opacity: 0.6;
  font-size: 0.8rem;
}

.thought-time {
  font-size: 0.75rem;
  color: #c5d6d6;
  font-style: italic;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(134, 183, 183, 0.2);
  padding-bottom: 4px;
}
