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

body {
  font-family: 'Inter', sans-serif;
  overflow: hidden;
  background: #F8F9FA;
}

.app-container {
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Top Toolbar */
.top-toolbar {
  background: #FFFFFF;
  border-bottom: 2px solid #F0F0F0;
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 60px;
  z-index: 100;
}

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

.app-logo {
  font-size: 20px;
  font-weight: 700;
  color: #FF6B9D;
}

.project-name {
  border: 1px solid #E0E0E0;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  min-width: 200px;
}

.toolbar-right {
  display: flex;
  gap: 10px;
}

.toolbar-btn {
  background: #FFFFFF;
  border: 1px solid #E0E0E0;
  border-radius: 6px;
  padding: 8px 16px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Inter', sans-serif;
}

.toolbar-btn:hover {
  background: #F8F9FA;
  border-color: #4ECDC4;
}

/* Main Content */
.main-content {
  flex: 1;
  display: flex;
  overflow: hidden;
}

/* Left Toolbar */
.left-toolbar {
  width: 60px;
  background: #FFFFFF;
  border-right: 2px solid #F0F0F0;
  display: flex;
  flex-direction: column;
  padding: 10px 0;
  gap: 5px;
  align-items: center;
}

.tool-btn {
  width: 45px;
  height: 45px;
  background: #FFFFFF;
  border: 2px solid transparent;
  border-radius: 8px;
  font-size: 24px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tool-btn:hover {
  background: #F8F9FA;
  border-color: #4ECDC4;
}

.tool-btn.active {
  background: #E6F9F7;
  border-color: #4ECDC4;
  animation: bounce 0.3s;
}

@keyframes bounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.color-picker-container {
  width: 45px;
  height: 45px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid #E0E0E0;
}

.color-picker {
  width: 100%;
  height: 100%;
  border: none;
  cursor: pointer;
}

/* Canvas Container */
.canvas-container {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: #FFFFFF;
}

.main-canvas {
  width: 100%;
  height: 100%;
  cursor: crosshair;
}

.canvas-controls {
  position: absolute;
  bottom: 20px;
  right: 20px;
  display: flex;
  gap: 8px;
  background: rgba(255, 255, 255, 0.95);
  padding: 8px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.canvas-controls button {
  width: 36px;
  height: 36px;
  background: #FFFFFF;
  border: 1px solid #E0E0E0;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.2s;
}

.canvas-controls button:hover {
  background: #F8F9FA;
  border-color: #4ECDC4;
}

.zoom-display {
  display: flex;
  align-items: center;
  padding: 0 10px;
  font-size: 12px;
  font-family: 'JetBrains Mono', monospace;
  color: #666;
}

.save-indicator {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(255, 255, 255, 0.95);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  color: #666;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Right Panel */
.right-panel {
  width: 300px;
  background: #F8F9FA;
  border-left: 2px solid #F0F0F0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.panel-tabs {
  display: flex;
  background: #FFFFFF;
  border-bottom: 2px solid #F0F0F0;
}

.panel-tabs button {
  flex: 1;
  padding: 12px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  color: #666;
  transition: all 0.2s;
}

.panel-tabs button:hover {
  background: #F8F9FA;
}

.panel-tabs button.active {
  color: #4ECDC4;
  border-bottom-color: #4ECDC4;
}

.properties-panel,
.layers-panel {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.shape-badge {
  display: inline-block;
  background: #4ECDC4;
  color: white;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.shape-name-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #E0E0E0;
  border-radius: 6px;
  font-family: 'Inter', sans-serif;
  margin-bottom: 20px;
}

.property-group {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid #E0E0E0;
}

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

.property-group h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
  color: #2D3436;
}

.property-group label {
  display: block;
  margin-bottom: 10px;
  font-size: 13px;
  color: #666;
}

.number-input {
  width: 100%;
  padding: 6px 10px;
  border: 1px solid #E0E0E0;
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
  margin-top: 4px;
}

.slider {
  width: calc(100% - 60px);
  margin-right: 10px;
}

.layer-controls {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.layer-controls button {
  flex: 1;
  padding: 8px;
  background: #FFFFFF;
  border: 1px solid #E0E0E0;
  border-radius: 6px;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
}

.delete-btn {
  width: 100%;
  padding: 10px;
  background: #FF6B9D;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  transition: all 0.2s;
}

.delete-btn:hover {
  background: #E05780;
}

/* Layers Panel */
.layer-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: #FFFFFF;
  border: 1px solid #E0E0E0;
  border-radius: 6px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.layer-item:hover {
  border-color: #4ECDC4;
}

.layer-item.selected {
  background: #E6F9F7;
  border-color: #4ECDC4;
}

.layer-color {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  border: 1px solid #E0E0E0;
}

.layer-name {
  flex: 1;
  font-size: 13px;
}

.visibility-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 16px;
  padding: 4px;
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: #999;
}

/* AI Panel */
.ai-panel {
  background: #FFFFFF;
  border-top: 2px solid #F0F0F0;
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
}

.ai-panel.open {
  height: 300px;
}

.ai-panel.closed {
  height: 50px;
}

.ai-panel-header {
  padding: 15px 20px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #F0F0F0;
}

.ai-panel-header:hover {
  background: #F8F9FA;
}

.ai-messages {
  flex: 1;
  overflow-y: auto;
  padding: 15px 20px;
}

.ai-empty-state {
  text-align: center;
  padding: 20px;
}

.strawberry-emoji {
  font-size: 60px;
  margin-bottom: 10px;
}

.ai-empty-state p {
  margin: 5px 0;
  color: #666;
}

.suggestion {
  font-size: 13px;
  color: #999;
  font-style: italic;
}

.ai-message {
  padding: 10px 15px;
  margin-bottom: 10px;
  border-radius: 12px;
  max-width: 80%;
  animation: fadeIn 0.3s;
}

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

.ai-message.user {
  background: #E6F9F7;
  margin-left: auto;
  color: #2D3436;
}

.ai-message.berrry {
  background: #FFF0F5;
  color: #2D3436;
}

.ai-message.thinking {
  animation: pulse 1.5s infinite;
}

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

.ai-input-container {
  display: flex;
  gap: 10px;
  padding: 15px 20px;
  border-top: 1px solid #F0F0F0;
}

.ai-input {
  flex: 1;
  padding: 10px 15px;
  border: 1px solid #E0E0E0;
  border-radius: 20px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
}

.ai-input:focus {
  outline: none;
  border-color: #4ECDC4;
}

.ai-send-btn {
  padding: 10px 20px;
  background: #FF6B9D;
  color: white;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  transition: all 0.2s;
}

.ai-send-btn:hover:not(:disabled) {
  background: #E05780;
}

.ai-send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Footer */
.app-footer {
  background: #2D3436;
  color: white;
  text-align: center;
  padding: 15px;
  font-size: 13px;
}

.app-footer a {
  color: #4ECDC4;
  text-decoration: none;
  font-weight: 600;
}

.app-footer a:hover {
  text-decoration: underline;
}

.privacy-note {
  color: #999;
  font-size: 11px;
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-content {
  background: white;
  padding: 30px;
  border-radius: 12px;
  max-width: 400px;
  width: 90%;
}

.modal-content h3 {
  margin-bottom: 20px;
  color: #2D3436;
}

.modal-content label {
  display: block;
  margin-bottom: 15px;
  color: #666;
}

.close-btn {
  width: 100%;
  padding: 10px;
  background: #4ECDC4;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  margin-top: 20px;
}

/* Responsive */
@media (max-width: 768px) {
  .right-panel {
    position: fixed;
    right: -300px;
    top: 60px;
    bottom: 0;
    z-index: 200;
    transition: right 0.3s;
  }
  
  .ai-panel.open {
    height: 250px;
  }
  
  .toolbar-left .project-name {
    min-width: 120px;
  }
}