        body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow-x: hidden;      /* allow vertical scroll */
    overflow-y: auto;
    background-color: #000;
    font-family: 'Inter', sans-serif;
}

/* Canvas stays behind everything and ignores clicks */
canvas {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

ul {
  list-style-type: none; /* Hides the default bullets */
  padding-left: 20px;   /* Provides overall indentation for the list */
}

li::before {
  content: "•"; /* Inserts a custom bullet character (you can use images as well) */
  margin-right: 5px; /* Adjusts the space between the bullet and the text */
  /* You can also use margin: 0 5px 0 -15px; for more specific positioning */
}


/* main scrolling content area */
.main-content {
    position: relative;
    z-index: 2;              /* above the canvas */
    max-width: 900px;
    margin: 60px auto 120px; /* below header, above footer */
    text-align: center;
    color: #ffffff;
}
        .header {
            position: fixed;
            top: 20px;
            left: 20px;
            z-index: 2;
            background: rgba(15, 23, 42, 0.85);
            padding: 20px;
            border-radius: 16px;
            color: #e2e8f0;
            backdrop-filter: blur(10px);
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
            max-width: 404px;
        }
        .header h1 {
            margin: 0;
            font-family: 'JetBrains Mono', monospace;
            font-size: 24px;
            color: #3b82f6;
            font-weight: 600;
        }
        .header p {
            margin: 10px 0 0 0;
            font-size: 14px;
            line-height: 1.6;
            color: #94a3b8;
            font-family: 'Inter', sans-serif;
        }
        .tech-stack {
            display: flex;
            gap: 16px;
            margin-top: 16px;
            padding-top: 16px;
            border-top: 1px solid rgba(148, 163, 184, 0.1);
        }
        .tech-item {
            display: flex;
            align-items: center;
            gap: 6px;
            font-size: 13px;
            color: #64748b;
            font-family: 'JetBrains Mono', monospace;
        }
        .tech-item i {
            font-size: 18px;
            color: #3b82f6;
        }
        .comment-prefix {
            color: #64748b;
            font-family: 'JetBrains Mono', monospace;
        }
        .footer {
            position: fixed;
            bottom: 20px;
            left: 50%;
            transform: translateX(-50%);
            z-index: 2;
            background: rgba(15, 23, 42, 0.85);
            padding: 12px 24px;
            border-radius: 30px;
            color: #e2e8f0;
            backdrop-filter: blur(10px);
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
            font-size: 12px;
            font-weight: 500;
            display: flex;
            align-items: center;
            gap: 6px;
        }
        .footer .heart {
            color: #ef4444;
            font-size: 18px;
            animation: pulse 1.5s ease infinite;
        }
        @keyframes pulse {
            0% { transform: scale(1); }
            50% { transform: scale(1.1); }
            100% { transform: scale(1); }
        }
        #controls {
            position: fixed;
            top: 20px;
            right: -320px;
            background: rgba(15, 23, 42, 0.95);
            padding: 20px;
            border-radius: 16px;
            color: #fff;
            z-index: 1000;
            transition: right 0.3s ease;
            width: 280px;
            backdrop-filter: blur(10px);
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
            overflow-y: auto;                 /* enables vertical scrolling */
            -webkit-overflow-scrolling: touch;/* smooth scrolling on iOS */
            max-height: calc(100vh - 24px);   /* fit inside viewport */
            overflow-x: hidden;
            box-sizing: border-box;
        }
        #controls.expanded {
            right: 20px;
        }
        #togglePanel {
            position: fixed;
            top: 20px;
            right: 20px;
            z-index: 1001;
            background: rgba(15, 23, 42, 0.95);
            color: #e2e8f0;
            border: 1px solid rgba(59, 130, 246, 0.2);
            padding: 10px 20px;
            border-radius: 8px;
            cursor: pointer;
            font-family: 'Inter', sans-serif;
            font-weight: 500;
            transition: all 0.2s ease;
            backdrop-filter: blur(4px);
        }
        #togglePanel:hover {
            background: rgba(15, 23, 42, 1);
            transform: translateY(-1px);
            border-color: rgba(59, 130, 246, 0.4);
        }
        .section {
            margin-bottom: 24px;
        }
        .section-title {
            font-size: 14px;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            color: #94a3b8;
            margin-bottom: 12px;
            padding-bottom: 8px;
            border-bottom: 1px solid rgba(148, 163, 184, 0.2);
        }
        .control-group {
            margin-bottom: 16px;
        }
        label {
            display: block;
            margin-bottom: 6px;
            font-size: 13px;
            font-weight: 500;
            color: #e2e8f0;
        }
        input[type="range"] {
            width: 100%;
            height: 6px;
            background: rgba(59, 130, 246, 0.2);
            border-radius: 3px;
            -webkit-appearance: none;
        }
        input[type="range"]::-webkit-slider-thumb {
            -webkit-appearance: none;
            width: 16px;
            height: 16px;
            background: #3b82f6;
            border-radius: 50%;
            cursor: pointer;
            transition: all 0.2s ease;
        }
        input[type="range"]::-webkit-slider-thumb:hover {
            transform: scale(1.1);
        }
        .button-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 8px;
            margin-bottom: 12px;
        }
        .special-buttons {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 12px;
            margin: 20px 0;
        }
        .special-button {
            background: rgba(59, 130, 246, 0.15) !important;
            border: 1px solid rgba(59, 130, 246, 0.3) !important;
            padding: 12px !important;
            font-size: 14px !important;
            font-weight: 600 !important;
            letter-spacing: 0.02em;
        }
        .special-button:hover {
            background: rgba(59, 130, 246, 0.25) !important;
        }
        .special-button.reset {
            background: rgba(239, 68, 68, 0.15) !important;
            border: 1px solid rgba(239, 68, 68, 0.3) !important;
            color: rgb(254, 202, 202) !important;
        }
        .special-button.reset:hover {
            background: rgba(239, 68, 68, 0.25) !important;
        }
        button {
            background: rgba(59, 130, 246, 0.1);
            border: 1px solid rgba(59, 130, 246, 0.2);
            padding: 8px 12px;
            color: #e2e8f0;
            border-radius: 6px;
            cursor: pointer;
            font-family: 'Inter', sans-serif;
            font-size: 13px;
            font-weight: 500;
            transition: all 0.2s ease;
        }
        button:hover {
            background: rgba(59, 130, 246, 0.2);
            transform: translateY(-1px);
        }
        button.active {
            background: rgba(59, 130, 246, 0.3);
            border-color: rgba(59, 130, 246, 0.4);
        }
        #fpsCounter {

        }

        .lang-switch {
  position: fixed;
  top: 12px;
  left: 18px;
  font-size: 12px;
  letter-spacing: 1px;
  opacity: 0.8;
}

.lang-switch a {
  text-decoration: none;
  color: #ccc;
}

.lang-switch a:hover {
  color: white;
}
        /* --- Mobile readability patch (add-only) --- */
.main-content {
  padding: 0 16px;
}

.main-content p,
.main-content li {
  line-height: 1.75;
  font-size: 16px;
  text-wrap: pretty;
  overflow-wrap: anywhere;
  hyphens: auto;
}

/* Prevent fixed-size elements from overflowing on small screens */
.main-content img {
  max-width: min(360px, 85vw);
  height: auto;
}

/* Make headings scale nicely */
.main-content h1 { font-size: clamp(24px, 6vw, 40px); }
.main-content h2 { font-size: clamp(18px, 4.8vw, 28px); }
.main-content h3 { font-size: clamp(16px, 4.2vw, 22px); }

/* Lists: better spacing on mobile */
.main-content ul {
  padding-left: 18px;   /* you already hide bullets and add custom bullet */
  margin: 12px 0 18px;
}
.main-content li { margin: 10px 0; }

/* Reduce the "fixed UI" footprint on phones */
@media (max-width: 640px) {
  .main-content {
    margin: 110px auto 40px;  /* leave room for fixed elements */
    text-align: left;         /* reading comfort on mobile */
  }

  /* Header: stop covering content */
  .header {
    left: 12px;
    right: 12px;
    top: 12px;
    max-width: none;
    padding: 14px;
  }

  /* Controls toggle button: smaller */
  #togglePanel {
    top: 12px;
    right: 12px;
    padding: 8px 12px;
  }

  /* Slide panel: fit smaller screens */
  #controls {
    width: min(280px, calc(100vw - 24px));
    right: calc(-1 * (min(280px, calc(100vw - 24px)) + 20px));
  }

  #controls.expanded {
    right: 12px;
  }

  /* Footer: make it non-blocking */
  .footer {
    left: 12px;
    right: 12px;
    transform: none;
    width: auto;
    justify-content: center;
    text-align: center;
    padding: 10px 14px;
    gap: 8px;
  }

  .main-content {
    max-width: 720px;
  }

  .main-content h2 {
    margin-top: 42px;
    margin-bottom: 14px;
  }

  .main-content h3 {
    margin-top: 28px;
    margin-bottom: 10px;
  }

  .main-content p {
    margin: 14px 0;
  }

  input, textarea, select {
    font-size: 16px;
  }
}
