* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  background-color: rgb(61, 98, 141);
  padding: 32px 16px;
}

.app {
  width: 100%;
}

.header {
  background-color: #6986a6;
  padding: 22px 18px;
  color: white;
  text-align: center;
  border-radius: 10px;
  width: min(400px, 90%);
  margin: 0 auto 20px;
}

.header h1 {
  font-size: 40px;
  font-weight: 780;
  margin-bottom: 12px;
}

.row {
  display: flex;
  gap: 10px;
}

.title {
  flex: 1;
  padding: 10px 12px;
  font-size: 15px;
  border: none;
  outline: none;
  border-radius: 10px;
}

.addBtn {
  padding: 10px 14px;
  font-size: 15px;
  font-weight: 790;
  border: none;
  cursor: pointer;
  background: #0f5a8c;
  color: #ffffff;
  border-radius: 10px;
  transition: 0.2s;
  min-width: 70px;
}

.addBtn:hover {
  background: #053d7e;
}

.notes {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

.container {
  background-color: #ffffff;
  border-radius: 10px;
  width: 220px;
  height: 230px;
  padding: 15px;
  display: flex;
  flex-direction: column;
}

.top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
  gap: 10px;
}

.container-title {
  font-weight: bold;
  font-size: 20px;
  word-break: break-word;
  flex: 1;
}

.close {
  font-size: 20px;
  font-weight: bold;
  cursor: pointer;
  color: red;
  flex-shrink: 0;
}

.container-note {
  font-size: 15px;
  line-height: 1.5;
  flex: 1;
  overflow-y: auto;
  word-break: break-word;
}

.date {
  font-size: 14px;
  color: gray;
  margin-top: 10px;
  flex-shrink: 0;
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 999;
}

.editor {
  position: fixed;
  top: 50%;
  left: 50%;
  width: min(400px, 90%);
  height: 430px;
  transform: translate(-50%, -50%) scale(0.95);
  opacity: 0;
  background: white;
  border-radius: 12px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  z-index: 1000;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  transition: 0.2s ease;
}

.editor.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.editor .container-title,
.editor .container-note {
  outline: none;
  cursor: text;
}

.editor .container-title:focus,
.editor .container-note:focus {
  background: #f2f7ff;
  border-radius: 4px;
}

.editor .container-note {
  flex: 1;
  overflow-y: auto;
}

.container-note:empty::before {
  content: attr(data-placeholder);
  color: gray;
}
