html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Segoe UI', Arial, sans-serif;
  margin: 0;
  background: linear-gradient(135deg, #f7f7fc 60%, #dbeafe 100%);
}
#landing {
  max-width: 900px;
  margin: 2rem auto 0;
  padding: 2rem;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 0 20px rgba(0,0,0,0.08);
}
.landing-header {
  text-align: center;
  margin-bottom: 2rem;
}


.landing-outer {
  min-height: 100vh;
  width: 100vw;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fafbfc;
}
.landing-inner {
  width: 100%;
  max-width: 1100px;
  padding: 2rem 1.5rem;
}
.therapist-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem;
  justify-content: center;
}
.therapist-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
  padding: 2rem 1.5rem;
  width: 290px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.therapist-img {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  margin-bottom: 1rem;
  object-fit: cover;
}
.therapist-name {
  font-weight: 600;
  font-size: 1.13rem;
  margin-bottom: 0.2rem;
}
.therapist-desc {
  color: #888;
  font-size: 1rem;
  margin-bottom: 1.1rem;
  text-align: center;
}
.therapist-recent {
  color: #555;
  font-size: 0.97rem;
  margin-bottom: 1.15rem;
  text-align: center;
}
.start-chat-btn {
  background: #1a73e8;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.7em 1.7em;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s;
}
.start-chat-btn:hover {
  background: #135dc2;
}


.therapist-options {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10%; /* 10% buffer between cards */
  margin-bottom: 2rem;
}

.therapist-card {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  padding: 1.4rem 1.2rem;
  text-align: center;
  width: 45%;
  min-width: 220px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.therapist-img {
  width: 100%;
  max-width: 120px;
  height: auto;
  border-radius: 50%;
  margin-bottom: 1rem;
  object-fit: cover;
  box-shadow: 0 2px 8px rgba(0,0,0,0.10);
}

/* Responsive: On mobile, stack cards and make them 90% width */
@media (max-width: 768px) {
  .therapist-options {
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
  }
  .therapist-card {
    width: 90%;
    max-width: 95vw;
    min-width: initial;
  }
}

.therapist-card:hover {
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 4px 18px 0 rgba(20,120,242,0.12);
}
.therapist-name {
  font-size: 1.2rem;
  font-weight: bold;
  margin-bottom: 0.7rem;
  color: #1478f2;
}
.therapist-desc {
  font-size: 1rem;
  color: #333;
  margin-bottom: 1.2rem;
  min-height: 68px;
}

.therapist-main-container {
  width: 100%;
  max-width: 1024px;       /* Adjust as needed: 600-800px is common */
  min-width: 0;           /* Prevents flexbox min-width issue */
  box-sizing: border-box;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
  display: flex;
  flex-direction: column;


#msgForm {
  width: 100%;
  display: flex;
  flex-direction: column; /* Stack children vertically */
  align-items: stretch;
}

#msgForm textarea {
  width: 100%;
  min-height: 60px;
  resize: vertical;
  box-sizing: border-box;
  font-size: 1rem;
  padding: 0.7em 1em;
}

#msgForm button[type="submit"] {
  width: max-content;
  align-self: flex-end;
  padding: 0.6em 1.5em;
  font-size: 1rem;
  margin-top: 0.5em;
}
.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 3px solid #ccc;
  border-top: 3px solid #888;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}


.landing-btn {
  background: #1478f2;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.7rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s;
  box-shadow: 0 2px 10px 0 rgba(20,120,242,0.05);
}
.landing-btn:hover {
  background: #0d5bbf;
}
@media (max-width: 800px) {
  .therapist-options { flex-direction: column; }
}
#app {
  max-width: 420px;
  margin: 2rem auto;
  padding: 1rem;
}
.card {
  background: #fff;
  border-radius: 10px;
  padding: 1.5rem 1rem;
  box-shadow: 0 0 12px rgba(0,0,0,0.07);
}
input, select, button, textarea {
  width: 100%;
  margin-bottom: 1rem;
  padding: 0.7rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 1rem;
  box-sizing: border-box;
}
button, btn {
  background: #1478f2;
  color: #fff;
  border: none;
  font-weight: 600;
  cursor: pointer;
}
button, btn:hover {
  background: #0d5bbf;
}
.chat-history {
  min-height: 220px;
  max-height: 320px;
  overflow-y: auto;
  background: #f3f7fa;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
}
.message {
  margin-bottom: 0.7rem;
}
.message.user { text-align: right; color: #1478f2;}
.message.bot { text-align: left; color: #333; }
.chat-switcher {
  margin-bottom: 1rem;
  padding: 0.9rem 1rem;
  background: #f2f8ff;
  border-radius: 10px;
  text-align: center;
}
.chat-switch-btn {
  margin: 0 0.2rem;
  background: #fff;
  color: #1478f2;
  border: 1.5px solid #1478f2;
  border-radius: 6px;
  padding: 0.4rem 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.chat-switch-btn.selected,
.chat-switch-btn:hover {
  background: #1478f2;
  color: #fff;
}
@media (max-width: 500px) {
  #landing, #app, .card {
    margin-top: 0.5rem;
    border-radius: 0;
    box-shadow: none;
    min-height: 100vh;
    padding: 0.5rem;
  }
}