/* ---------- BASE ---------- */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text",
               "Segoe UI", Roboto, Arial, sans-serif;
  background: linear-gradient(145deg, #e9ebf8, #f7f9ff);
  color: #1c1c1e;
  min-height: 100vh;
}

/* ---------- HIDDEN ---------- */

.hidden {
  display: none !important;
}

/* ---------- LOADER ---------- */

#loader {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* glass spinner */

.spinner-wrap {
  width: 128px;
  height: 128px;
  border-radius: 28px;
  background: linear-gradient(
    180deg,
    rgba(255,255,255,0.28),
    rgba(255,255,255,0.18)
  );
  border: 1px solid rgba(255,255,255,0.35);
  box-shadow: 0 10px 30px rgba(22,32,70,0.08);
  backdrop-filter: blur(18px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.spinner-ring {
  position: relative;
  width: 84px;
  height: 84px;
  border-radius: 50%;
}

.spinner-segment {
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  clip-path: polygon(50% 0%, 65% 0%, 65% 35%, 50% 35%);
  background: conic-gradient(
    from 0deg,
    rgba(106,141,255,1),
    rgba(154,192,255,1)
  );
  animation: spin 1s linear infinite;
}

.spinner-core {
  position: absolute;
  inset: 22px;
  border-radius: 50%;
  background: linear-gradient(
    180deg,
    rgba(255,255,255,0.55),
    rgba(245,245,255,0.28)
  );
  border: 1px solid rgba(255,255,255,0.7);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---------- APP ---------- */

.app-header {
  padding: 16px;
}

.app-header h1 {
  margin: 0 0 12px;
  font-size: 28px;
}

.app-header input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.6);
  background: rgba(255,255,255,0.6);
  backdrop-filter: blur(12px);
  font-size: 16px;
  outline: none;
}

/* ---------- NOTES LIST ---------- */

.notes-list {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.note-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border-radius: 20px;
  cursor: pointer;

  background: linear-gradient(
    180deg,
    rgba(255,255,255,0.75),
    rgba(255,255,255,0.55)
  );
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 28px rgba(22,32,70,0.06);
}

.note-icon {
  width: 44px;
  min-width: 44px;
  height: 44px;
  border-radius: 14px;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 22px;

  background: rgba(255, 255, 255, 0.25);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.note-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow: hidden;
}

.note-date {
  font-size: 12px;
  opacity: 0.55;
}

.note-title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
}

.note-preview {
  font-size: 14px;
  opacity: 0.75;
  line-height: 1.35;

  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.empty {
  text-align: center;
  opacity: 0.6;
  padding: 24px;
}