* {
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(135deg, #1e293b, #0f172a);
  color: #fff;
  display: flex;
  justify-content: center;
  padding: 30px;
}

.app {
  width: 100%;
  max-width: 900px;
}

.header {
  text-align: center;
  margin-bottom: 25px;
}

.header h1 {
  margin: 0;
  font-size: 42px;
}

.header p {
  color: #cbd5e1;
  margin-top: 8px;
}

.auth-box,
.note-form,
.search-box,
.user-bar {
  background: #ffffff12;
  border: 1px solid #ffffff25;
  padding: 20px;
  border-radius: 18px;
  margin-bottom: 20px;
  backdrop-filter: blur(10px);
}

.auth-box {
  max-width: 460px;
  margin: 0 auto;
}

.auth-box h2 {
  margin-top: 0;
  text-align: center;
}

input,
textarea {
  width: 100%;
  border: none;
  outline: none;
  padding: 14px;
  border-radius: 12px;
  margin-bottom: 12px;
  font-size: 16px;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

button {
  border: none;
  cursor: pointer;
  padding: 11px 16px;
  border-radius: 10px;
  font-weight: bold;
  transition: 0.2s;
}

button:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}

#addBtn,
#loginBtn {
  width: 100%;
  background: #22c55e;
  color: #fff;
  font-size: 17px;
  margin-bottom: 10px;
}

.secondary-btn {
  width: 100%;
  background: #3b82f6;
  color: #fff;
  font-size: 17px;
}

.user-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.logout-btn {
  background: #ef4444;
  color: #fff;
}

.message {
  text-align: center;
  min-height: 22px;
  margin-bottom: 0;
}

.success {
  color: #86efac;
}

.error {
  color: #fca5a5;
}

.hidden {
  display: none;
}

.notes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}

.note-card {
  background: #fff;
  color: #111827;
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 10px 25px #00000035;
  animation: fadeIn 0.25s ease-in-out;
}

.note-card h3 {
  margin: 0 0 10px;
  color: #0f172a;
}

.note-card p {
  color: #334155;
  white-space: pre-wrap;
  line-height: 1.5;
}

.actions {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

.edit-btn {
  background: #3b82f6;
  color: #fff;
  flex: 1;
}

.delete-btn {
  background: #ef4444;
  color: #fff;
  flex: 1;
}

.empty {
  text-align: center;
  color: #cbd5e1;
  font-size: 18px;
  grid-column: 1 / -1;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
