* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Inter', sans-serif;
}

body {
  margin: 0;
  height: 100vh;
  background: linear-gradient(135deg, #5f9cff, #8f6ed5);
}

/* Centered landing */

#app {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
}


.centered {
  text-align: center;
  width: 100%;
  max-width: 900px;   /* ⬅️ increased */
  padding: 20px;
  margin: auto;
}

.centered h1 {
  color: white;
  margin-bottom: 20px;
  font-size: 32px;
}

.input-box {
  display: flex;
  gap: 10px;
  width: 100%;
}

.input-box input {
  flex: 1;
  padding: 16px;
  font-size: 16px;
  border-radius: 30px;
}

.input-box button {
  padding: 12px 20px;
  border-radius: 25px;
  border: none;
  background: #2d6cdf;
  color: white;
  cursor: pointer;
}

/* Chat container */
#chatContainer {
  width: 100%;
  max-width: 1100px;   /* ⬅️ increase more */
  height: 90vh;
  background: white;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  margin-top: 20px;
}

#chatBox {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
}

.upload-icon {
  font-size: 22px;
  cursor: pointer;
  padding: 10px;
  border-radius: 50%;
  color: white;              /* 🔥 key fix */
  background: rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.upload-icon:hover {
  background: rgba(255,255,255,0.3);
}

/* Chat bubbles */
.message {
  margin-bottom: 15px;
  display: flex;
}

.message.user {
  justify-content: flex-end;
}

.message.ai {
  justify-content: flex-start;
}

.bubble {
  padding: 14px 18px;
  border-radius: 15px;
  max-width: 75%;   /* ⬅️ slightly wider */
  font-size: 15px;
}

.user .bubble {
  background: #2d6cdf;
  color: white;
}

.ai .bubble {
  background: #f1f1f1;
}

/* Input bottom */
.chat-input {
  display: flex;
  padding: 12px;
  gap: 10px;
}

.chat-input input {
  flex: 1;
  padding: 14px;
  font-size: 16px;
  border-radius: 25px;
  border: 1px solid #ddd;
}

.chat-input button {
  margin-left: 10px;
  padding: 10px 16px;
  border-radius: 25px;
  border: none;
  background: #2d6cdf;
  color: white;
  cursor: pointer;
}

.chat-input input:disabled {
  background: #f5f5f5;
}

.chat-input button:disabled {
  background: #aaa;
  cursor: not-allowed;
}

/* Hidden */
.hidden {
  display: none !important;
}

/* Mobile */
@media (max-width: 768px) {
  .centered {
    max-width: 100%;
  }

  #chatContainer {
    max-width: 100%;
    height: 100vh;
    border-radius: 0;
  }

  .bubble {
    max-width: 85%;
  }
}

/* Spinner */
.spinner {
  width: 20px;
  height: 20px;
  border: 3px solid #ddd;
  border-top: 3px solid #2d6cdf;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  100% {
    transform: rotate(360deg);
  }
}