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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  overflow: hidden;
  height: 100vh;
  width: 100vw;
  background: #1a1a1a;
  color: #e0e0e0;
}

#app {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* Toolbar (Fixed at Top, Slides in Edit Mode) */
#toolbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 1rem;
  background: #2a2a2a;
  border-bottom: 1px solid #3a3a3a;
  z-index: 2000;
  transform: translateY(-100%);
  transition: transform 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

#toolbar:not(.toolbar-hidden) {
  transform: translateY(0);
}

.toolbar-hidden {
  transform: translateY(-100%);
}

/* User Bar (Floating Panel) */
#user-bar {
  position: fixed;
  z-index: 2003; /* Above other floaties */
  pointer-events: auto;
  background: rgba(26, 26, 26, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 0.5rem 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transform: scale(0.7);
  transform-origin: bottom left;
}

#user-bar.user-bar-hidden {
  display: none;
}

/* User Bar Positions - N, S, E, W, NE, NW, SE, SW */
#user-bar.user-bar-NW { top: 20px; left: 20px; transform: scale(0.7); transform-origin: top left; }
#user-bar.user-bar-N { top: 20px; left: 50%; transform: translateX(-50%) scale(0.7); transform-origin: top center; }
#user-bar.user-bar-NE { top: 20px; right: 20px; transform: scale(0.7); transform-origin: top right; }
#user-bar.user-bar-W { top: 50%; left: 20px; transform: translateY(-50%) scale(0.7); transform-origin: center left; }
#user-bar.user-bar-E { top: 50%; right: 20px; transform: translateY(-50%) scale(0.7); transform-origin: center right; }
#user-bar.user-bar-SW { bottom: 20px; left: 20px; transform: scale(0.7); transform-origin: bottom left; }
#user-bar.user-bar-S { bottom: 20px; left: 50%; transform: translateX(-50%) scale(0.7); transform-origin: bottom center; }
#user-bar.user-bar-SE { bottom: 20px; right: 20px; transform: scale(0.7); transform-origin: bottom right; }

.user-bar-content {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem;
}

.user-bar-btn {
  padding: 0.4rem 0.9rem;
  background: rgba(58, 58, 58, 0.6);
  border: 1px solid rgba(74, 74, 74, 0.5);
  color: #e0e0e0;
  cursor: pointer;
  border-radius: 6px;
  font-size: 0.9rem;
  transition: all 0.2s;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.user-bar-btn:hover {
  background: rgba(68, 68, 68, 0.8);
  border-color: rgba(100, 100, 100, 0.7);
}

.user-bar-btn:active {
  background: rgba(48, 48, 48, 0.9);
}

/* Language Menu */
.language-menu-container {
  position: relative;
}

#language-menu {
  display: none;
  position: absolute;
  bottom: calc(100% + 0.5rem);
  left: 0;
  background: rgba(26, 26, 26, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.4);
  min-width: 150px;
  overflow: hidden;
  z-index: 2001;
  transform-origin: bottom center;
  animation: slideUp 0.2s ease-out;
}

#language-menu:not(.language-menu-hidden) {
  display: block;
}

.language-menu-hidden {
  display: none !important;
}

.language-menu-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.6rem 1rem;
  background: transparent;
  border: none;
  color: #e0e0e0;
  cursor: pointer;
  font-size: 0.9rem;
  text-align: left;
  transition: background 0.2s;
}

.language-menu-item:hover {
  background: rgba(255, 255, 255, 0.1);
}

.language-menu-item:active {
  background: rgba(255, 255, 255, 0.15);
}

.language-menu-item-active {
  background: rgba(74, 158, 255, 0.2);
  color: #4a9eff;
}

.language-menu-item-active:hover {
  background: rgba(74, 158, 255, 0.3);
}

.language-flag {
  font-size: 1.2rem;
}

/* Share Menu */
.share-menu-container {
  position: relative;
}

#share-menu {
  display: none;
  position: absolute;
  bottom: calc(100% + 0.5rem);
  left: 0;
  background: rgba(26, 26, 26, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.4);
  min-width: 150px;
  overflow: hidden;
  z-index: 2001;
  transform-origin: bottom center;
  animation: slideUp 0.2s ease-out;
}

#share-menu:not(.share-menu-hidden) {
  display: block;
}

.share-menu-hidden {
  display: none !important;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.05);
    opacity: 0.9;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.share-menu-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.6rem 1rem;
  background: transparent;
  border: none;
  color: #e0e0e0;
  cursor: pointer;
  font-size: 0.9rem;
  text-align: left;
  transition: background 0.2s;
}

.share-menu-item:hover {
  background: rgba(255, 255, 255, 0.1);
}

.share-menu-item:active {
  background: rgba(255, 255, 255, 0.15);
}

.share-menu-link {
  text-decoration: none;
  color: #e0e0e0;
}

.share-menu-link:hover {
  color: #e0e0e0;
  text-decoration: none;
}

.share-icon {
  font-size: 1rem;
}

/* User Menu */
#user-menu {
  display: none;
  position: absolute;
  bottom: calc(100% + 0.5rem);
  left: 0;
  background: rgba(26, 26, 26, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.4);
  min-width: 150px;
  overflow: hidden;
  z-index: 2001;
  transform-origin: bottom center;
  animation: slideUp 0.2s ease-out;
}

#user-menu:not(.user-menu-hidden) {
  display: block;
}

.user-menu-hidden {
  display: none !important;
}

.user-menu-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.6rem 1rem;
  background: transparent;
  border: none;
  color: #e0e0e0;
  cursor: pointer;
  font-size: 0.9rem;
  text-align: left;
  transition: background 0.2s;
}

.user-menu-item:hover {
  background: rgba(255, 255, 255, 0.1);
}

.user-menu-item:active {
  background: rgba(255, 255, 255, 0.15);
}

.user-menu-icon {
  font-size: 1rem;
}

/* Camera Position Indicator */
/* Camera indicator removed - functionality merged into minimap */

.toolbar-section {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.toolbar-btn {
  padding: 0.5rem 1rem;
  background: #3a3a3a;
  border: 1px solid #4a4a4a;
  color: #e0e0e0;
  cursor: pointer;
  border-radius: 4px;
  font-size: 1rem;
  transition: background 0.2s;
}

.toolbar-select {
  padding: 0.5rem 0.75rem;
  background: #3a3a3a;
  border: 1px solid #4a4a4a;
  color: #e0e0e0;
  border-radius: 4px;
  font-size: 0.9rem;
  cursor: pointer;
  min-width: 150px;
}

.toolbar-node-type-btn {
  padding: 0.5rem;
  min-width: 2.5rem;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toolbar-btn:hover {
  background: #4a4a4a;
}

.toolbar-bookmark-btn {
  font-size: 0.85rem;
  padding: 0.4rem 0.8rem;
}

.toolbar-btn:active {
  background: #5a5a5a;
}

.toolbar-btn:disabled {
  background: #2a2a2a;
  border-color: #3a3a3a;
  color: #666;
  cursor: not-allowed;
  opacity: 0.5;
}

.toolbar-btn:disabled:hover {
  background: #2a2a2a;
}

/* Save button with unsaved changes indicator */
#btn-save-server.has-unsaved {
  background: #d97706;
  border-color: #f59e0b;
  color: #fff;
  position: relative;
  animation: pulse-unsaved 2s ease-in-out infinite;
}

#btn-save-server.has-unsaved::before {
  content: '●';
  position: absolute;
  top: 0.25rem;
  right: 0.25rem;
  font-size: 0.6rem;
  color: #fff;
  animation: blink 1s ease-in-out infinite;
}

@keyframes pulse-unsaved {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(217, 119, 6, 0.7);
  }
  50% {
    box-shadow: 0 0 0 4px rgba(217, 119, 6, 0);
  }
}

@keyframes blink {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.3;
  }
}

/* Login Modal */
#login-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}

#login-modal.login-modal-hidden {
  display: none;
}

.login-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
}

.login-modal-content {
  position: relative;
  background: #2a2a2a;
  border: 1px solid #444;
  border-radius: 8px;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  z-index: 1;
}

.login-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
  border-bottom: 1px solid #444;
}

.login-modal-header h2 {
  margin: 0;
  color: #fff;
  font-size: 1.5rem;
}

.login-modal-close {
  background: none;
  border: none;
  color: #999;
  font-size: 2rem;
  cursor: pointer;
  padding: 0;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: color 0.2s;
}

.login-modal-close:hover {
  color: #fff;
}

.login-modal-body {
  padding: 1.5rem;
}

.login-form-group {
  margin-bottom: 1.5rem;
}

.login-form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: #ccc;
  font-size: 0.9rem;
}

.login-form-group input {
  width: 100%;
  padding: 0.75rem;
  background: #1a1a1a;
  border: 1px solid #444;
  border-radius: 4px;
  color: #fff;
  font-size: 1rem;
  font-family: inherit;
}

.login-form-group input:focus {
  outline: none;
  border-color: #4a9eff;
}

.login-error {
  color: #f87171;
  font-size: 0.875rem;
  margin-bottom: 1rem;
  min-height: 1.5rem;
}

.login-submit-btn {
  width: 100%;
  padding: 0.75rem;
  background: #4a9eff;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.login-submit-btn:hover:not(:disabled) {
  background: #3a8eef;
}

.login-submit-btn:disabled {
  background: #666;
  cursor: not-allowed;
}

/* Privacy Requirement Modal - Similar to login modal */
#privacy-requirement-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}

#privacy-requirement-modal.privacy-requirement-modal-hidden {
  display: none;
}

.privacy-requirement-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(2px);
}

.privacy-requirement-modal-content {
  position: relative;
  background: #1a1a1a;
  border: 1px solid #444;
  border-radius: 8px;
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.privacy-requirement-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid #333;
}

.privacy-requirement-modal-header h2 {
  margin: 0;
  color: #e0e0e0;
  font-size: 1.5rem;
}

.privacy-requirement-modal-close {
  background: none;
  border: none;
  color: #999;
  font-size: 2rem;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}

.privacy-requirement-modal-close:hover {
  background: #2a2a2a;
  color: #e0e0e0;
}

.privacy-requirement-modal-body {
  padding: 1.5rem;
}

.privacy-requirement-modal-body p {
  color: #ccc;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.privacy-form-group {
  margin-bottom: 1.25rem;
}

.privacy-form-group label {
  display: block;
  color: #e0e0e0;
  margin-bottom: 0.5rem;
  font-weight: 500;
  font-size: 0.9rem;
}

.privacy-form-group input,
.privacy-form-group textarea,
.privacy-form-group select {
  width: 100%;
  padding: 0.75rem;
  background: #2a2a2a;
  border: 1px solid #444;
  border-radius: 4px;
  color: #fff;
  font-size: 1rem;
  font-family: inherit;
  box-sizing: border-box;
}

.privacy-form-group input:focus,
.privacy-form-group textarea:focus,
.privacy-form-group select:focus {
  outline: none;
  border-color: #4a9eff;
}

.privacy-form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.privacy-form-help {
  display: block;
  color: #999;
  font-size: 0.85rem;
  margin-top: 0.25rem;
}

.privacy-modal-error {
  color: #ff6b6b;
  margin-bottom: 1rem;
  padding: 0.75rem;
  background: rgba(255, 107, 107, 0.1);
  border: 1px solid rgba(255, 107, 107, 0.3);
  border-radius: 4px;
  font-size: 0.9rem;
}

.privacy-submit-btn {
  width: 100%;
  padding: 0.75rem 1.5rem;
  background: #4a9eff;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  margin-top: 1rem;
}

.privacy-submit-btn:hover:not(:disabled) {
  background: #3a8eef;
}

.privacy-submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* User Info in User Bar */
.user-menu-container {
  position: relative;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.9rem;
  background: rgba(58, 58, 58, 0.6);
  border: 1px solid rgba(74, 74, 74, 0.5);
  border-radius: 6px;
  font-size: 0.9rem;
  color: #ccc;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: all 0.2s;
  cursor: pointer;
}

.user-info:hover {
  background: rgba(68, 68, 68, 0.8);
  border-color: rgba(100, 100, 100, 0.7);
}

.user-info.authenticated {
  background: linear-gradient(135deg, rgba(45, 80, 22, 0.8) 0%, rgba(30, 58, 15, 0.8) 100%);
  border-color: rgba(74, 222, 128, 0.6);
  color: #4ade80;
  box-shadow: 0 0 12px rgba(74, 222, 128, 0.3);
}

.user-info .user-icon {
  font-size: 1rem;
  opacity: 0.9;
}

.user-info .username {
  font-weight: 600;
  color: inherit;
}

.user-info.authenticated .username {
  color: #4ade80;
}

.user-info .privacy-level {
  font-size: 0.7rem;
  opacity: 0.85;
  background: rgba(0, 0, 0, 0.2);
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  font-weight: 500;
}

#zoom-display {
  min-width: 60px;
  text-align: center;
  font-size: 0.9rem;
}

#fps-display {
  min-width: 70px;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 2px 6px;
  border-radius: 3px;
  transition: color 0.2s ease;
}

.fps-display.fps-good {
  color: #4ade80; /* Green */
}

.fps-display.fps-ok {
  color: #fbbf24; /* Yellow */
}

.fps-display.fps-bad {
  color: #f87171; /* Red */
}

.mode-badge {
  padding: 0.25rem 0.75rem;
  background: #3a3a3a;
  border: 1px solid #4a4a4a;
  border-radius: 4px;
  font-size: 0.85rem;
  text-transform: uppercase;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  user-select: none;
}

.mode-badge:hover {
  background: #4a4a4a;
}

.mode-badge.edit {
  background: #4a6fa5;
  border-color: #5a7fb5;
}

.mode-badge.edit:hover {
  background: #5a7fb5;
}

/* Canvas */
#canvas-root {
  touch-action: pan-x pan-y pinch-zoom; /* Allow pan and pinch zoom, but prevent other gestures */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #252525;
  cursor: grab;
  outline: none;
}

#canvas-root.panning {
  cursor: grabbing;
}

#canvas-root.edit-mode.alt-pan {
  cursor: grab;
}

#canvas-root.edit-mode.alt-pan.panning {
  cursor: grabbing;
}

#canvas-world {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform-origin: 0 0;
  will-change: transform;
}

/* Marquee Selection */
#marquee-overlay {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  border: 2px dashed #4a9eff;
  background: rgba(74, 158, 255, 0.1);
  z-index: 100;
}

.marquee-hidden {
  display: none;
}

/* Selection Box (for multiple selected nodes) */
.selection-box {
  position: absolute;
  top: 0;
  left: 0;
  border: 2px solid #4a9eff;
  background: rgba(74, 158, 255, 0.05);
  pointer-events: auto;
  z-index: 50;
  box-sizing: border-box;
  cursor: move;
}

.selection-box .resize-handle,
.selection-box .rotation-handle {
  pointer-events: auto;
}

/* Node Wrapper */
.node-wrapper {
  position: absolute;
  transform-origin: 0 0;
  will-change: transform, width, height;
  user-select: none;
  pointer-events: auto;
  cursor: default;
  box-sizing: border-box;
  /* overflow is set dynamically based on clipContent property */
}

.node-frame {
  position: absolute;
  top: 0;
  left: 0;
  /* width and height are set explicitly in JavaScript - don't use percentages */
  border: 2px solid #4a4a4a;
  background: #2a2a2a;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  box-sizing: border-box;
  z-index: 1;
}

.node-wrapper.selected .node-frame {
  border-color: #4a9eff;
  box-shadow: 0 0 0 2px rgba(74, 158, 255, 0.3);
}

.node-titlebar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 20px;
  background: #c0c0c0;
  border-bottom: 2px solid #000;
  border-top: 1px solid #fff;
  border-left: 1px solid #fff;
  border-right: 1px solid #808080;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
  font-size: 11px;
  font-family: 'MS Sans Serif', 'Segoe UI', sans-serif;
  cursor: move;
  user-select: none;
  box-sizing: border-box;
  flex-shrink: 0;
  z-index: 10;
}

.node-titlebar-text {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #000;
  font-weight: normal;
  padding: 0 2px;
}

.node-titlebar-collapse {
  width: 16px;
  height: 14px;
  padding: 0;
  margin: 0;
  border: 1px solid #000;
  border-top-color: #fff;
  border-left-color: #fff;
  border-right-color: #808080;
  border-bottom-color: #808080;
  background: #c0c0c0;
  color: #000;
  font-size: 8px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-sizing: border-box;
  font-family: 'MS Sans Serif', 'Segoe UI', sans-serif;
}

.node-titlebar-collapse:active {
  border-top-color: #808080;
  border-left-color: #808080;
  border-right-color: #fff;
  border-bottom-color: #fff;
}

.node-titlebar-collapse:hover {
  background: #d4d0c8;
}

.node-wrapper.node-collapsed .node-content {
  display: none;
}

.node-content {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden; /* Default, can be overridden by clipContent property */
  border-radius: 0 0 4px 4px;
  pointer-events: auto;
 /* transform-origin: center center;*/
  box-sizing: border-box;
}

.node-wrapper:not(.no-titlebar) .node-content {
  /* Position and size are set explicitly in JavaScript */
  border-radius: 0;
}

.node-wrapper.no-titlebar .node-content {
  border-radius: 4px;
}

.node-wrapper.no-border .node-frame {
  border: none;
  background: transparent;
  box-shadow: none;
}

.node-wrapper.no-border.selected .node-frame {
  border: 2px solid #4a9eff;
}

/* Resize Handles */
.resize-handle {
  position: absolute;
  width: 8px;
  height: 8px;
  background: #4a9eff;
  border: 1px solid #fff;
  border-radius: 50%;
  z-index: 10;
  cursor: nwse-resize;
}

.resize-handle.nw { top: -4px; left: -4px; cursor: nwse-resize; }
.resize-handle.ne { top: -4px; right: -4px; cursor: nesw-resize; }
.resize-handle.sw { bottom: -4px; left: -4px; cursor: nesw-resize; }
.resize-handle.se { bottom: -4px; right: -4px; cursor: nwse-resize; }
.resize-handle.n { top: -4px; left: 50%; transform: translateX(-50%); cursor: ns-resize; }
.resize-handle.s { bottom: -4px; left: 50%; transform: translateX(-50%); cursor: ns-resize; }
.resize-handle.w { top: 50%; left: -4px; transform: translateY(-50%); cursor: ew-resize; }
.resize-handle.e { top: 50%; right: -4px; transform: translateY(-50%); cursor: ew-resize; }

/* Rotation Handle */
.rotation-handle {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 12px;
  background: #4a9eff;
  border: 2px solid #fff;
  border-radius: 50%;
  cursor: grab;
  z-index: 10;
}

.rotation-handle:active {
  cursor: grabbing;
}

/* Post-It Node */
.node-content.postit {
  padding: 1rem;
  background: #ffe66d;
  color: #000;
  font-size: 1rem;
  line-height: 1.5;
  overflow-wrap: break-word;
  overflow-y: auto;
}

/* Privacy Level Visual Treatments */
.node-content.privacy-restricted {
  position: relative;
}

/* Blur treatment */
.node-content.privacy-blur .node-content-transform {
  filter: blur(3px);
  pointer-events: none;
  user-select: none;
}

.node-content.privacy-blur::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  pointer-events: none;
  z-index: 1;
}

/* Overlay treatment */
.node-content.privacy-overlay {
  position: relative;
}

.node-content.privacy-overlay::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 2;
  pointer-events: none;
}

.node-content.privacy-overlay .node-content-transform {
  filter: blur(4px);
  opacity: 0.6;
}

.privacy-locked-overlay {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  pointer-events: auto !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: rgba(0, 0, 0, 0.6) !important;
  color: #ff6b6b !important;
  text-align: center !important;
  padding: 2rem !important;
  font-size: 1rem !important;
  font-weight: 500 !important;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif !important;
  line-height: 1.6 !important;
  border: 1px dashed #ff6b6b !important;
  border-radius: 4px !important;
  z-index: 1000 !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  box-sizing: border-box !important;
  overflow-y: auto !important;
  white-space: pre-wrap !important;
  word-wrap: break-word !important;
  pointer-events: auto !important;
}

.privacy-locked-overlay::before {
  content: '🔒 ' !important;
  font-size: 1.5rem !important;
  margin-right: 0.5rem !important;
  display: inline-block !important;
}

/* Teaser treatment */
.node-content.privacy-teaser {
  position: relative;
}

.node-content.privacy-teaser .node-content-transform {
  filter: blur(6px);
  opacity: 0.6;
}

.privacy-teaser-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.95);
  color: #e0e0e0;
  padding: 1.5rem 2rem;
  border-radius: 8px;
  text-align: center;
  z-index: 10;
  pointer-events: auto;
  max-width: 80%;
  font-size: 0.9rem;
  line-height: 1.5;
  border: 1px solid #4a4a4a;
  filter: none !important; /* Ensure no blur is applied */
  backdrop-filter: none !important; /* Ensure no backdrop blur */
}

/* Privacy requirement modal pending message */
.privacy-pending-message {
  padding: 1.5rem;
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: 8px;
  margin: 1rem 0;
}

.privacy-pending-message p {
  margin: 0.5rem 0;
  color: #e0e0e0;
}

.privacy-status-pending {
  color: #fbbf24;
  font-weight: 500;
}

/* Hard lock treatment */
.node-content.privacy-hardLock .node-content-transform {
  display: none; /* Hide actual content, but locked message is added directly to contentContainer */
}

.privacy-locked-message {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 100px !important;
  background: rgba(0, 0, 0, 0.95) !important;
  color: #ff6b6b !important;
  text-align: center !important;
  padding: 2rem !important;
  font-size: 1rem !important;
  font-weight: 500 !important;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif !important;
  line-height: 1.6 !important;
  border: 2px dashed #ff6b6b !important;
  border-radius: 4px !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  z-index: 1000 !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  box-sizing: border-box !important;
  overflow-y: auto !important;
  white-space: pre-wrap !important;
  word-wrap: break-word !important;
  pointer-events: auto !important;
}

.privacy-locked-message::before {
  content: '🔒 ' !important;
  font-size: 1.5rem !important;
  margin-right: 0.5rem !important;
  display: inline-block !important;
}

/* Hidden/Locked States */
.node-wrapper.hidden {
  display: none;
}

.node-wrapper.locked {
  opacity: 0.6;
  pointer-events: none;
}

/* Drop Shadow */
.node-wrapper.node-drop-shadow {
  filter: drop-shadow(4px 4px 8px rgba(0, 0, 0, 0.3));
}

/* Edit Mode Styles */
#canvas-root.edit-mode {
  cursor: default;
}

#canvas-root.edit-mode .node-wrapper {
  cursor: default;
}

#canvas-root.edit-mode .node-wrapper .node-titlebar {
  cursor: move;
}

/* Markdown Node Presets */
.markdown-content {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
}

/* Markdown Content - Base styles */
/* Note: Preset-specific styles are loaded dynamically from styles/ folder */

/* Media Library Panel */
#media-library-panel {
  position: fixed;
  top: 0;
  right: 350px; /* Default: to the left of right panel */
  width: 300px;
  height: 100vh;
  background: #2a2a2a;
  border-left: 1px solid #3a3a3a;
  border-right: 1px solid #3a3a3a;
  z-index: 998;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s ease, right 0.3s ease, width 0.3s ease;
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.3);
}

/* When right panel is hidden, position media library at right edge */
#right-panel.right-panel-hidden ~ #media-library-panel {
  right: 0;
}

/* Hidden state - completely hidden */
#media-library-panel.media-library-hidden {
  transform: translateX(100%);
}

/* Expanded state - fully visible */
#media-library-panel:not(.media-library-hidden) {
  transform: translateX(0);
  width: 300px;
}

/* Hidden state - completely hidden */
.media-library-hidden {
  transform: translateX(100%);
}

.media-library-header {
  display: flex;
  flex-direction: column;
  padding: 0.75rem 1rem;
  background: #1a1a1a;
  border-bottom: 1px solid #3a3a3a;
  padding-top: 60px; /* Account for toolbar */
}

.media-library-header > h3.media-library-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.media-library-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-size: 0.875rem;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid #3a3a3a;
}

.media-library-breadcrumb-item {
  color: #999;
  text-decoration: none;
  transition: color 0.2s ease;
  cursor: pointer;
}

.media-library-breadcrumb-item:hover {
  color: #4a9eff;
}

.media-library-breadcrumb-item.active {
  color: #e0e0e0;
  font-weight: 600;
}

.media-library-breadcrumb-separator {
  color: #666;
}

.media-library-folder {
  cursor: pointer;
}

.media-library-folder:hover {
  opacity: 0.8;
}

.media-library-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: #e0e0e0;
  margin: 0;
}

.media-library-close-btn {
  background: transparent;
  border: none;
  color: #999;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

.media-library-close-btn:hover {
  color: #e0e0e0;
}

.media-library-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.media-library-upload {
  padding: 1rem;
  border-bottom: 1px solid #3a3a3a;
}

.media-library-btn {
  width: 100%;
  padding: 0.5rem 1rem;
  background: #3a3a3a;
  border: 1px solid #4a4a4a;
  border-radius: 3px;
  color: #e0e0e0;
  font-size: 0.75rem;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.media-library-btn:hover {
  background: #4a4a4a;
  border-color: #5a5a5a;
}

.media-library-grid {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.media-library-item {
  position: relative;
  aspect-ratio: 1;
  border: 2px solid #3a3a3a;
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s;
  background: #1a1a1a;
}

.media-library-item:hover {
  border-color: #4a9eff;
  transform: scale(1.05);
}

.media-library-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.media-library-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.7);
  color: #e0e0e0;
  padding: 0.25rem 0.5rem;
  font-size: 0.65rem;
  white-space: nowrap;
  overflow: hidden;
}

/* Board Editor Panel - Now inside right panel, so no special positioning needed */
/* Board Editor Content - ensure it fits in sidebar */
#board-editor-content {
  width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

#board-editor-content-inner {
  width: 100%;
  box-sizing: border-box;
  max-width: 100%;
  overflow-x: hidden;
}

/* Ensure board editor inputs don't overflow */
#board-editor-panel .node-editor-input {
  max-width: 100%;
  box-sizing: border-box;
}

/* Board Details Panel - 50% Width */
#board-details-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 50vw;
  max-width: 800px;
  min-width: 400px;
  height: 100vh;
  background: #1a1a1a;
  z-index: 1001;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease-in-out;
  overflow: hidden;
  transform: translateX(100%);
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.5);
}

#board-details-panel.board-details-hidden {
  transform: translateX(100%);
}

#board-details-panel:not(.board-details-hidden) {
  transform: translateX(0);
}

.board-details-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.5rem;
  background: #1a1a1a;
  border-bottom: 1px solid #3a3a3a;
  padding-top: 60px;
  flex-shrink: 0;
}

.board-details-title {
  font-size: 1rem;
  font-weight: 600;
  color: #e0e0e0;
  margin: 0;
}

.board-details-close-btn {
  background: transparent;
  border: none;
  color: #999;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  transition: background 0.2s, color 0.2s;
}

.board-details-close-btn:hover {
  background: #2a2a2a;
  color: #e0e0e0;
}

.board-details-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0.5rem;
}

#board-details-content-inner {
  transform: scale(0.8);
  transform-origin: top left;
  width: 125%; /* Compensate for scale: 100% / 0.8 = 125% */
}

/* Privacy Levels Table/Row Layout */
.privacy-levels-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 1rem;
}

.privacy-level-row {
  background: #2a2a2a;
  border: 1px solid #3a3a3a;
  border-radius: 8px;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
  margin-bottom: 1rem;
}

.privacy-level-row:hover {
  border-color: #4a4a4a;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transform: translateY(-2px);
}

.privacy-level-row-header {
  display: grid;
  grid-template-columns: 80px 200px 1fr 150px 60px;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: #1a1a1a;
  border-bottom: 1px solid #3a3a3a;
  font-size: 0.75rem;
  font-weight: 600;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.privacy-level-row-content {
  display: grid;
  grid-template-columns: 80px 200px 1fr 150px 60px;
  gap: 1rem;
  padding: 1.5rem;
  align-items: start;
}

.privacy-level-requirements-section {
  padding: 1rem 1.5rem;
  background: #1a1a1a;
  border-top: 1px solid #2a2a2a;
  border-radius: 0 0 8px 8px;
}

.privacy-level-cell {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.privacy-level-cell-label {
  font-size: 0.7rem;
  color: #999;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.privacy-level-cell-value {
  font-size: 0.9rem;
  color: #e0e0e0;
}

.privacy-level-cell-input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  background: #1a1a1a;
  border: 1px solid #3a3a3a;
  border-radius: 4px;
  color: #e0e0e0;
  font-size: 0.85rem;
  transition: border-color 0.2s;
}

.privacy-level-cell-input:focus {
  outline: none;
  border-color: #4a9eff;
}

.privacy-level-cell-select {
  width: 100%;
  padding: 0.5rem 0.75rem;
  background: #1a1a1a;
  border: 1px solid #3a3a3a;
  border-radius: 4px;
  color: #e0e0e0;
  font-size: 0.85rem;
  cursor: pointer;
  transition: border-color 0.2s;
}

.privacy-level-cell-select:focus {
  outline: none;
  border-color: #4a9eff;
}

.privacy-level-cell-textarea {
  width: 100%;
  min-height: 60px;
  padding: 0.5rem 0.75rem;
  background: #1a1a1a;
  border: 1px solid #3a3a3a;
  border-radius: 4px;
  color: #e0e0e0;
  font-size: 0.85rem;
  font-family: inherit;
  resize: vertical;
  transition: border-color 0.2s;
}

.privacy-level-cell-textarea:focus {
  outline: none;
  border-color: #4a9eff;
}

.privacy-level-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  justify-content: flex-end;
}

.privacy-level-btn {
  padding: 0.4rem 0.8rem;
  background: #3a3a3a;
  border: 1px solid #4a4a4a;
  border-radius: 4px;
  color: #e0e0e0;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.privacy-level-btn:hover {
  background: #4a4a4a;
  border-color: #5a5a5a;
}

.privacy-level-btn-danger {
  background: #5a2a2a;
  border-color: #6a3a3a;
  color: #ff6b6b;
}

.privacy-level-btn-danger:hover {
  background: #6a3a3a;
  border-color: #7a4a4a;
}

.privacy-levels-actions-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #3a3a3a;
}

.privacy-levels-add-btn {
  padding: 0.75rem 1.5rem;
  background: #2a5a2a;
  border: 1px solid #3a6a3a;
  border-radius: 6px;
  color: #6bff6b;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.privacy-levels-add-btn:hover {
  background: #3a6a3a;
  border-color: #4a7a4a;
}

.privacy-levels-empty {
  text-align: center;
  padding: 4rem 2rem;
  color: #666;
  font-size: 1rem;
}

/* Board Editor Multi-Column Layout */
.board-editor-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  padding: 1rem 0;
}

@media (max-width: 1400px) {
  .board-editor-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .board-editor-grid {
    grid-template-columns: 1fr;
  }
}

.board-editor-column {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Board Editor Section Styling */
.board-editor-section {
  background: #2a2a2a;
  border: 1px solid #3a3a3a;
  border-radius: 8px;
  padding: 1.5rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.board-editor-section:hover {
  border-color: #4a4a4a;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.board-editor-section-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #e0e0e0;
  margin: 0 0 1.25rem 0;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #3a3a3a;
}

/* Board Editor Fields - Better spacing */
.board-editor-field {
  margin-bottom: 1rem;
}

.board-editor-field:last-child {
  margin-bottom: 0;
}

.board-editor-field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: #b0b0b0;
  margin-bottom: 0.5rem;
}

.board-editor-field input,
.board-editor-field select,
.board-editor-field textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  background: #1a1a1a;
  border: 1px solid #3a3a3a;
  border-radius: 4px;
  color: #e0e0e0;
  font-size: 0.9rem;
  transition: border-color 0.2s, background 0.2s;
}

.board-editor-field input:focus,
.board-editor-field select:focus,
.board-editor-field textarea:focus {
  outline: none;
  border-color: #4a9eff;
  background: #1f1f1f;
}

.board-editor-field-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

/* Privacy Levels List - Better styling */
.board-editor-privacy-levels-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.board-editor-privacy-level-item {
  background: #1a1a1a;
  border: 1px solid #3a3a3a;
  border-radius: 6px;
  padding: 1rem;
  transition: border-color 0.2s;
}

.board-editor-privacy-level-item:hover {
  border-color: #4a4a4a;
}

/* Requirements styling */
.privacy-requirement-item {
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 4px;
  padding: 1rem;
  margin-bottom: 0.75rem;
}

.privacy-requirement-item:last-child {
  margin-bottom: 0;
}

/* Right Side Panel */
#right-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 350px;
  height: 100vh;
  background: #2a2a2a;
  border-left: 1px solid #3a3a3a;
  z-index: 999;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.3);
}

#right-panel:not(.right-panel-hidden) {
  transform: translateX(0);
}

.right-panel-hidden {
  transform: translateX(100%);
}

.right-panel-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  padding-top: 60px; /* Account for toolbar */
}

.right-panel-section {
  flex: 0 0 auto;
  border-bottom: 1px solid #3a3a3a;
}

.right-panel-section-debug {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-bottom: none;
}

.right-panel-title {
  font-size: 0.7rem;
  font-weight: 600;
  color: #e0e0e0;
  margin: 0;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid #3a3a3a;
  background: #1a1a1a;
}

.right-panel-body {
  padding: 0.5rem 0.75rem;
  color: #999;
  font-size: 0.75rem;
}

.right-panel-placeholder {
  margin: 0;
  color: #666;
  font-style: italic;
}

/* Node Editor Styles */
.node-editor {
  padding: 0;
}

.node-editor-section {
  padding: 0.35rem 0.6rem;
  border-bottom: 1px solid #3a3a3a;
}

.node-editor-section:last-child {
  border-bottom: none;
}

.node-editor-label {
  display: block;
  font-size: 0.6rem;
  font-weight: 600;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.3rem;
}

.node-editor-row {
  display: flex;
  gap: 0.3rem;
}

.node-editor-field {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

/* Language tabs for markdown editor */
.markdown-language-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 0.5rem;
}

.markdown-language-tab {
  background: transparent;
  border: none;
  color: #999;
  padding: 0.4rem 0.8rem;
  cursor: pointer;
  font-size: 0.75rem;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.markdown-language-tab:hover {
  color: #e0e0e0;
  background: rgba(255, 255, 255, 0.05);
}

.markdown-language-tab.active {
  color: #4a9eff;
  border-bottom-color: #4a9eff;
  font-weight: 600;
}

.markdown-language-tab-panel {
  display: none;
}

.markdown-language-tab-panel[style*="block"] {
  display: block;
}

.node-editor-field-full {
  flex: 1;
  position: relative;
}

.node-editor-field label {
  font-size: 0.6rem;
  color: #999;
}

.node-editor-input {
  width: 100%;
  padding: 0.25rem 0.4rem;
  background: #1a1a1a;
  border: 1px solid #3a3a3a;
  border-radius: 3px;
  color: #e0e0e0;
  font-size: 0.65rem;
  font-family: inherit;
  box-sizing: border-box;
}

.node-editor-input:focus {
  outline: none;
  border-color: #4a9eff;
  background: #222;
}


.node-editor-unit {
  position: absolute;
  right: 0.4rem;
  top: 50%;
  transform: translateY(-50%);
  color: #666;
  font-size: 0.65rem;
  pointer-events: none;
  line-height: 1;
}

.node-editor-checkboxes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.2rem 0.4rem;
}

.node-editor-checkbox {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  cursor: pointer;
  user-select: none;
  font-size: 0.65rem;
  color: #e0e0e0;
  padding: 0.15rem 0;
}

.node-editor-checkbox input[type="checkbox"] {
  width: 12px;
  height: 12px;
  cursor: pointer;
  accent-color: #4a9eff;
  flex-shrink: 0;
}

.node-editor-actions {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.node-editor-btn {
  padding: 0.4rem 0.75rem;
  background: #3a3a3a;
  border: 1px solid #4a4a4a;
  border-radius: 3px;
  color: #e0e0e0;
  font-size: 0.7rem;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.node-editor-btn:hover {
  background: #4a4a4a;
  border-color: #5a5a5a;
}

.node-editor-btn-danger {
  background: #5a2a2a;
  border-color: #7a3a3a;
  color: #ff8888;
}

.node-editor-btn-danger:hover {
  background: #6a3a3a;
  border-color: #8a4a4a;
}

.node-editor-btn-small {
  padding: 0.25rem 0.5rem;
  font-size: 0.65rem;
  min-width: auto;
}

.node-editor-bookmarks-list {
  margin-bottom: 0.5rem;
}

.node-editor-bookmark-item {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
  padding: 0.4rem;
  background: #2a2a2a;
  border-radius: 3px;
  border: 1px solid #3a3a3a;
}

.node-editor-bookmark-item > .node-editor-bookmark-title {
  width: 100%;
}

.node-editor-bookmark-props {
  display: flex;
  gap: 0.3rem;
  align-items: center;
  flex-wrap: wrap;
}

.node-editor-bookmark-props select,
.node-editor-bookmark-props input {
  font-size: 0.65rem;
  padding: 0.2rem 0.4rem;
  height: auto;
}

.node-editor-bookmark-item .node-editor-bookmark-title {
  width: 100%;
  margin: 0;
}

.node-editor-bookmark-actions {
  display: flex;
  gap: 0.2rem;
  align-items: center;
}

.node-editor-multi {
  text-align: center;
}

.node-editor-hint {
  margin: 0.4rem 0 0 0;
  font-size: 0.65rem;
  color: #666;
}

/* Right Panel Accordion */
.right-panel-accordion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  background: #1a1a1a;
  border-bottom: 1px solid #3a3a3a;
  cursor: pointer;
  user-select: none;
  transition: background 0.2s;
}

.right-panel-accordion-header:hover {
  background: #222;
}

.right-panel-accordion-header .right-panel-title {
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
}

.right-panel-accordion-toggle {
  color: #999;
  font-size: 0.75rem;
  transition: transform 0.2s;
}

.right-panel-accordion-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  transition: flex 0.3s ease;
}

.right-panel-accordion-closed {
  flex: 0 0 0;
  min-height: 0;
  overflow: hidden;
}

.right-panel-accordion-closed .right-panel-accordion-toggle {
  transform: rotate(-90deg);
}

/* Debug Panel (now inside right panel) */
.debug-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

.debug-panel-hidden {
  display: none;
}

.debug-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 1rem;
  background: #2a2a2a;
  border-bottom: 1px solid #3a3a3a;
  cursor: move;
  user-select: none;
}

.debug-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: #e0e0e0;
}

.debug-controls {
  display: flex;
  gap: 0.5rem;
}

.debug-btn {
  padding: 0.25rem 0.75rem;
  background: #3a3a3a;
  border: 1px solid #4a4a4a;
  color: #e0e0e0;
  cursor: pointer;
  border-radius: 3px;
  font-size: 0.75rem;
  transition: background 0.2s;
}

.debug-btn:hover {
  background: #4a4a4a;
}

.debug-btn:active {
  background: #5a5a5a;
}

.debug-log-container {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0.5rem;
  font-family: 'Courier New', monospace;
  font-size: 0.75rem;
  line-height: 1.4;
}

.debug-log-entry {
  padding: 0.25rem 0.5rem;
  margin-bottom: 0.25rem;
  border-left: 3px solid transparent;
  border-radius: 2px;
  word-wrap: break-word;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.debug-log-entry:hover {
  background: rgba(255, 255, 255, 0.05);
}

.debug-log-debug {
  border-left-color: #666;
  color: #999;
}

.debug-log-info {
  border-left-color: #4a9eff;
  color: #b0d4ff;
}

.debug-log-warn {
  border-left-color: #ffaa00;
  color: #ffcc66;
}

.debug-log-error {
  border-left-color: #ff4444;
  color: #ff8888;
}

.debug-timestamp {
  color: #666;
  font-size: 0.7rem;
  margin-right: 0.5rem;
}

.debug-category {
  font-weight: 600;
  margin-right: 0.5rem;
  color: #888;
}

.debug-message {
  flex: 1;
}

.debug-data {
  margin-top: 0.25rem;
  padding: 0.5rem;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 2px;
  font-size: 0.7rem;
  max-height: 200px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

/* Scrollbar styling for debug panel */
.debug-log-container::-webkit-scrollbar {
  width: 8px;
}

.debug-log-container::-webkit-scrollbar-track {
  background: #1a1a1a;
}

.debug-log-container::-webkit-scrollbar-thumb {
  background: #3a3a3a;
  border-radius: 4px;
}

.debug-log-container::-webkit-scrollbar-thumb:hover {
  background: #4a4a4a;
}

/* Minimap Styles */
#minimap {
  position: fixed;
  z-index: 2002; /* Above board details panel (1001) */
  pointer-events: auto;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: opacity 0.2s ease;
}

#minimap.minimap-hidden {
  display: none;
}

/* Minimap Positions - N, S, E, W, NE, NW, SE, SW */
#minimap.minimap-NW { top: 1rem; left: 1rem; }
#minimap.minimap-N { top: 1rem; left: 50%; transform: translateX(-50%); }
#minimap.minimap-NE { top: 1rem; right: 1rem; }
#minimap.minimap-W { top: 50%; left: 1rem; transform: translateY(-50%); }
#minimap.minimap-E { top: 50%; right: 1rem; transform: translateY(-50%); }
#minimap.minimap-SW { bottom: 1rem; left: 1rem; }
#minimap.minimap-S { bottom: 1rem; left: 50%; transform: translateX(-50%); }
#minimap.minimap-SE { bottom: 1rem; right: 1rem; }

/* Minimap info display (camera info) */
#minimap-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(26, 26, 26, 0.9);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.25rem 0.5rem;
  font-family: 'Courier New', monospace;
  font-size: 0.65rem;
  color: #ccc;
  text-align: center;
  line-height: 1.3;
  pointer-events: none;
  user-select: none;
}

#minimap-canvas {
  display: block;
  cursor: pointer;
  border-radius: 4px;
}

#minimap-viewport {
  position: absolute;
  border: 2px solid rgba(100, 150, 255, 0.8);
  background: rgba(100, 150, 255, 0.1);
  pointer-events: auto;
  cursor: move;
  border-radius: 2px;
  box-shadow: 0 0 8px rgba(100, 150, 255, 0.4);
}

#minimap-viewport:hover {
  border-color: rgba(100, 150, 255, 1);
  background: rgba(100, 150, 255, 0.15);
  box-shadow: 0 0 12px rgba(100, 150, 255, 0.6);
}

/* Bookmarks Bar (Floating) */
#bookmarks-bar {
  position: fixed;
  z-index: 2001; /* Above board details panel (1001) */
  background: rgba(26, 26, 26, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: opacity 0.2s ease;
}

#bookmarks-bar.bookmarks-bar-hidden {
  display: none;
}

/* Bookmarks Bar Positions - N, S, E, W, NE, NW, SE, SW */
#bookmarks-bar.bookmarks-bar-NW { top: 1rem; left: 1rem; }
#bookmarks-bar.bookmarks-bar-N { top: 1rem; left: 50%; transform: translateX(-50%); }
#bookmarks-bar.bookmarks-bar-NE { top: 1rem; right: 1rem; }
#bookmarks-bar.bookmarks-bar-W { top: 50%; left: 1rem; transform: translateY(-50%); max-height: 80vh; }
#bookmarks-bar.bookmarks-bar-E { top: 50%; right: 1rem; transform: translateY(-50%); max-height: 80vh; }
#bookmarks-bar.bookmarks-bar-SW { bottom: 1rem; left: 1rem; }
#bookmarks-bar.bookmarks-bar-S { bottom: 1rem; left: 50%; transform: translateX(-50%); }
#bookmarks-bar.bookmarks-bar-SE { bottom: 1rem; right: 1rem; }

.bookmarks-bar-content {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.bookmarks-bar-content.bookmarks-bar-horizontal {
  flex-direction: row;
  flex-wrap: wrap;
}

.bookmarks-bar-content.bookmarks-bar-vertical {
  flex-direction: column;
  align-items: stretch;
}

.bookmarks-bar-btn {
  padding: 0.5rem 1rem;
  background: rgba(58, 58, 58, 0.6);
  border: 1px solid rgba(74, 74, 74, 0.5);
  color: #e0e0e0;
  cursor: pointer;
  border-radius: 6px;
  font-size: 0.875rem;
  transition: all 0.2s;
  white-space: nowrap;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.bookmarks-bar-btn:hover {
  background: rgba(68, 68, 68, 0.8);
  border-color: rgba(100, 100, 100, 0.7);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.bookmarks-bar-btn:active {
  background: rgba(48, 48, 48, 0.9);
  transform: translateY(0);
}

.bookmarks-bar-empty {
  color: #999;
  font-size: 0.875rem;
  font-style: italic;
}

/* Language Selector */
#language-selector {
  position: fixed;
  z-index: 2000; /* Above board details panel (1001) */
  pointer-events: none;
}

#language-selector.language-selector-hidden {
  display: none;
}

/* Language Selector Positions - N, S, E, W, NE, NW, SE, SW */
#language-selector.language-selector-NW { top: 20px; left: 20px; }
#language-selector.language-selector-N { top: 20px; left: 50%; transform: translateX(-50%); }
#language-selector.language-selector-NE { top: 20px; right: 20px; }
#language-selector.language-selector-W { top: 50%; left: 20px; transform: translateY(-50%); }
#language-selector.language-selector-E { top: 50%; right: 20px; transform: translateY(-50%); }
#language-selector.language-selector-SW { bottom: 20px; left: 20px; }
#language-selector.language-selector-S { bottom: 20px; left: 50%; transform: translateX(-50%); }
#language-selector.language-selector-SE { bottom: 20px; right: 20px; }

.language-selector-content {
  display: flex;
  gap: 0.5rem;
  background: rgba(26, 26, 26, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 0.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  pointer-events: auto;
}

.language-selector-btn {
  background: rgba(48, 48, 48, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  color: #fff;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.language-selector-btn:hover {
  background: rgba(64, 64, 64, 0.9);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.language-selector-btn:active {
  background: rgba(48, 48, 48, 0.9);
  transform: translateY(0);
}

.language-selector-btn-active {
  background: rgba(100, 150, 255, 0.3);
  border-color: rgba(100, 150, 255, 0.6);
}

.language-selector-btn-active:hover {
  background: rgba(100, 150, 255, 0.4);
  border-color: rgba(100, 150, 255, 0.7);
}

/* Language Selector Dropdown */
.language-selector-dropdown {
  position: relative;
  pointer-events: auto;
}

.language-selector-dropdown-btn {
  background: rgba(48, 48, 48, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  color: #fff;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 100px;
  justify-content: space-between;
}

.language-selector-dropdown-btn:hover {
  background: rgba(64, 64, 64, 0.9);
  border-color: rgba(255, 255, 255, 0.2);
}

.language-selector-arrow {
  font-size: 0.7rem;
  opacity: 0.7;
}

.language-selector-menu {
  position: absolute;
  background: rgba(26, 26, 26, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 0.25rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  min-width: 100%;
  z-index: 2003; /* Above language selector (2000) */
}

.language-selector-menu-down {
  top: calc(100% + 0.5rem);
  left: 0;
}

.language-selector-menu-up {
  bottom: calc(100% + 0.5rem);
  left: 0;
}

.language-selector-menu-hidden {
  display: none;
}

.language-selector-menu-item {
  display: block;
  width: 100%;
  background: transparent;
  border: none;
  border-radius: 4px;
  padding: 0.5rem 0.75rem;
  color: #fff;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  white-space: nowrap;
}

.language-selector-menu-item:hover {
  background: rgba(64, 64, 64, 0.8);
}

.language-selector-menu-item-active {
  background: rgba(100, 150, 255, 0.3);
  border-color: rgba(100, 150, 255, 0.6);
}

.language-selector-menu-item-active:hover {
  background: rgba(100, 150, 255, 0.4);
}

/* Share Bar */
#share-bar {
  position: fixed;
  z-index: 2004; /* Above board details panel (1001) */
  pointer-events: none;
}

#share-bar.share-bar-hidden {
  display: none;
}

/* Share Bar Positions - N, S, E, W, NE, NW, SE, SW */
#share-bar.share-bar-NW { top: 20px; left: 20px; }
#share-bar.share-bar-N { top: 20px; left: 50%; transform: translateX(-50%); }
#share-bar.share-bar-NE { top: 20px; right: 20px; }
#share-bar.share-bar-W { top: 50%; left: 20px; transform: translateY(-50%); }
#share-bar.share-bar-E { top: 50%; right: 20px; transform: translateY(-50%); }
#share-bar.share-bar-SW { bottom: 20px; left: 20px; }
#share-bar.share-bar-S { bottom: 20px; left: 50%; transform: translateX(-50%); }
#share-bar.share-bar-SE { bottom: 20px; right: 20px; }

.share-bar-content {
  display: flex;
  gap: 0.5rem;
  background: rgba(26, 26, 26, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 0.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  pointer-events: auto;
}

.share-bar-content-horizontal {
  flex-direction: row;
  flex-wrap: wrap;
}

.share-bar-content-stacked {
  flex-direction: column;
  align-items: stretch;
}

.share-bar-btn {
  background: rgba(48, 48, 48, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  color: #fff;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  text-decoration: none;
}

.share-bar-btn:hover {
  background: rgba(64, 64, 64, 0.9);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.share-bar-btn:active {
  background: rgba(48, 48, 48, 0.9);
  transform: translateY(0);
}

.share-bar-icon {
  font-size: 1rem;
  line-height: 1;
}

/* Share Bar Dropdown */
.share-bar-dropdown {
  position: relative;
  pointer-events: auto;
}

.share-bar-dropdown-btn {
  background: rgba(48, 48, 48, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  color: #fff;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 100px;
  justify-content: space-between;
}

.share-bar-dropdown-btn:hover {
  background: rgba(64, 64, 64, 0.9);
  border-color: rgba(255, 255, 255, 0.2);
}

.share-bar-arrow {
  font-size: 0.7rem;
  opacity: 0.7;
}

.share-bar-menu {
  position: absolute;
  background: rgba(26, 26, 26, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 0.25rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  min-width: 100%;
}

/* Media Library Manager - Fullscreen */
#media-library-manager {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  background: #1a1a1a;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#media-library-manager.media-library-manager-hidden {
  display: none;
}

.media-manager-header {
  background: #2a2a2a;
  border-bottom: 1px solid #3a3a3a;
  padding: 1rem;
  flex-shrink: 0;
}

.media-manager-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.media-manager-title h2 {
  margin: 0;
  color: #e0e0e0;
  font-size: 1.5rem;
  font-weight: 600;
}

.media-manager-btn-close {
  background: transparent;
  border: none;
  color: #999;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.media-manager-btn-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.media-manager-toolbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.media-manager-toolbar-left,
.media-manager-toolbar-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.media-manager-toolbar-center {
  flex: 1;
  min-width: 200px;
  max-width: 400px;
}

.media-manager-btn {
  background: #3a3a3a;
  border: 1px solid #4a4a4a;
  color: #e0e0e0;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.875rem;
  transition: all 0.2s ease;
}

.media-manager-btn:hover:not(:disabled) {
  background: #4a4a4a;
  border-color: #5a5a5a;
}

.media-manager-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.media-manager-search {
  width: 100%;
  padding: 0.5rem;
  background: #2a2a2a;
  border: 1px solid #3a3a3a;
  border-radius: 4px;
  color: #e0e0e0;
  font-size: 0.875rem;
}

.media-manager-search:focus {
  outline: none;
  border-color: #4a9eff;
}

.media-manager-select {
  padding: 0.5rem;
  background: #2a2a2a;
  border: 1px solid #3a3a3a;
  border-radius: 4px;
  color: #e0e0e0;
  font-size: 0.875rem;
  cursor: pointer;
}

.media-manager-view-toggle {
  display: flex;
  gap: 0.25rem;
  background: #2a2a2a;
  border: 1px solid #3a3a3a;
  border-radius: 4px;
  padding: 0.25rem;
}

.media-manager-view-btn {
  background: transparent;
  border: none;
  color: #999;
  padding: 0.25rem 0.5rem;
  cursor: pointer;
  border-radius: 2px;
  transition: all 0.2s ease;
}

.media-manager-view-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #e0e0e0;
}

.media-manager-view-btn.active {
  background: #4a9eff;
  color: #fff;
}

.media-manager-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid #3a3a3a;
  flex-wrap: wrap;
}

.media-manager-breadcrumb-item {
  color: #999;
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.2s ease;
}

.media-manager-breadcrumb-item:hover {
  color: #4a9eff;
}

.media-manager-breadcrumb-item.active {
  color: #e0e0e0;
  font-weight: 600;
}

.media-manager-breadcrumb-separator {
  color: #666;
}

.media-manager-content {
  flex: 1;
  overflow: auto;
  padding: 1rem;
}

.media-manager-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
}

.media-manager-grid.list-view {
  grid-template-columns: 1fr;
  gap: 0.5rem;
}

.media-manager-item {
  background: #2a2a2a;
  border: 2px solid transparent;
  border-radius: 6px;
  padding: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.media-manager-item:hover {
  background: #333;
  border-color: #4a4a4a;
}

.media-manager-item.selected {
  border-color: #4a9eff;
  background: rgba(74, 158, 255, 0.1);
}

.media-manager-item-checkbox {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 10;
}

.media-manager-item-checkbox input {
  cursor: pointer;
}

.media-manager-item-thumbnail {
  width: 100%;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1a1a1a;
  border-radius: 4px;
  margin-bottom: 0.5rem;
  overflow: hidden;
}

.media-manager-item-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-manager-pdf-icon,
.media-manager-file-icon {
  font-size: 3rem;
  opacity: 0.5;
}

.media-manager-item-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

.media-manager-item-icon img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 4px;
}

.media-manager-item-name {
  font-size: 0.875rem;
  color: #e0e0e0;
  word-break: break-word;
  margin-top: 0.5rem;
  line-height: 1.3;
}

.media-manager-grid.list-view .media-manager-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem;
}

.media-manager-grid.list-view .media-manager-item-thumbnail {
  width: 64px;
  height: 64px;
  margin-bottom: 0;
  flex-shrink: 0;
}

.media-manager-grid.list-view .media-manager-item-name {
  flex: 1;
  margin-top: 0;
}

.media-manager-item-meta {
  font-size: 0.75rem;
  color: #999;
  margin-top: 0.25rem;
}

.media-manager-grid.list-view .media-manager-item-meta {
  margin-top: 0;
  margin-left: auto;
  text-align: right;
  white-space: nowrap;
}

.media-manager-footer {
  background: #2a2a2a;
  border-top: 1px solid #3a3a3a;
  padding: 0.75rem 1rem;
  flex-shrink: 0;
}

.media-manager-status {
  color: #999;
  font-size: 0.875rem;
}

.media-manager-loading,
.media-manager-empty,
.media-manager-error {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem;
  color: #999;
}

.media-manager-error {
  color: #ff6b6b;
}

.share-bar-menu-down {
  top: calc(100% + 0.5rem);
  left: 0;
}

.share-bar-menu-up {
  bottom: calc(100% + 0.5rem);
  left: 0;
}

.share-bar-menu-hidden {
  display: none;
}

.share-bar-menu-item {
  display: block;
  width: 100%;
  background: transparent;
  border: none;
  border-radius: 4px;
  padding: 0.5rem 0.75rem;
  color: #fff;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  white-space: nowrap;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.share-bar-menu-item:hover {
  background: rgba(64, 64, 64, 0.8);
}


#canvas-root.edit-mode .noMobile {

  border: 1px solid #ff00ff !important;  

}