* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #6c63ff;
  --primary-dark: #5a52d5;
  --primary-light: #8b83ff;
  --secondary-color: #ff6584;
  --bg-dark: #0a0a1a;
  --bg-sidebar: #12122a;
  --bg-main: #1a1a3e;
  --bg-input: #24245a;
  --text-primary: #ffffff;
  --text-secondary: #b8b8d4;
  --text-muted: #8888aa;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --border-radius: 16px;
  --transition: all 0.3s ease;
}

body {
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  height: 100vh;
  overflow: hidden;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark);
}

/* App Container */
.app-container {
  display: flex;
  height: 100vh;
  background: var(--bg-main);
  gap: 0;
}

/* Sidebar */
.sidebar {
  width: 320px;
  min-width: 320px;
  background: var(--bg-sidebar);
  padding: 30px 24px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  overflow-y: auto;
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo i {
  font-size: 32px;
  margin-top: 10px;
  color: var(--primary-color);
  background: rgba(108, 99, 255, 0.15);
  padding: 10px;
  border-radius: 12px;
}

.logo h1 {
  font-size: 28px;
  font-weight: 700;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.subtitle {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 300;
  margin-top: -10px;
  margin-left: 50px;
  text-align: center;
}

.sidebar-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.feature-card {
  background: rgba(255, 255, 255, 0.03);
  padding: 18px 20px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: var(--transition);
  cursor: pointer;
}

.feature-card:hover {
  background: rgba(108, 99, 255, 0.08);
  border-color: var(--primary-color);
  transform: translateX(4px);
}

.feature-card i {
  color: var(--primary-color);
  font-size: 20px;
  margin-bottom: 8px;
}

.feature-card h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.5;
}

.sidebar-footer {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.status-dot {
  width: 8px;
  height: 8px;
  background: #4caf50;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
}

.clear-btn {
  width: 100%;
  padding: 12px;
  background: rgba(255, 101, 132, 0.1);
  color: var(--secondary-color);
  border: 1px solid rgba(255, 101, 132, 0.2);
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  font-family: "Inter", sans-serif;
}

.clear-btn:hover {
  background: rgba(255, 101, 132, 0.2);
  transform: scale(1.02);
}

.clear-btn i {
  margin-right: 8px;
}

/* Main Chat Area */
.chat-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--bg-main);
  position: relative;
}

/* Header */
.chat-header {
  padding: 20px 32px;
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}
.header-info h2 {
  font-size: 20px;
  font-weight: 600;
}

.header-info p {
  color: var(--text-secondary);
  font-size: 14px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.typing-indicator {
  display: none;
  gap: 4px;
  padding: 8px 12px;
  background: rgba(108, 99, 255, 0.1);
  border-radius: 20px;
}

.typing-indicator.active {
  display: flex;
}

.typing-indicator span {
  width: 8px;
  height: 8px;
  background: var(--primary-color);
  border-radius: 50%;
  animation: typing 1.4s infinite both;
}

.typing-indicator span:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typing {
  0%,
  60%,
  100% {
    transform: translateY(0);
  }
  30% {
    transform: translateY(-6px);
  }
}

/* Messages Container */
.messages-container {
  flex: 1;
  overflow-y: auto;
  padding: 24px 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Welcome Message */
.welcome-message {
  text-align: center;
  padding: 40px 20px;
  max-width: 600px;
  margin: 0 auto;
  animation: fadeIn 0.6s ease;
}

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

.welcome-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(
    135deg,
    rgba(108, 99, 255, 0.2),
    rgba(255, 101, 132, 0.2)
  );
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.welcome-icon i {
  font-size: 40px;
  color: var(--primary-color);
}

.welcome-message h3 {
  font-size: 24px;
  margin-bottom: 8px;
}

.welcome-message p {
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.welcome-message ul {
  list-style: none;
  text-align: left;
  margin: 16px 0;
  padding: 0;
}

.welcome-message ul li {
  padding: 8px 0;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.welcome-message ul li:last-child {
  border-bottom: none;
}

.example-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 16px;
}

.chip {
  background: rgba(108, 99, 255, 0.1);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid rgba(108, 99, 255, 0.2);
}

.chip:hover {
  background: rgba(108, 99, 255, 0.2);
  color: var(--text-primary);
  transform: scale(1.05);
}

/* Messages */
.message {
  display: flex;
  gap: 12px;
  max-width: 80%;
  animation: slideIn 0.3s ease;
}

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

.message.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.message.assistant {
  align-self: flex-start;
}

.message-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 16px;
}

.message.assistant .message-avatar {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--primary-dark)
  );
}

.message.user .message-avatar {
  background: linear-gradient(135deg, var(--secondary-color), #ff4d6d);
}

.message-content {
  background: rgba(255, 255, 255, 0.05);
  padding: 14px 18px;
  border-radius: 12px;
  word-wrap: break-word;
  line-height: 1.6;
}

.message.user .message-content {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--primary-dark)
  );
  border-bottom-right-radius: 4px;
}

.message.assistant .message-content {
  border-bottom-left-radius: 4px;
}

.message-content p {
  margin-bottom: 8px;
}

.message-content p:last-child {
  margin-bottom: 0;
}

.message-content ul,
.message-content ol {
  margin: 8px 0;
  padding-left: 20px;
}

.message-content h1,
.message-content h2,
.message-content h3 {
  margin: 12px 0 8px;
}

.message-content strong {
  color: var(--primary-light);
}

.message-content code {
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
}

.message-time {
  font-size: 11px;
  color: white;
  margin-top: 4px;
  opacity: 0.7;
}

.message.user .message-time {
  text-align: right;
}

/* Blog Content Styling */
.message-content.blog-content {
  background: rgba(108, 99, 255, 0.05);
  border-left: 3px solid var(--primary-color);
}

/* Input Area */
.input-area {
  padding: 20px 32px 24px;
  background: rgba(255, 255, 255, 0.02);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  flex-shrink: 0;
}

.input-wrapper {
  display: flex;
  gap: 12px;
  background: var(--bg-input);
  border-radius: 14px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: var(--transition);
}

.input-wrapper:focus-within {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.1);
}

.input-wrapper input {
  flex: 1;
  padding: 14px 20px;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 15px;
  font-family: "Inter", sans-serif;
}

.input-wrapper input::placeholder {
  color: var(--text-muted);
}

.send-btn {
  width: 48px;
  height: 48px;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--primary-dark)
  );
  border: none;
  border-radius: 10px;
  color: white;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.send-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 15px rgba(108, 99, 255, 0.3);
}

.send-btn:active {
  transform: scale(0.95);
}

.send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.input-hint {
  margin-top: 8px;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
}

.input-hint i {
  margin-right: 4px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .app-container {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    min-width: unset;
    max-height: 200px;
    padding: 16px;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }

  .sidebar-content {
    display: none;
  }

  .sidebar-footer {
    margin-top: 8px;
    padding-top: 8px;
  }

  .chat-header {
    padding: 12px 16px;
  }

  .messages-container {
    padding: 16px;
  }

  .message {
    max-width: 95%;
  }

  .input-area {
    padding: 12px 16px 16px;
  }

  .welcome-message {
    padding: 20px 12px;
  }

  .example-chips {
    flex-direction: column;
    align-items: center;
  }

  .chip {
    width: 100%;
    text-align: center;
  }
}
