* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg-dark: #202124;
  --bg-panel: #2a2b30;
  --bg-header: #050505;
  --accent: #10b981;
  --accent-soft: #34d399;
  --text-main: #f9fafb;
  --text-muted: #9ca3af;
  --border-subtle: #27272f;
  --vh: 1vh; /* klavye için dinamik yükseklik */
}


html,
body {
  height: 100%;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: #000;
  color: var(--text-main);
}

/* Kök layout */

.app-root {
  display: flex;
  flex-direction: column;
  /* visualViewport ile güncellenecek */
  height: calc(var(--vh, 1vh) * 100);
  max-height: 100vh;
  overflow: hidden;
}


/* Sol menü */

.sidebar {
  width: 260px;
  background: var(--bg-sidebar);
  color: var(--text-main);
  display: flex;
  flex-direction: column;
  border-right: 1px solid #27272f;
}

.sidebar-header {
  padding: 20px 18px 12px;
}

.logo-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
}

.brand-tagline {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Yeni sohbet butonu */

.new-chat-btn {
  margin: 16px 14px;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid #3f3f46;
  background: transparent;
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease,
    transform 0.06s ease;
}

.new-chat-btn:hover {
  background: #18181b;
  border-color: var(--accent-soft);
}

.new-chat-btn:active {
  transform: scale(0.97);
}

.new-chat-icon {
  font-size: 1.1rem;
}

/* Sağ panel */

.main-panel {
  flex: 1;
  background: var(--bg-dark);
  display: flex;
  flex-direction: column;
  position: relative;
}

.top-border {
  height: 3px;
  background: #a855f7;
}

/* Chat alanı */

.chat-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 24px 40px 16px;
  position: relative;
}

/* Hoşgeldiniz banner */

.welcome-banner {
  position: absolute;
  top: 18%;
  left: 50%;
  transform: translateX(-50%);
  font-size: 2.25rem;
  font-weight: 700;
  text-align: center;
  color: #ffffff;
}

/* Mesaj listesi */

.messages {
  flex: 1;
  overflow-y: auto;
  padding-right: 8px;
  margin-top: 8px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.messages::-webkit-scrollbar {
  width: 6px;
}
.messages::-webkit-scrollbar-thumb {
  background: #3f3f46;
  border-radius: 999px;
}

/* Baloncuklar */

.message {
  max-width: 70%;
  padding: 10px 14px;
  border-radius: 16px;
  white-space: pre-wrap;
  line-height: 1.4;
  font-size: 0.95rem;
}

.message.user {
  align-self: flex-end;
  background: var(--accent);
  color: #022c22;
  border-bottom-right-radius: 4px;
}

.message.bot {
  align-self: flex-start;
  background: var(--bg-panel);
  border: 1px solid #3f3f46;
  border-bottom-left-radius: 4px;
}

.message.system {
  align-self: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Alt giriş barı */

.input-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 8px;
  border-top: 1px solid #3f3f46;
}

.input-box {
  flex: 1;
  resize: none;
  padding: 10px 14px;
  border-radius: 999px;
  border: none;
  font-size: 0.95rem;
  outline: none;
  background: #f9fafb;
  color: #111827;
}

.input-box::placeholder {
  color: #6b7280;
}

.round-btn {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: none;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.08s ease,
    background 0.1s ease;
  color: white;
}

.send-btn {
  background: var(--accent);
}
.send-btn:hover {
  background: var(--accent-soft);
}
.send-btn:active {
  transform: scale(0.96);
  box-shadow: none;
}

.voice-btn {
  background: #15803d;
}
.voice-btn:hover {
  background: #16a34a;
}
.voice-btn:active {
  transform: scale(0.96);
  box-shadow: none;
}

.btn-icon {
  width: 20px;
  height: 20px;
}

/* Mobil uyum */

@media (max-width: 900px) {
  .app-root {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    border-right: none;
    border-bottom: 1px solid #27272f;
  }

  .sidebar-header {
    padding: 10px 14px;
  }

  .new-chat-btn {
    margin: 0 10px 0 0;
  }

  .chat-wrapper {
    padding: 16px 12px 10px;
  }

  .welcome-banner {
    font-size: 1.6rem;
    top: 14%;
    padding: 0 16px;
  }

  .message {
    max-width: 82%;
    font-size: 0.9rem;
  }

  .input-box {
    font-size: 0.9rem;
  }
}
