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

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

    .app {
      display: flex;
      height: 100vh;
    }

    /* Component Palette */
    .palette {
      width: 250px;
      background: white;
      border-right: 1px solid #ddd;
      padding: 20px;
      overflow-y: auto;
    }

    .palette h2 {
      font-size: 18px;
      margin-bottom: 20px;
      color: #333;
    }

    .palette-item {
      background: #4A90E2;
      color: white;
      padding: 15px;
      margin-bottom: 10px;
      border-radius: 4px;
      cursor: move;
      text-align: center;
      font-weight: 500;
      user-select: none;
      transition: transform 0.2s, box-shadow 0.2s;
    }

    .palette-item:hover {
      transform: translateY(-2px);
      box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    }

    /* Main Canvas */
    .canvas {
      flex: 1;
      padding: 20px;
      overflow: auto;
      position: relative;
    }

    .canvas-header {
      background: white;
      padding: 15px 20px;
      margin-bottom: 20px;
      border-radius: 4px;
      box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    }

    .canvas-header h1 {
      font-size: 24px;
      color: #333;
      margin-bottom: 5px;
    }

    .canvas-header p {
      color: #666;
      font-size: 14px;
    }

    .canvas-header .controls {
      margin-top: 10px;
      display: flex;
      gap: 10px;
      align-items: center;
      flex-wrap: wrap;
    }

    .canvas-header button {
      padding: 8px 16px;
      border: 1px solid #ddd;
      background: white;
      border-radius: 4px;
      cursor: pointer;
      font-size: 13px;
      transition: all 0.2s;
    }

    .canvas-header button:hover {
      background: #f5f5f5;
      border-color: #4A90E2;
    }

    .canvas-header button.active {
      background: #4A90E2;
      color: white;
      border-color: #4A90E2;
    }

    /* Info Badge */
    .info-badge {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 6px 12px;
      background: #fff3cd;
      border: 1px solid #ffc107;
      border-radius: 4px;
      font-size: 12px;
      color: #856404;
      cursor: help;
      position: relative;
    }

    .info-badge:hover .tooltip {
      opacity: 1;
      visibility: visible;
    }

    .tooltip {
      position: absolute;
      top: calc(100% + 10px);
      left: 50%;
      transform: translateX(-50%);
      background: #333;
      color: white;
      padding: 12px 16px;
      border-radius: 6px;
      font-size: 12px;
      line-height: 1.6;
      white-space: nowrap;
      opacity: 0;
      visibility: hidden;
      transition: opacity 0.2s, visibility 0.2s;
      z-index: 10000;
      box-shadow: 0 4px 12px rgba(0,0,0,0.3);
      max-width: 400px;
      white-space: normal;
    }

    .tooltip::after {
      content: '';
      position: absolute;
      bottom: 100%;
      left: 50%;
      transform: translateX(-50%);
      border: 6px solid transparent;
      border-bottom-color: #333;
    }

    .tooltip-section {
      margin-bottom: 8px;
    }

    .tooltip-section:last-child {
      margin-bottom: 0;
    }

    .tooltip-title {
      font-weight: 600;
      color: #4A90E2;
      margin-bottom: 4px;
    }

    .tooltip-list {
      margin: 0;
      padding-left: 16px;
    }

    .tooltip-list li {
      margin-bottom: 2px;
    }

    /* Version Switcher */
    .version-switcher {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: 6px 12px;
      background: #f8f9fa;
      border: 1px solid #dee2e6;
      border-radius: 4px;
      font-size: 12px;
    }

    .version-switcher-label {
      color: #666;
      font-weight: 500;
    }

    .version-switcher select {
      padding: 4px 8px;
      border: 1px solid #dee2e6;
      border-radius: 3px;
      background: white;
      color: #333;
      font-size: 12px;
      cursor: pointer;
      outline: none;
      transition: border-color 0.2s;
    }

    .version-switcher select:hover {
      border-color: #4A90E2;
    }

    .version-switcher select:focus {
      border-color: #4A90E2;
      box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.1);
    }

    /* Canvases Container */
    .canvases-container {
      display: flex;
      flex-direction: column;
      background: white;
      border-radius: 8px;
      box-shadow: 0 2px 8px rgba(0,0,0,0.1);
      overflow: hidden;
    }

    .canvas-item {
      display: flex;
      flex-direction: column;
      width: 100%;
      position: relative;
      border-bottom: 2px solid #e0e0e0;
    }

    .canvas-item:last-child {
      border-bottom: none;
    }

    .canvas-item-header {
      position: absolute;
      top: 10px;
      right: 10px;
      background: rgba(255, 255, 255, 0.95);
      padding: 8px 12px;
      border-radius: 4px;
      box-shadow: 0 2px 4px rgba(0,0,0,0.1);
      display: flex;
      gap: 10px;
      align-items: center;
      z-index: 1000;
      font-size: 12px;
      color: #666;
      opacity: 0.7;
      transition: opacity 0.2s;
      pointer-events: auto;
    }

    .canvas-item:hover .canvas-item-header {
      opacity: 1;
    }

    .canvas-item-header h3 {
      font-size: 11px;
      color: #999;
      margin: 0;
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }

    .canvas-controls {
      display: flex;
      gap: 8px;
      align-items: center;
    }

    .canvas-controls label {
      font-size: 11px;
      color: #666;
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .canvas-bg-color {
      cursor: pointer;
      width: 32px;
      height: 24px;
      border: 1px solid #ddd;
      border-radius: 3px;
    }

    .clear-canvas-btn, .delete-section-btn {
      padding: 4px 8px;
      border: 1px solid #ddd;
      background: white;
      border-radius: 3px;
      cursor: pointer;
      font-size: 11px;
      transition: all 0.2s;
    }

    .clear-canvas-btn:hover {
      background: #f5f5f5;
      border-color: #ff4444;
      color: #ff4444;
    }

    .delete-section-btn {
      background: transparent;
      border: none;
      font-size: 16px;
      padding: 4px;
    }

    .delete-section-btn:hover {
      transform: scale(1.2);
    }

    /* Muuri Grid */
    .grid-builder {
      position: relative;
      padding: 20px;
      min-height: 400px;
    }

    .muuri-grid {
      position: relative;
      width: 100%;
      min-height: 400px;
    }

    /* Grid Items */
    .grid-item {
      position: absolute;
      display: block;
      margin: 5px;
      z-index: 1;
      background: white;
      border: 2px solid transparent;
      border-radius: 4px;
      box-shadow: 0 2px 4px rgba(0,0,0,0.1);
      cursor: pointer;
      transition: border-color 0.2s;
    }

    .grid-item.selected {
      border-color: #4A90E2;
      box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
    }

    .grid-item:hover {
      border-color: #4A90E2;
    }

    .grid-item.muuri-item-dragging {
      z-index: 3;
      opacity: 0.8;
    }

    .grid-item.muuri-item-releasing {
      z-index: 2;
    }

    .grid-item.muuri-item-hidden {
      z-index: 0;
    }

    .item-content {
      position: relative;
      width: 200px;
      height: 150px;
      padding: 20px 20px 20px 44px; /* Extra left padding for drag handle */
      cursor: move;
    }

    .grid-item-header {
      font-weight: 600;
      color: #333;
      margin-bottom: 5px;
      font-size: 14px;
    }

    .grid-item-content {
      color: #666;
      font-size: 13px;
    }

    .grid-item-delete {
      position: absolute;
      top: 8px;
      right: 8px;
      width: 24px;
      height: 24px;
      background: #ff4444;
      color: white;
      border: none;
      border-radius: 50%;
      cursor: pointer;
      font-size: 14px;
      line-height: 1;
      padding: 0;
      opacity: 0;
      transition: opacity 0.2s, background 0.2s;
    }

    .grid-item:hover .grid-item-delete {
      opacity: 1;
    }

    .grid-item-delete:hover {
      background: #cc0000;
    }

    /* Size variants for different component types */
    .item-content.size-small {
      width: 150px;
      height: 100px;
    }

    .item-content.size-medium {
      width: 200px;
      height: 150px;
    }

    .item-content.size-large {
      width: 300px;
      height: 200px;
    }

    .item-content.size-wide {
      width: 400px;
      height: 150px;
    }

    .item-content.size-tall {
      width: 200px;
      height: 250px;
    }

    /* Resize Handles */
    .resize-handle {
      position: absolute;
      width: 24px;
      height: 24px;
      background: #4A90E2;
      border: 2px solid white;
      border-radius: 4px;
      box-shadow: 0 2px 6px rgba(0,0,0,0.3);
      opacity: 0.3;
      transition: all 0.2s;
      z-index: 10;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .resize-handle::after {
      content: '⇲';
      font-size: 14px;
      color: white;
      font-weight: bold;
      line-height: 1;
    }

    .grid-item:hover .resize-handle {
      opacity: 1;
      transform: scale(1.1);
      box-shadow: 0 3px 8px rgba(0,0,0,0.4);
    }

    .resize-handle:hover {
      background: #357ABD;
      transform: scale(1.2);
    }

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

    /* Drag Handle */
    .drag-handle {
      position: absolute;
      top: 8px;
      left: 8px;
      width: 28px;
      height: 28px;
      background: rgba(74, 144, 226, 0.1);
      border: 1px solid rgba(74, 144, 226, 0.3);
      border-radius: 4px;
      cursor: move;
      display: flex;
      align-items: center;
      justify-content: center;
      opacity: 0.3;
      transition: all 0.2s;
      z-index: 10;
    }

    .drag-handle::before {
      content: '⋮⋮';
      font-size: 14px;
      color: #4A90E2;
      font-weight: bold;
      letter-spacing: -2px;
    }

    .grid-item:hover .drag-handle {
      opacity: 1;
      background: rgba(74, 144, 226, 0.15);
    }

    .drag-handle:hover {
      background: rgba(74, 144, 226, 0.25);
      transform: scale(1.1);
    }

    /* Configuration Side Panel */
    .config-panel {
      position: fixed;
      top: 0;
      right: -400px;
      width: 400px;
      height: 100vh;
      background: white;
      box-shadow: -2px 0 8px rgba(0,0,0,0.15);
      transition: right 0.3s ease;
      z-index: 10000;
      display: flex;
      flex-direction: column;
    }

    .config-panel.open {
      right: 0;
    }

    .config-panel-header {
      padding: 20px;
      border-bottom: 1px solid #ddd;
      display: flex;
      justify-content: space-between;
      align-items: center;
    }

    .config-panel-header h2 {
      margin: 0;
      font-size: 18px;
      color: #333;
    }

    .config-panel-close {
      width: 32px;
      height: 32px;
      border: none;
      background: transparent;
      cursor: pointer;
      font-size: 24px;
      color: #666;
      border-radius: 4px;
      transition: all 0.2s;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 0;
    }

    .config-panel-close:hover {
      background: #f5f5f5;
      color: #333;
    }

    .config-panel-body {
      padding: 20px;
      flex: 1;
      overflow-y: auto;
    }

    .config-field {
      margin-bottom: 20px;
    }

    .config-field label {
      display: block;
      margin-bottom: 8px;
      font-weight: 600;
      color: #333;
      font-size: 14px;
    }

    .config-field input {
      width: 100%;
      padding: 10px 12px;
      border: 1px solid #ddd;
      border-radius: 4px;
      font-size: 14px;
      font-family: inherit;
      transition: border-color 0.2s;
    }

    .config-field input:focus {
      outline: none;
      border-color: #4A90E2;
      box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
    }

    .config-panel-footer {
      padding: 20px;
      border-top: 1px solid #ddd;
      display: flex;
      gap: 10px;
      justify-content: flex-end;
    }

    .config-panel-footer button {
      padding: 10px 20px;
      border: 1px solid #ddd;
      background: white;
      border-radius: 4px;
      cursor: pointer;
      font-size: 14px;
      font-weight: 500;
      transition: all 0.2s;
    }

    .config-panel-footer button:hover {
      background: #f5f5f5;
    }

    .config-panel-footer button.primary {
      background: #4A90E2;
      color: white;
      border-color: #4A90E2;
    }

    .config-panel-footer button.primary:hover {
      background: #357ABD;
      border-color: #357ABD;
    }
