* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Outfit', sans-serif;
  background-color: #f0f4f8;
  color: #212529;
  display: flex;
  flex-direction: column;
  height: 100vh;
}

.header {
  background: #ffffff;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  border-bottom: 1px solid #ced4da;
}

.brand {
  font-size: 1.5rem;
  font-weight: 700;
  color: #2c3e50;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.bot-icon {
  font-size: 1.8rem;
}

.motto {
  font-size: 1rem;
  color: #34495e;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

select,
button {
  padding: 0.6rem;
  font-size: 1rem;
  border-radius: 6px;
  border: 1px solid #7f8c8d;
  background-color: #ffffff;
  cursor: pointer;
  color: #2c3e50;
}

.chat-log {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  background-color: #ffffff;
}

.message {
  margin-bottom: 0.75rem;
  padding: 0.75rem;
  border-radius: 12px;
  max-width: 80%;
  word-wrap: break-word;
  line-height: 1.5;
}

.user {
  background-color: #dff9fb;
  align-self: flex-end;
}

.bot {
  background-color: #c7ecee;
  align-self: flex-start;
}

.typing {
  font-style: italic;
  opacity: 0.7;
  animation: blink 1s steps(1) infinite;
}

@keyframes blink {
  0% {
    opacity: 0.2;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0.2;
  }
}

footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 1rem;
  background: #ffffff;
  border-top: 1px solid #ced4da;
}

textarea {
  flex: 1;
  min-height: 50px;
  font-size: 1rem;
  padding: 0.75rem;
  border-radius: 8px;
  border: 1px solid #7f8c8d;
  resize: vertical;
}

#sendBtn,
#micBtn {
  background-color: #27ae60;
  border: none;
  color: white;
  font-weight: bold;
  border-radius: 8px;
  padding: 0 1rem;
  min-width: 48px;
  min-height: 48px;
}

.dark {
  background: #2c3e50;
  color: #ecf0f1;
}

.dark .message.user {
  background-color: #27ae60;
}

.dark .message.bot {
  background-color: #16a085;
}

@media (min-width: 768px) {
  .header {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .brand {
    font-size: 2rem;
  }

  .controls {
    justify-content: flex-end;
  }
}

/* Additional base44 style refinements */
button, select {
    transition: background-color 0.2s ease, color 0.2s ease;
}

button:hover, select:hover {
    background-color: #e0f7fa;
    border-color: #26c6da;
    color: #007c91;
}

.upgrade-button {
    background-color: #26c6da;
    border: none;
    color: white;
    font-weight: 700;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.upgrade-button:hover {
    background-color: #00acc1;
}

.chat-log {
    scrollbar-width: thin;
    scrollbar-color: #b2dfdb #e0f2f1;
}

.chat-log::-webkit-scrollbar {
    width: 8px;
}

.chat-log::-webkit-scrollbar-thumb {
    background-color: #80cbc4;
    border-radius: 10px;
}

.chat-log::-webkit-scrollbar-track {
    background-color: #e0f2f1;
}

#beat-generator {
    background-color: #ffffff;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 0 12px rgba(0,0,0,0.05);
}

#beat-generator h3 {
    margin-bottom: 1rem;
    font-weight: 700;
    color: #007c91;
}

#beat-generator label {
    margin-right: 0.5rem;
    font-weight: 600;
    color: #004d40;
}

#beat-generator select {
    margin-right: 1rem;
    margin-bottom: 1rem;
}

#generateBeatBtn {
    background-color: #007c91;
    color: white;
    font-weight: 700;
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
}

#generateBeatBtn:hover {
    background-color: #004d40;
}

footer textarea {
    border-color: #26c6da;
}

footer #sendBtn, footer #micBtn {
    background-color: #007c91;
}

footer #sendBtn:hover, footer #micBtn:hover {
    background-color: #004d40;
}


#showBeatGenBtn:hover {
    background-color: #004d40;
}


/* Enhanced base44.com style polish */

/* Body improvements */
body {
  background-color: #f8fafc !important;
  font-weight: 600;
}

/* Header */
.header {
  padding: 1.5rem 2rem !important;
  box-shadow: 0 2px 10px rgb(0 0 0 / 0.05);
  background-color: white !important;
}

.brand {
  font-size: 2.2rem !important;
  color: #00363a !important;
  font-weight: 900 !important;
  letter-spacing: 0.1em;
}

.motto {
  font-weight: 500 !important;
  color: #00575b !important;
}

/* Controls */
.controls select, .controls button {
  border-color: #ade8e6 !important;
  background-color: #e0f7fa !important;
  color: #007c91 !important;
  font-weight: 700 !important;
  padding: 0.75rem 1rem !important;
  border-radius: 12px !important;
  box-shadow: none !important;
}

.controls select:hover, .controls button:hover {
  background-color: #007c91 !important;
  color: #e0f7fa !important;
  border-color: #004d40 !important;
}

/* Chat log */
.chat-log {
  background: white !important;
  border-radius: 12px !important;
  box-shadow: 0 2px 15px rgb(0 0 0 / 0.07) !important;
  padding: 2rem !important;
  font-size: 1.1rem !important;
  font-weight: 500 !important;
  line-height: 1.6 !important;
}

/* User & bot messages */
.message.user {
  background: linear-gradient(90deg, #00b4d8 0%, #0077b6 100%) !important;
  color: white !important;
  font-weight: 700 !important;
  align-self: flex-end !important;
  border-radius: 30px 30px 0 30px !important;
  max-width: 70% !important;
}

.message.bot {
  background: linear-gradient(90deg, #caf0f8 0%, #90e0ef 100%) !important;
  color: #023e8a !important;
  font-weight: 600 !important;
  align-self: flex-start !important;
  border-radius: 30px 30px 30px 0 !important;
  max-width: 70% !important;
}

/* Footer */
footer {
  background-color: white !important;
  padding: 1.5rem 2rem !important;
  box-shadow: 0 -2px 10px rgb(0 0 0 / 0.05) !important;
  gap: 1rem !important;
}

textarea#userInput {
  border-radius: 25px !important;
  border: 2px solid #00b4d8 !important;
  font-size: 1.1rem !important;
  font-weight: 600 !important;
  padding: 1rem 1.5rem !important;
  height: 50px !important;
  resize: none !important;
  box-shadow: none !important;
}

#sendBtn, #micBtn {
  background-color: #0077b6 !important;
  border-radius: 50% !important;
  width: 48px !important;
  height: 48px !important;
  font-size: 20px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 4px 8px rgb(0 0 0 / 0.15) !important;
  border: none !important;
  color: white !important;
  cursor: pointer !important;
}

#sendBtn:hover, #micBtn:hover {
  background-color: #023e8a !important;
  box-shadow: 0 6px 12px rgb(0 0 0 / 0.25) !important;
}

/* Upgrade button */
.upgrade-button {
  background: linear-gradient(90deg, #00b4d8 0%, #0077b6 100%) !important;
  border-radius: 25px !important;
  padding: 15px 30px !important;
  font-size: 1.2rem !important;
  font-weight: 900 !important;
  color: white !important;
  border: none !important;
  cursor: pointer !important;
  box-shadow: 0 4px 12px rgb(0 0 0 / 0.2) !important;
  transition: all 0.3s ease !important;
  margin-top: 20px !important;
  width: 100%;
}

.upgrade-button:hover {
  background: linear-gradient(90deg, #0077b6 0%, #00b4d8 100%) !important;
  box-shadow: 0 6px 18px rgb(0 0 0 / 0.35) !important;
}

/* Beat generator */
#beat-generator {
  background-color: white !important;
  border-radius: 20px !important;
  padding: 2rem !important;
  box-shadow: 0 4px 20px rgb(0 0 0 / 0.1) !important;
  margin-top: 3rem !important;
}

#beat-generator h3 {
  font-weight: 900 !important;
  font-size: 1.5rem !important;
  color: #0077b6 !important;
  margin-bottom: 1.5rem !important;
}

#generateBeatBtn {
  background: linear-gradient(90deg, #00b4d8 0%, #0077b6 100%) !important;
  border-radius: 25px !important;
  padding: 15px 30px !important;
  font-weight: 900 !important;
  color: white !important;
  font-size: 1.1rem !important;
  border: none !important;
  cursor: pointer !important;
  box-shadow: 0 4px 12px rgb(0 0 0 / 0.2) !important;
  transition: all 0.3s ease !important;
  margin-top: 1rem !important;
}

#generateBeatBtn:hover {
  background: linear-gradient(90deg, #0077b6 0%, #00b4d8 100%) !important;
  box-shadow: 0 6px 18px rgb(0 0 0 / 0.35) !important;
}

/* Scrollbar customization */
.chat-log::-webkit-scrollbar {
  width: 10px !important;
}

.chat-log::-webkit-scrollbar-track {
  background: #e0f7fa !important;
  border-radius: 10px !important;
}

.chat-log::-webkit-scrollbar-thumb {
  background: #0077b6 !important;
  border-radius: 10px !important;
}

@media (min-width: 768px) {
  footer {
    padding: 2rem 3rem !important;
  }

  textarea#userInput {
    height: 60px !important;
  }

  .brand {
    font-size: 3rem !important;
  }
}
