/* public/chat.css */

.chat-app {
  height: 100vh;
  width: 100vw;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 10;
  background: linear-gradient(180deg, rgba(10,14,26,0.9) 0%, rgba(5,7,17,0.9) 100%);
}

.chat-header {
  padding: 60px 20px 20px;
  text-align: center;
  border-bottom: 1px solid rgba(100,181,246,0.1);
  background: rgba(5,7,17,0.6);
  backdrop-filter: blur(10px);
  z-index: 5;
}

.chat-title {
  font-family: var(--font-display);
  color: var(--accent-chat);
  font-size: 2rem;
  font-style: italic;
  font-weight: 400;
  margin-bottom: 4px;
}

.chat-subtitle {
  font-family: var(--font-body);
  color: var(--text-secondary);
  font-size: 0.8rem;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.chat-container {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  scroll-behavior: smooth;
  display: flex;
  flex-direction: column;
}

.chat-messages {
  max-width: 600px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 20px;
}

/* ── Chat Bubbles ── */
.message {
  max-width: 80%;
  padding: 12px 16px;
  border-radius: 18px;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
  opacity: 0;
  transform: translateY(20px);
  animation: message-in 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
  position: relative;
}

@keyframes message-in {
  to { opacity: 1; transform: translateY(0); }
}

.msg-me {
  align-self: flex-end;
  background: linear-gradient(135deg, rgba(100,181,246,0.2) 0%, rgba(100,181,246,0.1) 100%);
  border: 1px solid rgba(100,181,246,0.2);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.msg-ruru {
  align-self: flex-start;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,248,220,0.9);
  border-bottom-left-radius: 4px;
}

/* Timestamp */
.msg-time {
  display: block;
  font-size: 0.7rem;
  opacity: 0.5;
  margin-top: 4px;
  text-align: right;
}

.msg-ruru .msg-time {
  text-align: left;
}

/* ── Typing Indicator ── */
.typing {
  display: flex;
  gap: 4px;
  padding: 16px 20px;
  align-self: flex-start;
  background: rgba(255,255,255,0.03);
  border-radius: 18px;
  border-bottom-left-radius: 4px;
  width: fit-content;
}

.typing-dot {
  width: 6px; height: 6px;
  background: rgba(255,248,220,0.5);
  border-radius: 50%;
  animation: typing-bounce 1.4s infinite ease-in-out both;
}

.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes typing-bounce {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1); }
}

/* ── Controls ── */
.chat-controls {
  padding: 20px;
  background: linear-gradient(0deg, rgba(5,7,17,1) 0%, transparent 100%);
  display: flex;
  justify-content: center;
  z-index: 5;
}

.chat-btn {
  background: rgba(100,181,246,0.15);
  border: 1px solid rgba(100,181,246,0.3);
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.9rem;
  padding: 12px 24px;
  border-radius: 24px;
  cursor: pointer;
  transition: all 0.3s;
  letter-spacing: 1px;
}

.chat-btn:hover {
  background: rgba(100,181,246,0.25);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(100,181,246,0.2);
}

.chat-btn:disabled {
  opacity: 0;
  pointer-events: none;
}
