/* ============================================
   Winnie's FigJam - A Playful Canvas App
   Compact UI for Maximum Canvas Space
   ============================================ */

:root {
  /* Color palette - warm, crafty, playful */
  --bg-paper: #fdf6e3;
  --bg-paper-dark: #f5ead6;
  --text-primary: #2d2a32;
  --text-secondary: #6b6574;
  --accent-pink: #ff6b9d;
  --accent-purple: #9b5de5;
  --accent-teal: #00c4a7;
  --accent-yellow: #ffd166;
  --shadow-soft: rgba(45, 42, 50, 0.08);
  --shadow-medium: rgba(45, 42, 50, 0.15);
  
  /* Toolbar */
  --toolbar-bg: rgba(255, 251, 245, 0.95);
  --toolbar-border: #e8dfd0;
  
  /* Animation */
  --transition-quick: 150ms ease;
  --transition-smooth: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  overflow: hidden;
  position: fixed;
  width: 100%;
  overscroll-behavior: none;
}

body {
  font-family: 'Nunito', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-paper);
  color: var(--text-primary);
  line-height: 1.5;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

/* Paper texture background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: 
    radial-gradient(ellipse at 20% 30%, rgba(255, 107, 157, 0.03) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 70%, rgba(155, 93, 229, 0.03) 0%, transparent 50%),
    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.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  opacity: 0.4;
  pointer-events: none;
  z-index: -1;
}

/* App Layout - Full viewport */
.app {
  height: 100vh;
  width: 100vw;
}

.workspace {
  display: flex;
  height: 100%;
  width: 100%;
}

/* ============================================
   Toolbars - Compact Floating Design
   ============================================ */

.toolbar {
  position: absolute;
  z-index: 50;
  background: var(--toolbar-bg);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 0.5rem;
  box-shadow: 0 4px 20px var(--shadow-medium);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toolbar-left {
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  border: 2px solid var(--toolbar-border);
  min-width: 120px;
}

.toolbar-right {
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  border: 2px solid var(--toolbar-border);
  width: 90px;
}

.toolbar-divider {
  height: 2px;
  background: var(--toolbar-border);
  margin: 0.25rem 0;
  border-radius: 1px;
}

/* Tool Buttons */
.tool-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.tool-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: white;
  border: 2px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  transition: all var(--transition-smooth);
}

.tool-btn:hover {
  border-color: var(--toolbar-border);
  color: var(--text-primary);
}

.tool-btn.active {
  background: linear-gradient(135deg, rgba(155, 93, 229, 0.15), rgba(255, 107, 157, 0.15));
  border-color: var(--accent-purple);
  color: var(--accent-purple);
  box-shadow: 0 2px 8px rgba(155, 93, 229, 0.25);
}

.tool-icon {
  font-size: 1.1rem;
}

.tool-label {
  font-family: inherit;
}

/* Color Palette - Compact Grid */
.color-palette {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.35rem;
}

.color-btn {
  width: 24px;
  height: 24px;
  background: var(--color);
  border: 2px solid white;
  border-radius: 50%;
  cursor: pointer;
  transition: all var(--transition-quick);
  box-shadow: 0 1px 3px var(--shadow-soft);
}

.color-btn:hover {
  transform: scale(1.2);
  z-index: 1;
}

.color-btn.active {
  border-color: var(--text-primary);
  transform: scale(1.15);
  box-shadow: 
    0 0 0 2px white,
    0 0 0 4px var(--color);
}

/* Brush Sizes */
.brush-sizes {
  display: flex;
  gap: 0.35rem;
  justify-content: center;
}

.brush-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  border: 2px solid var(--toolbar-border);
  border-radius: 8px;
  cursor: pointer;
  transition: all var(--transition-quick);
}

.brush-btn:hover {
  border-color: var(--accent-purple);
}

.brush-btn.active {
  border-color: var(--accent-purple);
  background: linear-gradient(135deg, rgba(155, 93, 229, 0.1), rgba(255, 107, 157, 0.1));
}

.brush-preview {
  width: var(--size);
  height: var(--size);
  background: var(--text-primary);
  border-radius: 50%;
}

/* Action Grid - 2 columns, icon-only */
.action-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.25rem;
  margin-top: 0.25rem;
}

.action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem;
  font-size: 1.1rem;
  background: white;
  border: 2px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  transition: all var(--transition-smooth);
  position: relative;
}

.action-btn:hover {
  border-color: var(--toolbar-border);
  transform: scale(1.05);
}

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

/* Alligator toggle - disabled state */
.action-btn.alligator-toggle:not(.active)::after {
  content: '';
  position: absolute;
  width: 24px;
  height: 3px;
  background: #e53935;
  border-radius: 2px;
  transform: rotate(-45deg);
  pointer-events: none;
}

.action-btn.alligator-toggle:not(.active) {
  opacity: 0.45;
}

.save-btn:hover {
  border-color: var(--accent-teal) !important;
  color: var(--accent-teal) !important;
}

.gallery-btn {
  position: relative;
}

.gallery-btn:hover {
  border-color: var(--accent-purple) !important;
  color: var(--accent-purple) !important;
}

.clear-btn:hover {
  border-color: #e63946 !important;
  color: #e63946 !important;
}

.gallery-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  font-size: 0.6rem;
  font-weight: 700;
  color: white;
  background: var(--accent-purple);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-badge:empty {
  display: none;
}

/* Tape Palette */
.tape-palette {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.4rem;
}

.tape-btn {
  padding: 0.3rem;
  background: white;
  border: 2px solid var(--toolbar-border);
  border-radius: 8px;
  cursor: pointer;
  transition: all var(--transition-quick);
  overflow: hidden;
}

.tape-btn:hover {
  border-color: var(--accent-pink);
  transform: scale(1.05);
}

.tape-btn.active {
  border-color: var(--accent-pink);
  box-shadow: 0 2px 8px rgba(255, 107, 157, 0.3);
}

.tape-sample {
  width: 100%;
  height: 24px;
  border-radius: 4px;
}

/* Tape Width Buttons */
.tape-widths {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.tape-width-btn {
  padding: 0.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  border: 2px solid var(--toolbar-border);
  border-radius: 6px;
  cursor: pointer;
  transition: all var(--transition-quick);
}

.tape-width-btn:hover {
  border-color: var(--accent-pink);
}

.tape-width-btn.active {
  border-color: var(--accent-pink);
  background: linear-gradient(135deg, rgba(255, 107, 157, 0.1), rgba(255, 209, 102, 0.1));
}

.tape-width-preview {
  width: 100%;
  background: linear-gradient(90deg, var(--accent-pink), var(--accent-purple));
  border-radius: 3px;
  opacity: 0.7;
}

/* ============================================
   Washi Tape Patterns
   ============================================ */

.stripes-pink {
  background: repeating-linear-gradient(90deg, #ffb5c5 0px, #ffb5c5 4px, #fff0f3 4px, #fff0f3 8px);
}

.stripes-mint {
  background: repeating-linear-gradient(90deg, #98e4d5 0px, #98e4d5 4px, #e8faf6 4px, #e8faf6 8px);
}

.dots-yellow {
  background-color: #fff3cd;
  background-image: radial-gradient(#ffd166 25%, transparent 25%);
  background-size: 10px 10px;
}

.dots-blue {
  background-color: #cce5ff;
  background-image: radial-gradient(#5aa9e6 25%, transparent 25%);
  background-size: 10px 10px;
}

.checker-purple {
  background-color: #e8daef;
  background-image: 
    linear-gradient(45deg, #9b5de5 25%, transparent 25%),
    linear-gradient(-45deg, #9b5de5 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #9b5de5 75%),
    linear-gradient(-45deg, transparent 75%, #9b5de5 75%);
  background-size: 10px 10px;
  background-position: 0 0, 0 5px, 5px -5px, -5px 0;
}

.checker-orange {
  background-color: #ffe4cc;
  background-image: 
    linear-gradient(45deg, #f4a261 25%, transparent 25%),
    linear-gradient(-45deg, #f4a261 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #f4a261 75%),
    linear-gradient(-45deg, transparent 75%, #f4a261 75%);
  background-size: 10px 10px;
  background-position: 0 0, 0 5px, 5px -5px, -5px 0;
}

.zigzag-teal {
  background: 
    linear-gradient(135deg, #2a9d8f 25%, transparent 25%) -10px 0,
    linear-gradient(225deg, #2a9d8f 25%, transparent 25%) -10px 0,
    linear-gradient(315deg, #2a9d8f 25%, transparent 25%),
    linear-gradient(45deg, #2a9d8f 25%, transparent 25%);
  background-size: 20px 10px;
  background-color: #d4f0ed;
}

.zigzag-coral {
  background: 
    linear-gradient(135deg, #ff6b6b 25%, transparent 25%) -10px 0,
    linear-gradient(225deg, #ff6b6b 25%, transparent 25%) -10px 0,
    linear-gradient(315deg, #ff6b6b 25%, transparent 25%),
    linear-gradient(45deg, #ff6b6b 25%, transparent 25%);
  background-size: 20px 10px;
  background-color: #ffe5e5;
}

.hearts {
  background-color: #fff0f5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Cpath fill='%23ff6b9d' fill-opacity='0.6' d='M10 18l-1.45-1.32C3.4 12.36 0 9.28 0 5.5 0 2.42 2.42 0 5.5 0 7.24 0 8.91.81 10 2.09 11.09.81 12.76 0 14.5 0 17.58 0 20 2.42 20 5.5c0 3.78-3.4 6.86-8.55 11.18L10 18z'/%3E%3C/svg%3E");
  background-size: 16px 16px;
}

.stars {
  background-color: #fff9e6;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Cpolygon fill='%23ffd166' fill-opacity='0.7' points='10,0 13,7 20,7 14,12 16,20 10,15 4,20 6,12 0,7 7,7'/%3E%3C/svg%3E");
  background-size: 14px 14px;
}

.confetti {
  background-color: #fafafa;
  background-image: 
    radial-gradient(#ff6b9d 2px, transparent 2px),
    radial-gradient(#9b5de5 2px, transparent 2px),
    radial-gradient(#00c4a7 2px, transparent 2px),
    radial-gradient(#ffd166 2px, transparent 2px);
  background-size: 20px 20px;
  background-position: 0 0, 10px 5px, 5px 10px, 15px 15px;
}

.rainbow {
  background: linear-gradient(90deg, #ff6b6b 0%, #ffd166 16.66%, #06d6a0 33.33%, #118ab2 50%, #9b5de5 66.66%, #ff6b9d 83.33%, #ff6b6b 100%);
}

/* ============================================
   Canvas Container
   ============================================ */

.canvas-container {
  flex: 1;
  position: relative;
  overflow: hidden;
  cursor: crosshair;
  background: 
    linear-gradient(90deg, rgba(0,0,0,0.02) 1px, transparent 1px),
    linear-gradient(rgba(0,0,0,0.02) 1px, transparent 1px),
    var(--bg-paper);
  background-size: 20px 20px;
  touch-action: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.canvas-container[data-tool="pan"] {
  cursor: grab;
}

.canvas-container[data-tool="pan"]:active {
  cursor: grabbing;
}

.canvas-container[data-tool="eraser"] {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='10' fill='white' stroke='%23333' stroke-width='2'/%3E%3C/svg%3E") 12 12, crosshair;
}

/* Transform wrapper for pan/zoom */
.canvas-transform-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform-origin: center center;
  transition: transform 0.1s ease-out;
}

#drawingCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

#glitterCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.tape-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Zoom Controls */
.zoom-controls {
  position: absolute;
  bottom: 0.75rem;
  right: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--toolbar-bg);
  backdrop-filter: blur(10px);
  padding: 0.4rem;
  border-radius: 10px;
  border: 2px solid var(--toolbar-border);
  z-index: 10;
}

.zoom-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: white;
  border: 2px solid var(--toolbar-border);
  border-radius: 6px;
  cursor: pointer;
  transition: all var(--transition-quick);
}

.zoom-btn:hover {
  color: var(--accent-purple);
  border-color: var(--accent-purple);
}

.zoom-level {
  font-family: 'SF Mono', Menlo, monospace;
  font-size: 0.65rem;
  color: var(--text-secondary);
  min-width: 36px;
  text-align: center;
}

.tape-preview {
  position: absolute;
  pointer-events: none;
  opacity: 0.7;
  display: none;
  transform-origin: left center;
}

/* Placed tape pieces */
.tape-piece {
  position: absolute;
  transform-origin: left center;
  pointer-events: none;
  filter: drop-shadow(1px 2px 3px rgba(0,0,0,0.1));
  animation: tape-fade-in 0.3s var(--bounce) forwards;
}

/* Toast Messages */
.toast-message {
  position: fixed;
  bottom: 5rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text-primary);
  color: white;
  padding: 0.75rem 1.25rem;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  z-index: 9999;
  white-space: nowrap;
  animation: toast-in 0.3s var(--bounce) forwards, toast-out 0.3s ease 3.5s forwards;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

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

@keyframes toast-out {
  from { opacity: 1; }
  to { opacity: 0; }
}

/* ============================================
   Animations
   ============================================ */

@keyframes tape-fade-in {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

/* Glitter Sparkle Animation */
@keyframes sparkle {
  0%, 100% {
    opacity: 0;
    transform: scale(0) rotate(0deg);
  }
  50% {
    opacity: 1;
    transform: scale(1) rotate(180deg);
  }
}

/* Save animation */
@keyframes save-flash {
  0% { box-shadow: 0 0 0 0 rgba(0, 196, 167, 0.7); }
  70% { box-shadow: 0 0 0 15px rgba(0, 196, 167, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 196, 167, 0); }
}

.save-flash {
  animation: save-flash 0.5s ease-out;
}

/* ============================================
   Alligator Mode 🐊
   ============================================ */

.alligator {
  position: fixed;
  bottom: -120px;
  left: 20px;
  z-index: 999;
  transition: bottom 0.5s ease-out;
  pointer-events: none;
}

.alligator-body {
  font-size: 6rem;
  filter: drop-shadow(3px 3px 6px rgba(0,0,0,0.4));
}

/* Peeking animation - face up, bobbing */
.alligator.peeking {
  bottom: -50px;
  animation: alligator-peek 1.5s ease-in-out infinite;
}

@keyframes alligator-peek {
  0%, 100% { bottom: -50px; }
  50% { bottom: -35px; }
}

/* Attack animation - slower and more dramatic */
.alligator.attacking {
  animation: alligator-attack 3.5s ease-in-out forwards;
}

@keyframes alligator-attack {
  0% { 
    bottom: -50px; 
    left: 20px;
  }
  15% { 
    bottom: 50px; 
    left: 20px;
  }
  25% { 
    bottom: 50px; 
    left: 20px;
  }
  50% { 
    bottom: var(--bite-y, 200px); 
    left: var(--bite-x, 300px);
  }
  55% { 
    bottom: var(--bite-y, 200px); 
    left: var(--bite-x, 300px);
    transform: rotate(-20deg) scale(1.2);
  }
  60% { 
    bottom: var(--bite-y, 200px); 
    left: var(--bite-x, 300px);
    transform: rotate(15deg) scale(1.1);
  }
  65% { 
    bottom: var(--bite-y, 200px); 
    left: var(--bite-x, 300px);
    transform: rotate(0deg) scale(1);
  }
  80% { 
    bottom: 50px; 
    left: 20px;
  }
  100% { 
    bottom: -120px; 
    left: 20px;
  }
}

/* Bite mark visual effect */
@keyframes bite-flash {
  0% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(2); }
}

.bite-mark {
  position: absolute;
  font-size: 5rem;
  pointer-events: none;
  animation: bite-flash 0.8s ease-out forwards;
}

/* ============================================
   Gallery Modal
   ============================================ */

.gallery-modal {
  position: fixed;
  inset: 0;
  background: rgba(45, 42, 50, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.gallery-modal.open {
  opacity: 1;
  visibility: visible;
}

.gallery-content {
  background: var(--toolbar-bg);
  border-radius: 20px;
  width: 90%;
  max-width: 800px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  transform: scale(0.9) translateY(20px);
  transition: transform 0.3s var(--bounce);
}

.gallery-modal.open .gallery-content {
  transform: scale(1) translateY(0);
}

.gallery-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 2px solid var(--toolbar-border);
}

.gallery-header h2 {
  font-family: 'Caveat', cursive;
  font-size: 1.5rem;
  color: var(--accent-purple);
  margin: 0;
}

.gallery-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: var(--text-secondary);
  background: white;
  border: 2px solid var(--toolbar-border);
  border-radius: 50%;
  cursor: pointer;
  transition: all var(--transition-quick);
}

.gallery-close:hover {
  color: #e63946;
  border-color: #e63946;
  transform: rotate(90deg);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.75rem;
  padding: 1rem;
  overflow-y: auto;
  flex: 1;
}

.gallery-item {
  position: relative;
  aspect-ratio: 4/3;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  background: white;
  border: 3px solid var(--toolbar-border);
  transition: all var(--transition-smooth);
}

.gallery-item:hover {
  border-color: var(--accent-purple);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(155, 93, 229, 0.2);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-item-date {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.4rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
  color: white;
  font-size: 0.65rem;
  text-align: center;
}

.gallery-empty {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2.5rem;
  text-align: center;
  color: var(--text-secondary);
}

.gallery-empty.show {
  display: flex;
}

.gallery-empty-icon {
  font-size: 3rem;
  margin-bottom: 0.75rem;
  opacity: 0.5;
}

.gallery-empty p {
  margin: 0.2rem 0;
}

.gallery-empty-hint {
  font-size: 0.8rem;
  opacity: 0.7;
}

/* ============================================
   Lightbox
   ============================================ */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1100;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.lightbox.open {
  opacity: 1;
  visibility: visible;
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  color: white;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: all var(--transition-quick);
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(90deg);
}

.lightbox-image {
  max-width: 90%;
  max-height: 75vh;
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  transform: scale(0.9);
  transition: transform 0.3s var(--bounce);
}

.lightbox.open .lightbox-image {
  transform: scale(1);
}

.lightbox-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.lightbox-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.25rem;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: white;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  cursor: pointer;
  transition: all var(--transition-smooth);
}

.lightbox-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: white;
  transform: translateY(-2px);
}

.lightbox-btn-danger:hover {
  background: rgba(230, 57, 70, 0.3);
  border-color: #e63946;
}

/* ============================================
   Responsive
   ============================================ */

/* Hide zoom controls on touch devices - use pinch in Pan mode instead */
@media (hover: none) and (pointer: coarse) {
  .zoom-controls {
    display: none;
  }
}

@media (max-width: 768px) {
  .zoom-controls {
    display: none;
  }
  
  .toolbar-right {
    width: 70px;
  }
  
  .tape-palette {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .toolbar-right {
    display: none;
  }
  
  .toolbar-left {
    left: 0.5rem;
  }
  
  .logo-text {
    display: none;
  }
}
