﻿:root {
  --bg-main: #fff8e7;
  --bg-alt: #f9ffeb;
  --ink: #223;
  --muted: #576071;
  --card: rgba(255, 255, 255, 0.82);
  --card-border: rgba(34, 34, 51, 0.12);
  --shadow: 0 18px 45px rgba(34, 34, 51, 0.17);
  --note-sun: #ffe66d;
  --note-mint: #c4ffd7;
  --note-sky: #c4e8ff;
  --note-rose: #ffd0e0;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "DM Sans", sans-serif;
  color: var(--ink);
  background: radial-gradient(1250px circle at 12% 12%, var(--bg-alt), transparent 45%),
    linear-gradient(160deg, var(--bg-main), #f4f5ff 60%, #edfff8);
  overflow: hidden;
}

.bg-shape {
  position: fixed;
  pointer-events: none;
  border-radius: 40px;
  filter: blur(1px);
  opacity: 0.35;
}

.shape-one {
  width: 360px;
  height: 360px;
  right: -60px;
  top: 10vh;
  background: linear-gradient(40deg, #ffd59f, #ff9bbb);
  transform: rotate(20deg);
}

.shape-two {
  width: 300px;
  height: 300px;
  left: -70px;
  bottom: -60px;
  background: linear-gradient(40deg, #b6ffce, #8ad8ff);
  transform: rotate(-25deg);
}

.app-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  padding: 2rem clamp(1rem, 2.5vw, 2.5rem);
}

.lock-screen,
.board-screen {
  width: min(1200px, 100%);
  margin: 0 auto;
}

.lock-screen {
  min-height: calc(100vh - 4rem);
  display: grid;
  place-items: center;
}

.lock-card {
  width: min(460px, 100%);
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: clamp(1.3rem, 2.5vw, 2rem);
  backdrop-filter: blur(8px);
  animation: rise-in 0.45s ease-out both;
}

.eyebrow {
  margin: 0;
  font-family: "Syne", sans-serif;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #40437b;
  font-size: 0.78rem;
  font-weight: 700;
}

h1,
h2 {
  margin: 0.3rem 0 0.2rem;
  font-family: "Syne", sans-serif;
  line-height: 1.1;
}

h1 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
}

h2 {
  font-size: clamp(1.4rem, 3vw, 2rem);
}

.lock-subtitle {
  margin: 0.5rem 0 1.2rem;
  color: var(--muted);
}

.unlock-form {
  display: grid;
  gap: 0.65rem;
}

.unlock-form label {
  font-weight: 600;
  font-size: 0.94rem;
}

input,
textarea,
select,
button {
  font: inherit;
}

input,
button,
select,
textarea {
  border-radius: 14px;
  border: 1px solid rgba(35, 36, 53, 0.2);
}

input {
  padding: 0.78rem 0.85rem;
}

button {
  padding: 0.72rem 0.95rem;
  border: 0;
  background: #28303f;
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.2s ease;
}

button:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

button:active {
  transform: translateY(0);
}

.error {
  margin: 0.1rem 0 0;
  min-height: 1.1em;
  color: #a11644;
  font-size: 0.9rem;
}

.lock-footnote {
  margin: 1rem 0 0;
  color: #697089;
  font-size: 0.85rem;
}

.board-screen {
  display: grid;
  gap: 1rem;
  animation: rise-in 0.5s ease-out both;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 18px;
  box-shadow: 0 10px 22px rgba(34, 34, 51, 0.12);
  padding: 0.95rem 1rem;
  backdrop-filter: blur(7px);
}

.topbar-actions {
  display: flex;
  gap: 0.6rem;
}

.ghost {
  background: #f2f5ff;
  color: #2f3762;
}

.board {
  position: relative;
  min-height: 70vh;
  border-radius: 24px;
  border: 1px solid rgba(35, 36, 53, 0.14);
  background:
    linear-gradient(to right, rgba(30, 40, 66, 0.05) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(to bottom, rgba(30, 40, 66, 0.05) 1px, transparent 1px) 0 0 / 28px 28px,
    rgba(255, 255, 255, 0.75);
  box-shadow: inset 0 10px 35px rgba(30, 40, 66, 0.08);
  overflow: hidden;
}

.note {
  position: absolute;
  width: min(250px, 68vw);
  min-height: 165px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  border-radius: 16px;
  box-shadow: 0 10px 20px rgba(29, 31, 39, 0.22);
  border: 1px solid rgba(0, 0, 0, 0.14);
  transform-origin: center;
  animation: pop-in 0.23s ease-out both;
}

.note-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.7rem;
  padding: 0.45rem 0.62rem;
  border-bottom: 1px dashed rgba(0, 0, 0, 0.14);
  cursor: grab;
  user-select: none;
}

.drag-hint {
  font-size: 0.78rem;
  color: rgba(28, 30, 45, 0.7);
}

.delete-btn {
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 50%;
  padding: 0;
  background: rgba(255, 255, 255, 0.64);
  color: #4f2437;
  font-size: 1.1rem;
  line-height: 1;
}

.note-text {
  border: 0;
  resize: none;
  background: transparent;
  padding: 0.6rem;
  min-height: 95px;
  font-size: 0.96rem;
  line-height: 1.4;
  color: #1e2431;
}

.note-text:focus {
  outline: none;
}

.note-footer {
  display: flex;
  justify-content: flex-end;
  padding: 0.45rem 0.55rem 0.55rem;
}

.note-footer label {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  font-size: 0.78rem;
  color: rgba(28, 30, 45, 0.72);
}

.note-footer select {
  border-radius: 9px;
  padding: 0.18rem 0.34rem;
  border: 1px solid rgba(0, 0, 0, 0.22);
  background: rgba(255, 255, 255, 0.6);
}

.note.category-brainstorm {
  background: var(--note-sun);
}

.note.category-product {
  background: var(--note-mint);
}

.note.category-research {
  background: var(--note-sky);
}

.note.category-personal {
  background: var(--note-rose);
}

.note.category-custom {
  background: #ffe9b8;
}

.hidden {
  display: none !important;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes pop-in {
  from {
    opacity: 0;
    transform: scale(0.88);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@media (max-width: 760px) {
  body {
    overflow: auto;
  }

  .app-shell {
    padding: 1rem;
  }

  .topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .topbar-actions {
    width: 100%;
  }

  .topbar-actions button {
    flex: 1;
  }

  .board {
    min-height: 66vh;
  }
}
