* {
  box-sizing: border-box;
}

/* the hidden attribute must always win over display:flex rules below */
[hidden] {
  display: none !important;
}

:root {
  /* Single brand gradient reused everywhere (buttons, active states, badges, hero)
     instead of several competing gradients, for a simpler, more cohesive look */
  --grad-main: linear-gradient(135deg, #38bdf8 0%, #2563eb 55%, #1e3a8a 100%);
  --grad-main-hover: linear-gradient(135deg, #22a8ee 0%, #1d4fd1 55%, #172f75 100%);
  --grad-text: var(--grad-main);
  --glass-bg: rgba(255, 255, 255, 0.65);
  --glass-border: rgba(255, 255, 255, 0.5);
  --ink: #1a1533;
  --muted: #6b6480;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: #050b1a;
  color: var(--ink);
}

/* ---------- Home page ---------- */

body.home {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, #102a5c 0%, #0a1830 55%, #040a1a 100%);
}

.home-card {
  position: relative;
  z-index: 1;
  background: var(--glass-bg);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: 28px;
  padding: 48px 40px;
  max-width: 480px;
  width: 100%;
  box-shadow: 0 30px 80px rgba(20, 10, 60, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  text-align: center;
}

.home-logo {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: var(--grad-main);
  box-shadow: 0 10px 26px rgba(37, 99, 235, 0.4);
}

.home-logo svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: #fff;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.home-card h1 {
  margin: 0 0 8px;
  font-family: 'Poppins', sans-serif;
  font-size: 2.3rem;
  font-weight: 800;
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: -0.5px;
}

.subtitle {
  color: var(--muted);
  margin: 0 0 30px;
  font-size: 1rem;
}

.home-actions {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 30px;
}

.join-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
}

.join-form label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}

.join-row {
  display: flex;
  gap: 8px;
}

.join-row input {
  flex: 1;
  padding: 12px 14px;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 4px;
  text-align: center;
  text-transform: uppercase;
  border: 2px solid rgba(37, 99, 235, 0.18);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.join-row input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}

.field-input {
  width: 100%;
  padding: 12px 14px;
  font-size: 0.95rem;
  border: 2px solid rgba(37, 99, 235, 0.18);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink);
  outline: none;
  font-family: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}

.error-text {
  color: #d33;
  font-size: 0.85rem;
  margin: 0;
}

.feature-list {
  text-align: left;
  list-style: none;
  padding: 18px 18px;
  margin: 0;
  color: #443f5c;
  font-size: 0.88rem;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: rgba(37, 99, 235, 0.06);
  border-radius: 16px;
  border: 1px solid rgba(37, 99, 235, 0.1);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 20px;
  border-radius: 14px;
  border: none;
  background: rgba(59, 130, 246, 0.12);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
  white-space: nowrap;
}

.btn:hover {
  filter: brightness(1.04);
  transform: translateY(-1px);
}

.btn:active {
  transform: scale(0.96);
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  filter: none;
  transform: none;
}

.btn-primary {
  background: var(--grad-main);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 10px 30px rgba(37, 99, 235, 0.45);
}

.btn-primary:hover {
  background: var(--grad-main-hover);
  box-shadow: 0 14px 36px rgba(37, 99, 235, 0.55);
}

/* Quiet ghost variant (no gradient fill) so the primary gradient button stands out */
.btn-secondary {
  background: rgba(37, 99, 235, 0.08);
  color: var(--ink);
  border: 1.5px solid rgba(37, 99, 235, 0.3);
  box-shadow: none;
}

.btn-secondary:hover {
  background: rgba(37, 99, 235, 0.14);
}

.btn-danger {
  background: linear-gradient(135deg, #ff8a8a, #ff5c5c);
  color: #fff;
  box-shadow: 0 8px 20px rgba(255, 92, 92, 0.35);
}

.btn-danger:hover {
  filter: brightness(1.05);
}

.btn-small {
  padding: 8px 12px;
  font-size: 0.85rem;
}

.icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.icon-only {
  padding: 10px;
  width: 42px;
}

.tool-btn {
  background: rgba(37, 99, 235, 0.1);
}

.tool-btn.active {
  background: var(--grad-main);
  color: #fff;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.4);
}

/* ---------- Draw page ---------- */

body.draw-page {
  display: flex;
  flex-direction: column;
  /* 100vh includes the space behind a mobile browser's address/toolbar chrome;
     100dvh tracks the actual visible viewport so the bottom toolbar isn't hidden under it */
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: radial-gradient(circle at 10% 0%, #102a5c 0%, #0a1830 45%, #040a1a 100%);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  padding: 14px 20px;
  background: rgba(10, 22, 48, 0.65);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
  z-index: 10;
  color: #f1eefc;
}

.toolbar .btn {
  color: #f1eefc;
  background: rgba(255, 255, 255, 0.08);
}

.toolbar .btn:hover {
  background: rgba(255, 255, 255, 0.14);
}

.toolbar .btn-primary,
.toolbar .btn-danger {
  color: #fff;
}

.toolbar-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.room-info {
  gap: 12px;
}

.room-code {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  letter-spacing: 3px;
  background: var(--grad-main);
  color: #fff;
  padding: 8px 14px;
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.4);
}

.user-count {
  font-size: 0.82rem;
  font-weight: 600;
  color: #baf7c9;
  background: rgba(52, 199, 89, 0.15);
  border: 1px solid rgba(52, 199, 89, 0.3);
  padding: 5px 12px;
  border-radius: 999px;
}

.save-status {
  font-size: 0.78rem;
  font-weight: 600;
  color: #cfc9e8;
  transition: color 0.2s ease;
}

.save-status.saving {
  color: #fcd34d;
}

.save-status.saving::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 6px;
  border-radius: 50%;
  background: #fcd34d;
  animation: pulse 1s ease-in-out infinite;
}

.save-status.saved::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 6px;
  border-radius: 50%;
  background: #34d399;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.color-swatches {
  display: flex;
  gap: 7px;
}

.swatch {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.5);
  outline: 1px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
  padding: 0;
  transition: transform 0.12s ease;
}

.swatch:hover {
  transform: scale(1.12);
}

.swatch.active {
  outline: 2px solid #60a5fa;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.35);
}

#colorPicker {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 10px;
  padding: 0;
  cursor: pointer;
  background: none;
}

.size-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: #cfc9e8;
}

.size-label input[type="range"] {
  accent-color: #2563eb;
}

.toolbar-textformat {
  padding-top: 8px;
  padding-bottom: 8px;
}

.text-format-group {
  flex-wrap: wrap;
}

.text-format-group select,
.text-format-group input[type="number"] {
  background: rgba(255, 255, 255, 0.08);
  color: #f1eefc;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  padding: 8px 10px;
  font-family: inherit;
  font-size: 0.85rem;
  outline: none;
}

.text-format-group select option {
  color: #1a1533;
}

#fontSizeInput {
  width: 64px;
}

.format-btn.active {
  background: var(--grad-main);
  color: #fff;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.4);
}

.zoom-group {
  gap: 6px;
}

.zoom-level {
  min-width: 46px;
  padding: 8px 4px;
  border: none;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: #f1eefc;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
}

.zoom-level:hover {
  background: rgba(255, 255, 255, 0.14);
}

.place-hint {
  position: absolute;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--grad-main);
  color: #fff;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 10px 26px rgba(37, 99, 235, 0.5);
}

.shapes-dropdown {
  position: relative;
}

.shapes-panel {
  /* Fixed (not absolute) so it isn't clipped by .toolbar-tools's overflow-x: auto;
     JS positions it under the shapes button via top/left. */
  position: fixed;
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 12px;
  background: rgba(10, 22, 48, 0.92);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}

.shape-item {
  width: 46px;
  height: 46px;
  padding: 8px;
  border: none;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: #f1eefc;
  cursor: grab;
  transition: background 0.12s ease, transform 0.12s ease;
}

.shape-item:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: scale(1.05);
}

.shape-item:active {
  cursor: grabbing;
}

.shape-item svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
  stroke: none;
}

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--grad-main);
  color: #fff;
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 14px 34px rgba(37, 99, 235, 0.5);
  z-index: 100;
}

/* ---------- Modals (join / share) ---------- */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 5, 30, 0.55);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 200;
  animation: fadeIn 0.15s ease;
}

.modal {
  position: relative;
  background: var(--glass-bg);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 32px 28px;
  max-width: 420px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 30px 80px rgba(20, 10, 60, 0.45);
  text-align: center;
  animation: popIn 0.2s cubic-bezier(0.2, 0.8, 0.3, 1.1);
}

@keyframes fadeIn {
  from { opacity: 0; }
}

@keyframes popIn {
  from { opacity: 0; transform: translateY(8px) scale(0.97); }
}

.modal h2 {
  margin: 0 0 20px;
  font-family: 'Poppins', sans-serif;
  font-size: 1.4rem;
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: rgba(37, 99, 235, 0.12);
  color: var(--ink);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  background: rgba(37, 99, 235, 0.22);
}

.join-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  background: rgba(37, 99, 235, 0.08);
  border-radius: 14px;
  padding: 6px;
}

.tab-btn {
  flex: 1;
  border: none;
  background: transparent;
  padding: 10px 12px;
  border-radius: 10px;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--muted);
  cursor: pointer;
}

.tab-btn.active {
  background: var(--grad-main);
  color: #fff;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.35);
}

.scan-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.scan-panel video {
  width: 100%;
  max-width: 320px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 16px;
  background: #000;
  box-shadow: 0 10px 30px rgba(20, 10, 60, 0.3);
}

.scan-hint {
  color: var(--muted);
  font-size: 0.85rem;
  margin: 0;
}

.share-qr {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  padding: 16px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(20, 10, 60, 0.15);
}

.share-qr canvas {
  display: block;
  max-width: 100%;
  height: auto;
}

.share-code {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 0.95rem;
}

.share-code strong {
  color: var(--ink);
  letter-spacing: 2px;
  font-family: 'Poppins', sans-serif;
}

.modal .join-row input {
  font-size: 0.85rem;
  letter-spacing: 0;
  text-transform: none;
}

/* ---------- Account / saved drawings ---------- */

.top-bar {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 2;
}

.account-widget {
  display: flex;
  align-items: center;
  gap: 8px;
}

body.home .account-widget .btn {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

body.home .account-widget .btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.account-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: #cfc9e8;
  padding: 0 4px;
}

body.home .account-name {
  color: #fff;
}

.drawings-list {
  list-style: none;
  margin: 0 0 8px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 50vh;
  overflow-y: auto;
  text-align: left;
}

.drawing-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(37, 99, 235, 0.06);
  border-radius: 12px;
}

.drawing-title {
  flex: 1;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drawing-title:hover {
  text-decoration: underline;
}

.drawing-meta {
  font-size: 0.8rem;
  color: var(--muted);
  white-space: nowrap;
}

/* ---------- Draw page top menu (collapses room info, account and actions) ---------- */

/* Floats over the single toolbar-tools line instead of its own bar, so the top of the
   page stays a single line; toolbar-tools gets right-padding to clear it (see below). */
.menu-corner {
  position: fixed;
  top: 14px;
  right: 16px;
  z-index: 40;
}

.menu-panel {
  /* Fixed (not absolute) so it isn't clipped by any ancestor's overflow;
     JS positions it under the menu button via top/left. */
  position: fixed;
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 240px;
  padding: 16px;
  background: rgba(10, 22, 48, 0.94);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}

.menu-panel .toolbar-group {
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.menu-panel .toolbar-group:not(:first-child) {
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.menu-panel .btn {
  width: 100%;
  justify-content: flex-start;
}

/* ---------- Responsive / mobile ---------- */

.toolbar-tools {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  flex-wrap: nowrap;
  /* Clears the floating menu button in the corner so it never hides a tool button */
  padding-right: 64px;
}

@media (max-width: 720px) {
  .home-card {
    padding: 32px 22px;
    margin-top: 48px;
  }

  .home-card h1 {
    font-size: 1.9rem;
  }

  .top-bar {
    top: 12px;
    right: 12px;
  }

  .menu-corner {
    top: 10px;
    right: 10px;
  }

  .account-widget .account-name {
    max-width: 90px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .toolbar {
    padding: 10px 12px;
    gap: 10px;
  }

  /* Reorder so the drawing gets max height and tools sit within thumb reach at the bottom */
  body.draw-page {
    flex-direction: column;
  }

  .board-viewport {
    order: 1;
  }

  .toolbar-textformat {
    order: 2;
    justify-content: flex-start;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .toolbar-tools {
    order: 3;
    justify-content: flex-start;
    gap: 12px;
    padding-bottom: max(10px, env(safe-area-inset-bottom));
  }

  /* Free up vertical space for the on-screen keyboard: while editing a text
     object's contents, the pen/eraser/image tool row isn't needed */
  body.draw-page.editing-text .toolbar-tools {
    display: none;
  }

  .toolbar-tools .toolbar-group {
    flex-shrink: 0;
  }

  .icon-only {
    width: 46px;
    height: 46px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .room-code {
    padding: 6px 10px;
    font-size: 0.85rem;
    letter-spacing: 1.5px;
  }

  .user-count {
    font-size: 0.75rem;
    padding: 4px 8px;
  }

  .btn {
    padding: 10px 14px;
    font-size: 0.88rem;
  }

  .board-viewport {
    padding: 12px;
  }

  .size-label input[type="range"] {
    width: 90px;
  }

  .modal {
    padding: 26px 18px;
  }
}

@media (max-width: 420px) {
  .home-logo {
    width: 48px;
    height: 48px;
  }

  .home-logo svg {
    width: 24px;
    height: 24px;
  }

  .home-card h1 {
    font-size: 1.6rem;
  }

  .swatch {
    width: 22px;
    height: 22px;
  }

  .join-row input {
    font-size: 1rem;
    letter-spacing: 2px;
  }
}

/* ---------- Canvas ---------- */

.board-viewport {
  flex: 1;
  position: relative;
  overflow: auto;
}

.board-surface {
  position: relative;
  /* Sized dynamically by JS to fit the viewport plus whatever has been drawn, so the
     canvas starts small and grows on demand instead of being a huge empty void */
  width: 100%;
  height: 100%;
  /* JS-driven pan/draw/pinch-zoom fully handle touch gestures, so the browser must not
     hijack single-finger drags as its own page-scroll/pan gesture while drawing */
  touch-action: none;
  transform-origin: 0 0;
  background:
    linear-gradient(90deg, rgba(37, 99, 235, 0.06) 1px, transparent 1px),
    linear-gradient(rgba(37, 99, 235, 0.06) 1px, transparent 1px),
    #ffffff;
  background-size: 32px 32px, 32px 32px, auto;
}

.board-object {
  position: absolute;
  cursor: move;
  touch-action: none;
  /* outline (not border) so this selection frame never shifts/shrinks the obj.w x obj.h
     box it's drawn around - a border would inset the content by its own width, throwing
     off the exact position/scale that the viewBox-scaled SVG (strokes/shapes) relies on. */
  outline: 2px solid transparent;
  outline-offset: -2px;
  border-radius: 4px;
  transition: outline-color 0.12s ease, box-shadow 0.12s ease;
}

.board-object.selected {
  outline-color: #2563eb;
  box-shadow: 0 4px 18px rgba(37, 99, 235, 0.25);
}

.board-object-draw {
  cursor: move;
}

.board-object-draw svg {
  display: block;
  pointer-events: none;
  overflow: visible;
}

.board-object-shape svg {
  display: block;
  pointer-events: none;
}

.board-object-image img {
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
  user-select: none;
}

.board-text-content {
  width: 100%;
  height: 100%;
  padding: 8px 10px;
  font-family: 'Inter', sans-serif;
  line-height: 1.35;
  outline: none;
  overflow: auto;
  cursor: text;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 4px;
}

.resize-handle {
  position: absolute;
  right: -6px;
  bottom: -6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--grad-main);
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  cursor: nwse-resize;
  display: none;
  transition: transform 0.12s ease;
}

.resize-handle:hover {
  transform: scale(1.2);
}

.board-object.selected .resize-handle {
  display: block;
}

.draw-overlay {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
}

