{ lib, pkgs, config, ... }: {
  config = lib.mkIf (config.usercfg.wm == "Wayland") {
    programs.hyprlock = {
      enable = true;
      settings = {
        general = {
          grace = 5;                        # grace=5
          no_fade_in = false;               # fade-in=0.2 (handled dynamically)
          ignore_empty_input = true;        # ignore-empty-password
        };

        background = [
          # 1. OLED MONITOR (Pure Black) 
          {
            monitor = "desc:LG Electronics LG ULTRAGEAR+ 511NTDVGC194";
            color = "rgba(0,0,0,1.0)";      # Pure black OLED protection
            path = "";                      # Explicitly no screenshot
            zindex = 0;   
          }
          # 2. ALL OTHER MONITORS (Pixelated Screenshot)
          {
            monitor = "";
            path = "screenshot";            # screenshots
            blur_passes = 2;                # effect-pixelate=5 approximation
            blur_size = 4;
            noise = 0.01;
            zindex = -1;   
          }
        ];

        input-field = {
          monitor = "";
          placeholder_text = "";
          fail_text = "";

          size = "200, 200";                # Custom sizing matching indicator-radius
          outline_thickness = 30;           # indicator-thickness=30
          
          dots_size = 0.33;
          dots_spacing = 0.15;
          dots_center = true;
          fade_on_empty = true;
          hide_input = true;
          dots_text_format = "*";
          font_family = "IBM Plex Mono";    # font=IBM Plex Mono
          
          # --- Outer Rings / Outline Colors ---
          # key-hl-color, bs-hl-color, caps-lock-key-hl-color
          check_color = "rgb(${config.colorScheme.palette.base0C})";       # key-hl
          fail_color = "rgb(${config.colorScheme.palette.base0F})";        # inside-wrong
          capslock_color = "rgb(${config.colorScheme.palette.base09})";    # caps-lock-key-hl
          
          # --- Inner/Outer Core Colors ---
          # Replicating your transparent rings with solid action states
          outer_color = "rgba(${config.colorScheme.palette.base00}00)";    # ring-color (Transparent)
          inner_color = "rgba(${config.colorScheme.palette.base0C}00)";    # inside-color (Transparent)
          font_color = "rgba(${config.colorScheme.palette.base00}00)";     # text-color (Transparent)

          fail_transition = 300;
        };
      };
    };
    xdg.configFile."swaylock/config".text = ''
      screenshots
      grace-no-mouse
      grace-no-touch
      grace=5
      effect-pixelate=5
      fade-in=0.2

      ignore-empty-password
      font=IBM Plex Mono

      color=${config.colorScheme.palette.base00}00

      indicator-radius=100
      indicator-thickness=30

      separator-color=${config.colorScheme.palette.base00}00

      inside-color=${config.colorScheme.palette.base0C}00
      inside-clear-color=${config.colorScheme.palette.base08}FF
      inside-caps-lock-color=${config.colorScheme.palette.base09}00
      inside-ver-color=${config.colorScheme.palette.base0C}FF
      inside-wrong-color=${config.colorScheme.palette.base0F}FF


      ring-color=${config.colorScheme.palette.base00}00
      ring-clear-color=${config.colorScheme.palette.base00}00
      ring-caps-lock-color=${config.colorScheme.palette.base00}00
      ring-ver-color=${config.colorScheme.palette.base00}00
      ring-wrong-color=${config.colorScheme.palette.base00}00

      line-color=${config.colorScheme.palette.base00}00
      line-clear-color=${config.colorScheme.palette.base00}00
      line-caps-lock-color=${config.colorScheme.palette.base00}00
      line-ver-color=${config.colorScheme.palette.base00}00
      line-wrong-color=${config.colorScheme.palette.base00}00

      text-color=${config.colorScheme.palette.base00}00
      text-clear-color=${config.colorScheme.palette.base00}00
      text-caps-lock-color=${config.colorScheme.palette.base00}00
      text-ver-color=${config.colorScheme.palette.base00}00
      text-wrong-color=${config.colorScheme.palette.base00}00


      key-hl-color=${config.colorScheme.palette.base0C}FF
      bs-hl-color=${config.colorScheme.palette.base08}FF
      caps-lock-key-hl-color=${config.colorScheme.palette.base09}FF
      caps-lock-bs-hl-color=${config.colorScheme.palette.base09}FF
    '';
  };
}
