/* Reset */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: 'Segoe UI', sans-serif;
  background: linear-gradient(135deg, #1a1a1a, #101010);
  color: #fff;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Glassmorphism helper */
.glass {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}

/* Header */
header {
  padding: 16px;
  margin: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
header h1 { font-size: 22px; font-weight: 600; }
.menu-bar {
  display: flex;
  gap: 12px;
  align-items: center;
}
#search {
  padding: 8px 12px;
  border-radius: 14px;
  border: none;
  outline: none;
  background: rgba(255,255,255,0.1);
  color: #fff;
}

/* Dropdown menus */
details summary {
  list-style: none;
  cursor: pointer;
  padding: 8px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.25s ease;
}
details summary:hover {
  background: rgba(255, 255, 255, 0.18);
}
details summary::-webkit-details-marker { display: none; }
details[open] { position: relative; }
details[open] summary ~ * {
  position: absolute;
  right: 0;
  margin-top: 6px;
  min-width: 150px;
  border-radius: 16px;
  padding: 8px;
  background: rgba(20,20,20,0.7);
  backdrop-filter: blur(18px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.5);
  animation: fadeIn 0.25s ease;
}
details[open] li {
  list-style: none;
  padding: 8px 12px;
  border-radius: 12px;
  cursor: pointer;
  transition: 0.2s;
}
details[open] li:hover { background: rgba(255,255,255,0.12); }

/* Notes grid */
#notes-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
  padding: 16px;
}
.note {
  padding: 16px;
  border-radius: 20px;
  cursor: pointer;
  transition: transform 0.25s ease;
}
.note:hover { transform: translateY(-4px) scale(1.02); }
.note h3 { font-size: 18px; margin-bottom: 8px; }
.note p { font-size: 14px; opacity: 0.8; }

/* Add button */
#add-btn {
  position: fixed;
  bottom: 20px; right: 20px;
  width: 60px; height: 60px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff4d6d, #ff9966);
  color: #fff;
  font-size: 28px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0,0,0,0.5);
  transition: transform 0.25s ease;
}
#add-btn:hover { transform: scale(1.1); }

/* Fullscreen view */
.fullscreen {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(14px);
  display: flex; justify-content: center; align-items: center;
  z-index: 200; opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease;
}
.fullscreen.show { opacity: 1; pointer-events: auto; }
.fullscreen-content {
  padding: 28px;
  border-radius: 24px;
  max-width: 600px;
  width: 90%;
  transform: scale(0.95);
  animation: zoomIn 0.3s ease forwards;
}
@keyframes zoomIn {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.close-btn {
  position: absolute;
  top: 16px; right: 16px;
  background: rgba(255,255,255,0.15);
  border: none;
  border-radius: 50%;
  width: 36px; height: 36px;
  font-size: 18px; color: #fff;
  cursor: pointer;
  transition: 0.2s;
}
.close-btn:hover { background: rgba(255,255,255,0.3); }

/* Modal */
.modal {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.5);
  display: flex; justify-content: center; align-items: center;
  opacity: 0; pointer-events: none;
  transition: 0.3s;
}
.modal.show { opacity: 1; pointer-events: auto; }
.modal-content {
  padding: 24px;
  border-radius: 20px;
  width: 90%; max-width: 400px;
  display: flex; flex-direction: column;
  gap: 12px;
}
.modal-content input,
.modal-content textarea {
  padding: 10px;
  border-radius: 12px;
  border: none;
  outline: none;
  background: rgba(255,255,255,0.1);
  color: #fff;
}
.modal-content button {
  padding: 10px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg,#4facfe,#00f2fe);
  color: #fff; cursor: pointer;
  font-weight: 600;
}
