* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  outline: none !important;
  -webkit-tap-highlight-color: transparent !important;
}

*:focus, *:active {
  outline: none !important;
  box-shadow: none !important;
}

:root {
  --davys-gray: #58525C;
  --black-bean: #350B15;
  --misty-rose: #E4D1D0;
  --raisin-black: #26212A;
  --rich-black: #14151D;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--rich-black);
  color: var(--misty-rose);
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* ===================== MENU ===================== */
.menu-wrapper {
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 1000;
}

.menu-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--raisin-black);
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: background 0.3s;
}

.menu-btn:hover {
  background: var(--davys-gray);
}

.menu-btn span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--misty-rose);
  border-radius: 2px;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 52px;
  left: 0;
  background: var(--raisin-black);
  border-radius: 12px;
  overflow: hidden;
  min-width: 180px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.5);
  flex-direction: column;
}

.dropdown-menu.open {
  display: flex;
}

.dropdown-item {
  padding: 12px 18px;
  color: var(--misty-rose);
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  font-size: 0.95rem;
  text-decoration: none;
  transition: background 0.2s;
  display: block;
}

.dropdown-item:hover {
  background: var(--davys-gray);
}

/* ===================== HERO ===================== */
.hero-section {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transition: opacity 0.4s;
}

.hero-section.hidden {
  opacity: 0;
  pointer-events: none;
}

.hero-text {
  font-size: clamp(1.4rem, 4vw, 2rem);
  color: var(--misty-rose);
  text-align: center;
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* ===================== CHAT AREA ===================== */
.chat-area {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 80px;
  overflow-y: auto;
  padding: 80px 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-behavior: smooth;
}

.chat-area::-webkit-scrollbar {
  width: 4px;
}
.chat-area::-webkit-scrollbar-track {
  background: transparent;
}
.chat-area::-webkit-scrollbar-thumb {
  background: var(--davys-gray);
  border-radius: 4px;
}

/* ===================== MESSAGES ===================== */
.message {
  max-width: 75%;
  padding: 12px 16px;
  border-radius: 18px;
  font-size: 0.95rem;
  line-height: 1.6;
  animation: msgIn 0.25s ease;
}

@keyframes msgIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.message.user {
  background: var(--davys-gray);
  color: var(--misty-rose);
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

[dir="ltr"] .message.user {
  align-self: flex-end;
  border-bottom-right-radius: 4px;
  border-bottom-left-radius: 18px;
}

.message.bot {
  background: var(--raisin-black);
  color: var(--misty-rose);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

[dir="ltr"] .message.bot {
  align-self: flex-start;
  border-bottom-left-radius: 4px;
  border-bottom-right-radius: 18px;
}

.message a {
  color: #c89090;
  word-break: break-all;
}

/* Support button inside messages */
.support-link-btn {
  display: inline-block;
  margin-top: 10px;
  padding: 8px 16px;
  background: linear-gradient(135deg, var(--black-bean), #8B1538);
  color: var(--misty-rose) !important;
  border-radius: 20px;
  text-decoration: none;
  font-size: 0.9rem;
  cursor: pointer;
}

/* ===================== SUGGESTIONS ===================== */
.suggestions-box {
  position: fixed;
  bottom: 80px;
  left: 0;
  right: 0;
  max-height: 220px;
  overflow-y: auto;
  background: var(--raisin-black);
  border-top: 1px solid var(--davys-gray);
  z-index: 500;
  display: none;
  flex-direction: column;
}

.suggestions-box.visible {
  display: flex;
}

.suggestion-item {
  padding: 12px 20px;
  cursor: pointer;
  font-size: 0.92rem;
  color: var(--misty-rose);
  border-bottom: 1px solid rgba(88,82,92,0.3);
  transition: background 0.2s;
}

.suggestion-item:hover {
  background: var(--davys-gray);
}

/* ===================== INPUT BAR ===================== */
.input-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 72px;
  background: var(--raisin-black);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border-top: 1px solid rgba(88,82,92,0.4);
  z-index: 600;
}

.chat-input {
  flex: 1;
  background: var(--rich-black);
  color: var(--misty-rose);
  border: 1px solid var(--davys-gray) !important;
  border-radius: 24px;
  padding: 12px 18px;
  font-size: 0.95rem;
  transition: border-color 0.3s;
}

.chat-input:focus {
  border-color: var(--misty-rose) !important;
}

.chat-input::placeholder {
  color: rgba(228, 209, 208, 0.4);
}

.send-btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--black-bean), #8B1538);
  border: none;
  color: var(--misty-rose);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.2s, opacity 0.2s;
}

.send-btn:hover {
  transform: scale(1.08);
  opacity: 0.9;
}

.send-btn svg {
  width: 20px;
  height: 20px;
}

/* ===================== RTL/LTR ===================== */
[dir="ltr"] .menu-wrapper {
  left: auto;
  right: 16px;
}

[dir="ltr"] .dropdown-menu {
  left: auto;
  right: 0;
}

[dir="ltr"] .dropdown-item {
  text-align: right;
}

[dir="ltr"] .chat-input {
  direction: ltr;
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 600px) {
  .message {
    max-width: 88%;
    font-size: 0.9rem;
  }
}
