/* Reset + basic styling */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: linear-gradient(135deg, #0f172a, #020617);
  color: #e5e7eb;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 16px;
  animation: bgShift 14s ease infinite;
  background-size: 400% 400%;
}

/* Smooth animated background */
@keyframes bgShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* App container */
.app {
  width: 100%;
  max-width: 960px;
  background: rgba(15, 23, 42, 0.92);
  border-radius: 18px;
  box-shadow: 0 35px 60px rgba(0, 0, 0, 0.75);
  border: 1px solid rgba(148, 163, 184, 0.25);
  padding: 28px;
  backdrop-filter: blur(12px);
}

/* Header section */
.header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 26px;
  gap: 12px;
  flex-wrap: wrap;
}

.title {
  font-size: 1.8rem;
  font-weight: 700;
  color: #e5e7eb;
}

.subtitle {
  font-size: 0.95rem;
  color: #9ca3af;
}

.pill {
  font-size: 0.75rem;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(94, 234, 212, 0.5);
  color: #67e8f9;
  background: rgba(8, 47, 73, 0.55);
}

/* Two-column layout */
.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

@media (max-width: 768px) {
  .grid { grid-template-columns: 1fr; }
}

/* Card styling */
.card {
  background: rgba(15, 23, 42, 0.97);
  border-radius: 14px;
  padding: 18px 20px;
  border: 1px solid rgba(55, 65, 81, 0.85);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

/* Card hover effect */
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 35px rgba(0, 0, 0, 0.6);
}

.card h2 {
  font-size: 1rem;
  margin-bottom: 12px;
  color: #e5e7eb;
}

.list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;   /* space between header and "User ID" field */
}

/* Form fields */
.field {
  margin-bottom: 14px;
}

.field label {
  display: block;
  font-size: 0.82rem;
  color: #9ca3af;
  margin-bottom: 4px;
}

.field input,
.field textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(75, 85, 99, 0.9);
  background: rgba(15, 23, 42, 0.85);
  color: #e5e7eb;
  font-size: 0.9rem;
}

.field textarea {
  min-height: 90px;
  resize: vertical;
}

/* Glowing focus effect */
.field input:focus,
.field textarea:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.5);
  outline: none;
}

/* Button layout */
.button-row {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 10px;
}

/* Buttons */
button {
  border-radius: 999px;
  border: none;
  padding: 10px 16px;
  font-size: 0.86rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}

.btn-primary {
  background: linear-gradient(135deg, #38bdf8, #22c55e);
  color: #0f172a;
  font-weight: 600;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 22px rgba(8, 47, 73, 0.9);
}

.btn-secondary {
  background: rgba(15, 23, 42, 0.9);
  color: #e5e7eb;
  border: 1px solid rgba(75, 85, 99, 0.9);
}

.btn-secondary:hover {
  background: rgba(31, 41, 55, 1);
}

/* Badge for note counts */
.badge {
  font-size: 0.75rem;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 1);
  border: 1px solid rgba(75, 85, 99, 1);
  color: #9ca3af;
}

/* Status text */
.status {
  margin-top: 10px;
  font-size: 0.82rem;
  min-height: 18px;
  color: #9ca3af;
}

.status.ok { color: #4ade80; }
.status.err { color: #f97373; }

/* Notes list */
.notes-list {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 360px;
  overflow-y: auto;
  padding-right: 4px;
}

/* Single note card */
.note-item {
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 1);
  border: 1px solid rgba(55, 65, 81, 1);
}

.note-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.note-meta {
  font-size: 0.72rem;
  color: #9ca3af;
  margin-bottom: 8px;
}

.note-content {
  font-size: 0.87rem;
  color: #d1d5db;
  white-space: pre-wrap;
}

/* Bottom footer */
.footer {
  margin-top: 28px;
  padding: 18px 0;
  text-align: center;
  color: #a1a1aa;
  font-size: 0.85rem;
}

.footer-inner {
  opacity: 0.85;
  transition: opacity 0.2s ease;
}

.footer-inner:hover {
  opacity: 1;
}

.footer-name strong {
  color: #38bdf8;
}

.footer-links {
  margin-top: 6px;
}

.footer-links a {
  color: #22d3ee;
  text-decoration: none;
}

.footer-links a:hover {
  text-decoration: underline;
}

.footer-year {
  margin-top: 6px;
  color: #71717a;
}
