
    #menuBtn{
        position: fixed;
        top: 20px;
        left: 20px;
        z-index: 20;
        width: auto;
        padding: 12px 18px;
        border: none;
        border-radius: 14px;
        background: rgba(20,40,80,0.85);
        color: #d8ecff;
        font-size: 15px;
        cursor: pointer;
        backdrop-filter: blur(10px);
        border: 1px solid rgba(120,180,255,0.25);
        box-shadow:
            0 0 18px rgba(0,140,255,0.25);
        transition: 0.25s;
    }
    #menuBtn:hover{
        transform: translateY(-2px);
        background: rgba(40,80,140,0.95);
        box-shadow:
            0 0 24px rgba(80,180,255,0.45);
    }
    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
    }

    body {
      background: #0b0f19;
      font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
      color: #e5e7eb;
      overflow-x: hidden;
    }

    :root {
      --bg-primary: #0b0f19;
      --bg-panel: #111827;
      --bg-card: #1f2937;
      --border: #374151;
      --text-primary: #e5e7eb;
      --text-secondary: #9ca3af;
      --accent: #3b82f6;
      --accent-glow: rgba(59, 130, 246, 0.3);
      --success: #10b981;
      --danger: #ef4444;
      --warning: #f59e0b;
    }

    .physics-container {
      display: flex;
      flex-wrap: wrap;
      gap: 20px;
      padding: 20px;
      background: var(--bg-primary);
      min-height: 100vh;
      box-sizing: border-box;
    }

    .canvas-area {
      flex: 2;
      min-width: 400px;
      background: var(--bg-panel);
      border-radius: 16px;
      border: 1px solid var(--border);
      padding: 20px;
      position: relative;
      overflow: hidden;
    }

    .canvas-area::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background:
        radial-gradient(circle at 20% 80%, rgba(59, 130, 246, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(16, 185, 129, 0.05) 0%, transparent 50%);
      pointer-events: none;
    }

    .canvas-title {
      font-size: 18px;
      font-weight: 600;
      color: var(--text-primary);
      margin-bottom: 12px;
      display: flex;
      align-items: center;
      gap: 8px;
      justify-content: flex-end; 
    }

    .canvas-title::before {
      content: '';
      width: 4px;
      height: 20px;
      background: var(--accent);
      border-radius: 2px;
    }

    #physicsCanvas {
      width: 100%;
      height: auto;
      display: block;
      border-radius: 8px;
      background: #0d1117;
      border: 1px solid var(--border);
    }

    .control-area {
      flex: 1;
      min-width: 320px;
      display: flex;
      flex-direction: column;
      gap: 16px;
    }

    .control-card {
      background: var(--bg-card);
      border-radius: 12px;
      border: 1px solid var(--border);
      padding: 20px;
      position: relative;
      overflow: hidden;
    }

    .control-card::after {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      height: 2px;
      background: linear-gradient(90deg, var(--accent), transparent);
    }

    .card-title {
      font-size: 14px;
      font-weight: 600;
      color: var(--accent);
      text-transform: uppercase;
      letter-spacing: 1px;
      margin-bottom: 16px;
    }

    .slider-group {
      margin-bottom: 20px;
    }

    .slider-label {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 8px;
      font-size: 13px;
      color: var(--text-secondary);
    }

    .slider-value {
      color: var(--accent);
      font-weight: 600;
      font-family: 'Courier New', monospace;
      background: rgba(59, 130, 246, 0.1);
      padding: 2px 8px;
      border-radius: 4px;
    }

    input[type="range"] {
      -webkit-appearance: none;
      width: 100%;
      height: 6px;
      background: var(--border);
      border-radius: 3px;
      outline: none;
    }

    input[type="range"]::-webkit-slider-thumb {
      -webkit-appearance: none;
      width: 18px;
      height: 18px;
      background: var(--accent);
      border-radius: 50%;
      cursor: pointer;
      box-shadow: 0 0 10px var(--accent-glow);
      border: 2px solid #fff;
    }

    input[type="range"]::-moz-range-thumb {
      width: 18px;
      height: 18px;
      background: var(--accent);
      border-radius: 50%;
      cursor: pointer;
      border: 2px solid #fff;
      box-shadow: 0 0 10px var(--accent-glow);
    }

    .toggle-group {
      display: flex;
      flex-direction: column;
      gap: 12px;
    }

    .toggle-item {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 10px 14px;
      background: var(--bg-panel);
      border-radius: 8px;
      border: 1px solid var(--border);
      transition: all 0.2s;
    }

    .toggle-item:hover {
      border-color: var(--accent);
    }

    .toggle-item label {
      font-size: 13px;
      color: var(--text-secondary);
      cursor: pointer;
    }

    .switch {
      position: relative;
      display: inline-block;
      width: 44px;
      height: 24px;
    }

    .switch input {
      opacity: 0;
      width: 0;
      height: 0;
    }

    .slider-switch {
      position: absolute;
      cursor: pointer;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: var(--border);
      transition: 0.3s;
      border-radius: 24px;
    }

    .slider-switch::before {
      position: absolute;
      content: '';
      height: 18px;
      width: 18px;
      left: 3px;
      bottom: 3px;
      background: white;
      transition: 0.3s;
      border-radius: 50%;
    }

    input:checked + .slider-switch {
      background: var(--accent);
    }

    input:checked + .slider-switch::before {
      transform: translateX(20px);
    }

    .force-display {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 10px;
    }

    .force-item {
      background: var(--bg-panel);
      border-radius: 8px;
      padding: 12px;
      border: 1px solid var(--border);
      text-align: center;
      transition: all 0.2s;
    }

    .force-item:hover {
      border-color: var(--accent);
      transform: translateY(-2px);
    }

    .force-name {
      font-size: 12px;
      color: var(--text-secondary);
      margin-bottom: 4px;
    }

    .force-value {
      font-size: 16px;
      font-weight: 700;
      font-family: 'Courier New', monospace;
    }

    .force-g {
      color: var(--success);
    }

    .force-f {
      color: var(--danger);
    }

    .force-n {
      color: var(--warning);
    }

    .legend {
      display: flex;
      flex-wrap: wrap;
      gap: 12px;
      margin-top: 12px;
      padding-top: 12px;
      border-top: 1px solid var(--border);
    }

    .legend-item {
      display: flex;
      align-items: center;
      gap: 6px;
      font-size: 12px;
      color: var(--text-secondary);
    }

    .legend-color {
      width: 12px;
      height: 12px;
      border-radius: 2px;
    }

    .info-text {
      font-size: 12px;
      color: var(--text-secondary);
      line-height: 1.6;
      margin-top: 8px;
    }

    .triangle-info {
      background: var(--bg-panel);
      border-radius: 8px;
      padding: 12px;
      margin-top: 12px;
      border: 1px dashed var(--border);
    }

    .triangle-info-title {
      font-size: 12px;
      color: var(--accent);
      font-weight: 600;
      margin-bottom: 8px;
    }

    .triangle-row {
      display: flex;
      justify-content: space-between;
      font-size: 12px;
      color: var(--text-secondary);
      padding: 4px 0;
      border-bottom: 1px solid var(--border);
    }

    .triangle-row:last-child {
      border-bottom: none;
    }

    @media (max-width: 800px) {
      .physics-container {
        flex-direction: column;
      }

      .canvas-area,
      .control-area {
        min-width: auto;
        width: 100%;
      }
    }