.logo.vanilla:hover {
  filter: drop-shadow(0 0 2em #ffe21c);
}
:root {
  font-family: Inter, Avenir, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 24px;
  font-weight: 400;

  color: #0f0f0f;
  background-color: #f6f6f6;

  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
}
body {
  font-family: sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  min-height: 100dvh;
  box-sizing:border-box;
  overflow-x: hidden;
  overflow-y: auto;
}
.logo {
  height: 6em;
  padding: 1.5em;
  will-change: filter;
  transition: 0.75s;
}
.group{
  padding: 5px;
  border: 1px solid #333;
  border-radius: 4px;
}
.group button {
  display: block;
  margin-left: auto;
  margin-right: 10px;
}
.logo.tauri:hover {
  filter: drop-shadow(0 0 2em #24c8db);
}

.row {
  display: flex;
  justify-content: center;
}


h1 {
  color: #333;
  text-align: center;
  margin: 10px 0;
}

.container {
  background: white;
  padding: 1rem;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);;

  width: 100%;
  max-width: 800px;
  margin: 5px  0;
  box-sizing: border-box; 
  overflow-x: hidden;
}

.center{
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  box-sizing: border-box;
  align-items: center;
  width: 100%;
}
#update{
 display:none;
}
#btn-return{
  display:none;
  margin-right: auto;
  margin-left: 10px;
}
.buttons{
  display: flex;
  width: 100%;
  gap: 10px;
  flex-wrap: wrap;
  
}
.buttons button{
  flex: 1;
}
.setting-item{
  display:flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  margin-bottom: 15px;
  text-align: left;
}
.setting-item label{
  text-align: left;
  width: 100%;
}

select {
  width: 100%;
  padding: 10px;
  margin-bottom: 20px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 1rem;
}
.btn-close{
  display: block;
  position: absolute;
  right: 0%;
  transform:translateY(-50%);
}
#log {
  white-space: pre-wrap;
  text-align: left;
  border: 1px solid #111;
  border-radius: 3px;
  min-height: 10px;
  width: 100%;
  margin:15px 0;
  overflow-y: auto;
  height: 50dvh;
  max-height: 80dvh;
}
#btn-log{
  display: block;
  position: absolute;
  left: 0%;
  transform:translateY(-50%);
}
#btn-record {
  background-color: #ff4d4d;
  color: white;
}

#btn-record:disabled {
  background-color: #ffcccc;
  cursor: not-allowed;
}
#btn-record:hover {
  border-color: #ff4d4d;
}

#btn-record:active {
  border-color: #ff4d4d;
  background-color: #e8e8e8;
}
#btn-analyze {
  background-color: #4d4dff;
  color: white;
}

#btn-analyze:disabled {
  background-color: #ccccff;
  cursor: not-allowed;
}
#btn-analyze:hover {
  border-color: #396cd8;
}

#btn-analyze:active {
  border-color: #396cd8;
  background-color: #e8e8e8;
}


#btn-stop {
  background-color: #333;
  color: white;
}

#btn-stop:disabled {
  background-color: #999;
  cursor: not-allowed;
}
#dpip-btn{
  margin-right:10px;
  margin-left: auto;
}

#audio-player {
  margin: 5px;
  width: 100%;
}
#player-position {
  width: 100%;
}

#status {
  font-size: 0.9rem;
  color: #666;
  height: 20px;
}
.toggle-row{
  display:flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin:5px 0;
}
.toggle-row input[type="checkbox"]{
  display: none;
}
.toggle-switch{
  width: 62px;
  min-width: 62px;
  height: 32px;
  background: #AAA;
  border-radius: 20px;
  position: relative;
  cursor: pointer;
  transition: background 0.3s;
}
.toggle-switch::after{
  content: "";
  width: 30px;
  height: 30px;
  background-color: white;
  border-radius: 50%;
  position: absolute;
  top: 1px;
  left: 1px;
  transition: left 0.3s;
}
/* on */
.toggle-row input[type="checkbox"]:checked + .toggle-switch{
  background: #4c50af;
}
/* off */
.toggle-row input[type="checkbox"]:checked + .toggle-switch::after{
  left: 30px;
}

canvas {
  width: 100%;
  height: 250px;
  background-color: #222;
  margin: 5px;
  border-radius: 5px;
}
#canvas-position{
  width: 100%;
  height: 250px;
}
a {
  font-weight: 500;
  color: #646cff;
  text-decoration: inherit;
}

a:hover {
  color: #535bf2;
}

button {
  font-size: 1em;
  font-weight: 500;
  font-family: inherit;
  color: #222;
  background-color: #ddd;
  transition: border-color 0.25s;
  box-shadow: 0 2px 2px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  padding: 10px;
  margin: 10px;
  border-radius: 5px;
  border-color: #eee;
  
}

button:hover{
  border-color: #ddd;
  background-color: #aaa;
}
button:active{
  border-color: #333;
} 
button:disabled{
  background-color: #999;
  cursor: not-allowed;
}
input[type="range"]{
  padding: 0;
  box-shadow: none;
  cursor: pointer;
  height: auto;
}
#greet-input {
  margin-right: 5px;
}
.setting-position{
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  width: 100%;
  margin: 5px;
}
.setting-position select{
  display: none;
  flex: 1;
  margin-bottom: 0;
}

#btn-mic-permission{
  display: flex;
  flex: 1;
}

dialog{
  width: 80%;
  max-width: 700px;
  box-sizing: border-box;
  border: none;
  border-radius: 12px;
  padding: 20px;
  padding-bottom: 3rem;
}
dialog h2{
  margin-top: 0;
  margin-bottom: 0;
}
@media (prefers-color-scheme: dark) {
  :root {
    color: #f6f6f6;
    background-color: #2f2f2f;
  }
  .container{
    background: #3a3a3a;
    color:#f6f6f6;
  }
  a:hover {
    color: #24c8db;
  }
  h1 {
    color: #f6f6f6;
  }
  button {
    color: #eee;
    background-color: #222;
  }
  button:active {
    background-color: #333;
  }
  #status{
    color: #888;
  }
}