:root {
  --bg-color: linear-gradient(135deg, #cf9aff, #95c0ff);
  --note-bg: #ffffff;
  --text-color: #333;
  --btn-bg: linear-gradient(135deg, #9418fd, #571094);
}

body.dark {
  --bg-color: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
  --note-bg: #1e1e1e;
  --text-color: #f1f1f1;
  --btn-bg: linear-gradient(135deg, #444, #222);
}

* {
  margin: 0;
  padding: 0;
  font-family: 'Poppins', sans-serif;
  box-sizing: border-box;
}

body {
  background: var(--bg-color);
  color: var(--text-color);
  transition: background 0.4s, color 0.3s;
}

.container {
  width: 100%;
  min-height: 100vh;
  padding: 4% 8%;
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.top-bar h1 {
  display: flex;
  align-items: center;
  font-size: 32px;
  font-weight: 600;
  margin-bottom: 20px;
}

.top-bar h1 img {
  width: 40px;
  margin-right: 10px;
}

.controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

button {
  display: flex;
  align-items: center;
  background: var(--btn-bg);
  color: #fff;
  font-size: 14px;
  border: none;
  border-radius: 30px;
  padding: 10px 16px;
  cursor: pointer;
  transition: background 0.3s;
}

button img {
  width: 18px;
  margin-right: 6px;
}

button#theme-toggle {
  font-size: 18px;
  padding: 10px 12px;
  background: transparent;
  border: 2px solid #fff;
  border-radius: 50%;
}

.notes-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.note {
  background: var(--note-bg);
  color: var(--text-color);
  border-radius: 12px;
  padding: 15px 20px 40px;
  min-height: 180px;
  position: relative;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
  outline: none;
}

.note:focus {
  transform: scale(1.02);
}

.note .date {
  font-size: 12px;
  opacity: 0.6;
  margin-bottom: 8px;
}

.note img {
  position: absolute;
  bottom: 10px;
  right: 10px;
  width: 22px;
  cursor: pointer;
  opacity: 0.6;
}

.note img:hover {
  opacity: 1;
}
