/* Adjust the keyframes to use currentColor for box-shadow */
@keyframes pulse {
    0% {
      box-shadow: 0 0 0 0px currentColor;
    }
    70% {
      box-shadow: 0 0 0 20px rgba(0, 0, 0, 0);
    }
    100% {
      box-shadow: 0 0 0 0px currentColor;
    }
  }
  
  @keyframes listening-pulse {
    0%,
    100% {
      transform: scaleY(1);
    }
    50% {
      transform: scaleY(2);
    }
  }
  
  .container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: #111;
    font-family: "Orbitron", sans-serif;
  }
  
  .record-btn {
    border: none;
    border-radius: 50%;
    width: 100px;
    height: 100px;
    position: relative;
    background-color: #3498db; /* idle blue color */
    transition: background-color 0.5s;
    transition: transform 0.3s, opacity 0.3s; /* Smooth transition for transform and opacity */
  }

  .record-btn:hover {
    transform: scale(0.95); /* Slightly scale down the button */
    opacity: 0.8; /* Reduce the opacity to give a feedback effect */
  }
  
  .record-btn.listening {
    background-color: #e74c3c; /* listening green color */
    animation: pulse 2s infinite;
  }
  
  .record-btn:before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 90%;
    height: 90%;
    background-color: #111;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 10px currentColor, 0 0 20px currentColor, 0 0 30px currentColor, 0 0 40px currentColor;
  }
  
  .listening-indicator {
    color: #0f0;
    margin-bottom: 10px;
    text-shadow: 0 0 5px #0f0, 0 0 10px #0f0, 0 0 15px #0f0, 0 0 20px #0f0;
    display: flex;
    justify-content: center;
    gap: 5px;
  }
  
  .listening-indicator span {
    display: inline-block;
    background-color: #ff3b30;
    height: 10px;
    width: 10px;
    border-radius: 50%;
    animation: listening-pulse 1s infinite ease-in-out;
    transform-origin: 50% 50%;
  }
  
  .cancel-btn {
    background-color: #ff3b30;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    position: absolute;
    bottom: 30px;
    right: 30px;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.1s ease-in-out, background-color 0.2s;
    box-shadow: 0 0 10px #ff3b30, 0 0 20px #ff3b30, 0 0 30px #ff3b30,
      0 0 40px #ff3b30;
  }
  
  .cancel-btn:active {
    transform: scale(0.9);
  }
  
  .cancel-btn:hover {
    background-color: #ff645a;
  }
  
  /* Optional: Add a global style for the body to prevent scrollbars */
  body {
    margin: 0;
    overflow: hidden;
  }
  
  /* Existing styles... */
  
  /* Colors for different states */
  .idle .record-btn {
    background-color: #3498db; /* Blue for idle */
    color: #3498db; /* Set the color for box-shadow */
  }
  
  .listening .record-btn,
  .playing .record-btn {
    animation: pulse 2s infinite;
  }
  
  .listening .record-btn {
    background-color: #e74c3c; /* Red for listening */
    color: #e74c3c; /* Set the color for box-shadow */
  }
  
  .playing .record-btn {
    background-color: #2ecc71; /* Green for playback */
    color: #2ecc71; /* Set the color for box-shadow */
  }
  
  .transcript {
    color: #fff;
    margin-top: 20px;
  }
  
  .record-btn:disabled {
    background-color: #aaa; /* or any color that indicates the button is disabled */
    cursor: not-allowed;
  }
  
  /* Set the color of the dots for the listening state */
  .listening .listening-indicator span {
    background-color: #e74c3c; /* Red color for listening state */
  }
  
  /* Set the color of the dots for the playing state */
  .playing .listening-indicator span {
    background-color: #2ecc71; /* Green color for playing state */
  }
  
  .stop-btn {
    background-color: #ff3b30; /* Red color for stop button */
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    position: relative;
    bottom: -20px;
    right: -150px; /* Adjust as needed to position near the record button */
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.1s ease-in-out, background-color 0.2s;
    box-shadow: 0 0 10px #ff3b30, 0 0 20px #ff3b30, 0 0 30px #ff3b30,
      0 0 40px #ff3b30;
    font-family: 'Orbitron', sans-serif;
  }
  
  .stop-btn:active {
    transform: scale(0.9);
  }
  
  .stop-btn:hover {
    background-color: #ff645a;
  }
  
  /* ... [existing styles] */
  
  /* Chat Sidebar Styles */
  .chat-sidebar {
    position: fixed;
    right: -320px; /* Initially hidden, adjusted for shadow */
    top: 0;
    width: 300px;
    height: 100vh;
    background-color: #23272a; /* Dark gray background */
    color: #ffffff;
    overflow-y: auto;
    transition: right 0.3s;
    z-index: 1000;
    box-shadow: -5px 0 10px rgba(0, 0, 0, 0.5);
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; /* Font similar to the image */
  }
  
  .chat-sidebar.open {
    right: 0; /* Slide in */
  }
  
  .chat-header {
    padding: 10px 20px;
    background-color: #2c2f33; /* Slightly lighter gray for header */
    font-size: 16px;
    font-weight: bold;
    color: #99aab5; /* Light gray text */
    border-bottom: 1px solid #23272a; /* Border to match the background */
  }
  
  .chat-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  
  .chat-entry {
    background: #2c2f33; /* Slightly lighter gray for entry */
    border-radius: 8px; /* Rounded corners */
    padding: 10px;
    margin-bottom: 10px;
    word-wrap: break-word; /* Ensure text wraps within the bubble */
  }
  
  .user-query {
    color: #ffffff; /* White text for user query */
    margin-bottom: 5px;
  }
  
  .system-response {
    color: #7289da; /* Discord blue for system response */
  }
  
  .chat-toggle-button {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: #2c2f33; /* Slightly lighter gray for button */
    border: none;
    color: #ffffff; /* White text for button */
    cursor: pointer;
    padding: 10px;
    z-index: 1010; /* Above the sidebar */
    transition: right 0.3s;
  }
  
  .chat-sidebar.open + .chat-toggle-button {
    right: 300px; /* Move with the sidebar */
  }
  
  .listening-bubble {
    position: absolute;
    bottom: 120px; /* Position it above the record button */
    left: 50%;
    transform: translateX(-50%);
    background-color: rgb(0, 255, 157); /* Neon green background */
    color: black; /* Text color */
    padding: 10px 20px;
    border-radius: 20px;
    box-shadow: 0 0 10px rgb(0, 255, 157), 0 0 10px rgb(0, 255, 157), 0 0 10px rgb(0, 255, 157); /* Neon glow */
    font-size: 16px;
    white-space: nowrap;
    z-index: 10; /* Ensure it's above other elements */
  }
  .speech-bubble {
    position: absolute;
    bottom: 120px; /* Adjust as needed */
    left: 50%;
    transform: translateX(-50%);
    background-color: #00ff9d; /* Neon green */
    padding: 10px 20px;
    border-radius: 20px;
    box-shadow: 0 0 10px #00ff9d, 0 0 20px #00ff9d;
    color: black;
    display: none;
    z-index: 10;
  }
  
  .speech-bubble.visible {
    display: block;
  }
  .spinner {
    width: 90%;
    height: 90%;
    border: 4px solid #00ff9d;
    border-top-color: #db2323;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: spin 1s linear infinite;
  }
  
  @keyframes spin {
    0% {
      transform: translate(-50%, -50%) rotate(0deg);
    }
    100% {
      transform: translate(-50%, -50%) rotate(360deg);
    }
  }

  .app-header {
    position: absolute;
    top: 0;
    width: 100%;
    text-align: center;
    color: #3498db; /* Adjust color as needed */
    z-index: 20; /* Adjust as needed */
    text-shadow: 0 0 2px #3498db, 0 0 2px #3498db; /* Glow effect for readability */
  }
  
  .app-footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    text-align: center;
    color: #3498db; /* Adjust color as needed */
    z-index: 20; /* Adjust as needed */
  }
  
  .app-subtext {
    color: white;
  }
  