/* Base */
body {
  margin: 0;
  font-family: 'Open Sans', sans-serif;
  background: linear-gradient(135deg, #164e63 0%, #0891b2 50%, #6366f1 100%);
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #fff;
}

/* Chat page container */
.chat-page {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 750px;
  height: 95vh;
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(12px);
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
  overflow: hidden;
}

/* Header */
.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.15);
  background: rgba(22,78,99,0.6);
}

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

.chat-header .logo {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #0891b2);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.3rem;
  box-shadow: 0 0 12px rgba(99,102,241,0.6);
}

.chat-header h1 {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.3rem;
  margin: 0;
}
.chat-header p {
  font-size: 0.8rem;
  opacity: 0.8;
  margin: 0;
}

.status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  opacity: 0.9;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #4caf50;
}
.dot.thinking {
  background: #6366f1;
  animation: pulse 1s infinite;
}
@keyframes pulse {
  0%,100% { transform: scale(1); }
  50% { transform: scale(1.4); }
}

/* Chat area */
.chat-box {
  flex: 1;
  padding: 18px;
  overflow-y: auto;
  font-size: 0.95rem;
}

.welcome {
  text-align: center;
  margin-top: 40px;
}
.welcome-icon {
  font-size: 2rem;
  margin-bottom: 10px;
}
.welcome h2 {
  margin: 6px 0;
  font-weight: 700;
}
.welcome p {
  opacity: 0.8;
  margin-bottom: 20px;
}

.suggestions {
  display: grid;
  gap: 10px;
}
.suggestion {
  padding: 10px;
  border-radius: 10px;
  background: rgba(255,255,255,0.08);
  cursor: pointer;
  transition: all 0.2s;
}
.suggestion:hover {
  background: rgba(99,102,241,0.3);
}

/* Messages */
.message {
  display: flex;
  margin: 8px 0;
}
.message.user {
  justify-content: flex-end;
}
.message.bot {
  justify-content: flex-start;
}

.bubble {
  padding: 12px 15px;
  border-radius: 12px;
  max-width: 75%;
  line-height: 1.5;
  position: relative;
}
.user .bubble {
  background: linear-gradient(135deg, #6366f1, #0891b2);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.bot .bubble {
  background: rgba(255,255,255,0.15);
  color: #fff;
  border-bottom-left-radius: 4px;
}
.error {
  background: rgba(244,67,54,0.85) !important;
}
.copy-btn {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 0.8rem;
  position: absolute;
  top: 6px;
  right: 6px;
  opacity: 0.7;
}
.copy-btn:hover {
  opacity: 1;
}

/* Typing indicator */
.typing {
  display: none;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin: 5px;
}
.typing span {
  width: 8px;
  height: 8px;
  background: #6366f1;
  border-radius: 50%;
  animation: bounce 1s infinite;
}
.typing span:nth-child(2) { animation-delay: 0.2s; }
.typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes bounce {
  0%, 80%, 100% { transform: scale(0.7); }
  40% { transform: scale(1.2); }
}
.typing p {
  font-size: 0.8rem;
  margin-left: 6px;
  opacity: 0.8;
}

/* Input */
.chat-input {
  display: flex;
  padding: 14px;
  border-top: 1px solid rgba(255,255,255,0.15);
  background: rgba(22,78,99,0.6);
  gap: 8px;
}
.chat-input input {
  flex: 1;
  border: none;
  border-radius: 10px;
  padding: 12px;
  background: rgba(255,255,255,0.15);
  color: #fff;
}
.chat-input input::placeholder {
  color: rgba(255,255,255,0.6);
}
.chat-input button {
  padding: 12px 16px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #6366f1, #0891b2);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}
.chat-input button:hover {
  transform: translateY(-2px);
}
