/* Outfit Editor Styles */

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

html {
  font-size: 14px;
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
  text-size-adjust: 100%;
  width: 100%;
  height: 100%;
}

body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #e2e8f0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  font-size: 11px;
  margin: 0;
  padding: 0;
}

header {
  padding: 0.35rem 0.5rem;
  background: rgba(30, 41, 59, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(96, 165, 250, 0.2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

header h1 {
  font-size: 0.95rem;
  font-weight: 600;
  background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header-actions {
  display: flex;
  gap: 0.5rem;
}

.main {
  display: flex;
  flex: 1;
  overflow: hidden;
}

#canvas-container {
  flex: 1;
  position: relative;
  background: #1e293b;
  display: flex;
  align-items: center;
  justify-content: center;
}

.grid {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    linear-gradient(rgba(96, 165, 250, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(96, 165, 250, 0.1) 1px, transparent 1px);
  background-size: 20px 20px;
  pointer-events: none;
}

#canvas {
  border: 2px solid rgba(96, 165, 250, 0.3);
  border-radius: 8px;
  background: #f8fafc;
  cursor: grab;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  max-width: 90%;
  max-height: 90%;
}

#canvas:active {
  cursor: grabbing;
}

.canvas-controls {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  background: rgba(30, 41, 59, 0.9);
  padding: 0.5rem;
  border-radius: 8px;
  backdrop-filter: blur(10px);
}

.zoom-controls {
  display: flex;
  gap: 0.25rem;
}

.sidebar {
  width: 280px;
  background: rgba(30, 41, 59, 0.95);
  backdrop-filter: blur(10px);
  border-left: 1px solid rgba(96, 165, 250, 0.2);
  padding: 0.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.panel {
  background: rgba(51, 65, 85, 0.5);
  border: 1px solid rgba(96, 165, 250, 0.2);
  border-radius: 6px;
  padding: 0.5rem;
  transition: all 0.3s;
}

.panel:hover {
  border-color: rgba(96, 165, 250, 0.3);
  box-shadow: 0 4px 12px rgba(96, 165, 250, 0.1);
}

.panel h3 {
  margin: 0 0 0.35rem;
  color: #60a5fa;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding-bottom: 0.2rem;
  border-bottom: 1px solid rgba(96, 165, 250, 0.2);
  font-weight: 600;
}

.panel h4 {
  margin: 0.35rem 0 0.25rem 0;
  color: #60a5fa;
  font-size: 0.65rem;
  font-weight: 600;
  border-bottom: 1px solid rgba(96, 165, 250, 0.2);
  padding-bottom: 0.1rem;
}

.form-group {
  margin-bottom: 0.75rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.9rem;
  color: #cbd5e1;
}

.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  padding: 0.35rem;
  background: rgba(51, 65, 85, 0.8);
  border: 1px solid rgba(96, 165, 250, 0.3);
  border-radius: 4px;
  color: #e2e8f0;
  font-size: 0.65rem;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none;
  border-color: #60a5fa;
  box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.2);
}

.form-group input[type="range"] {
  padding: 0;
  height: 6px;
  background: rgba(51, 65, 85, 0.8);
  outline: none;
  border-radius: 3px;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

.form-group input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(96, 165, 250, 0.5);
  transition: all 0.2s;
}

.form-group input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 4px 12px rgba(96, 165, 250, 0.7);
}

.form-group input[type="color"] {
  height: 30px;
  padding: 2px;
  cursor: pointer;
}

.value {
  color: #60a5fa;
  font-weight: 600;
  font-family: 'Courier New', monospace;
  font-size: 0.6rem;
  margin-left: 0.35rem;
}

.tool-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
}

.tool-btn {
  padding: 0.3rem 0.5rem;
  background: rgba(51, 65, 85, 0.8);
  border: 1px solid rgba(96, 165, 250, 0.3);
  border-radius: 4px;
  color: #e2e8f0;
  font-size: 0.65rem;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  margin: 0.15rem;
}

.tool-btn:hover {
  background: rgba(96, 165, 250, 0.2);
  border-color: rgba(96, 165, 250, 0.5);
  transform: translateY(-1px);
}

.tool-btn.active {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  border-color: #60a5fa;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
}

.point-tools {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 0.35rem;
}

.point-info {
  padding: 0.35rem;
  background: rgba(30, 41, 59, 0.6);
  border-radius: 3px;
  text-align: center;
  margin-bottom: 0.35rem;
}

.point-info small {
  color: #94a3b8;
  font-family: 'Courier New', monospace;
  font-size: 0.6rem;
}

.attachment-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  max-height: 150px;
  overflow-y: auto;
}

.attachment-item {
  padding: 0.4rem;
  background: rgba(51, 65, 85, 0.6);
  border: 1px solid rgba(96, 165, 250, 0.2);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.attachment-item:hover {
  background: rgba(96, 165, 250, 0.1);
  border-color: rgba(96, 165, 250, 0.4);
}

.attachment-item.selected {
  background: rgba(59, 130, 246, 0.2);
  border-color: #60a5fa;
}

.attachment-item .name {
  font-weight: 500;
}

.attachment-item .type {
  font-size: 0.8rem;
  color: #94a3b8;
}

.editor-section {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(96, 165, 250, 0.1);
}

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

button {
  width: 100%;
  padding: 0.35rem 0.5rem;
  margin: 0.15rem 0;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.7rem;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(96, 165, 250, 0.4);
}

button.secondary {
  background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
  box-shadow: 0 2px 4px rgba(107, 114, 128, 0.3);
}

button.secondary:hover {
  box-shadow: 0 4px 8px rgba(107, 114, 128, 0.4);
}

button.success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
}

button.success:hover {
  box-shadow: 0 4px 8px rgba(16, 185, 129, 0.4);
}

button.danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
  width: 100%;
}

button.danger:hover {
  box-shadow: 0 4px 8px rgba(239, 68, 68, 0.4);
}

button.primary {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
  box-shadow: 0 2px 4px rgba(139, 92, 246, 0.3);
}

button.primary:hover {
  box-shadow: 0 4px 8px rgba(139, 92, 246, 0.4);
}

button.icon-btn {
  width: 24px;
  height: 24px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  min-width: unset;
}

.info-box {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(96, 165, 250, 0.3);
  border-radius: 6px;
  padding: 0.35rem;
  font-size: 0.6rem;
  line-height: 1.3;
  color: #cbd5e1;
}

#status {
  position: fixed;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  font-weight: 500;
  opacity: 0;
  transition: all 0.3s;
  pointer-events: none;
  z-index: 1000;
}

#status.show {
  opacity: 1;
}

#status.info {
  background: rgba(59, 130, 246, 0.9);
  color: white;
}

#status.success {
  background: rgba(16, 185, 129, 0.9);
  color: white;
}

#status.warning {
  background: rgba(245, 158, 11, 0.9);
  color: white;
}

#status.error {
  background: rgba(239, 68, 68, 0.9);
  color: white;
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0.2rem 0;
  cursor: pointer;
  font-size: 0.65rem;
  font-size: 0.65rem;
  color: #cbd5e1;
  padding: 0.2rem;
  border-radius: 3px;
  transition: all 0.2s;
}

.checkbox:hover {
  background: rgba(96, 165, 250, 0.1);
}

.checkbox input[type="checkbox"] {
  width: 12px;
  height: 12px;
  cursor: pointer;
  accent-color: #60a5fa;
}