@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;500;600&display=swap');

body {
  font-family: 'Fredoka', sans-serif;
  background-color: #fcfdff;
  color: #2b2b2b;
  text-align: center;
  margin: 0;
  padding: 2rem 1rem 8rem;
}

/* --- HEADER --- */
h1 {
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 2.8rem;
  color: #4d66f5;
  margin-bottom: 0.3rem;
}

.subtitle {
  font-size: 1rem;
  color: #7b7e8b;
  margin-bottom: 2.8rem;
}

/* --- CONTAINERS --- */
.section-title {
  font-size: 1.3rem;
  font-weight: 600;
  text-align: left;
  max-width: 1100px;
  margin: 2.5rem auto 1rem auto;
  color: #444;
}

.hybrid-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
  padding: 0 1rem;
}

/* --- GROUPED LAYOUT --- */
.grouped-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 3rem;
}

.category-col {
  flex: 0 0 270px;
  background: #fff;
  border-radius: 25px;
  padding: 1.4rem 1rem;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: 2px solid #f1f3ff;
}

.category-col:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.category-col h3 {
  font-size: 1.2rem;
  margin-bottom: 0.8rem;
  color: #3b3b3b;
}

/* --- NOTES --- */
.note {
  background: #fffdf8;
  border-radius: 14px;
  padding: 0.8rem 1rem;
  margin-bottom: 0.8rem;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  font-size: 1rem;
  text-align: left;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.note:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.1);
}

.new-notes-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.2rem;
  margin-top: 2rem;
}

/* --- BUTTONS + CONTROLS --- */
button {
  font-family: 'Fredoka', sans-serif;
  font-weight: 500;
  border-radius: 40px;
  padding: 0.6rem 1.3rem;
  font-size: 0.95rem;
  border: 2px solid #000;
  background: #fff;
  cursor: pointer;
  transition: all 0.15s ease;
}

button:hover {
  transform: translateY(-2px);
  background: #f5f7ff;
}

/* --- CENTERED CONTROL BAR --- */
.controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.2rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

/* --- ADD NOTE BUTTON --- */
#addBtn {
  background: #4b63f5;
  color: white;
  border: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 1.8rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: all 0.15s ease;
}

#addBtn:hover {
  transform: translateY(-2px);
}

/* --- MODAL --- */
#noteModal {
  position: relative;
  background: white;
  border: 2px solid #000;
  border-radius: 20px;
  padding: 1rem;
  width: 240px;
  margin: 2rem auto 0 auto;
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
}

#noteModal textarea {
  width: 90%;
  height: 90px;
  border-radius: 12px;
  border: 1.5px solid #ccc;
  padding: 0.6rem;
  font-family: 'Fredoka', sans-serif;
  resize: none;
}

#noteModal button {
  font-size: 0.9rem;
  padding: 0.4rem 1rem;
}

/* --- SHOW MODAL --- */
#noteModal:not(.hidden) {
  display: flex;
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
  .grouped-row {
    flex-direction: column;
    align-items: center;
  }
  .category-col {
    width: 90%;
  }
}
