@import url('https://fonts.googleapis.com/css2?family=VT323&display=swap');

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

body {
    background: #0a0a0a;
    font-family: 'VT323', 'Courier New', monospace;
    color: #00ff41;
    overflow: hidden;
    height: 100vh;
    /* do not force a cursor here; modes will set it */
}

/* Disable text selection during panel drag */
body.ui-dragging-panel, body.ui-dragging-panel * {
  user-select: none !important;
  -webkit-user-select: none !important;
  -ms-user-select: none !important;
}

/* Scanlines effect */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(0, 255, 65, 0.03) 2px,
            rgba(0, 255, 65, 0.03) 4px
        );
    pointer-events: none;
    animation: scanlines 0.1s linear infinite;
    z-index: 1;
}

@keyframes scanlines {
    0% { background-position: 0 0; }
    100% { background-position: 0 2px; }
}

/* Glow effect */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 20%, rgba(0, 255, 65, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(0, 255, 65, 0.05) 0%, transparent 50%);
    pointer-events: none;
    animation: flicker 0.15s infinite;
    z-index: 1;
}

@keyframes flicker {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.95; }
}

#editor-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    z-index: 10;
    display: flex;
    flex-direction: column;
}

#canvas-container {
    position: relative;
    width: 100%;
    flex: 1;
    min-height: 0; /* Allow flex item to shrink */
    overflow: hidden; /* Prevent content from spilling out */
    /* Give canvas container more priority in the flex layout */
    flex-grow: 1;
    flex-shrink: 1;
}

/* Sketch overlay action buttons (top-right) */
.center-panel { position: relative; }
.sketch-actions {
  position: absolute;
  top: 48px; /* below the viewport header */
  right: 16px;
  display: none; /* shown only in sketch */
  gap: 8px;
  z-index: 2000;
}
.sketch-actions img {
  width: 28px;
  height: 28px;
  cursor: pointer;
  opacity: 0.85;
}
.sketch-actions img:hover { opacity: 1; }

/* Canvas element styling for proper flex behavior */
#canvas-container canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
    object-fit: contain;
}

/* Override for axis indicator canvas */
#editor-canvas-axis-indicator {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    max-width: 40px !important;
    min-height: 40px !important;
    max-height: 40px !important;
    transform: none !important;
    object-fit: none !important;
}

.button {
    background: rgba(0, 255, 65, 0.2);
    border: 1px solid #00ff41;
    color: #00ff41;
    padding: 8px 15px;
    margin: 5px;
    border-radius: 3px;
    cursor: pointer;
    font-family: 'VT323', monospace;
    font-size: 14px;
    transition: all 0.2s ease;
}

.button:hover {
    background: rgba(0, 255, 65, 0.3);
    transform: translateY(-1px);
}

.button:active {
    transform: translateY(0);
}

.button.active {
    background: rgba(0, 255, 65, 0.4);
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.5);
}

/* Traditional Menu Bar Styles */
.menu-bar {
    display: flex;
    align-items: center; /* vertically center menu item text */
    background: #2d2d30;
    border-bottom: 1px solid #3e3e42;
    height: 30px;
    z-index: 20000; /* above draggable panels (1000) and indicators (10000) */
    position: relative;
    width: 100%;
}

.menu-item {
    position: relative;
    padding: 0 15px; /* vertical centering handled by align-items on bar */
    color: #cccccc;
    cursor: pointer;
    font-family: 'VT323', 'Courier New', monospace;
    font-size: 13px;
    transition: background 0.2s ease;
}

.menu-item:hover {
    background: #3e3e42;
}

.menu-item:hover .menu-dropdown {
    display: block;
}

.menu-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #2d2d30;
    border: 1px solid #3e3e42;
    min-width: 200px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    z-index: 20010;
}

.menu-option {
    padding: 8px 15px;
    color: #cccccc;
    cursor: pointer;
    font-family: 'VT323', 'Courier New', monospace;
    font-size: 12px;
    transition: background 0.2s ease;
}

.menu-option:hover {
    background: #3e3e42;
}

.menu-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.menu-option img {
    background: transparent;
    border-radius: 2px;
    margin-left: auto;
}

.menu-separator {
    height: 1px;
    background: #3e3e42;
    margin: 5px 0;
}

.menu-submenu {
    position: relative;
    z-index: 20010;
}

.menu-submenu:hover .submenu {
    display: block;
}

.submenu {
    display: none;
    position: absolute;
    left: 100%;
    top: 0;
    background: #2d2d30;
    border: 1px solid #3e3e42;
    min-width: 150px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    z-index: 20020; /* submenus above their parents */
}

/* Toolbar Styles */
.toolbar {
    display: flex;
    background: #252526;
    border-bottom: 1px solid #3e3e42;
    padding: 8px 10px;
    height: 48px; /* default (features) */
    align-items: center;
    position: relative;
    width: 100%;
}

/* Ensure first tool-group aligns with same left padding across modes */
.toolbar > .tool-group:first-of-type { margin-left: 0; }

/* Taller height when Sketch tab is active */
body.toolbar-sketch .toolbar {
  height: 92px; /* tighter sketch toolbar */
  align-items: center; /* vertically center all items */
}
body.toolbar-features .toolbar {
  height: 92px; /* match sketch toolbar height so large buttons fit */
  align-items: center;
}

/* Make extrude/revolve buttons exactly match sketch toggle sizing/spacing */
body.toolbar-features .tool-group .tool-button#extrude-tool,
body.toolbar-features .tool-group .tool-button#revolve-tool {
  height: 74px;
  padding: 0 10px;
  width: 72px;
  min-width: 72px;
  position: relative;
}
body.toolbar-features .tool-group .tool-button#extrude-tool .sketch-toggle-icon,
body.toolbar-features .tool-group .tool-button#revolve-tool .sketch-toggle-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -55%);
  width: 40px;
  height: 40px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  pointer-events: none;
}
body.toolbar-features .tool-group .tool-button#extrude-tool .btn-caption,
body.toolbar-features .tool-group .tool-button#revolve-tool .btn-caption {
  position: absolute;
  left: 0; right: 0;
  bottom: 4px;
  text-align: center;
  font-size: 12px;
  line-height: 12px;
}

.mode-tabs {
    display: flex;
    gap: 6px;
    padding: 0 8px 6px 8px; /* hang down below the menubar */
    background: transparent;
    border: none;
    position: absolute;
    top: 30px; /* align directly under menubar height */
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
}

.tab-button {
    background: #1f1f1f;
    border: 1px solid #3e3e42;
    color: #cccccc;
    padding: 4px 10px;
    border-radius: 0 0 6px 6px; /* rounded bottom corners, sharp top to hang down */
    cursor: pointer;
    font-family: 'VT323', monospace;
    font-size: 14px;
}

.tab-button.active {
    background: #28a745; /* green accent for active tab */
    color: #ffffff;
    border-color: #28a745;
}

.tool-group {
    display: flex;
    gap: 6px;
    margin-right: 12px;
    align-items: center;
}

.tool-button {
    background: #2d2d30;
    border: 1px solid #3e3e42;
    color: #cccccc;
    padding: 4px 8px;
    cursor: pointer;
    font-family: 'VT323', monospace;
    font-size: 16px;
    transition: all 0.2s ease;
    border-radius: 3px;
    display: flex;
    flex-direction: column;
    align-items: center;
  justify-content: center;
}
.tool-button .btn-caption {
  font-size: 12px;
  line-height: 12px;
  text-align: center;
  position: absolute;
  left: 0; right: 0;
  bottom: 4px;
}

/* Fixed width for sketch toggle for consistent sizing */
.tool-button.sketch-toggle {
  width: 72px; /* match typical button footprint */
  min-width: 72px;
  position: relative; /* allow absolute-centered icon */
}
.tool-button.sketch-toggle img {
  display: block;
  margin: 0 auto 2px auto;
}

.sketch-toggle-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -55%); /* bias slightly upward for caption */
  width: 40px;
  height: 40px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  pointer-events: none; /* clicks pass through to button */
}

/* Sketch toggle icon states */
.tool-button.sketch-toggle.state-idle .sketch-toggle-icon { background-image: url('assets/icons/sketch.png'); }
.tool-button.sketch-toggle.state-armed .sketch-toggle-icon { background-image: url('assets/icons/enter-sketch.png'); }
.tool-button.sketch-toggle.state-active .sketch-toggle-icon { background-image: url('assets/icons/exit-sketch.png'); }
/* Extrude toggle states */
body.toolbar-features .tool-button#extrude-tool.state-idle .sketch-toggle-icon { background-image: url('assets/icons/extrude.png'); }
body.toolbar-features .tool-button#extrude-tool.state-armed .sketch-toggle-icon { background-image: url('assets/icons/enter-extrude.png'); }
body.toolbar-features .tool-button#extrude-tool.state-active .sketch-toggle-icon { background-image: url('assets/icons/exit-extrude.png'); }
/* Revolved extrusion icon (static for now) */
body.toolbar-features .tool-button#revolve-tool .sketch-toggle-icon { background-image: url('assets/icons/revolved-extrude.png'); }

.tool-button:hover {
    background: #3e3e42;
}

.tool-button.active {
    background: #007acc;
    border-color: #007acc;
    color: #ffffff;
}

/* Sketch palette styles */
.sketch-only .menu-label {
  color: #cccccc;
  font-family: 'VT323', monospace;
  font-size: 14px;
}
.sketch-palette {
  display: grid;
  grid-template-columns: repeat(3, 24px);
  grid-template-rows: repeat(3, 24px);
  gap: 3px;
  margin-left: 8px;
  padding: 4px;
  border: 1px solid #3e3e42;
  background: #1e1e1e;
  border-radius: 4px;
}
.palette-btn {
  background: #2d2d30;
  border: 1px solid #3e3e42;
  color: #cccccc;
  width: 24px;
  height: 24px;
  font-family: 'VT323', monospace;
  cursor: pointer;
}
.palette-btn:hover { background: #3e3e42; }
.palette-btn img { width: 12px; height: 12px; display: block; margin: 0 auto; }



/* Sketch toolbar sizing */
body.toolbar-sketch .tool-group.sketch-only .tool-button#sketch-toggle {
  height: 74px; /* matches grid block height */
  padding: 0 10px;
  display: flex;
  align-items: center;
}
body.toolbar-sketch .tool-group.sketch-only .tool-button#sketch-dimension {
  height: 74px;
  padding: 0 14px; /* slightly wider */
  display: flex;
  align-items: center;
}
body.toolbar-sketch .tool-group.sketch-only .tool-button#sketch-dimension img {
  width: 18px;
  height: 18px;
}

/* Main Content Layout */
.main-content {
    display: flex;
    flex: 1; /* fill remaining space under menu+toolbar */
    min-height: 0; /* allow to shrink with flexbox */
    margin-top: 0;
    background: #1e1e1e;
    overflow: hidden; /* Prevent any content from spilling out */
}

.center-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #0a0a0a;
    width: 100%;
    height: 100%;
    min-width: 0; /* Allow flex item to shrink below content size */
    overflow: hidden; /* Prevent content from spilling out */
}

/* Draggable Panel Styles */
.draggable-panel {
    position: fixed;
    background: #252526;
    border: none;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    min-width: 200px;
    min-height: 200px;
    max-width: none;
    max-height: none;
    z-index: 1000;
    display: none;
    flex-direction: column;
    resize: both;
    overflow: hidden;
}

.draggable-panel.active {
    display: flex;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: #2d2d30;
    border-bottom: 1px solid #3e3e42;
    height: 40px;
    box-sizing: border-box;
    flex-shrink: 0;
    cursor: move;
}

.panel-title {
    color: #cccccc;
    font-family: 'VT323', 'Courier New', monospace;
    font-size: 13px;
    font-weight: 500;
}

.panel-toggle {
    background: none;
    border: none;
    color: #cccccc;
    cursor: pointer;
    font-size: 16px;
    padding: 0 5px;
}

.panel-toggle:hover {
    color: #ffffff;
}

.panel-content {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background: #1e1e1e;
    color: #cccccc;
}

.panel-controls {
    display: flex;
    gap: 2px;
}

.panel-minimize,
.panel-close {
    background: none;
    border: none;
    color: #cccccc;
    font-size: 14px;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 2px;
    transition: background-color 0.2s;
    min-width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.panel-minimize:hover,
.panel-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.panel-close:hover {
    background: rgba(255, 0, 0, 0.2);
}

/* Resizable Panels */
.resize-handle {
    position: absolute;
    z-index: 100;
    transition: all 0.2s ease;
    border-radius: 1px;
}

/* Edge handles */
.resize-handle.resize-top,
.resize-handle.resize-bottom {
    width: 100%;
    height: 6px;
    background: transparent;
    cursor: ns-resize;
}

.resize-handle.resize-left,
.resize-handle.resize-right {
    width: 6px;
    height: 100%;
    background: transparent;
    cursor: ew-resize;
}

/* Corner handles */
.resize-handle.resize-top-left,
.resize-handle.resize-top-right,
.resize-handle.resize-bottom-left,
.resize-handle.resize-bottom-right {
    width: 12px;
    height: 12px;
    background: transparent;
    cursor: nw-resize;
}

.resize-handle.resize-top-right {
    cursor: ne-resize;
}

.resize-handle.resize-bottom-left {
    cursor: sw-resize;
}

.resize-handle.resize-bottom-right {
    cursor: se-resize;
}

.resize-handle:hover {
    background: rgba(255, 255, 255, 0.15) !important;
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.resize-handle.resize-top:hover,
.resize-handle.resize-bottom:hover {
    height: 8px;
}

.resize-handle.resize-left:hover,
.resize-handle.resize-right:hover {
    width: 8px;
}

.resize-handle.resize-top-left:hover,
.resize-handle.resize-top-right:hover,
.resize-handle.resize-bottom-left:hover,
.resize-handle.resize-bottom-right:hover {
    width: 14px;
    height: 14px;
}

.resize-handle.resizing {
    background: rgba(255, 255, 255, 0.25) !important;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: #2d2d30;
    border-bottom: 1px solid #3e3e42;
    height: 40px;
    box-sizing: border-box;
    flex-shrink: 0;
}

.panel-title {
    color: #cccccc;
    font-family: 'VT323', 'Courier New', monospace;
    font-size: 13px;
    font-weight: 500;
}

.panel-toggle {
    background: none;
    border: none;
    color: #cccccc;
    cursor: pointer;
    font-size: 16px;
    padding: 0 5px;
}

.panel-toggle:hover {
    color: #ffffff;
}

.panel-content {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
}

.viewport-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 15px; /* Reduced padding from 10px to 5px */
    background: #2d2d30;
    border-bottom: 1px solid #3e3e42;
    min-height: 30px; /* Reduced from 40px to 30px */
    height: auto;
    box-sizing: border-box;
    flex-wrap: wrap;
    gap: 10px;
    flex-shrink: 0; /* Prevent header from shrinking */
    /* Make header more compact */
    font-size: 12px; /* Smaller font size */
}

.viewport-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex: 1;
    min-width: 0;
    transition: all 0.3s ease;
    overflow: hidden;
}

.viewport-header-panels {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

.viewport-title {
    color: #cccccc;
    font-family: 'VT323', 'Courier New', monospace;
    font-size: 13px;
    font-weight: 500;
}

.viewport-controls {
    color: #888888;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ui-toggle-btn {
    background: none;
    border: 1px solid #3e3e42;
    color: #888888;
    cursor: pointer;
    font-size: 14px;
    padding: 2px 6px;
    border-radius: 3px;
    transition: all 0.2s ease;
}

.ui-toggle-btn:hover {
    background: #3e3e42;
    color: #cccccc;
}

.ui-toggle-btn.active {
    background: #007acc;
    border-color: #007acc;
    color: #ffffff;
}

.floating-ui-toggle-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    cursor: pointer;
    padding: 8px;
    z-index: 10000;
    transition: all 0.3s ease;
    display: none;
}

.floating-ui-toggle-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
}

/* Hidden UI state */
.center-panel.ui-hidden .viewport-header,
.center-panel.ui-hidden .status-bar {
    display: none;
}

.center-panel.ui-hidden #canvas-container {
    flex: 1;
    height: 100%;
}

/* Properties Panel Styles */
.nothing-selected {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: #888888;
    text-align: center;
}

.nothing-selected-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.nothing-selected-text {
    font-size: 14px;
    color: #666666;
}

.object-preview-section {
    background: #2d2d30;
    border: 1px solid #3e3e42;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 15px;
}

.preview-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.preview-icon {
    font-size: 24px;
}

.preview-info {
    flex: 1;
}

.preview-type {
    font-weight: 500;
    color: #cccccc;
    margin-bottom: 2px;
}

.preview-subtitle {
    font-size: 12px;
    color: #888888;
}

.preview-type-input,
.preview-subtitle-input {
    background: transparent;
    border: none;
    color: inherit;
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
    width: 100%;
    padding: 0;
    margin: 0;
    outline: none;
}

.preview-type-input {
    font-weight: 500;
    color: #cccccc;
    margin-bottom: 2px;
}

.preview-subtitle-input {
    font-size: 12px;
    color: #888888;
    margin-bottom: 4px;
}

.preview-type-input:focus,
.preview-subtitle-input:focus {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    padding: 2px 4px;
}

.preview-type-display {
    font-size: 10px;
    color: #666666;
    font-style: italic;
}

/* Unified Properties Section */
.unified-properties-section {
    background: #2d2d30;
    border: 1px solid #3e3e42;
    border-radius: 4px;
    padding: 12px;
    margin-bottom: 15px;
}

.unified-header {
    display: flex;
    align-items: flex-start;
    margin-bottom: 12px;
}

.unified-icon {
    font-size: 24px;
    margin-right: 12px;
    margin-top: 2px;
}

.unified-info {
    flex: 1;
}

.unified-type-input,
.unified-subtitle-input {
    background: transparent;
    border: none;
    color: inherit;
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
    width: 100%;
    padding: 0;
    margin: 0;
    outline: none;
}

.unified-type-input {
    font-weight: 500;
    color: #cccccc;
    margin-bottom: 2px;
}

.unified-subtitle-input {
    font-size: 12px;
    color: #888888;
    margin-bottom: 4px;
}

.unified-type-input:focus,
.unified-subtitle-input:focus {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    padding: 2px 4px;
}

.unified-type-display {
    font-size: 10px;
    color: #666666;
    font-style: italic;
}

.unified-separator {
    height: 1px;
    background: #3e3e42;
    margin: 12px 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.separator-text {
    background: #2d2d30;
    color: #888888;
    font-size: 10px;
    font-style: italic;
    padding: 0 8px;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.unified-location {
    padding-top: 8px;
}

.location-label {
    font-weight: 500;
    color: #cccccc;
    margin-bottom: 8px;
    font-size: 12px;
}

.location-coordinates {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.coordinate-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.coordinate-label {
    color: #cccccc;
    font-size: 12px;
    min-width: 15px;
}

.coordinate-input {
    background: transparent;
    border: none;
    color: #cccccc;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    width: 60px;
    padding: 0;
    margin: 0;
    outline: none;
    text-align: right;
}

.coordinate-input:focus {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    padding: 2px 4px;
}

.properties-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.property-section {
    background: #2d2d30;
    border: 1px solid #3e3e42;
    border-radius: 4px;
    overflow: hidden;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: #3e3e42;
    cursor: pointer;
    user-select: none;
}

.section-title {
    font-weight: 500;
    color: #cccccc;
}

.section-toggle {
    color: #888888;
    font-size: 12px;
}

.section-content {
    padding: 15px;
}

.property-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.property-row:last-child {
    margin-bottom: 0;
}

.property-name {
    color: #cccccc;
    font-size: 13px;
    min-width: 80px;
}

.property-value {
    background: #1e1e1e;
    border: 1px solid #3e3e42;
    color: #cccccc;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 12px;
    width: 120px;
}

.property-value[type="text"],
.property-value[type="number"] {
    width: 120px;
}

.property-value[type="textarea"] {
    width: 120px;
    min-height: 40px;
    resize: vertical;
    font-family: inherit;
}

.property-value:focus {
    outline: none;
    border-color: #007acc;
}

.property-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

/* Action buttons in properties */
.action-button {
  background: rgba(0, 255, 65, 0.15);
  border: 1px solid #00ff41;
  color: #00ff41;
  padding: 6px 10px;
  border-radius: 3px;
  cursor: pointer;
  font-family: 'VT323', monospace;
}
.action-button.primary {
  background: rgba(0, 255, 65, 0.25);
}
.action-button:hover {
  background: rgba(0, 255, 65, 0.35);
}

/* Scene Header */
.scene-header {
    padding: 12px 15px;
    margin: 0 0 10px 0;
    background: #1e1e1e;
    border: 1px solid #3e3e42;
    border-radius: 4px;
    font-weight: 500;
    color: #ffffff;
}

.scene-header-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

.scene-icon {
    font-size: 16px;
}

.scene-name {
    font-weight: 600;
    color: #ffffff;
}

.scene-count {
    font-size: 11px;
    color: #888888;
    margin-left: auto;
}

/* Scene Objects List */
.scene-object {
    padding: 8px 12px;
    margin: 2px 0;
    background: #2d2d30;
    border: 1px solid transparent;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 13px;
    color: #cccccc;
    display: flex;
    align-items: center;
    gap: 8px;
}

.scene-object:hover {
    background: #3e3e42;
    border-color: #5a5a5a;
}

.scene-object.selected {
    background: #007acc;
    border-color: #007acc;
    color: #ffffff;
}

.object-icon {
    font-size: 14px;
}

.object-name {
    flex: 1;
}

/* Scene Name Display */
.scene-name-display {
    margin-bottom: 15px;
    padding: 4px 0;
}

.scene-name-text {
    font-size: 14px;
    color: #666666;
    cursor: pointer;
    user-select: none;
    display: block;
    padding: 2px 0;
}

.scene-name-text.editing {
    background: #2d2d30;
    border: 1px solid #007acc;
    outline: none;
    user-select: text;
    border-radius: 3px;
    padding: 4px 8px;
    margin: 0 -8px;
}

/* Scene Objects Hierarchy - Simple */
.scene-header {
    margin-bottom: 10px;
    padding: 4px 0;
}

.scene-header-content {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #666666;
}

.scene-icon {
    font-size: 14px;
}

.scene-name {
    font-weight: normal;
}

.scene-count {
    color: #888888;
    font-size: 12px;
}

.scene-object {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 2px 0;
    cursor: pointer;
    font-size: 14px;
    color: #666666;
}

.hierarchy-dots {
    color: #666666;
    font-size: 14px;
    min-width: 40px;
}

.object-icon {
    font-size: 14px;
    min-width: 16px;
}

.object-name {
    flex: 1;
}

/* Context Menu */
.context-menu {
    position: fixed;
    background: #2d2d30;
    border: 1px solid #3e3e42;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 2000;
    display: none;
    min-width: 150px;
    padding: 5px 0;
}

.context-menu.show {
    display: block;
}

.context-menu-item {
    padding: 8px 15px;
    color: #cccccc;
    cursor: pointer;
    font-family: 'VT323', 'Courier New', monospace;
    font-size: 13px;
    transition: background-color 0.2s ease;
}

.context-menu-item:hover {
    background: #3e3e42;
}

.context-menu-separator {
    height: 1px;
    background: #3e3e42;
    margin: 5px 0;
}

/* Status Bar */
.status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 3px 15px; /* Reduced padding from 5px to 3px */
    background: #1e1e1e;
    border-top: 1px solid #3e3e42;
    height: 24px; /* Reduced from 30px to 24px */
    font-size: 11px; /* Smaller font size */
    color: #888888;
    flex-shrink: 0; /* Prevent status bar from shrinking */
}

.status-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.status-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.fps-display {
    color: #00ff41;
    font-weight: bold;
}

/* Responsive Design */
@media (max-width: 768px) {
    .left-panel, .right-panel {
        min-width: 150px;
        max-width: 300px;
    }
    
    .center-panel {
        min-width: 200px;
    }
}

/* Fullscreen Styles */
:fullscreen {
    background: #0a0a0a;
}

:-webkit-full-screen {
    background: #0a0a0a;
}

:-ms-fullscreen {
    background: #0a0a0a;
}

/* Hide browser UI elements in fullscreen */
:fullscreen #editor-container {
    width: 100vw;
    height: 100vh;
}

:-webkit-full-screen #editor-container {
    width: 100vw;
    height: 100vh;
}

:-ms-fullscreen #editor-container {
    width: 100vw;
    height: 100vh;
} 

/* UI global hide */
body.ui-all-hidden .menu-bar,
body.ui-all-hidden .toolbar,
body.ui-all-hidden .viewport-header,
body.ui-all-hidden .status-bar,
body.ui-all-hidden .left-panel,
body.ui-all-hidden .right-panel,
body.ui-all-hidden #browser-panel,
body.ui-all-hidden #properties-panel,
body.ui-all-hidden .draggable-panel,
body.ui-all-hidden .axis-indicator {
  display: none !important;
} 

/* Right-aligned actions in unified location */
.location-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
} 

/* Mode cursors */
body.mode-place { cursor: crosshair !important; }
body.mode-select { cursor: url('./assets/icons/select.png'), auto !important; }
body.mode-select-points { cursor: url('./assets/icons/select.png'), auto !important; } 

/* Mode cursors override canvas */
body.mode-place #canvas-container,
body.mode-place #canvas-container canvas { cursor: crosshair !important; }
body.mode-select #canvas-container,
body.mode-select #canvas-container canvas { cursor: url('assets/icons/select.png'), auto !important; }
body.mode-select-points #canvas-container,
body.mode-select-points #canvas-container canvas { cursor: url('assets/icons/select.png'), auto !important; } 

/* Strong override to enforce select cursor even if controls set inline styles */
html.force-select-cursor,
html.force-select-cursor *,
body.force-select-cursor,
body.force-select-cursor * {
  cursor: url('assets/icons/select.png') 0 0, url('assets/icons/select.png'), pointer !important;
}
html.force-select-cursor #canvas-container,
html.force-select-cursor #canvas-container canvas,
body.force-select-cursor #canvas-container,
body.force-select-cursor #canvas-container canvas {
  cursor: url('assets/icons/select.png') 0 0, url('assets/icons/select.png'), pointer !important;
} 