html {
  height: 100%;
  width: 100%;
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
}

body {
  height: 100vh;
  height: 100dvh;
  /* Dynamic viewport height for mobile */
  margin: 0;
  padding: 20px;
  background-color: #f0f0f0;
  box-sizing: border-box;
  overflow-x: hidden;
}

.chat-container {
  max-width: 600px;
  width: 100%;
  margin: 0 auto;
  background-color: white;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  height: calc(100vh - 40px);
  height: calc(100dvh - 40px);
  /* Dynamic viewport height for mobile */
  max-height: calc(100vh - 40px);
  max-height: calc(100dvh - 40px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chat-header {
  background-color: #3498db;
  color: white;
  padding: 12px;
  display: flex;
  align-items: center;
  border-radius: 10px 10px 0 0;
}

.header-avatar {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.2);
  background-image: url('./attached_assets/doctorobv.png');
  background-size: cover;
  background-position: center;
  margin-right: 15px;
  flex-shrink: 0;
}

.header-info {
  display: flex;
  flex-direction: column;
}

.doctor-name {
  font-size: 22px;
  font-weight: bold;
  margin: 0;
}

.doctor-status {
  font-size: 16px;
  opacity: 0.8;
  margin-top: 2px;
  display: flex;
  align-items: center;
  color: #00ff41;
  text-shadow: 0 0 5px #00ff41, 0 0 10px #00ff41, 0 0 15px #00ff41;
}

.online-indicator {
  width: 8px;
  height: 8px;
  background-color: #00ff41;
  border-radius: 50%;
  margin-right: 6px;
  box-shadow: 0 0 3px #00ff41, 0 0 6px #00ff41, 0 0 9px #00ff41;
  animation: pulse 2s infinite;
}

.about-link {
  margin-top: 2px;
  margin-bottom: 10px;
}

.about-link a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: underline;
  font-size: 14px;
  transition: color 0.2s;
}

.about-link a:hover {
  color: white;
  text-decoration: underline;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 3px #00ff41, 0 0 6px #00ff41, 0 0 9px #00ff41;
  }

  50% {
    box-shadow: 0 0 5px #00ff41, 0 0 10px #00ff41, 0 0 15px #00ff41;
  }

  100% {
    box-shadow: 0 0 3px #00ff41, 0 0 6px #00ff41, 0 0 9px #00ff41;
  }
}

.chat-messages {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  background-color: #fafafa;
}

.message {
  display: flex;
  margin-bottom: 20px;
  align-items: flex-start;
}

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

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

.avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  margin: 0 10px;
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
}

.user-avatar {
  background-color: rgba(255, 255, 255, 0.2);
  background-image: url('./attached_assets/patient.png');
  background-size: cover;
  background-position: center;
}

.doctor-avatar {
  background-color: rgba(255, 255, 255, 0.2);
  background-image: url('./attached_assets/doctorobv.png');
  background-size: cover;
  background-position: center;
}

.message-bubble {
  max-width: 70%;
  padding: 12px 16px;
  border-radius: 18px;
  word-wrap: break-word;
}

.user .message-bubble {
  background-color: #2196F3;
  color: white;
}

.doctor .message-bubble {
  background-color: #e0e0e0;
  color: #333;
}

.chat-input {
  display: flex;
  padding: 20px;
  background-color: white;
  border-radius: 0 0 10px 10px;
  border-top: 1px solid #ddd;
}

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

.chat-input button {
  margin-left: 10px;
  padding: 12px 20px;
  background-color: #3498db;
  color: white;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  font-size: 14px;
}

.chat-input button:hover {
  background-color: #45a049;
}

.thinking-status {
  display: flex;
  justify-content: center;
  margin: 10px 0;
}

.thinking-text {
  font-style: italic;
  opacity: 0.6;
  color: #666;
  font-size: 16px;
  animation: thinking-pulse 1s infinite;
}

@keyframes thinking-pulse {
  0% {
    opacity: 0.4;
  }

  50% {
    opacity: 1;
  }

  100% {
    opacity: 0.4;
  }
}

.chat-input input:focus {
  border-color: #3498db;
}

.reply-chorus {
  font-weight: bolder;
}

/* Mobile responsive adjustments */
@media screen and (max-width: 768px) {
  body {
    padding: 10px;
  }

  .chat-container {
    height: calc(100vh - 20px);
    height: calc(100dvh - 20px);
    max-height: calc(100vh - 20px);
    max-height: calc(100dvh - 20px);
    border-radius: 5px;
    width: calc(100% - 20px);
  }

  .header-avatar {
    width: 90px;
    height: 90px;
    margin-right: 10px;
  }

  .doctor-name {
    font-size: 22px;
  }

  .doctor-status {
    font-size: 14px;
  }

  .chat-messages {
    padding: 15px;
  }

  .chat-input {
    padding: 15px;
  }

  .message-bubble {
    max-width: 85%;
    padding: 10px 14px;
  }

  .avatar {
    width: 40px;
    height: 40px;
  }
}

/* Handle virtual keyboard on mobile */
@media screen and (max-width: 480px) {
  body {
    padding: 5px;
    position: fixed;
    width: 100%;
    overflow: hidden;
  }

  .chat-container {
    min-height: 0;
    flex: 1;
    height: 100vh;
    height: 100dvh;
    width: calc(100vw - 10px);
    max-width: none;
    position: relative;
  }

  .chat-messages {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .chat-input {
    flex-shrink: 0;
    padding: 10px;
  }

  .chat-input input {
    font-size: 16px;
    /* Prevents zoom on iOS */
  }
}

/* Additional fixes for keyboard appearance */
@supports (-webkit-appearance: none) {
  @media screen and (max-width: 480px) {
    .chat-container {
      height: 100vh;
      height: -webkit-fill-available;
    }
  }
}

/* About page styles */
.about-container {
  max-width: 600px;
  width: 100%;
  margin: 0 auto;
  background-color: white;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  height: calc(100vh - 40px);
  height: calc(100dvh - 40px);
  max-height: calc(100vh - 40px);
  max-height: calc(100dvh - 40px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.about-header {
  background-color: #3498db;
  color: white;
  padding: 12px;
  display: flex;
  align-items: center;
  border-radius: 10px 10px 0 0;
}

.about-tagline {
  font-size: 16px;
  opacity: 0.9;
  margin-top: 2px;
  font-style: italic;
}

.about-content {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  background-color: #fafafa;
  scroll-behavior: smooth;
}

.section-navigation {
  text-align: center;
  margin-bottom: 30px;
  padding-bottom: 15px;
  border-bottom: 2px solid #e0e0e0;
}

.section-navigation a {
  color: #3498db;
  text-decoration: none;
  font-weight: 500;
  padding: 8px 12px;
  transition: color 0.2s;
}

.section-navigation a:hover {
  color: #2980b9;
  text-decoration: underline;
}

.section-navigation a:not(:last-child)::after {
  content: " | ";
  color: #999;
  margin-left: 12px;
}

.content-section {
  margin-bottom: 30px;
}

.content-section h2 {
  color: #3498db;
  font-size: 24px;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e0e0e0;
}

.section-content {
  line-height: 1.6;
  color: #333;
  min-height: 100px;
  padding: 10px 0;
}

.section-content .about-me-text {
  color: #5a5858;
  text-align: center;
}

.section-divider {
  border: none;
  height: 1px;
  background-color: #e0e0e0;
  margin: 30px 0;
}

.return-to-top {
  text-align: right;
  margin-top: 20px;
}

.return-to-top a {
  color: #3498db;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}

.return-to-top a:hover {
  color: #2980b9;
  text-decoration: underline;
}

.about-footer {
  display: flex;
  padding: 20px;
  background-color: white;
  border-radius: 0 0 10px 10px;
  border-top: 1px solid #ddd;
  cursor: pointer;
  transition: background-color 0.2s;
}

.about-footer:hover {
  background-color: #f5f5f5;
}

.about-footer-content {
  display: flex;
  align-items: center;
  width: 100%;
}

.about-back-arrow {
  font-size: 24px;
  color: #3498db;
  margin-right: 10px;
  font-weight: bold;
}

.about-back-text {
  font-size: 16px;
  color: #3498db;
  font-weight: 500;
}

/* Mobile responsive adjustments for about page */
@media screen and (max-width: 768px) {
  .about-container {
    height: calc(100vh - 20px);
    height: calc(100dvh - 20px);
    max-height: calc(100vh - 20px);
    max-height: calc(100dvh - 20px);
    border-radius: 5px;
    width: calc(100% - 20px);
  }

  .about-tagline {
    font-size: 14px;
  }

  .about-content {
    padding: 15px;
  }

  .section-navigation {
    text-align: center;
  }

  .section-navigation a {
    padding: 8px 8px;
  }

  .section-navigation a:not(:last-child)::after {
    margin-left: 8px;
  }

  .content-section h2 {
    font-size: 20px;
  }

  .about-footer {
    padding: 15px;
  }
}

/* Handle virtual keyboard on mobile for about page */
@media screen and (max-width: 480px) {
  .about-container {
    min-height: 0;
    flex: 1;
    height: 100vh;
    height: 100dvh;
    width: calc(100vw - 10px);
    max-width: none;
    position: relative;
  }

  .about-content {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 10px;
  }

  .section-navigation {
    margin-bottom: 20px;
  }

  .section-navigation a {
    padding: 6px 6px;
    font-size: 14px;
  }

  .section-navigation a:not(:last-child)::after {
    margin-left: 6px;
  }

  .content-section h2 {
    font-size: 18px;
    margin-bottom: 10px;
  }

  .section-content {
    min-height: 80px;
  }

  .about-footer {
    flex-shrink: 0;
    padding: 10px;
  }
}

/* Additional fixes for keyboard appearance on about page */
@supports (-webkit-appearance: none) {
  @media screen and (max-width: 480px) {
    .about-container {
      height: 100vh;
      height: -webkit-fill-available;
    }
  }
}