  html {
    height: 100%;
    margin: 0;
  }
  
  body {
    font-family: Arial, sans-serif;
    background-color: #f7f7f8;
    justify-content: center;
    align-items: center;
    display: flex;
    flex-direction: column;
    height: 100vh;
    margin: 0;
  }

  .chat-container {
    height: 100dvh; /* fixes iOS Safari shrinking UI and Android address bar overlap*/
    width: 100%;
    max-width: 100%;
    border-radius: 0;
    background: white;
    /* max-height: 600px; */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    /* border-radius: 12px; */
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  #chatBox {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .message {
    font-size: 16px;
    padding: 10px 14px;
    border-radius: 16px;
    max-width: 80%;
    line-height: 1.4;
  }

  .user {
    align-self: flex-end;
    background-color: #52a8a8;
    color: white;
  }

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

  .input-area {
    gap: 8px;
    display: flex;
    border-top: 1px solid #ddd;
    padding: 10px;
    background-color: #fafafa;
  }

  #userInput {
    flex: 1;
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 8px;
  }

  button {
    margin-left: 0;
    padding: 10px 16px;
    font-size: 16px;
    min-width: 44px; /* larger buttons for mobile */
    min-height: 44px;
    border: none;
    /*background-color: green;*/
    color: white;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s;
  }

  button:hover {
    background-color: #005ecb;
  }

  .typing {
    align-self: flex-start;
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .typing::before {
    content: "";
    width: 14px;
    height: 14px;
    border: 2px solid #ccc;
    border-top-color: #888;
    border-radius: 50%;
    animation: spin 1s linear infinite;
  }

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

  .dot-anim::after {
    content: "";
    display: inline-block;
    animation: dots 1s steps(4, end) infinite;
  }

  @keyframes dots {
    0%,
    20% {
      content: "";
    }
    40% {
      content: ".";
    }
    60% {
      content: "..";
    }
    80%,
    100% {
      content: "...";
    }
  }

  #micButton {
    background: #fff;
    background-color: #52a8a8;
    border: 2px solid #52a8a8;
    color: #91e6d7;
    /*border-radius: 50%;*/
    padding: 10px;
    font-size: 18px;
    cursor: pointer;
    transition: box-shadow 0.3s ease;
  }

  #muteButton {
    background: #fff;
    border: 2px solid #52a8a8;
    color: #007aff;
    padding: 10px;
    font-size: 18px;
    cursor: pointer;
    transition: box-shadow 0.3s ease;
  }

  #micButton.listening {
    box-shadow: 0 0 10px 3px rgba(0, 122, 255, 0.7);
    transform: scale(1.1);
    background-color: #007aff;
    color: white;
  }

  #listeningIndicator {
    margin-left: 10px;
    font-size: 14px;
    color: #007aff;
    visibility: hidden;
  }

  .action-card-container{
    margin-top:12px;
    display:flex;
    flex-direction:column;
    gap:8px;
  }

  .action-card{
    display:flex;
    align-items:center;
    justify-content:space-between;
    background:#f2f8f8;
    border:1px solid #dceeee;
    border-radius:10px;
    padding:12px 14px;
    text-decoration:none;
    color:#333;
    transition:all .2s;
  }

  .action-card:hover{
    background:#e6f3f3;
  }

  .action-icon{
    font-size:20px;
    margin-right:10px;
  }

  .action-text{
    flex:1;
    font-weight:600;
  }

  .action-arrow{
    font-size:18px;
    opacity:.6;
  }

  .chat-container.voice-mode .input-area input {
    display: none;
  }

  .chat-container.voice-mode .input-area {
    justify-content: center;
    gap: 20px;
  }

  .chat-container.voice-mode button {
    font-size: 20px;
    padding: 14px 18px;
  }

  .chat-container.voice-mode #chatBox {
    opacity: 0.9;
  }

  @media (max-width: 600px) { /* mobile media query to make more mobile-friendly */
    #chatBox {
      padding: 12px;
    }

    .message {
      max-width: 90%;
      padding: 12px;
    }

    .input-area {
      padding: 8px;
    }

    #userInput {
      padding: 12px;
      font-size: 16px;
    }

    button {
      padding: 12px;
      font-size: 18px;
    }

    /* Voice mode = full call UI feel */
    .chat-container.voice-mode {
      /* background: #0f172a; */
      color: black;
    }

    .chat-container.voice-mode #chatBox {
      /* justify-content: center;
      align-items: center;
      text-align: center; */
      font-size: 18px;
  }
}