* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, sans-serif;
  background: linear-gradient(135deg, #111827, #1e3a8a);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.app {
  width: 100%;
  max-width: 720px;
  height: 85vh;
  min-height: 520px;
  background: #ffffff;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
  display: flex;
  flex-direction: column;
}

header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 22px;
  background: #111827;
  color: white;
}

.logo {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: #2563eb;
  display: grid;
  place-items: center;
  font-size: 24px;
}

h1 { margin: 0; font-size: 21px; }
header p { margin: 4px 0 0; opacity: .7; font-size: 13px; }

#chat {
  flex: 1;
  overflow-y: auto;
  padding: 22px;
  background: #f8fafc;
}

.message { display: flex; margin-bottom: 14px; }
.message.bot { justify-content: flex-start; }
.message.user { justify-content: flex-end; }

.bubble {
  max-width: 80%;
  padding: 12px 15px;
  border-radius: 16px;
  line-height: 1.5;
  font-size: 15px;
  background: white;
  border: 1px solid #e5e7eb;
}

.user .bubble {
  background: #2563eb;
  color: white;
  border: none;
}

form {
  display: flex;
  gap: 10px;
  padding: 15px;
  border-top: 1px solid #e5e7eb;
  background: white;
}

input {
  flex: 1;
  border: 1px solid #d1d5db;
  border-radius: 13px;
  padding: 13px 15px;
  outline: none;
  font-size: 15px;
}

input:focus { border-color: #2563eb; }

button {
  border: 0;
  border-radius: 13px;
  padding: 0 20px;
  background: #2563eb;
  color: white;
  font-weight: bold;
  cursor: pointer;
}

button:hover { opacity: .9; }

@media (max-width: 600px) {
  body { padding: 0; }
  .app { height: 100vh; min-height: 100vh; border-radius: 0; }
}
