* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  
  body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f0f2f5;
    color: #333;
    overflow: hidden;
  }
  
  .app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
  }
  
  /* Header */
  .header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    flex-shrink: 0;
  }
  
  .header-left {
    display: flex;
    align-items: center;
    gap: 30px;
  }
  
  .logo {
    font-size: 24px;
    font-weight: bold;
    color: #00d4ff;
  }
  
  .nav-items {
    display: flex;
    gap: 20px;
  }
  
  .nav-items span {
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 4px;
    transition: background-color 0.2s;
  }
  
  .nav-items span:hover {
    background-color: rgba(255, 255, 255, 0.1);
  }
  
  .header-center h1 {
    font-size: 20px;
    font-weight: 500;
  }
  
  .header-right {
    display: flex;
    gap: 20px;
  }
  
  .header-right span {
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 4px;
    transition: background-color 0.2s;
  }
  
  .header-right span:hover {
    background-color: rgba(255, 255, 255, 0.1);
  }
  
  /* Main Content */
  .main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
    min-height: 0;
  }
  
  /* Sidebars */
  .sidebar {
    width: 260px;
    min-width: 260px;
    background: #2c3e50;
    color: white;
    padding: 16px;
    overflow-y: auto;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
  }
  
  .left-sidebar {
    border-right: 1px solid #34495e;
  }
  
  .right-sidebar {
    border-left: 1px solid #34495e;
  }
  
  .sidebar-section {
    margin-bottom: 24px;
  }
  
  .sidebar-section h3 {
    color: #3498db;
    margin-bottom: 12px;
    font-size: 15px;
    border-bottom: 2px solid #3498db;
    padding-bottom: 6px;
  }
  
  .control-group {
    margin-bottom: 16px;
    padding: 10px;
    background: rgba(52, 73, 94, 0.3);
    border-radius: 6px;
    border: 1px solid rgba(52, 152, 219, 0.2);
    transition: all 0.3s ease;
  }
  
  .control-group:hover {
    background: rgba(52, 73, 94, 0.5);
    border-color: rgba(52, 152, 219, 0.4);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  }
  
  .control-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    font-weight: 600;
    color: #ecf0f1;
    cursor: pointer;
    font-size: 13px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  }
  
  .slider-container {
    display: flex;
    align-items: center;
    gap: 10px;
  }
  
  .slider-container input[type="range"] {
    flex: 1;
    height: 6px;
    background: #34495e;
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
  }
  
  .slider-container input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: #3498db;
    border-radius: 50%;
    cursor: pointer;
  }
  
  .slider-container input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: #3498db;
    border-radius: 50%;
    cursor: pointer;
    border: none;
  }
  
  .slider-container span {
    min-width: 40px;
    text-align: right;
    font-weight: bold;
    color: #3498db;
  }
  
  .option-group {
    margin-bottom: 12px;
    padding: 10px;
    background: rgba(52, 73, 94, 0.3);
    border-radius: 6px;
    border: 1px solid rgba(52, 152, 219, 0.2);
    transition: all 0.3s ease;
  }
  
  .option-group:hover {
    background: rgba(52, 73, 94, 0.5);
    border-color: rgba(52, 152, 219, 0.4);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  }
  
  .option-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #ecf0f1;
    font-size: 13px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  }
  
  .option-group select,
  .option-group input,
  .control-group select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #4a5568;
    border-radius: 6px;
    background: #1a202c;
    color: #e2e8f0;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
    line-height: 1.4;
  }
  
  /* Clean, modern select dropdowns */
  .option-group select,
  .control-group select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a0aec0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 14px;
    padding-right: 36px;
  }
  
  .option-group select:hover,
  .control-group select:hover {
    border-color: #63b3ed;
    background-color: #2d3748;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2363b3ed' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
  }
  
  .option-group input:hover {
    border-color: #63b3ed;
    background: #2d3748;
  }
  
  .option-group select:focus,
  .control-group select:focus {
    border-color: #3182ce;
    background-color: #2d3748;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233182ce' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1);
  }
  
  .option-group input:focus {
    border-color: #3182ce;
    background: #2d3748;
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1);
  }
  
  .option-group select option,
  .control-group select option {
    background: #1a202c;
    color: #e2e8f0;
    padding: 8px;
    border: none;
  }
  
  .option-group input[type="color"] {
    height: 36px;
    padding: 2px;
    cursor: pointer;
    border-radius: 6px;
  }
  
  /* Enhanced checkbox styling */
  .control-group input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
    transform: scale(1.1);
    accent-color: #3182ce;
    cursor: pointer;
  }
  
  .control-group label:has(input[type="checkbox"]) {
    cursor: pointer;
    padding: 6px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
  }
  
  .control-group label:has(input[type="checkbox"]):hover {
    background-color: rgba(49, 130, 206, 0.1);
  }
  
  /* Tower info styling */
  .tower-info {
    background: rgba(52, 152, 219, 0.1);
    padding: 8px 12px;
    border-radius: 4px;
    margin-bottom: 12px;
    font-size: 12px;
    color: #3498db;
    border: 1px solid rgba(52, 152, 219, 0.3);
  }
  
  /* Buttons */
  .component-btn,
  .primary-btn,
  .secondary-btn,
  .cta-btn {
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 6px;
  }
  
  .component-btn {
    background: #34495e;
    color: white;
    border: 1px solid #3498db;
  }
  
  .component-btn:hover {
    background: #3498db;
    transform: translateY(-1px);
  }
  
  /* Tower component buttons - special styling */
  .tower-btn {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    border: 1px solid #27ae60;
    font-weight: 600;
  }
  
  .tower-btn:hover {
    background: linear-gradient(135deg, #229954, #27ae60);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
  }
  
  .primary-btn {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
  }
  
  .primary-btn:hover {
    background: linear-gradient(135deg, #2980b9, #1f5f8b);
    transform: translateY(-1px);
  }
  
  .secondary-btn {
    background: #95a5a6;
    color: white;
  }
  
  .secondary-btn:hover {
    background: #7f8c8d;
    transform: translateY(-1px);
  }
  
  .cta-btn {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    font-size: 15px;
    padding: 12px;
  }
  
  .cta-btn:hover {
    background: linear-gradient(135deg, #c0392b, #a93226);
    transform: translateY(-1px);
  }
  
  /* Scene Container */
  .scene-container {
    flex: 1;
    position: relative;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-width: 0;
    overflow: hidden;
  }
  
  #three-container {
    width: 100%;
    height: 100%;
  }
  
  .scene-controls {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 16px;
    z-index: 100;
  }
  
  .view-controls {
    display: flex;
    background: rgba(44, 62, 80, 0.9);
    border-radius: 6px;
    padding: 6px;
    gap: 3px;
  }
  
  .view-btn {
    padding: 8px 14px;
    border: none;
    background: transparent;
    color: white;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 13px;
  }
  
  .view-btn:hover,
  .view-btn.active {
    background: #3498db;
  }
  
  .camera-controls {
    display: flex;
    background: rgba(44, 62, 80, 0.9);
    border-radius: 6px;
    padding: 6px;
  }
  
  #reset-camera {
    padding: 8px 14px;
    border: none;
    background: transparent;
    color: white;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 13px;
  }
  
  #reset-camera:hover {
    background: #e74c3c;
  }
  
  .dimension-overlay {
    position: absolute;
    top: 16px;
    left: 16px;
    background: rgba(44, 62, 80, 0.9);
    color: white;
    padding: 12px;
    border-radius: 6px;
    font-size: 13px;
    z-index: 100;
    max-width: calc(100% - 32px);
  }
  
  .dimension-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }
  
  .dimension-info span {
    display: flex;
    justify-content: space-between;
    gap: 16px;
  }
  
  /* Footer */
  .footer {
    background: #2c3e50;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
  }
  
  .footer-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    background: #34495e;
    color: white;
  }
  
  .footer-btn.primary {
    background: linear-gradient(135deg, #3498db, #2980b9);
  }
  
  .footer-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  }
  
  .controls-help {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
  }
  
  .controls-help small {
    color: #bdc3c7;
    font-size: 11px;
  }
  
  /* Responsive Design */
  @media (max-width: 1400px) {
    .sidebar {
      width: 240px;
      min-width: 240px;
    }
  
    .header-left {
      gap: 20px;
    }
  
    .nav-items {
      gap: 15px;
    }
  }
  
  @media (max-width: 1200px) {
    .sidebar {
      width: 200px;
      min-width: 200px;
      padding: 15px;
    }
  
    .sidebar-section h3 {
      font-size: 14px;
    }
  
    .component-btn,
    .primary-btn,
    .secondary-btn {
      padding: 10px;
      font-size: 13px;
    }
  
    .nav-items {
      display: none;
    }
  }
  
  @media (max-width: 1000px) {
    .main-content {
      flex-direction: column;
    }
  
    .sidebar {
      width: 100%;
      min-width: auto;
      max-height: 200px;
      padding: 10px 15px;
    }
  
    .sidebar-section {
      margin-bottom: 15px;
    }
  
    .sidebar-section h3 {
      margin-bottom: 8px;
      font-size: 13px;
    }
  
    .control-group {
      margin-bottom: 10px;
    }
  
    .scene-container {
      flex: 1;
      min-height: 400px;
    }
  
    .dimension-overlay {
      position: relative;
      top: auto;
      left: auto;
      margin: 10px;
      max-width: none;
    }
  
    .scene-controls {
      bottom: 10px;
      gap: 10px;
    }
  
    .view-btn,
    #reset-camera {
      padding: 8px 12px;
      font-size: 12px;
    }
  }
  
  @media (max-width: 768px) {
    .header {
      padding: 8px 15px;
    }
  
    .header-left {
      gap: 15px;
    }
  
    .logo {
      font-size: 20px;
    }
  
    .header-center h1 {
      font-size: 16px;
    }
  
    .header-right {
      gap: 10px;
    }
  
    .sidebar {
      max-height: 150px;
      padding: 8px 12px;
    }
  
    .sidebar-section {
      margin-bottom: 10px;
    }
  
    .sidebar-section h3 {
      font-size: 12px;
      margin-bottom: 5px;
    }
  
    .control-group {
      margin-bottom: 8px;
    }
  
    .component-btn,
    .primary-btn,
    .secondary-btn {
      padding: 8px;
      font-size: 12px;
      margin-bottom: 4px;
    }
  
    .footer {
      padding: 10px 15px;
    }
  
    .footer-btn {
      padding: 8px 15px;
      font-size: 12px;
    }
  
    .scene-controls {
      flex-direction: column;
      gap: 8px;
    }
  
    .view-controls,
    .camera-controls {
      padding: 6px;
    }
  }
  
  @media (max-width: 480px) {
    .header-left .nav-items,
    .header-right span:not(:last-child) {
      display: none;
    }
  
    .sidebar {
      max-height: 120px;
      padding: 6px 10px;
    }
  
    .sidebar-section h3 {
      font-size: 11px;
    }
  
    .component-btn,
    .primary-btn,
    .secondary-btn {
      font-size: 11px;
      padding: 6px;
    }
  
    .scene-container {
      min-height: 300px;
    }
  
    .dimension-overlay {
      font-size: 12px;
      padding: 10px;
    }
  }
  
  /* Sidebar collapse functionality for very small screens */
  @media (max-width: 600px) {
    .sidebar.collapsed {
      max-height: 60px;
      overflow: hidden;
    }
  
    .sidebar.collapsed .sidebar-section:not(:first-child) {
      display: none;
    }
  
    .sidebar-toggle {
      display: block;
      width: 100%;
      background: #3498db;
      color: white;
      border: none;
      padding: 8px;
      cursor: pointer;
      margin-bottom: 10px;
    }
  }
  
  @media (min-width: 601px) {
    .sidebar-toggle {
      display: none;
    }
  }
  