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

    body {
      font-family: 'Inter', sans-serif;
      background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 50%, #16213e 100%);
      color: #ffffff;
      overflow: hidden;
      height: 100vh;
    }

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

    .header {
      background: rgba(0, 0, 0, 0.2);
      backdrop-filter: blur(10px);
      border-bottom: 1px solid rgba(255, 255, 255, 0.1);
      padding: 1rem 2rem;
      display: flex;
      justify-content: space-between;
      align-items: center;
      z-index: 1000;
    }

    .logo {
      font-size: 1.5rem;
      font-weight: 700;
      background: linear-gradient(45deg, #667eea 0%, #764ba2 100%);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
    }

    .header-controls {
      display: flex;
      gap: 1rem;
      align-items: center;
    }

    .btn {
      padding: 0.5rem 1rem;
      border: none;
      border-radius: 8px;
      background: rgba(255, 255, 255, 0.1);
      color: white;
      cursor: pointer;
      transition: all 0.3s ease;
      font-size: 0.9rem;
      font-weight: 500;
    }

    .btn:hover {
      background: rgba(255, 255, 255, 0.2);
      transform: translateY(-2px);
    }

    .btn-primary {
      background: linear-gradient(45deg, #667eea 0%, #764ba2 100%);
    }

    .btn-primary:hover {
      background: linear-gradient(45deg, #5a6fd8 0%, #6a4190 100%);
      box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
    }

    .main-content {
      flex: 1;
      display: flex;
      position: relative;
    }

    .left-panel {
      width: 280px;
      min-width: 280px;
      background: rgba(0, 0, 0, 0.2);
      backdrop-filter: blur(10px);
      border-right: 1px solid rgba(255, 255, 255, 0.1);
      padding: 1rem;
      overflow-y: auto;
      overflow-x: hidden;
      display: flex;
      flex-direction: column;
      gap: 1rem;
      z-index: 100;
      position: relative;
      transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .left-panel.collapsed {
      width: 50px;
      min-width: 50px;
      padding: 0.5rem;
    }

    .canvas-container {
      flex: 1;
      position: relative;
      overflow: hidden;
      transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
      min-height: 100vh;
      background: rgba(15, 15, 35, 1.0);
    }

    .right-panel {
      width: 300px;
      min-width: 300px;
      background: rgba(0, 0, 0, 0.2);
      backdrop-filter: blur(10px);
      border-left: 1px solid rgba(255, 255, 255, 0.1);
      overflow-y: auto;
      overflow-x: hidden;
      z-index: 100;
      padding: 0;
      position: relative;
      transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .right-panel.collapsed {
      width: 50px;
      min-width: 50px;
    }

    .panel-toggle-btn {
      position: absolute;
      top: 10px;
      background: rgba(102, 126, 234, 0.9);
      border: none;
      color: white;
      width: 30px;
      height: 30px;
      border-radius: 15px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1rem;
      font-weight: bold;
      transition: all 0.3s ease;
      z-index: 101;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    }

    .panel-toggle-btn:hover {
      background: rgba(102, 126, 234, 1);
      transform: scale(1.1);
    }

    .left-toggle {
      right: 10px;
    }

    .right-toggle {
      left: 10px;
    }

    .collapsed .panel-toggle-btn {
      background: rgba(34, 197, 94, 0.9);
    }

    .collapsed .panel-toggle-btn:hover {
      background: rgba(34, 197, 94, 1);
    }

    .collapsed .panel-section,
    .collapsed .sidebar-section {
      display: none;
    }

    .panel-section {
      background: rgba(255, 255, 255, 0.05);
      border-radius: 8px;
      padding: 1rem;
    }

    .panel-title {
      font-size: 0.9rem;
      font-weight: 600;
      margin-bottom: 0.75rem;
      color: #e0e6ed;
      border-bottom: 1px solid rgba(255, 255, 255, 0.1);
      padding-bottom: 0.5rem;
    }

    .control-group {
      margin-bottom: 1rem;
    }

    .control-label {
      display: block;
      font-size: 0.8rem;
      color: #9ca3af;
      margin-bottom: 0.5rem;
    }

    .slider-container {
      display: flex;
      align-items: center;
      gap: 0.5rem;
    }

    .slider {
      flex: 1;
      -webkit-appearance: none;
      height: 4px;
      border-radius: 2px;
      background: rgba(255, 255, 255, 0.2);
      outline: none;
    }

    .slider::-webkit-slider-thumb {
      -webkit-appearance: none;
      appearance: none;
      width: 16px;
      height: 16px;
      border-radius: 50%;
      background: #667eea;
      cursor: pointer;
    }

    .slider-value {
      font-size: 0.8rem;
      color: #e0e6ed;
      min-width: 40px;
      text-align: right;
    }

    #studio-canvas {
      width: 100%;
      height: 100%;
      cursor: grab;
    }

    #studio-canvas:active {
      cursor: grabbing;
    }

    .sidebar-section {
      padding: 1.5rem;
      border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .section-title {
      font-size: 1.1rem;
      font-weight: 600;
      margin-bottom: 1rem;
      color: #e0e6ed;
      margin-left: 30px;
    }

    .gear-item {
      background: rgba(255, 255, 255, 0.05);
      border-radius: 6px;
      padding: 0.75rem;
      margin-bottom: 0.5rem;
      cursor: pointer;
      transition: all 0.2s ease;
      border: 1px solid transparent;
    }

    .gear-item:hover {
      background: rgba(255, 255, 255, 0.1);
      border-color: rgba(102, 126, 234, 0.5);
      transform: translateY(-1px);
    }

    .gear-item.hidden {
      display: none;
    }

    .gear-name {
      font-size: 0.9rem;
      font-weight: 500;
      color: #ffffff;
      margin-bottom: 0.25rem;
    }

    .gear-description {
      font-size: 0.75rem;
      color: #9ca3af;
      line-height: 1.3;
    }

    .search-container {
      margin-bottom: 1rem;
    }

    .search-input {
      width: 100%;
      padding: 0.75rem;
      background: rgba(255, 255, 255, 0.1);
      border: 1px solid rgba(255, 255, 255, 0.2);
      border-radius: 8px;
      color: #ffffff;
      font-size: 0.9rem;
      outline: none;
      transition: all 0.3s ease;
    }

    .search-input:focus {
      border-color: #667eea;
      box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    }

    .search-input::placeholder {
      color: #6b7280;
    }

    .gear-category {
      margin-bottom: 1rem;
    }

    .category-header {
      font-size: 0.9rem;
      font-weight: 600;
      color: #667eea;
      margin-bottom: 0.5rem;
      padding: 0.5rem 0;
      border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .control-hint {
      font-size: 0.8rem;
      color: #9ca3af;
      line-height: 1.6;
      background: rgba(255, 255, 255, 0.05);
      padding: 0.75rem;
      border-radius: 6px;
      border-left: 3px solid #667eea;
    }

    .signal-type-item {
      display: flex;
      align-items: center;
      gap: 0.5rem;
      margin-bottom: 0.5rem;
      cursor: pointer;
      padding: 0.25rem;
      border-radius: 4px;
      transition: background 0.2s ease;
    }

    .signal-type-item:hover {
      background: rgba(255, 255, 255, 0.1);
    }

    .signal-type-item.disabled {
      opacity: 0.4;
    }

    .signal-dot {
      width: 12px;
      height: 12px;
      border-radius: 50%;
      border: 2px solid transparent;
    }

    .signal-dot.disabled {
      border-color: currentColor;
      background: transparent !important;
    }

    .sidebar-section {
      padding: 1.5rem;
      border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .sidebar-section:last-child {
      flex: 1;
      display: flex;
      flex-direction: column;
    }

    #gear-list {
      flex: 1;
      overflow-y: auto;
      overflow-x: hidden;
      max-height: calc(100vh - 200px);
      padding-right: 8px;
    }

    #gear-list::-webkit-scrollbar {
      width: 6px;
    }

    #gear-list::-webkit-scrollbar-track {
      background: rgba(255, 255, 255, 0.1);
      border-radius: 3px;
    }

    #gear-list::-webkit-scrollbar-thumb {
      background: rgba(102, 126, 234, 0.8);
      border-radius: 3px;
    }

    #gear-list::-webkit-scrollbar-thumb:hover {
      background: rgba(102, 126, 234, 1);
    }

    .compact-stats {
      display: flex;
      flex-direction: column;
      gap: 0.5rem;
    }

    .stat-row {
      display: flex;
      justify-content: space-between;
      align-items: center;
      font-size: 0.8rem;
    }

    .stat-label {
      color: #9ca3af;
    }

    .stat-value {
      color: #e0e6ed;
      font-weight: 500;
    }

    .stat-item {
      display: flex;
      justify-content: space-between;
      margin-bottom: 0.5rem;
      font-size: 0.9rem;
    }

    .signal-indicator {
      position: absolute;
      bottom: 20px;
      left: 20px;
      background: rgba(0, 0, 0, 0.3);
      backdrop-filter: blur(10px);
      border-radius: 12px;
      padding: 1rem;
      display: flex;
      gap: 1rem;
      align-items: center;
    }

    .signal-light {
      width: 12px;
      height: 12px;
      border-radius: 50%;
      background: #4ade80;
      animation: pulse 2s infinite;
    }

    @keyframes pulse {

      0%,
      100% {
        opacity: 1;
      }

      50% {
        opacity: 0.5;
      }
    }

    .minimap {
      border: 1px solid rgba(255, 255, 255, 0.2);
      border-radius: 6px;
      overflow: hidden;
      background: rgba(0, 0, 0, 0.3);
      position: relative;
    }

    .minimap canvas {
      display: block;
      width: 100%;
      height: auto;
      cursor: pointer;
    }



    .selection-box {
      position: absolute;
      border: 2px dashed #667eea;
      background: rgba(102, 126, 234, 0.1);
      pointer-events: none;
      z-index: 200;
    }

    .loading-screen {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 50%, #16213e 100%);
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      z-index: 10000;
      transition: opacity 0.5s ease;
    }

    .loading-text {
      font-size: 1.5rem;
      margin-bottom: 2rem;
      font-weight: 300;
    }

    .loading-spinner {
      width: 50px;
      height: 50px;
      border: 3px solid rgba(255, 255, 255, 0.1);
      border-top: 3px solid #667eea;
      border-radius: 50%;
      animation: spin 1s linear infinite;
    }

    @keyframes spin {
      0% {
        transform: rotate(0deg);
      }

      100% {
        transform: rotate(360deg);
      }
    }

    .hidden {
      opacity: 0;
      pointer-events: none;
    }

    /* Responsive Design */
    @media screen and (max-width: 1024px) {
      .left-panel {
        width: 250px;
        min-width: 250px;
      }

      .right-panel {
        width: 280px;
        min-width: 280px;
      }
    }

    @media screen and (max-width: 768px) {
      .left-panel {
        width: 220px;
        min-width: 220px;
      }

      .right-panel {
        width: 250px;
        min-width: 250px;
      }

      .header-controls {
        gap: 0.5rem;
      }

      .btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
      }
    }

    @media screen and (max-width: 640px) {

      .left-panel,
      .right-panel {
        position: fixed;
        top: 60px;
        height: calc(100vh - 60px);
        z-index: 1000;
      }

      .left-panel {
        left: 0;
        transform: translateX(-100%);
      }

      .left-panel:not(.collapsed) {
        transform: translateX(0);
      }

      .right-panel {
        right: 0;
        transform: translateX(100%);
      }

      .right-panel:not(.collapsed) {
        transform: translateX(0);
      }

      .canvas-container {
        width: 100%;
      }

      .header-controls {
        gap: 0.25rem;
      }

      .btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.75rem;
      }
    }

    /* Modal Styles */

    /* Form Styles */

    /* Ports Section */
