:root {
  --bg-dark: #121212;
  --bg-radial-red: #3b0507;
  --sidebar-bg: #181818;
  --accent-red: #e50914;
  --text-main: #f1f1f1;
  --text-muted: #aaaaaa;
  --user-msg-bg: #262626;
  --bot-msg-bg: #1e1e1e;
  --border-color: #2a2a2a;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
  background: radial-gradient(circle at 50% 100%, var(--bg-radial-red) 0%, var(--bg-dark) 75%);
  color: var(--text-main);
  height: 100vh;
  overflow: hidden;
}

.app-container {
  display: flex;
  height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 260px;
  background-color: var(--sidebar-bg);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  padding: 16px;
}

.sidebar-header {
  margin-bottom: 20px;
}

.sidebar-logo {
  max-width: 140px;
  height: auto;
  display: block;
}

.new-chat-btn {
  background-color: transparent;
  border: 1px solid var(--accent-red);
  color: #ffffff;
  padding: 10px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s;
  text-align: left;
  margin-bottom: 20px;
}

.new-chat-btn:hover {
  background-color: var(--accent-red);
}

.history-list {
  flex: 1;
  overflow-y: auto;
}

.history-item {
  padding: 10px;
  border-radius: 6px;
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

.history-item:hover, .history-item.active {
  background-color: #252525;
  color: var(--text-main);
}

/* Main Area */
.chat-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
}

.top-header {
  height: 60px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  padding: 0 24px;
  background: rgba(18, 18, 18, 0.8);
  backdrop-filter: blur(10px);
}

.top-header h1 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.messages-container {
  flex: 1;
  overflow-y: auto;
  padding: 24px 15%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.message {
  max-width: 80%;
  padding: 14px 18px;
  border-radius: 12px;
  line-height: 1.5;
  font-size: 15px;
}

.message.user {
  align-self: flex-end;
  background-color: var(--user-msg-bg);
  border: 1px solid var(--border-color);
}

.message.bot {
  align-self: flex-start;
  background-color: var(--bot-msg-bg);
  border-left: 3px solid var(--accent-red);
}

/* Input Bar */
.input-container {
  padding: 20px 15%;
  background: transparent;
}

#chatForm {
  display: flex;
  background-color: #1a1a1a;
  border: 1px solid #333333;
  border-radius: 24px;
  padding: 8px 16px;
  align-items: center;
}

#chatForm:focus-within {
  border-color: var(--accent-red);
}

textarea {
  flex: 1;
  background: transparent;
  border: none;
  color: #fff;
  outline: none;
  resize: none;
  font-size: 15px;
  max-height: 120px;
}

#sendBtn {
  background: var(--accent-red);
  border: none;
  color: white;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-left: 8px;
}
