/* Main application styles */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
  background: #1a1a1a;
  color: #e0e0e0;
  overflow: hidden;
}

/* Layout */
#app-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

#toolbar-container {
  flex-shrink: 0;
}

#main-container {
  display: flex;
  flex: 1;
  overflow: hidden;
}

#slice-list-container {
  width: 240px;
  flex-shrink: 0;
  background: #252525;
  border-right: 1px solid #3a3a3a;
  overflow-y: auto;
}

#canvas-container {
  flex: 1;
  overflow: auto;
  background: #000;
  position: relative;
}

#property-panel-container {
  width: 300px;
  flex-shrink: 0;
  background: #252525;
  border-left: 1px solid #3a3a3a;
  overflow-y: auto;
}

#led {
  display: block;
}

/* Toolbar */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: #2a2a2a;
  border-bottom: 1px solid #3a3a3a;
  gap: 20px;
}

.toolbar h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #00ff88;
}

.toolbar-section {
  display: flex;
  align-items: center;
  gap: 8px;
}

.toolbar-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: #3a3a3a;
  border: 1px solid #4a4a4a;
  border-radius: 4px;
  color: #e0e0e0;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

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

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

.toolbar-btn span {
  font-size: 16px;
}

/* Slice List */
.slice-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid #3a3a3a;
}

.slice-list-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #00ff88;
}

.slice-list-actions {
  display: flex;
  gap: 6px;
}

.btn-toggle-info {
  width: 28px;
  height: 28px;
  background: transparent;
  border: 1px solid #4a4a4a;
  border-radius: 4px;
  color: #e0e0e0;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.btn-toggle-info:hover {
  background: #3a3a3a;
  border-color: #00ff88;
}

.btn-add {
  width: 28px;
  height: 28px;
  background: #00ff88;
  border: none;
  border-radius: 4px;
  color: #000;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-add:hover {
  background: #00dd77;
  transform: scale(1.05);
}

.slice-list-items {
  padding: 8px;
}

.slice-list-empty {
  padding: 32px 16px;
  text-align: center;
  color: #666;
  font-size: 14px;
}

.slice-item {
  background: #2a2a2a;
  border: 2px solid #3a3a3a;
  border-radius: 6px;
  padding: 12px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.slice-item:hover {
  background: #323232;
  border-color: #4a4a4a;
}

.slice-item.selected {
  background: #2a3a3a;
  border-color: #00ff88;
}

.slice-item-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.slice-name {
  flex: 1;
  font-weight: 500;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-toggle-enabled {
  width: 28px;
  height: 28px;
  background: transparent;
  border: 1px solid #4a4a4a;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.btn-toggle-enabled:hover {
  background: #3a3a3a;
  border-color: #5a5a5a;
}

.slice-actions {
  display: flex;
  gap: 4px;
}

.btn-duplicate,
.btn-delete {
  width: 28px;
  height: 28px;
  background: transparent;
  border: 1px solid #4a4a4a;
  border-radius: 4px;
  cursor: pointer;
  font-size: 18px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  color: #e0e0e0;
}

.btn-duplicate:hover {
  background: #3a3a3a;
  border-color: #00ff88;
  color: #00ff88;
}

.btn-delete:hover {
  background: #4a2a2a;
  border-color: #ff4444;
  color: #ff4444;
}

.slice-item-info {
  font-size: 12px;
  color: #999;
  font-family: 'Courier New', monospace;
}

/* Property Panel */
.property-panel-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 40px;
  text-align: center;
  color: #666;
}

.property-panel-empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.property-panel-empty-text {
  font-size: 14px;
}

.property-panel-content {
  padding: 16px;
}

.property-section {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #3a3a3a;
}

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

.property-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.property-section h4 {
  margin: 0 0 12px 0;
  font-size: 13px;
  font-weight: 600;
  color: #00ff88;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-regenerate-colors {
  width: 28px;
  height: 28px;
  background: transparent;
  border: 1px solid #4a4a4a;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.btn-regenerate-colors:hover {
  background: #3a3a3a;
  border-color: #00ff88;
  transform: rotate(15deg);
}

.property-group {
  margin-bottom: 12px;
}

.property-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.property-label {
  display: block;
  font-size: 12px;
  color: #999;
  margin-bottom: 6px;
  font-weight: 500;
}

.property-input {
  width: 100%;
  padding: 8px 10px;
  background: #1a1a1a;
  border: 1px solid #3a3a3a;
  border-radius: 4px;
  color: #e0e0e0;
  font-size: 13px;
  font-family: 'Courier New', monospace;
  transition: all 0.2s;
}

.property-input:focus {
  outline: none;
  border-color: #00ff88;
  background: #222;
}

.property-input:hover {
  border-color: #4a4a4a;
}

.color-input-group {
  display: flex;
  gap: 8px;
  align-items: center;
}

.property-color {
  width: 50px;
  height: 36px;
  padding: 2px;
  background: #1a1a1a;
  border: 1px solid #3a3a3a;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}

.property-color:hover {
  border-color: #00ff88;
}

.color-text {
  flex: 1;
  text-transform: uppercase;
}

.property-slider {
  width: calc(100% - 50px);
  height: 4px;
  background: #3a3a3a;
  border-radius: 2px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.property-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  background: #00ff88;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s;
}

.property-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.property-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  background: #00ff88;
  border-radius: 50%;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}

.property-slider::-moz-range-thumb:hover {
  transform: scale(1.2);
}

.property-value {
  display: inline-block;
  width: 40px;
  text-align: right;
  font-size: 12px;
  color: #999;
  font-family: 'Courier New', monospace;
  margin-left: 8px;
}

/* Slice List Compact Updates */
.slice-item {
  background: #2a2a2a;
  border: 2px solid #3a3a3a;
  border-radius: 4px;
  padding: 8px;
  margin-bottom: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.slice-item-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.slice-name {
  flex: 1;
  font-weight: 500;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.slice-item-info {
  font-size: 11px;
  color: #666;
  font-family: 'Courier New', monospace;
  margin-left: 32px;
}

.btn-toggle-enabled,
.btn-duplicate,
.btn-delete {
  width: 24px;
  height: 24px;
  font-size: 14px;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
  background: #4a4a4a;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #5a5a5a;
}
