@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;0,900;1,400&display=swap');

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --wall-color: #F5EDDE;
  --wall-dark: #E8DFD0;
  --cork-light: #C4A265;
  --cork-mid: #B8944F;
  --cork-dark: #A07A3A;
  --wood-frame: #5C3A1E;
  --wood-light: #7A5230;
  --wood-shadow: #3D2510;
  --pin-red: #CC3333;
  --pin-blue: #3366AA;
  --pin-green: #339944;
  --pin-yellow: #CCAA22;
}

body {
  font-family: 'Segoe Script', 'Comic Sans MS', cursive;
  background: var(--wall-color);
  overflow: hidden;
  height: 100vh;
  width: 100vw;
}

.wall-bg {
  position: fixed;
  inset: 0;
  background-color: var(--wall-color);
  background-image:
    url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  z-index: 0;
}

.wall-vignette {
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 50%, rgba(0,0,0,0.15) 100%);
  pointer-events: none;
  z-index: 1;
}

.board-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  color: #3D2510;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.15);
  letter-spacing: 0.02em;
}

.cork-texture {
  background-color: var(--cork-mid);
  background-image:
    radial-gradient(ellipse at 20% 30%, var(--cork-light) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 70%, var(--cork-dark) 0%, transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(255,255,255,0.05) 0%, transparent 30%),
    url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.5' numOctaves='6' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.08'/%3E%3C/svg%3E");
}

.wood-frame {
  border: 6px solid var(--wood-frame);
  border-image: linear-gradient(
    135deg,
    var(--wood-light) 0%,
    var(--wood-frame) 30%,
    var(--wood-shadow) 60%,
    var(--wood-frame) 80%,
    var(--wood-light) 100%
  ) 1;
  box-shadow:
    inset 0 0 8px rgba(0,0,0,0.3),
    0 4px 12px rgba(0,0,0,0.3),
    0 1px 3px rgba(0,0,0,0.2);
}

.sticky-note {
  font-family: 'Segoe Script', 'Comic Sans MS', cursive;
  position: absolute;
  width: 130px;
  min-height: 90px;
  padding: 20px 10px 10px 10px;
  box-shadow: 2px 3px 8px rgba(0,0,0,0.25), 0 1px 2px rgba(0,0,0,0.15);
  cursor: default;
  transition: transform 0.15s, box-shadow 0.15s;
  word-wrap: break-word;
  overflow: hidden;
}

.sticky-note.dev-note {
  width: 180px;
  min-height: 110px;
  padding: 22px 12px 12px 12px;
}

.sticky-note:hover {
  transform: scale(1.05) !important;
  box-shadow: 3px 5px 14px rgba(0,0,0,0.35);
  z-index: 100 !important;
}

.sticky-note::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 0 18px 18px;
  border-color: transparent transparent rgba(0,0,0,0.08) transparent;
}

.pushpin {
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3), inset 0 -1px 2px rgba(0,0,0,0.2), inset 0 1px 1px rgba(255,255,255,0.4);
}

.corner-pin {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3), inset 0 -1px 1px rgba(0,0,0,0.2), inset 0 1px 1px rgba(255,255,255,0.3);
  z-index: 5;
}

.board-glow {
  box-shadow:
    inset 0 0 8px rgba(0,0,0,0.3),
    0 4px 12px rgba(0,0,0,0.3),
    0 0 0 3px rgba(255,200,50,0.7),
    0 0 20px rgba(255,200,50,0.4) !important;
  border-color: #D4A020 !important;
}

.board-glow-pulse {
  animation: glowPulse 1.5s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% { box-shadow: inset 0 0 8px rgba(0,0,0,0.3), 0 4px 12px rgba(0,0,0,0.3), 0 0 0 3px rgba(255,200,50,0.7), 0 0 20px rgba(255,200,50,0.4); }
  50% { box-shadow: inset 0 0 8px rgba(0,0,0,0.3), 0 4px 12px rgba(0,0,0,0.3), 0 0 0 5px rgba(255,200,50,0.9), 0 0 35px rgba(255,200,50,0.6); }
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.modal-note {
  width: 320px;
  min-height: 280px;
  padding: 40px 24px 24px 24px;
  position: relative;
  box-shadow: 4px 6px 20px rgba(0,0,0,0.35);
  transform: rotate(-1deg);
}

.modal-note textarea {
  font-family: 'Segoe Script', 'Comic Sans MS', cursive;
  background: transparent;
  border: none;
  outline: none;
  width: 100%;
  min-height: 120px;
  resize: none;
  font-size: 15px;
  color: #333;
  line-height: 1.5;
}

.modal-note textarea::placeholder {
  color: #999;
}

.toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: #3D2510;
  color: #FDF5E6;
  padding: 12px 24px;
  border-radius: 8px;
  font-family: 'Playfair Display', serif;
  font-size: 14px;
  z-index: 99999;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  animation: toastIn 0.3s ease, toastOut 0.3s ease 2.5s forwards;
  white-space: nowrap;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(20px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@keyframes toastOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

.hud-controls {
  position: fixed;
  bottom: 16px;
  right: 16px;
  background: rgba(61, 37, 16, 0.8);
  color: #FDF5E6;
  padding: 10px 16px;
  border-radius: 8px;
  font-family: 'Segoe Script', cursive;
  font-size: 12px;
  z-index: 9000;
  transition: opacity 0.5s;
  backdrop-filter: blur(4px);
  line-height: 1.8;
}

.slide-transition {
  transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), opacity 0.4s ease;
}

.watermark-text {
  font-family: 'Playfair Display', serif;
  color: rgba(0,0,0,0.12);
  font-size: 18px;
  font-style: italic;
  pointer-events: none;
  user-select: none;
}

.auth-bar {
  position: fixed;
  top: 8px;
  right: 12px;
  z-index: 9001;
  font-family: 'Playfair Display', serif;
  font-size: 13px;
}

.footer-link {
  position: fixed;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9001;
  font-family: 'Playfair Display', serif;
  font-size: 11px;
}

.footer-link a {
  color: rgba(61, 37, 16, 0.4);
  text-decoration: none;
}
.footer-link a:hover {
  color: rgba(61, 37, 16, 0.7);
}

.delete-note-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: none;
  background: rgba(200, 50, 50, 0.7);
  color: white;
  font-size: 10px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s, background 0.2s;
  z-index: 10;
  padding: 0;
}

.sticky-note:hover .delete-note-btn {
  opacity: 1;
}

.delete-note-btn:hover {
  background: rgba(200, 50, 50, 1);
  transform: scale(1.15);
}

.password-modal {
  background: #FDF5E6;
  border: 3px solid #5C3A1E;
  border-radius: 12px;
  padding: 28px 24px;
  width: 360px;
  max-width: 90vw;
  box-shadow: 4px 6px 20px rgba(0,0,0,0.35);
}