/* --- Reset & Base --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background-color: #f7f7f7;
  color: #333;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 1rem;
}

/* --- Container --- */
.container {
  width: 100%;
  max-width: 800px;
  background-color: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* --- Header / Model Info --- */
#modelInfo {
  display: none;
  padding: 0.5rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  background-color: #f0f4f8;
}

#modelInfo div {
  margin: 0.2rem 0;
}

/* --- Chat History --- */
#chatHistory {
  flex: 1;
  max-height: 400px;
  overflow-y: auto;
  padding: 0.5rem;
  border: 1px solid #ddd;
  border-radius: 12px;
  background-color: #fafafa;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* --- Chat Bubbles --- */
.chat-bubble {
  max-width: 80%;
  padding: 0.6rem 1rem;
  border-radius: 16px;
  word-wrap: break-word;
}

.chat-bubble.user {
  background-color: #cce7ff;
  align-self: flex-end;
  text-align: right;
}

.chat-bubble.assistant {
  background-color: #e8e8e8;
  align-self: flex-start;
  text-align: left;
}

/* --- Input Area --- */
.input-container {
  display: flex;
  flex-direction: column; /* Change to column to stack input and buttons vertically */
  gap: 0.5rem;
}

.input-group {
  flex: 1; /* Ensure the input group takes up the full width */
  display: flex;
}

#userInput {
  flex: 1 1 auto; /* Ensure the textarea takes up the full width of the input group */
  min-width: 0;
  padding: 0.5rem 1rem;
  border: 1px solid #ccc;
  border-radius: 12px;
  font-size: 1rem;
  width: 100%; /* Ensure it takes full width */
}

/* --- Buttons --- */
button {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s ease;
}

button:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

#generateBtn {
  background-color: #007bff;
  color: #fff;
}

#generateBtn:hover:not(:disabled) {
  background-color: #0056b3;
}

#cancelBtn {
  background-color: #dc3545;
  color: #fff;
  display: none;
}

#cancelBtn:hover {
  background-color: #a71d2a;
}

#clearBtn {
  background-color: #6c757d;
  color: #fff;
}

#clearBtn:hover {
  background-color: #495057;
}

/* --- Status / Progress --- */
.current-status {
  padding: 0.5rem;
  text-align: center;
  font-style: italic;
  color: #555;
}

#progressContainer {
  display: none;
  width: 100%;
  background-color: #e9ecef;
  border-radius: 12px;
  overflow: hidden;
  margin-top: 0.5rem;
}

#progressFill {
  height: 10px;
  width: 0%;
  background-color: #007bff;
  transition: width 0.2s ease;
}

#progressText {
  font-size: 0.8rem;
  text-align: center;
  margin-top: 0.2rem;
}

/* --- Select Dropdown --- */
#modelSelect {
  width: 100%;
  padding: 0.5rem 1rem;
  border-radius: 12px;
  border: 1px solid #ccc;
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

/* --- Responsive Media Queries --- */
@media (max-width: 600px) {
  #chatHistory {
    max-height: 300px;
  }

  .chat-bubble {
    max-width: 90%;
    font-size: 0.9rem;
  }

  button {
    flex: 1 1 100%;
    font-size: 0.9rem;
  }

  .input-container {
    flex-direction: column;
  }
}

@media (min-width: 601px) and (max-width: 900px) {
  #chatHistory {
    max-height: 350px;
  }

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

/* --- Remove the bullets from the list --- */
.educational-content ul {
  list-style-type: none; /* Remove bullets */
  padding-left: 0; /* Remove default padding */
}
