/* Assistant Chat Page */
:root {
  --gold: #d4a84b;
  --gold-light: #e8c87a;
  --navy: #1a2332;
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: "Cairo", sans-serif;
  background: linear-gradient(135deg, #1a2332, #0f1521);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a {
  text-decoration: none;
  color: inherit;
}

.chat-header {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 16px 24px;
}
.chat-header-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.chat-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.chat-brand .icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--gold), #c4903a);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}
.chat-brand h1 {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
}
.chat-brand p {
  font-size: 12px;
  color: #94a3b8;
}
.chat-back {
  color: #94a3b8;
  font-size: 14px;
  transition: color 0.2s;
}
.chat-back:hover {
  color: var(--gold);
}

.chat-container {
  flex: 1;
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  padding: 0 24px;
}

/* Registration */
.reg-overlay {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 0;
}
.reg-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  padding: 40px;
  max-width: 500px;
  width: 100%;
  backdrop-filter: blur(10px);
}
.reg-card h2 {
  color: #fff;
  font-size: 28px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 8px;
}
.reg-card .sub {
  color: #94a3b8;
  text-align: center;
  margin-bottom: 32px;
}
.reg-card label {
  display: block;
  color: #e2e8f0;
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 14px;
}
.reg-card input {
  width: 100%;
  padding: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  color: #fff;
  font-size: 15px;
  outline: none;
  margin-bottom: 16px;
  font-family: "Cairo", sans-serif;
}
.reg-card input:focus {
  border-color: var(--gold);
}
.reg-card input::placeholder {
  color: #64748b;
}
.reg-card .start-btn {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, var(--gold), #c4903a);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  font-family: "Cairo", sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.reg-card .start-btn:hover {
  opacity: 0.9;
}

/* Messages */
.messages-area {
  flex: 1;
  overflow-y: auto;
  padding: 24px 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.msg {
  max-width: 80%;
  padding: 16px 20px;
  border-radius: 16px;
  line-height: 1.7;
  font-size: 15px;
  animation: fadeIn 0.3s;
}
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.msg.bot {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
  border-bottom-right-radius: 4px;
}
.msg.user {
  align-self: flex-end;
  background: linear-gradient(135deg, var(--gold), #c4903a);
  color: #fff;
  border-bottom-left-radius: 4px;
}
.msg.typing .dots {
  display: inline-flex;
  gap: 4px;
}
.msg.typing .dots span {
  width: 8px;
  height: 8px;
  background: #94a3b8;
  border-radius: 50%;
  animation: blink 1.4s infinite;
}
.msg.typing .dots span:nth-child(2) {
  animation-delay: 0.2s;
}
.msg.typing .dots span:nth-child(3) {
  animation-delay: 0.4s;
}
@keyframes blink {
  0%,
  80%,
  100% {
    opacity: 0.3;
  }
  40% {
    opacity: 1;
  }
}

/* Suggestions */
.suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.suggestion-btn {
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #e2e8f0;
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: "Cairo", sans-serif;
}
.suggestion-btn:hover {
  background: rgba(212, 168, 75, 0.2);
  border-color: var(--gold);
  color: var(--gold);
}

/* Input */
.chat-input-bar {
  padding: 16px 0 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.chat-input-wrap {
  display: flex;
  gap: 12px;
  align-items: center;
}
.chat-input-wrap input {
  flex: 1;
  padding: 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  color: #fff;
  font-size: 15px;
  outline: none;
  font-family: "Cairo", sans-serif;
}
.chat-input-wrap input:focus {
  border-color: var(--gold);
}
.chat-input-wrap input::placeholder {
  color: #64748b;
}
.send-btn {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, var(--gold), #c4903a);
  border: none;
  border-radius: 14px;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.send-btn:disabled {
  background: #374151;
  cursor: not-allowed;
}
.question-count {
  text-align: center;
  color: #64748b;
  font-size: 12px;
  margin-top: 8px;
}

.limit-msg {
  text-align: center;
  padding: 16px;
  background: rgba(212, 168, 75, 0.1);
  border: 1px solid rgba(212, 168, 75, 0.3);
  border-radius: 12px;
  color: var(--gold);
  margin-bottom: 16px;
}
.limit-msg a {
  color: var(--gold);
  text-decoration: underline;
}

@media (max-width: 640px) {
  .msg {
    max-width: 90%;
  }
  .reg-card {
    padding: 24px;
  }
}
