/* === Buttons & Controls === */
#stopAudio{
  font-size:23px;
  padding:5px 10px;
  background-color:red;
  color:#fff;
  border:none;
  border-radius:5px;
  cursor:pointer;
  margin-top:10px;
}
#stopAudio:hover{ background-color:darkred; }

#downloadAudio{
  background-color:#df5203;
  color:#fff;
  border:none;
  padding:5px 10px;
  border-radius:5px;
  cursor:pointer;
  font-size:18px;
  margin-left:10px;
  display:none;
}
#downloadAudio:hover{ background-color:darkgreen; }

#pauseResumeAudio{
  background-color:red;
  color:#fff;
  border:none;
  padding:5px 10px;
  border-radius:5px;
  cursor:pointer;
  font-size:18px;              /* from 2nd file (priority) */
  transition:font-size .3s;
}
#pauseResumeAudio:hover{ font-size:20px; }

#toggleRecognition{
  background-color:yellow;
  color:#000;
  border:none;
  padding:5px 10px;
  border-radius:5px;
  cursor:pointer;
  font-size:18px;              /* from 2nd file (priority) */
  transition:background-color .3s;
  margin-top:10px;
}
#toggleRecognition:hover{
  background-color:gold;       /* from 2nd file (priority) */
}

#dowsess{
  background-color:#8880b9;
  color:#fff;
  border:0;
  padding:5px 10px;
  border-radius:5px;
  cursor:pointer;
  font-size:16px;
  transition:font-size .3s;
}
#dowsess:hover{ background-color:#aaa; font-size:20px; }

#controls{
  display:flex;
  flex-direction:column;       /* from 2nd file (priority) */
  align-items:flex-end;        /* from 2nd file (priority) */
}
.audio-controls{
  display:flex;
  align-items:center;
  margin-top:5px;
}
button{ margin-right:5px; margin-bottom:4px; }
button:last-of-type{ margin-right:0; }

/* === Chat Layout === */
#chat-container{
  width:60%;
  height:500px;
  margin:0 auto;
  border:2px solid #1727EE;
  padding:20px;
  box-sizing:border-box;
  overflow:auto;
  /* background-image: url('matrix.png'); */ /* optional image line from 2nd */
  background-size:cover;
  background-repeat:no-repeat;
  background-position:center center;
}

#message-area{
  display:flex;
  align-items:center;
  padding:10px 0;              /* from 2nd file (priority) */
  width:60%;
  margin:0 auto;
  box-sizing:border-box;
}

#messageInput{
  width:calc(60% - 44px);      /* from 2nd file (priority) */
  border:2px solid blue;
  margin:10px auto;
  display:block;
  box-sizing:border-box;
  flex-grow:1;                 /* from 2nd file (priority) */
  margin-right:10px;           /* from 2nd file (priority) */
  font-size:18px;
  color:#fff;
  background-color:#2653d2;
  text-shadow:
    1px 0 0 #000, -1px 0 0 #000,
    0 1px 0 #000,  0 -1px 0 #000,
    1px 1px 0 #000, -1px -1px 0 #000,
    1px -1px 0 #000, -1px 1px 0 #000;
}

#sendMessage{
  font-size:23px;
  padding:5px 10px;
  background-color:#2653d2;
  color:#fff;
  border:none;
  border-radius:5px;
  cursor:pointer;
}
#sendMessage:hover{ background-color:darkblue; }

#ai{ background-color:#fff; }

label{
  display:block;
  margin-bottom:10px;
}

/* === Bubbles === */
.bubble{
  border-radius:5px;
  margin:10px;
  padding:10px;
  display:inline-block;
  clear:both;
  width:auto;
  position:relative;
  border:5px solid #000;
}
.user-bubble{
  background-color:#2653d2;
  color:#fff;
  float:right;
  margin-right:20px;
  text-shadow:
    1px 0 0 #000, -1px 0 0 #000,
    0 1px 0 #000,  0 -1px 0 #000,
    1px 1px 0 #000, -1px -1px 0 #000,
    1px -1px 0 #000, -1px 1px 0 #000;
}
.user-bubble::after{
  content:'';
  position:absolute;
  top:10px;
  right:-8px;
  width:0; height:0;
  border:8px solid transparent;
  border-right-color:blue;
  border-left:0; border-bottom:0;
}
.bot-bubble{
  background-color:#df5203;
  color:#000;
  float:left;
  margin-left:20px;

}
.bot-bubble::after{
  content:'';
  position:absolute;
  top:10px;
  left:-8px;
  width:0; height:0;
  border:8px solid transparent;
  border-left-color:green;
  border-right:0; border-bottom:0;
}

/* === Typing Indicator === */
.typing{ display:none; }
.typing span{
  display:inline-block;
  width:8px; height:8px;
  border-radius:50%;
  background-color:#fff;
  margin:0 2px;
  animation:bounce 1s infinite;
}
.typing span:nth-child(2){ animation-delay:.2s; }
.typing span:nth-child(3){ animation-delay:.4s; }
@keyframes bounce{
  0%,20%,50%,80%,100%{ transform:translateY(0); }
  40%{ transform:translateY(-10px); }
  60%{ transform:translateY(-5px); }
}

/* === Samples/Prompts === */
#sampleQueries{
  width:60%;
  margin:20px auto;
  background-color:#f0f0f0;
  border:2px solid #333;
  border-radius:10px;
  padding:15px;
  box-sizing:border-box;
}
#sampleQueries h3{
  margin-top:0;
  color:#333;
}
.sample-query{
  background-color:#007bff;
  color:#fff;
  border:none;
  padding:8px 15px;
  margin:5px;
  border-radius:20px;
  cursor:pointer;
  font-size:14px;
  transition:background-color .3s;
}
.sample-query:hover{ background-color:#0056b3; }

#sample-prompts-container{
  display:flex;
  justify-content:center;
  align-items:center;
  width:100%;
}
#sample-prompts{
  margin-top:6px;
  padding:6px;
  background-color:#f2f2f2;
  display:inline-block;
  text-align:left;
}
.prompt{
  display:block;
  margin:5px 0;
  color:#007bff;
  text-decoration:none;
  font-size:18px;
}
.prompt:hover{
  text-decoration:underline;
  font-size:23px;
}

/* === Misc utility === */
.books{ color:#fff; font-size:18px; display:block; }
.responsive-logo{ max-width:100%; height:auto; display:block; margin:0 auto; }

.bot-bubble a{
  color:yellow;
  font-weight:bold;
  text-decoration:none;
}
.bot-bubble a:hover{ text-decoration:underline; }

/* === Mobile overrides (kept from 1st; non-conflicting) === */
@media (max-width:768px){
  #message-area{
    display:block !important;
    width:100% !important;
    margin:0 !important;
    padding-left:15px;
  }
  #messageInput{
    width:calc(100% - 30px) !important;
    margin:0 0 10px 0 !important;
  }
  #controls{
    text-align:left;
    padding-left:15px;
    display:block;
  }
}
