* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}
html {
  font-family: "Montserrat", sans-serif;
}
body {
  background: #eee;
  background-image: url("https://www.transparenttextures.com/patterns/cubes.png");
  padding: 0 16px;
}

header {
  background-color: brown;
  margin: auto -50px;
  padding: 16px 50px;
  box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.3);
}

header h1 {
  color: #fff;
  font-family: "McLaren", cursive;
  font-weight: 200;
  text-align: left;
}

footer {
  position: absolute;
  text-align: center;
  bottom: 0;
  width: 100%;
  height: 2.5rem;
}

footer p {
  color: #f5ba13;
}
.note {
  background: #fff;
  border-radius: 7px;
  box-shadow: 0 2px 5px #ccc;
  padding: 10px;
  width: 240px;
  margin: 16px;
  float: left;
}
.note h1 {
  font-size: 1.1em;
  margin-bottom: 6px;
}
.note p {
  font-size: 1.1em;
  margin-bottom: 10px;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.note button {
  background-color: #fff;
  position: relative;
  float: right;
  margin-right: 10px;
  color: brown;
  border: none;
  cursor: pointer;
  outline: none;
}

form.create-note {
  position: relative;
  width: 80%;
  margin: 30px auto 30px auto;
  background: #fff;
  padding: 15px;
  border-radius: 7px;
  box-shadow: 0 1px 5px rgb(138, 137, 137);
}
form.create-note input,
form.create-note textarea {
  width: 100%;
  border: none;
  padding: 4px;
  outline: none;
  font-size: 1.2em;
  font-family: inherit;
  resize: none;
}

form.create-note input{
  font-weight: bolder;
}

form.create-note button {
  position: absolute;
  right: 18px;
  bottom: -18px;
  background: #f5ba13;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  outline: none;
}

@media (max-width: 600px) {
  header {
    background-color:brown;
  }

  header h1{
     text-align: center;
  }

  form.create-note textarea, input{
    text-align: center;
  }

  .note{
    display: flex;
    flex-direction: column;
    width: 92%;
    padding: 15px;
    border-radius: 7px;
  }

  .note button {
    text-align: end;
  }
  
}

.notes-container {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 16px;
}

.empty-state {
  padding: 16px;
  opacity: 0.8;
}

.note {
  width: 260px;
  padding: 14px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}

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

.btn {
  border: 1px solid #ddd;
  background: #fff;
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
}

.btn.small {
  padding: 6px 8px;
  border-radius: 10px;
  font-size: 12px;
}

.btn.primary {
  border-color: #111;
}

.btn.secondary {
  opacity: 0.85;
}

.btn.danger {
  border-color: #ffb4b4;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 9998;
}

.modal {
  width: min(520px, 100%);
  background: #fff;
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 18px 40px rgba(0,0,0,0.18);
}

.modal input,
.modal textarea {
  width: 100%;
  margin-top: 10px;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid #ddd;
  outline: none;
}

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

.hint {
  margin-top: 10px;
  font-size: 12px;
  opacity: 0.75;
}

.notes-container {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 16px;
}

.empty-state {
  padding: 16px;
  opacity: 0.8;
}

.note {
  width: 260px;
  padding: 14px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}

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

.btn {
  border: 1px solid #ddd;
  background: #fff;
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
}

.btn.small {
  padding: 6px 8px;
  border-radius: 10px;
  font-size: 12px;
}

.btn.primary {
  border-color: #111;
}

.btn.secondary {
  opacity: 0.85;
}

.btn.danger {
  border-color: #ffb4b4;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 9998;
}

.modal {
  width: min(520px, 100%);
  background: #fff;
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 18px 40px rgba(0,0,0,0.18);
}

.modal input,
.modal textarea {
  width: 100%;
  margin-top: 10px;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid #ddd;
  outline: none;
}

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

.hint {
  margin-top: 10px;
  font-size: 12px;
  opacity: 0.75;
}
