/* ==========================================================================
   Luiza's World — Falling Items + Drag + 3D Flip
   ========================================================================== */

:root {
  --c-pink:     #FF6B8A;
  --c-cream:    #FFF5E6;
  --c-mint:     #7ECFB3;
  --c-coral:    #FF8C6B;
  --c-lavender: #C5A3D9;
}

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: 'Nunito', sans-serif;
  -webkit-font-smoothing: antialiased;

  background: none; /* bg images handled by JS rotation layers */
}

/* --- Background rotation layers --- */
.bg-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-color: #d4a574;
  opacity: 0;
  transition: opacity 2s ease-in-out;
}

.bg-layer.active {
  opacity: 1;
}

/* --- Viewport (the full screen) --- */
.canvas-viewport {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

/* --- World (same size as viewport, items overflow and recycle) --- */
.canvas-world {
  position: absolute;
  inset: 0;
}

/* --- Backdrop overlay for expanded items --- */
.canvas-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  z-index: 998;
  pointer-events: none;
  transition: background 0.5s ease;
}

.canvas-backdrop.active {
  background: rgba(0, 0, 0, 0.7);
  pointer-events: all;
}

/* ==========================================================================
   Canvas Item — Draggable + 3D Flip Card
   ========================================================================== */
.canvas-item {
  position: absolute;
  cursor: grab;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  perspective: 1200px;
  transition: filter 0.3s ease, box-shadow 0.3s ease;
}

.canvas-item:hover {
  filter: brightness(1.06) drop-shadow(0 10px 25px rgba(255, 107, 138, 0.25));
}

.canvas-item.dragging {
  cursor: grabbing;
  z-index: 900 !important;
  filter: brightness(1.1) drop-shadow(0 15px 35px rgba(255, 107, 138, 0.35));
  transition: filter 0.1s ease;
}

/* Inner flip container */
.canvas-item-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Front face */
.canvas-item-front {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.canvas-item-front img {
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}

/* Back face — fills the item, transparent bg with silhouette gradient fill */
.canvas-item-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: rotateY(180deg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: visible;
  pointer-events: all;
}

/* SVG silhouette as the colored background shape */
.back-silhouette {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.back-silhouette img {
  width: 100%;
  height: 100%;
  /* Tint the silhouette with the pink/coral gradient using filters */
  filter: brightness(0.9) sepia(1) hue-rotate(310deg) saturate(2.5);
  opacity: 0.85;
}

/* Content sits on top of the silhouette — constrained to inner area */
.back-content {
  position: absolute;
  z-index: 1;
  /* Fit inside the silhouette's visible area */
  top: 50%;
  left: 50%;
  width: 55%;
  height: 55%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: all;
}

/* Counter-scale to keep text/buttons readable at expanded scale */
.canvas-item.expanded .back-content {
  transform: translate(-50%, -50%) scale(var(--inv-scale, 0.5));
}

.canvas-item.expanded .back-close-btn {
  transform: scale(var(--inv-scale, 0.5));
  transform-origin: top right;
}

/* ==========================================================================
   Floating controls toolbar — sits OUTSIDE the flip, on the canvas-item
   ========================================================================== */
.item-toolbar {
  position: absolute;
  top: 50%;
  left: calc(100% + 6px);
  transform: translateY(-50%) scale(var(--inv-scale, 0.5));
  transform-origin: left center;
  z-index: 1010;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.5rem;
  padding: 0;
  background: none;
  white-space: nowrap;
  pointer-events: all;
}

/* Toolbar buttons — fun, colorful, bouncy */
.toolbar-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: 2rem;
  background: linear-gradient(135deg, var(--c-pink), var(--c-coral));
  color: white;
  font-family: 'Quicksand', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
  box-shadow: 0 3px 12px rgba(255, 107, 138, 0.3);
  text-decoration: none;
}

.toolbar-btn:hover {
  transform: scale(1.1) rotate(-1deg);
  box-shadow: 0 6px 20px rgba(255, 107, 138, 0.4);
}

.toolbar-btn:active {
  transform: scale(0.95);
}

.toolbar-btn .btn-icon {
  font-size: 1.1rem;
}

/* Recording stop button — red pulse */
.toolbar-btn.recording {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  box-shadow: 0 3px 12px rgba(231, 76, 60, 0.4);
  animation: pulse-dot 1.5s ease-in-out infinite;
}

.toolbar-btn.recording:hover {
  box-shadow: 0 6px 20px rgba(231, 76, 60, 0.5);
}

/* Play button — mint */
.play-pause-btn {
  background: linear-gradient(135deg, var(--c-mint), #5bb89a);
  box-shadow: 0 3px 12px rgba(126, 207, 179, 0.4);
}

/* Restart — lavender */
.restart-btn {
  background: linear-gradient(135deg, var(--c-lavender), #a87fc4);
  box-shadow: 0 3px 12px rgba(197, 163, 217, 0.4);
}

.rec-timer {
  font-variant-numeric: tabular-nums;
  font-size: 0.9rem;
  color: #e74c3c;
  font-weight: 700;
  font-family: 'Quicksand', sans-serif;
}

.toolbar-guest {
  font-size: 0.8rem;
  color: var(--c-lavender);
  font-family: 'Quicksand', sans-serif;
  font-weight: 700;
}

.toolbar-name-field {
  padding: 0.5rem 1rem;
  border: 2px solid var(--c-pink);
  border-radius: 2rem;
  background: white;
  color: var(--c-pink);
  font-family: 'Quicksand', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
  outline: none;
  width: 150px;
  transition: border-color 0.3s;
}

.toolbar-name-field:focus {
  border-color: var(--c-coral);
}

.toolbar-name-field::placeholder {
  color: rgba(255, 107, 138, 0.4);
}

/* Flipped */
.canvas-item.flipped .canvas-item-inner {
  transform: rotateY(180deg);
}

/* Has-content — badge handles the indicator now */

@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.7; }
}

/* Label */
.canvas-item-label {
  position: absolute;
  bottom: -24px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Quicksand', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--c-pink);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.canvas-item:hover .canvas-item-label {
  opacity: 0;
}

.canvas-item.flipped .canvas-item-label,
.canvas-item.dragging .canvas-item-label {
  opacity: 0 !important;
}

/* ==========================================================================
   Expanded State — grows in place with scale
   ========================================================================== */
.canvas-item.expanded {
  z-index: 999 !important;
  cursor: default;
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
              filter 0.3s ease;
}

/* ==========================================================================
   Back Face Content
   ========================================================================== */
.back-close-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.2);
  color: #FFF5E6;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, background 0.2s ease;
  z-index: 5;
}

.back-close-btn:hover {
  transform: scale(1.15) rotate(90deg);
  background: rgba(255, 255, 255, 0.35);
}

.back-title {
  font-family: 'Quicksand', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: #FFF5E6;
  margin-bottom: 0.2rem;
  text-shadow: 0 2px 8px rgba(0,0,0,0.2);
  text-align: center;
}

.back-subtitle {
  font-size: 0.7rem;
  color: rgba(255, 245, 230, 0.8);
  margin-bottom: 0.5rem;
  text-align: center;
}

.guest-name-field {
  width: 90%;
  max-width: 200px;
  padding: 0.5rem 0.8rem;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: 2rem;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  color: #FFF5E6;
  font-family: 'Quicksand', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
  outline: none;
  margin-bottom: 0.5rem;
  transition: border-color 0.3s, background 0.3s;
}

.guest-name-field:focus {
  border-color: #FFF5E6;
  background: rgba(255, 255, 255, 0.3);
}

.guest-name-field::placeholder { color: rgba(255, 245, 230, 0.45); }

.back-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
  width: 100%;
}

.back-option-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  padding: 0.5rem 0.3rem;
  border: none;
  border-radius: 1rem;
  color: #FFF5E6;
  font-family: 'Quicksand', sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
  white-space: nowrap;
  justify-content: center;
  box-shadow: 0 3px 10px rgba(0,0,0,0.12);
}

/* Each button gets its own fun color */
.back-option-btn[data-action="photo"] {
  background: linear-gradient(135deg, #7ECFB3, #5bb89a);
}
.back-option-btn[data-action="note"] {
  background: linear-gradient(135deg, #C5A3D9, #a87fc4);
}
.back-option-btn[data-action="audio"] {
  background: linear-gradient(135deg, #FF8C6B, #e07050);
}
.back-option-btn[data-action="video"] {
  background: linear-gradient(135deg, #FF6B8A, #e0506e);
}

/* Continue button */
.back-continue-btn {
  background: linear-gradient(135deg, #FFF5E6, #f0e0cc) !important;
  color: var(--c-pink) !important;
  border: none !important;
  padding: 0.5rem 1.5rem !important;
  border-radius: 2rem !important;
  font-size: 0.8rem !important;
  font-weight: 700 !important;
  box-shadow: 0 3px 12px rgba(255, 107, 138, 0.2);
  min-width: 0 !important;
  flex-direction: row !important;
  grid-column: span 2;
}

.back-option-btn:hover {
  transform: scale(1.12) rotate(-2deg);
  box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

.back-option-btn:active {
  transform: scale(0.95);
}

.back-option-btn .btn-icon { font-size: 1.2rem; display: block; }

/* Note form */
.back-note-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  width: 85%;
}

.back-note-form textarea {
  width: 100%;
  min-height: 70px;
  padding: 0.6rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.12);
  color: #FFF5E6;
  font-family: 'Nunito', sans-serif;
  font-size: 0.8rem;
  resize: none;
  outline: none;
}

.back-note-form textarea::placeholder { color: rgba(255, 245, 230, 0.5); }

.back-note-form .send-btn {
  padding: 0.4rem 1.2rem;
  border: none;
  border-radius: 2rem;
  background: rgba(255, 255, 255, 0.9);
  color: var(--c-pink);
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
  transition: transform 0.2s;
}

.back-note-form .send-btn:hover { transform: scale(1.05); }

/* Recording */
.back-recording {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.7rem;
}

.back-recording .rec-indicator {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: #FFF5E6;
  font-size: 0.85rem;
}

.back-recording .rec-dot {
  width: 10px;
  height: 10px;
  background: #fff;
  border-radius: 50%;
  animation: pulse-dot 1s ease-in-out infinite;
}

.back-recording .stop-btn {
  padding: 0.4rem 1rem;
  border: 2px solid rgba(255, 255, 255, 0.6);
  border-radius: 2rem;
  background: rgba(255, 255, 255, 0.2);
  color: #FFF5E6;
  font-family: 'Nunito', sans-serif;
  font-weight: 600;
  font-size: 0.8rem;
  cursor: pointer;
}

/* Media display */
.back-media {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.back-media img,
.back-media video {
  max-width: 90%;
  max-height: 70%;
  border-radius: 12px;
  object-fit: cover;
}

.back-media .back-note-display {
  text-align: center;
  color: #FFF5E6;
  font-size: 0.9rem;
  padding: 1rem;
  font-style: italic;
}

.back-media .back-note-author {
  font-size: 0.75rem;
  opacity: 0.8;
  margin-top: 0.3rem;
  color: #FFF5E6;
}

.back-media audio {
  width: 80%;
  max-width: 200px;
}

/* ==========================================================================
   Title overlay
   ========================================================================== */
.title-overlay {
  position: fixed;
  bottom: 2.5rem;
  left: 2.5rem;
  z-index: 50;
  text-align: left;
  pointer-events: none;
  transition: opacity 1.5s ease;
}

.title-overlay.faded { opacity: 0; }

.title-name {
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  font-style: italic;
  font-size: clamp(4rem, 12vw, 9rem);
  color: #FFF5E6;
  text-shadow:
    0 4px 40px rgba(0, 0, 0, 0.5),
    0 2px 8px rgba(0, 0, 0, 0.3);
  line-height: 0.85;
  letter-spacing: -0.03em;
  margin-bottom: 0.3rem;
}

.title-sub {
  font-family: 'Nunito', sans-serif;
  font-size: clamp(0.8rem, 2vw, 1.1rem);
  color: rgba(255, 245, 230, 0.75);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

/* ==========================================================================
   Spotify mini widget
   ========================================================================== */
.spotify-widget {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  z-index: 100;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  opacity: 0.85;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.spotify-widget:hover { opacity: 1; transform: scale(1.02); }
.spotify-widget iframe { display: block; border-radius: 12px; }

/* ==========================================================================
   Photo stickers — floating photos with polaroid-like styling
   ========================================================================== */
/* Photo close button */
.photo-close-btn {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid white;
  background: var(--c-pink);
  color: white;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  box-shadow: 0 3px 10px rgba(255, 107, 138, 0.4);
  transition: transform 0.2s ease;
  transform: scale(var(--inv-scale, 1));
  transform-origin: center center;
}

.photo-close-btn:hover {
  transform: scale(var(--inv-scale, 1)) rotate(90deg);
}

.photo-sticker .canvas-item-front img {
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  border: 6px solid white;
}

.photo-sticker:hover .canvas-item-front img {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
}

/* ==========================================================================
   Memory bubbles — appear on item edges when it has content
   ========================================================================== */
.memory-bubble {
  position: absolute;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: white;
  border: 3px solid var(--c-pink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  cursor: pointer;
  z-index: 20;
  transform: translate(-50%, -50%) scale(var(--inv-scale, 0.5));
  box-shadow: 0 3px 12px rgba(255, 107, 138, 0.3);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
  pointer-events: all;
}

.memory-bubble:hover {
  transform: translate(-50%, -50%) scale(calc(var(--inv-scale, 0.5) * 1.2));
  box-shadow: 0 6px 20px rgba(255, 107, 138, 0.45);
}

/* Content badge — count indicator on non-expanded items */
.content-badge {
  position: absolute;
  top: 20%;
  right: 20%;
  min-width: 36px;
  height: 36px;
  border-radius: 18px;
  background: var(--c-pink);
  color: white;
  font-family: 'Quicksand', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  z-index: 5;
  border: 3px solid white;
  box-shadow: 0 3px 12px rgba(255, 107, 138, 0.4);
}

.photo-sticker .content-badge {
  top: -15px;
  right: -15px;
}

/* ==========================================================================
   Media modal — full-screen overlay to view/download a memory
   ========================================================================== */
.media-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.97);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.media-modal.active {
  opacity: 1;
}

.media-modal-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.1);
  color: white;
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, background 0.2s;
}

.media-modal-close:hover {
  transform: scale(1.1) rotate(90deg);
  background: rgba(255, 255, 255, 0.2);
}

.media-modal-content {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 90vw;
  max-height: 70vh;
}

.media-modal-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* ==========================================================================
   Splash overlay — click to enter
   ========================================================================== */
.splash-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: url('../assets/bg-brasil-1.jpg') center center / cover no-repeat;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 3rem;
  gap: 1.5rem;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

.splash-overlay::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.6) 0%,
    rgba(0, 0, 0, 0.1) 50%,
    rgba(0, 0, 0, 0) 100%
  );
  pointer-events: none;
}

.splash-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splash-name {
  position: relative;
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  font-style: italic;
  font-size: clamp(5rem, 15vw, 12rem);
  color: #FFF5E6;
  text-shadow: 0 4px 40px rgba(0, 0, 0, 0.5), 0 2px 15px rgba(0,0,0,0.3);
  line-height: 0.85;
  letter-spacing: -0.03em;
}

.splash-enter {
  position: relative;
  padding: 1rem 3rem;
  border: 2px solid rgba(255, 245, 230, 0.6);
  border-radius: 0;
  background: transparent;
  color: #FFF5E6;
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-weight: 700;
  font-style: italic;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.splash-enter:hover {
  background: rgba(255, 245, 230, 0.15);
  border-color: #FFF5E6;
  transform: scale(1.05);
}

.splash-enter:active {
  transform: scale(0.97);
}

/* ==========================================================================
   Reduced motion / responsive / print
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  .canvas-item { transition-duration: 0.01ms !important; }
  .canvas-item-inner { transition-duration: 0.01ms !important; }
  .canvas-item.has-content::after { animation: none; }
}

@media (max-width: 700px) {
  /* Toolbar below item on mobile */
  .item-toolbar {
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) scale(var(--inv-scale, 0.5));
    transform-origin: top center;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
  }

  /* Memory bubbles: smaller on mobile */
  .memory-bubble {
    width: 44px;
    height: 44px;
    font-size: 1.2rem;
  }

  .spotify-widget { bottom: 0.5rem; right: 0.5rem; }
  .spotify-widget iframe { width: 250px; height: 80px; }
}

@media print {
  .spotify-widget { display: none !important; }
}

/* ==========================================================================
   Save toast — upload progress indicator
   ========================================================================== */
.save-toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  z-index: 20000;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem;
  border-radius: 2rem;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  color: white;
  font-family: 'Quicksand', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
  opacity: 0;
  pointer-events: none;
}

.save-toast.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: all;
}

.save-toast-spinner {
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255, 255, 255, 0.25);
  border-top-color: var(--c-pink);
  border-radius: 50%;
  animation: toast-spin 0.7s linear infinite;
}

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

.save-toast-icon {
  font-size: 1.1rem;
  line-height: 1;
}

.save-toast.success {
  background: rgba(91, 184, 154, 0.9);
}

.save-toast.error {
  background: rgba(231, 76, 60, 0.9);
}

/* ==========================================================================
   Zoom / density controls
   ========================================================================== */
.zoom-controls {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 1.5rem;
  padding: 0.4rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.zoom-btn {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: white;
  font-family: 'Quicksand', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.zoom-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.12);
}

.zoom-btn:active {
  transform: scale(0.9);
}

.zoom-filter-btn.active {
  background: var(--c-pink);
  color: white;
  box-shadow: 0 0 12px rgba(255, 107, 138, 0.5);
}

.zoom-label {
  font-family: 'Quicksand', sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.6);
  font-variant-numeric: tabular-nums;
  user-select: none;
}

@media (max-width: 600px) {
  .zoom-controls {
    top: 0.5rem;
    right: 0.5rem;
  }
  .zoom-btn {
    width: 32px;
    height: 32px;
    font-size: 1rem;
  }
}
