body {
  font-family: Arial, sans-serif;
  background-color: #f0f0f0;
  margin: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

header {
  background-color: white;
  padding: clamp(8px, 2vw, 10px) clamp(10px, 3vw, 20px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #e0e0e0;
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  transition: all 0.3s ease-in-out;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: #ffffff;
  padding: 25px 30px;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 360px;
  font-family: 'Segoe UI', sans-serif;
}

.modal-content h2 {
  margin-top: 0;
  font-size: 1.5em;
  color: #333;
}

.modal-content p {
  font-size: 0.95em;
  color: #666;
  margin-bottom: 1em;
}

.modal-content label {
  display: block;
  margin: 12px 0 4px;
  font-weight: 500;
  color: #444;
}

.modal-content input {
  width: 100%;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 0.95em;
  transition: border 0.2s;
}

.modal-content input:focus {
  border-color: #3f51b5;
  outline: none;
}

.modal-actions {
  margin-top: 20px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.modal-actions .btn {
  padding: 8px 16px;
  font-size: 0.9em;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.modal-actions .btn.confirm {
  background-color: #3f51b5;
  color: white;
}

.modal-actions .btn.confirm:hover {
  background-color: #303f9f;
}

.modal-actions .btn.cancel {
  background-color: #f1f1f1;
  color: #333;
}

.modal-actions .btn.cancel:hover {
  background-color: #ddd;
}
#voice-button {
  background: #34e98f;
  border: none;
  color: white;
  padding: 0px 4px;
  font-size: 105x;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s;
}

#voice-button:hover {
  background: #e7533f;
}



.logo {
  font-size: clamp(16px, 4vw, 20px);
  font-weight: bold;
  color: #8574e7;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
}

.toolbar button {
  background: none;
  border: none;
  padding: clamp(4px, 1vw, 5px) clamp(8px, 2vw, 10px);
  cursor: pointer;
  font-size: clamp(12px, 3.5vw, 14px);
  color: #666;
}

.toolbar button:hover {
  color: #333;
}

#note-id {
  font-size: clamp(12px, 3.5vw, 14px);
  color: #8574e7;
  word-break: break-all;
  max-width: 150px;
  text-align: center;
}

#auth-button {
  background-color: #8574e7;
  color: white;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: clamp(4px, 1vw, 5px) clamp(8px, 2vw, 10px);
}

#auth-button:hover {
  background-color: #e55a9f;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(10px, 3vw, 20px);
}

textarea {
  width: 100%;
  max-width: 1200px;
  height: clamp(400px, 80vh, 700px);
  border: none;
  border-radius: 4px;
  padding: clamp(10px, 2vw, 15px);
  font-size: clamp(14px, 4vw, 16px);
  resize: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  margin-bottom: 10px;
  box-sizing: border-box;
}

textarea:focus {
  outline: none;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
}

textarea:disabled {
  background-color: #e0e0e0;
  cursor: not-allowed;
  opacity: 0.7;
}

.markdown-preview {
  width: 100%;
  max-width: 1200px;
  height: clamp(300px, 50vh, 700px);
  border: none;
  border-radius: 4px;
  padding: clamp(10px, 2vw, 15px);
  font-size: clamp(14px, 4vw, 16px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  margin-bottom: 10px;
  background-color: white;
  overflow-y: auto;
  box-sizing: border-box;
}

.hidden {
  display: none;
}

#status {
  text-align: center;
  font-size: clamp(12px, 3.5vw, 14px);
  color: #666;
  margin-bottom: 10px;
}

.saved {
  color: #28a745;
}

.stats {
  text-align: center;
  font-size: clamp(12px, 3.5vw, 14px);
  color: #666;
  margin-bottom: 20px;
  width: 100%;
  max-width: 1200px;
  box-sizing: border-box;
}

footer {
  text-align: center;
  padding: clamp(8px, 2vw, 10px);
  font-size: clamp(12px, 3.5vw, 14px);
  color: #666;
  background-color: white;
  border-top: 1px solid #e0e0e0;
}

footer a {
  color: #666;
  text-decoration: none;
  margin: 0 5px;
}

footer a:hover {
  text-decoration: underline;
}

/* Mais estilos omitidos para brevidade */
/* RESPONSIVIDADE GERAL */

/* Quebra a toolbar em colunas quando a tela é pequena */
@media (max-width: 600px) {
  header {
    flex-direction: row;
    align-items: flex-start;
    gap: 10px;
  }

  .toolbar {
    flex-direction: row;
    
    width: 100%;
  }

  .toolbar button,
  #auth-button,
  #note-id {
    width: 100%;
    text-align: left;
  }

  .logo {
    align-self: center;
    text-align: center;
    width: 100%;
  }

  main {
    padding: 10px;
  }

  textarea,
  .markdown-preview,
  .stats {
    font-size: 14px;
    height: auto;
    min-height: 300px;
  }

  .modal-content {
    padding: 20px;
    border-radius: 8px;
  }

  #voice-button {
    width: 30px;
    height: 30px;
    font-size: 13px;
  }
}

/* Responsividade adicional para tablets */
@media (max-width: 900px) {
  textarea,
  .markdown-preview {
    font-size: 15px;
  }

  .stats {
    font-size: 13px;
  }

  .modal-content {
    max-width: 90%;
  }

  #note-id {
    max-width: 100%;
    word-wrap: break-word;
  }
}
